Quittio next API

BuildsParties

Seller, buyer, payee and tax representative (BG-4, BG-7, BG-10, BG-11).

Part of InvoiceBuilder, which holds the state; use the builder, not the trait.

Table of Contents

Methods

buyer()  : static
The buyer (BG-7): a BuyerParty, a PartyBuilder (Party::make()) or an application model (ProvidesParty), e.g. ->buyer($customer), replace the buyer set before; a callable receives the builder of the buyer set before and changes it.
payee()  : static
Payee (BG-10), if different from the seller (e.g. a factoring company): the name with the identifier (BT-60) and the legal registration identifier (BT-61) and their schemes, a PartyBuilder (Party::make('Factoring AG')->identifier(…)), a PayeeParty, or a callable that receives a PartyBuilder and, like seller() and buyer(), continues an earlier payee.
seller()  : static
The seller (BG-4).
taxRepresentative()  : static
The seller's tax representative (BG-11): name (BT-62), VAT identifier (BT-63) and postal address (BG-12).

Methods

payee()

Payee (BG-10), if different from the seller (e.g. a factoring company): the name with the identifier (BT-60) and the legal registration identifier (BT-61) and their schemes, a PartyBuilder (Party::make('Factoring AG')->identifier(…)), a PayeeParty, or a callable that receives a PartyBuilder and, like seller() and buyer(), continues an earlier payee.

public payee(PayeeParty|PartyBuilder|string|callable(PartyBuilder): mixed $payee[, string|null $identifier = null ][, string|null $legalRegistration = null ][, IdentifierScheme|RawCode|string|null $identifierScheme = null ][, IdentifierScheme|RawCode|string|null $legalRegistrationScheme = null ]) : static
Parameters
$payee : PayeeParty|PartyBuilder|string|callable(PartyBuilder): mixed
$identifier : string|null = null
$legalRegistration : string|null = null
$identifierScheme : IdentifierScheme|RawCode|string|null = null
$legalRegistrationScheme : IdentifierScheme|RawCode|string|null = null
Tags
throws
InvalidArgumentException

for identifiers or schemes next to a PayeeParty or a callable

Return values
static

seller()

The seller (BG-4).

public seller(SellerParty|PartyBuilder|ProvidesParty|callable(PartyBuilder): mixed $seller) : static

A SellerParty, a PartyBuilder (Party::make()) or an application model (ProvidesParty) replaces the seller set before. If the builder was started with the defaults of a seller (applyDefaults(), e.g. Quittio::invoice() with the seller of config/quittio.php or the current Managed issuer), another seller gets nothing of them: everything they set is removed again, i.e. the bank account and the small business flag, for a Managed issuer also payment terms, presentation, locale, time zone and currency. Values the caller set on the builder stay, also when they were set before seller().

A callable receives the builder of the seller set before and changes it, e.g. ->seller(fn ($s) => $s->contact('Max Muster')); the seller stays the same, and so do its defaults.

Parameters
$seller : SellerParty|PartyBuilder|ProvidesParty|callable(PartyBuilder): mixed
Return values
static

taxRepresentative()

The seller's tax representative (BG-11): name (BT-62), VAT identifier (BT-63) and postal address (BG-12).

public taxRepresentative(string $name, string $vatId, Address $address) : static
Parameters
$name : string
$vatId : string
$address : Address
Return values
static
On this page

Search results