Class: CargowiseTS::Invoice
- Inherits:
-
AbstractResult
- Object
- AbstractResult
- CargowiseTS::Invoice
- Defined in:
- lib/cargowise-ts/invoice.rb
Overview
An invoice that is associated with a Shipment. Not built directly, but available via the invoices() attribute of the Shipment model.
Instance Attribute Summary collapse
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#due_date ⇒ Object
readonly
Returns the value of attribute due_date.
-
#issuer ⇒ Object
readonly
Returns the value of attribute issuer.
-
#link ⇒ Object
readonly
Returns the value of attribute link.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#outstanding ⇒ Object
readonly
Returns the value of attribute outstanding.
-
#total ⇒ Object
readonly
Returns the value of attribute total.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(node) ⇒ Invoice
constructor
A new instance of Invoice.
Methods inherited from AbstractResult
Constructor Details
#initialize(node) ⇒ Invoice
Returns a new instance of Invoice.
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/cargowise-ts/invoice.rb', line 17 def initialize(node) @node = node @number = text_value("./InvoiceNumber") @issuer = text_value("./IssuerName") @date = time_value("./InvoiceDate") @due_date = time_value("./DueDate") @currency = text_value("./Currency") @total = decimal_value("./TotalAmount") @outstanding = decimal_value("./OutstandingAmount") @link = text_value("./Link") end |
Instance Attribute Details
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
14 15 16 |
# File 'lib/cargowise-ts/invoice.rb', line 14 def currency @currency end |
#date ⇒ Object (readonly)
Returns the value of attribute date.
13 14 15 |
# File 'lib/cargowise-ts/invoice.rb', line 13 def date @date end |
#due_date ⇒ Object (readonly)
Returns the value of attribute due_date.
13 14 15 |
# File 'lib/cargowise-ts/invoice.rb', line 13 def due_date @due_date end |
#issuer ⇒ Object (readonly)
Returns the value of attribute issuer.
13 14 15 |
# File 'lib/cargowise-ts/invoice.rb', line 13 def issuer @issuer end |
#link ⇒ Object (readonly)
Returns the value of attribute link.
15 16 17 |
# File 'lib/cargowise-ts/invoice.rb', line 15 def link @link end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
13 14 15 |
# File 'lib/cargowise-ts/invoice.rb', line 13 def number @number end |
#outstanding ⇒ Object (readonly)
Returns the value of attribute outstanding.
14 15 16 |
# File 'lib/cargowise-ts/invoice.rb', line 14 def outstanding @outstanding end |
#total ⇒ Object (readonly)
Returns the value of attribute total.
14 15 16 |
# File 'lib/cargowise-ts/invoice.rb', line 14 def total @total end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
13 14 15 |
# File 'lib/cargowise-ts/invoice.rb', line 13 def type @type end |