Overview
TheParty class represents an organization, sub-organization, or individual fulfilling a role in a business process. Itβs one of the most commonly used aggregate components in UBL documents, particularly in invoices where it represents buyers, sellers, and other parties involved in the transaction.
Class Definition
Constructor Parameters
The partyβs postal address
Tax schemes applying to this party
Description of this party as a legal entity
An identifier for the end point of the routing service (e.g., EAN Location Number, GLN)
An indicator that this party is βcare ofβ (c/o) (true) or not (false)
An indicator that this party is βfor the attention ofβ (FAO) (true) or not (false)
The URI that identifies this partyβs web site
An identifier for this partyβs logo
This partyβs Industry Classification Code
An array of identifiers for this party
An array of names for this party
The language associated with this party
The primary contact for this party
Methods
addPartyName()
Adds a party name to the party.The party name to add. Can be a PartyName instance or a string.
addPartyTaxScheme()
Adds a tax scheme to the party.The tax scheme to add
addPartyLegalEntity()
Adds a legal entity description to the party.The party legal entity to add
addPartyIdentification()
Adds an identification to the party.The party identification to add
setContact()
Sets the primary contact for the party.The contact information
setPhysicalLocation()
Sets the physical location of the party.The physical location
getTaxSchemes()
Returns the array of tax schemes for this party.Array of tax schemes
Usage Example
Creating a Supplier Party for an Invoice
The Party class is exported under multiple aliases including
IssuerParty, TaxRepresentativeParty, CarrierParty, DeliveryParty, NotifyParty, and DespatchParty. These all refer to the same Party class but provide semantic meaning when used in different contexts.Related Components
- Address - For address information
- PostalAddress - For postal address information
- Contact - For contact details
- PartyTaxScheme - For tax registration information
- PartyLegalEntity - For legal entity information
- PartyIdentification - For party identifiers
- PartyName - For party names