class
Zugpferd::Invoice::Builder
- Zugpferd::Invoice::Builder
- Reference
- Object
Overview
Mutable builder used inside the Invoice.build block.
Set #document, #seller, #buyer, and #settlement before the block exits.
Defined in:
zugpferd/invoice.crConstructors
Instance Method Summary
-
#add_line_item(item : SupplyChainTradeLineItem) : self
Appends item to the line items and returns
selffor chaining. -
#build : Invoice
Constructs the
Invoice. - #buyer : TradeParty | Nil
- #buyer=(buyer : TradeParty | Nil)
- #buyer_order_reference : String | Nil
- #buyer_order_reference=(buyer_order_reference : String | Nil)
- #contract_reference : String | Nil
- #contract_reference=(contract_reference : String | Nil)
- #delivery_date : Time | Nil
- #delivery_date=(delivery_date : Time | Nil)
- #despatch_advice_reference : String | Nil
- #despatch_advice_reference=(despatch_advice_reference : String | Nil)
- #document : ExchangedDocument | Nil
- #document=(document : ExchangedDocument | Nil)
- #line_items : Array(SupplyChainTradeLineItem)
- #line_items=(line_items : Array(SupplyChainTradeLineItem))
- #profile : Profile
- #profile=(profile : Profile)
- #seller : TradeParty | Nil
- #seller=(seller : TradeParty | Nil)
- #settlement : TradeSettlement | Nil
- #settlement=(settlement : TradeSettlement | Nil)
Constructor Detail
Instance Method Detail
Appends item to the line items and returns self for chaining.
Constructs the Invoice. Raises GenerationError if document, seller, buyer,
or settlement have not been assigned.