Class: GOBL::Bill::Invoice

Inherits:
Object show all
Defined in:
lib/generated/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'
TYPE_ENUM =

Enumeration of possible values for #type with their corresponding descriptions

{
  'standard' => 'A regular commercial invoice document between a supplier and customer.',
  'proforma' => 'For a clients validation before sending a final invoice.',
  'corrective' => 'Corrected invoice that completely replaces the preceding document.',
  'credit-note' => 'Reflects a refund either partial or complete of the preceding document.',
  'debit-note' => 'An additional set of charges to be added to the preceding document.'
}.freeze

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:



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

property :charges, [Charge]

#codeString (readonly)

Sequential code used to identify this invoice in tax declarations.

Returns:

  • (String)


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

property :code, String

#currencyGOBL::Currency::Code (readonly)

Currency for all invoice totals.



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

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:



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

property :customer, GOBL::Org::Party

#deliveryDelivery (readonly)

Specific details on delivery of the goods referenced in the invoice.

Returns:



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

property :delivery, Delivery

#discountsArray<Discount> (readonly)

Discounts or allowances applied to the complete invoice

Returns:



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

property :discounts, [Discount]

#exchange_ratesArray<GOBL::Currency::ExchangeRate> (readonly)

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

Returns:



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

property :exchange_rates, [GOBL::Currency::ExchangeRate]

#issue_dateGOBL::Cal::Date (readonly)

When the invoice was created.

Returns:



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

property :issue_date, GOBL::Cal::Date

#linesArray<Line> (readonly)

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

Returns:



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

property :lines, [Line]

#metaGOBL::CBC::Meta (readonly)

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

Returns:



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

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:



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

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

#op_dateGOBL::Cal::Date (readonly)

Date when the operation defined by the invoice became effective.

Returns:



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

property :op_date, GOBL::Cal::Date

#orderingOrdering (readonly)

Ordering details including document references and buyer or seller parties.

Returns:



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

property :ordering, Ordering

#outlaysArray<Outlay> (readonly)

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

Returns:



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

property :outlays, [Outlay]

#paymentPayment (readonly)

Information on when, how, and to whom the invoice should be paid.

Returns:



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

property :payment, Payment

#precedingArray<Preceding> (readonly)

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

Returns:



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

property :preceding, [Preceding]

#seriesString (readonly)

Used as a prefix to group codes.

Returns:

  • (String)


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

property :series, String

#supplierGOBL::Org::Party (readonly)

The taxable entity supplying the goods or services.

Returns:



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

property :supplier, GOBL::Org::Party

#taxTax (readonly)

Special tax configuration for billing.

Returns:



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

property :tax, Tax

#totalsTotals (readonly)

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

Returns:



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

property :totals, Totals

#typeGOBL::CBC::Key (readonly)

Type of invoice document subject to the requirements of the local tax regime.

Returns:



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

property :type, GOBL::CBC::Key

#uuidGOBL::UUID::UUID (readonly)

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

Returns:



19
# File 'lib/generated/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:



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

property :value_date, GOBL::Cal::Date