Quittio 0.3 API

PartyBuilder
in package

FinalYes

Fluent builder for the seller (BG-4), the buyer (BG-7) and the payee (BG-10).

Table of Contents

Methods

additionalLegalInfo()  : self
The seller's additional legal information (BT-33), e.g. legal form and share capital; ignored for the buyer.
address()  : self
Postal address (seller BG-5, buyer BG-8); the country code (ISO 3166-1 alpha-2) is uppercased. Required for seller and buyer.
buildBuyer()  : BuyerParty
The buyer party (BG-7).
buildPayee()  : PayeeParty
Payee (BG-10): name, the first identifier (BT-60) and the legal registration (BT-61); the other values of the builder do not belong to the payee.
buildSeller()  : SellerParty
The seller party (BG-4).
consumer()  : self
Marks the buyer as a consumer (B2C): gross prices, no e-invoice obligation.
contact()  : self
Contact (seller BG-6, buyer BG-9): name, phone and e-mail. XRechnung requires all three for the seller.
countryCode()  : string|null
Country code of the postal address set so far (BT-40, BT-55), e.g. for defaults that depend on the seller's country.
electronicAddress()  : self
Electronic address (seller BT-34, buyer BT-49) with its EAS scheme; default e-mail (EM).
fromBuyer()  : self
A builder with the values of an existing buyer.
fromModel()  : self
Lets an application model fill this builder (ProvidesParty).
fromPayee()  : self
A builder with the values of an existing payee.
fromSeller()  : self
A builder with the values of an existing seller, e.g. to change one of them.
identifier()  : self
Adds an identifier (BT-29 seller, BT-46 buyer, BT-60 payee), e.g. a GLN or the customer number. Buyer and payee take the first one.
legalRegistration()  : self
Legal registration identifier, e.g. the commercial register number (seller BT-30, buyer BT-47, payee BT-61), with its scheme.
name()  : self
Legal name: seller BT-27, buyer BT-44, payee BT-59. Required.
postalAddress()  : self
Postal address as object, see address().
taxNumber()  : self
The seller's tax registration number (BT-32), e.g. the German Steuernummer; ignored for the buyer.
tradingName()  : self
Trading name: seller BT-28, buyer BT-45; null removes it.
vatId()  : self
VAT identifier with country prefix, e.g. "DE123456789" (seller BT-31, buyer BT-48); uppercased, spaces removed; null removes it.

Methods

additionalLegalInfo()

The seller's additional legal information (BT-33), e.g. legal form and share capital; ignored for the buyer.

public additionalLegalInfo(string|null $info) : self
Parameters
$info : string|null
Return values
self

address()

Postal address (seller BG-5, buyer BG-8); the country code (ISO 3166-1 alpha-2) is uppercased. Required for seller and buyer.

public address(string|null $line1, string|null $postcode, string|null $city, string $countryCode[, string|null $line2 = null ][, string|null $line3 = null ][, string|null $subdivision = null ]) : self
Parameters
$line1 : string|null
$postcode : string|null
$city : string|null
$countryCode : string
$line2 : string|null = null
$line3 : string|null = null
$subdivision : string|null = null
Return values
self

buildPayee()

Payee (BG-10): name, the first identifier (BT-60) and the legal registration (BT-61); the other values of the builder do not belong to the payee.

public buildPayee() : PayeeParty
Return values
PayeeParty

consumer()

Marks the buyer as a consumer (B2C): gross prices, no e-invoice obligation.

public consumer([bool $consumer = true ]) : self
Parameters
$consumer : bool = true
Return values
self

contact()

Contact (seller BG-6, buyer BG-9): name, phone and e-mail. XRechnung requires all three for the seller.

public contact([string|null $name = null ][, string|null $phone = null ][, string|null $email = null ]) : self
Parameters
$name : string|null = null
$phone : string|null = null
$email : string|null = null
Return values
self

countryCode()

Country code of the postal address set so far (BT-40, BT-55), e.g. for defaults that depend on the seller's country.

public countryCode() : string|null
Return values
string|null

fromBuyer()

A builder with the values of an existing buyer.

public static fromBuyer(BuyerParty $buyer) : self
Parameters
$buyer : BuyerParty
Return values
self

fromPayee()

A builder with the values of an existing payee.

public static fromPayee(PayeeParty $payee) : self
Parameters
$payee : PayeeParty
Return values
self

fromSeller()

A builder with the values of an existing seller, e.g. to change one of them.

public static fromSeller(SellerParty $seller) : self
Parameters
$seller : SellerParty
Return values
self

identifier()

Adds an identifier (BT-29 seller, BT-46 buyer, BT-60 payee), e.g. a GLN or the customer number. Buyer and payee take the first one.

public identifier(string $value[, IdentifierScheme|RawCode|string|null $scheme = null ]) : self
Parameters
$value : string
$scheme : IdentifierScheme|RawCode|string|null = null
Return values
self

legalRegistration()

Legal registration identifier, e.g. the commercial register number (seller BT-30, buyer BT-47, payee BT-61), with its scheme.

public legalRegistration(string|null $value[, IdentifierScheme|RawCode|string|null $scheme = null ]) : self
Parameters
$value : string|null
$scheme : IdentifierScheme|RawCode|string|null = null
Return values
self

name()

Legal name: seller BT-27, buyer BT-44, payee BT-59. Required.

public name(string $name) : self
Parameters
$name : string
Return values
self

postalAddress()

Postal address as object, see address().

public postalAddress(Address $address) : self
Parameters
$address : Address
Return values
self

taxNumber()

The seller's tax registration number (BT-32), e.g. the German Steuernummer; ignored for the buyer.

public taxNumber(string|null $taxNumber) : self
Parameters
$taxNumber : string|null
Return values
self

tradingName()

Trading name: seller BT-28, buyer BT-45; null removes it.

public tradingName(string|null $tradingName) : self
Parameters
$tradingName : string|null
Return values
self

vatId()

VAT identifier with country prefix, e.g. "DE123456789" (seller BT-31, buyer BT-48); uppercased, spaces removed; null removes it.

public vatId(string|null $vatId) : self
Parameters
$vatId : string|null
Return values
self
On this page

Search results