class Zugpferd::Invoice::Builder

Overview

Mutable builder used inside the Invoice.build block. Set #document, #seller, #buyer, and #settlement before the block exits.

Defined in:

zugpferd/invoice.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(profile : Profile) #

[View source]

Instance Method Detail

def add_line_item(item : SupplyChainTradeLineItem) : self #

Appends item to the line items and returns self for chaining.


[View source]
def build : Invoice #

Constructs the Invoice. Raises GenerationError if document, seller, buyer, or settlement have not been assigned.


[View source]
def buyer : TradeParty | Nil #

[View source]
def buyer=(buyer : TradeParty | Nil) #

[View source]
def buyer_order_reference : String | Nil #

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

[View source]
def contract_reference : String | Nil #

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

[View source]
def delivery_date : Time | Nil #

[View source]
def delivery_date=(delivery_date : Time | Nil) #

[View source]
def despatch_advice_reference : String | Nil #

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

[View source]
def document : ExchangedDocument | Nil #

[View source]
def document=(document : ExchangedDocument | Nil) #

[View source]
def line_items : Array(SupplyChainTradeLineItem) #

[View source]
def line_items=(line_items : Array(SupplyChainTradeLineItem)) #

[View source]
def profile : Profile #

[View source]
def profile=(profile : Profile) #

[View source]
def seller : TradeParty | Nil #

[View source]
def seller=(seller : TradeParty | Nil) #

[View source]
def settlement : TradeSettlement | Nil #

[View source]
def settlement=(settlement : TradeSettlement | Nil) #

[View source]