Class: GOBL::Bill::Invoice

Inherits:
Object show all
Defined in:
lib/gobl/bill/invoice.rb

Overview

Invoice represents a payment claim for goods or services supplied under conditions agreed between the supplier and the customer.

Constant Summary collapse

SCHEMA_ID =

The Schema ID of the GOBL Invoice structure

'https://gobl.org/draft-0/bill/invoice'

Constants included from Hashme

Hashme::Boolean

Instance Attribute Summary collapse

Method Summary

Methods inherited from Object

new

Methods inherited from Struct

#as_json, from_data, from_json!, #to_json

Instance Attribute Details

#chargesArray<Charge> (readonly)

Charges or surcharges applied to the complete invoice

Returns:



98
# File 'lib/gobl/bill/invoice.rb', line 98

property :charges, [Charge]

#codeString (readonly)

Sequential code used to identify this invoice in tax declarations.

Returns:

  • (String)


24
# File 'lib/gobl/bill/invoice.rb', line 24

property :code, String

#currencyGOBL::Currency::Code (readonly)

Currency for all invoice totals.



40
# File 'lib/gobl/bill/invoice.rb', line 40

property :currency, GOBL::Currency::Code

#customerGOBL::Org::Party (readonly)

Legal entity receiving the goods or services, may be empty in certain circumstances such as simplified invoices.

Returns:



83
# File 'lib/gobl/bill/invoice.rb', line 83

property :customer, GOBL::Org::Party

#deliveryDelivery (readonly)

Returns:



115
# File 'lib/gobl/bill/invoice.rb', line 115

property :delivery, Delivery

#discountsArray<Discount> (readonly)

Discounts or allowances applied to the complete invoice

Returns:



93
# File 'lib/gobl/bill/invoice.rb', line 93

property :discounts, [Discount]

#exchange_ratesExchangeRates (readonly)

Exchange rates to be used when converting the invoices monetary values into other currencies.

Returns:



46
# File 'lib/gobl/bill/invoice.rb', line 46

property :exchange_rates, ExchangeRates

#issue_dateGOBL::Cal::Date (readonly)

When the invoice was created.

Returns:



61
# File 'lib/gobl/bill/invoice.rb', line 61

property :issue_date, GOBL::Cal::Date

#linesArray<Line> (readonly)

List of invoice lines representing each of the items sold to the customer.

Returns:



88
# File 'lib/gobl/bill/invoice.rb', line 88

property :lines, [Line]

#metaGOBL::CBC::Meta (readonly)

Additional semi-structured data that doesn’t fit into the body of the invoice.

Returns:



130
# File 'lib/gobl/bill/invoice.rb', line 130

property :meta, GOBL::CBC::Meta

#notesArray<GOBL::CBC::Note> (readonly)

Unstructured information that is relevant to the invoice, such as correction or additional legal details.

Returns:



125
# File 'lib/gobl/bill/invoice.rb', line 125

property :notes, [GOBL::CBC::Note]

#op_dateGOBL::Cal::Date (readonly)

Date when the operation defined by the invoice became effective.

Returns:



67
# File 'lib/gobl/bill/invoice.rb', line 67

property :op_date, GOBL::Cal::Date

#orderingOrdering (readonly)

Returns:



107
# File 'lib/gobl/bill/invoice.rb', line 107

property :ordering, Ordering

#outlaysArray<Outlay> (readonly)

Expenses paid for by the supplier but invoiced directly to the customer.

Returns:



103
# File 'lib/gobl/bill/invoice.rb', line 103

property :outlays, [Outlay]

#paymentPayment (readonly)

Returns:



111
# File 'lib/gobl/bill/invoice.rb', line 111

property :payment, Payment

#precedingArray<Preceding> (readonly)

Key information regarding previous invoices and potentially details as to why they were corrected.

Returns:



56
# File 'lib/gobl/bill/invoice.rb', line 56

property :preceding, [Preceding]

#seriesString (readonly)

Used in addition to the Code in some regions.

Returns:

  • (String)


30
# File 'lib/gobl/bill/invoice.rb', line 30

property :series, String

#supplierGOBL::Org::Party (readonly)

The taxable entity supplying the goods or services.

Returns:



77
# File 'lib/gobl/bill/invoice.rb', line 77

property :supplier, GOBL::Org::Party

#taxTax (readonly)

Special tax configuration for billing.

Returns:



51
# File 'lib/gobl/bill/invoice.rb', line 51

property :tax, Tax

#totalsTotals (readonly)

Summary of all the invoice totals, including taxes (calculated).

Returns:



120
# File 'lib/gobl/bill/invoice.rb', line 120

property :totals, Totals

#typeInvoiceType (readonly)

Optional invoice type, leave empty unless needed for a specific situation.

Returns:



35
# File 'lib/gobl/bill/invoice.rb', line 35

property :type, InvoiceType

#uuidGOBL::UUID::UUID (readonly)

Unique document ID. Not required, but always recommended in addition to the Code.

Returns:



19
# File 'lib/gobl/bill/invoice.rb', line 19

property :uuid, GOBL::UUID::UUID

#value_dateGOBL::Cal::Date (readonly)

When the taxes of this invoice become accountable, if none set, the issue date is used.

Returns:



72
# File 'lib/gobl/bill/invoice.rb', line 72

property :value_date, GOBL::Cal::Date