struct Zugpferd::TradeParty

Overview

Represents a trade party — either the seller (BG-4) or the buyer (BG-7). Used for both SellerTradeParty and BuyerTradeParty in the CII XML.

Defined in:

zugpferd/trade_party.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(name : String, *, address : TradeAddress | Nil = nil, tax_registrations : Array(TaxRegistration) = [] of TaxRegistration, contact_name : String | Nil = nil, contact_phone : String | Nil = nil, contact_email : String | Nil = nil, global_id : String | Nil = nil, global_id_scheme : String | Nil = nil, electronic_address : String | Nil = nil, electronic_address_scheme : String | Nil = nil) #

[View source]

Instance Method Detail

def address : TradeAddress | Nil #

Postal address (BG-5 for seller, BG-8 for buyer). Required for BASIC_WL and above; only country_id is emitted for MINIMUM.


[View source]
def address=(address : TradeAddress | Nil) #

Postal address (BG-5 for seller, BG-8 for buyer). Required for BASIC_WL and above; only country_id is emitted for MINIMUM.


[View source]
def contact_email : String | Nil #

Contact e-mail address (BT-43). Only emitted for BASIC_WL and above.


[View source]
def contact_email=(contact_email : String | Nil) #

Contact e-mail address (BT-43). Only emitted for BASIC_WL and above.


[View source]
def contact_name : String | Nil #

Contact person name (BT-41). Only emitted for BASIC_WL and above.


[View source]
def contact_name=(contact_name : String | Nil) #

Contact person name (BT-41). Only emitted for BASIC_WL and above.


[View source]
def contact_phone : String | Nil #

Contact telephone number (BT-42). Only emitted for BASIC_WL and above.


[View source]
def contact_phone=(contact_phone : String | Nil) #

Contact telephone number (BT-42). Only emitted for BASIC_WL and above.


[View source]
def electronic_address : String | Nil #

Electronic address used for routing (BT-34 for seller, BT-49 for buyer). Scheme "EM" = e-mail; "9930" = DE:VAT (used in PEPPOL). Only emitted for BASIC_WL and above.


[View source]
def electronic_address=(electronic_address : String | Nil) #

Electronic address used for routing (BT-34 for seller, BT-49 for buyer). Scheme "EM" = e-mail; "9930" = DE:VAT (used in PEPPOL). Only emitted for BASIC_WL and above.


[View source]
def electronic_address_scheme : String | Nil #

Scheme identifier for #electronic_address (BT-34-1 / BT-49-1); defaults to "EM".


[View source]
def electronic_address_scheme=(electronic_address_scheme : String | Nil) #

Scheme identifier for #electronic_address (BT-34-1 / BT-49-1); defaults to "EM".


[View source]
def global_id : String | Nil #

Global identifier for the party (BT-29 for seller, BT-46 for buyer). Common scheme codes: "0088" = GS1 GLN, "0060" = DUNS.


[View source]
def global_id=(global_id : String | Nil) #

Global identifier for the party (BT-29 for seller, BT-46 for buyer). Common scheme codes: "0088" = GS1 GLN, "0060" = DUNS.


[View source]
def global_id_scheme : String | Nil #

Scheme identifier for #global_id (BT-29-1 / BT-46-1), e.g. "0088".


[View source]
def global_id_scheme=(global_id_scheme : String | Nil) #

Scheme identifier for #global_id (BT-29-1 / BT-46-1), e.g. "0088".


[View source]
def name : String #

Legal or trading name of the party (BT-27 for seller, BT-44 for buyer).


[View source]
def name=(name : String) #

Legal or trading name of the party (BT-27 for seller, BT-44 for buyer).


[View source]
def tax_registrations : Array(TaxRegistration) #

VAT and tax number registrations (BT-31/32 for seller, BT-63/64 for buyer). At least one entry with scheme VA (VAT ID) is required for BASIC and above.


[View source]
def tax_registrations=(tax_registrations : Array(TaxRegistration)) #

VAT and tax number registrations (BT-31/32 for seller, BT-63/64 for buyer). At least one entry with scheme VA (VAT ID) is required for BASIC and above.


[View source]