Class: GOBL::Bill::Invoice
- Includes:
- Extensions::Bill::InvoiceHelper
- 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. A credit note effectively *extends* the previous document.', 'debit-note' => 'An additional set of charges to be added to the preceding document.' }.freeze
Instance Attribute Summary collapse
-
#charges ⇒ Array<Charge>
readonly
Charges or surcharges applied to the complete invoice.
-
#code ⇒ String
readonly
Sequential code used to identify this invoice in tax declarations.
-
#complements ⇒ Array<GOBL::Schema::Object>
readonly
Additional complementary objects that add relevant information to the invoice.
-
#currency ⇒ GOBL::Currency::Code
readonly
Currency for all invoice totals.
-
#customer ⇒ GOBL::Org::Party
readonly
Legal entity receiving the goods or services, may be empty in certain circumstances such as simplified invoices.
-
#delivery ⇒ Delivery
readonly
Specific details on delivery of the goods referenced in the invoice.
-
#discounts ⇒ Array<Discount>
readonly
Discounts or allowances applied to the complete invoice.
-
#exchange_rates ⇒ Array<GOBL::Currency::ExchangeRate>
readonly
Exchange rates to be used when converting the invoices monetary values into other currencies.
-
#issue_date ⇒ GOBL::Cal::Date
readonly
When the invoice was created.
-
#lines ⇒ Array<Line>
readonly
List of invoice lines representing each of the items sold to the customer.
-
#meta ⇒ GOBL::CBC::Meta
readonly
Additional semi-structured data that doesn’t fit into the body of the invoice.
-
#notes ⇒ Array<GOBL::CBC::Note>
readonly
Unstructured information that is relevant to the invoice, such as correction or additional legal details.
-
#op_date ⇒ GOBL::Cal::Date
readonly
Date when the operation defined by the invoice became effective.
-
#ordering ⇒ Ordering
readonly
Ordering details including document references and buyer or seller parties.
-
#outlays ⇒ Array<Outlay>
readonly
Expenses paid for by the supplier but invoiced directly to the customer.
-
#payment ⇒ Payment
readonly
Information on when, how, and to whom the invoice should be paid.
-
#preceding ⇒ Array<Preceding>
readonly
Key information regarding previous invoices and potentially details as to why they were corrected.
-
#series ⇒ String
readonly
Used as a prefix to group codes.
-
#supplier ⇒ GOBL::Org::Party
readonly
The taxable entity supplying the goods or services.
-
#tax ⇒ Tax
readonly
Special tax configuration for billing.
-
#totals ⇒ Totals
readonly
Summary of all the invoice totals, including taxes (calculated).
-
#type ⇒ GOBL::CBC::Key
readonly
Type of invoice document subject to the requirements of the local tax regime.
-
#uuid ⇒ GOBL::UUID::UUID
readonly
Unique document ID.
-
#value_date ⇒ GOBL::Cal::Date
readonly
When the taxes of this invoice become accountable, if none set, the issue date is used.
Method Summary
Methods included from Extensions::Bill::InvoiceHelper
Methods inherited from Object
Methods inherited from Struct
#as_json, from_data, from_json!, #to_json
Instance Attribute Details
#charges ⇒ Array<Charge> (readonly)
Charges or surcharges applied to the complete invoice
107 |
# File 'lib/generated/gobl/bill/invoice.rb', line 107 property :charges, [Charge] |
#code ⇒ String (readonly)
Sequential code used to identify this invoice in tax declarations.
45 |
# File 'lib/generated/gobl/bill/invoice.rb', line 45 property :code, String |
#complements ⇒ Array<GOBL::Schema::Object> (readonly)
Additional complementary objects that add relevant information to the invoice.
142 |
# File 'lib/generated/gobl/bill/invoice.rb', line 142 property :complements, [GOBL::Schema::Object] |
#currency ⇒ GOBL::Currency::Code (readonly)
Currency for all invoice totals.
66 |
# File 'lib/generated/gobl/bill/invoice.rb', line 66 property :currency, GOBL::Currency::Code |
#customer ⇒ GOBL::Org::Party (readonly)
Legal entity receiving the goods or services, may be empty in certain circumstances such as simplified invoices.
92 |
# File 'lib/generated/gobl/bill/invoice.rb', line 92 property :customer, GOBL::Org::Party |
#delivery ⇒ Delivery (readonly)
Specific details on delivery of the goods referenced in the invoice.
127 |
# File 'lib/generated/gobl/bill/invoice.rb', line 127 property :delivery, Delivery |
#discounts ⇒ Array<Discount> (readonly)
Discounts or allowances applied to the complete invoice
102 |
# File 'lib/generated/gobl/bill/invoice.rb', line 102 property :discounts, [Discount] |
#exchange_rates ⇒ Array<GOBL::Currency::ExchangeRate> (readonly)
Exchange rates to be used when converting the invoices monetary values into other currencies.
71 |
# File 'lib/generated/gobl/bill/invoice.rb', line 71 property :exchange_rates, [GOBL::Currency::ExchangeRate] |
#issue_date ⇒ GOBL::Cal::Date (readonly)
When the invoice was created.
51 |
# File 'lib/generated/gobl/bill/invoice.rb', line 51 property :issue_date, GOBL::Cal::Date |
#lines ⇒ Array<Line> (readonly)
List of invoice lines representing each of the items sold to the customer.
97 |
# File 'lib/generated/gobl/bill/invoice.rb', line 97 property :lines, [Line] |
#meta ⇒ GOBL::CBC::Meta (readonly)
Additional semi-structured data that doesn’t fit into the body of the invoice.
147 |
# File 'lib/generated/gobl/bill/invoice.rb', line 147 property :meta, GOBL::CBC::Meta |
#notes ⇒ Array<GOBL::CBC::Note> (readonly)
Unstructured information that is relevant to the invoice, such as correction or additional legal details.
137 |
# File 'lib/generated/gobl/bill/invoice.rb', line 137 property :notes, [GOBL::CBC::Note] |
#op_date ⇒ GOBL::Cal::Date (readonly)
Date when the operation defined by the invoice became effective.
56 |
# File 'lib/generated/gobl/bill/invoice.rb', line 56 property :op_date, GOBL::Cal::Date |
#ordering ⇒ Ordering (readonly)
Ordering details including document references and buyer or seller parties.
117 |
# File 'lib/generated/gobl/bill/invoice.rb', line 117 property :ordering, Ordering |
#outlays ⇒ Array<Outlay> (readonly)
Expenses paid for by the supplier but invoiced directly to the customer.
112 |
# File 'lib/generated/gobl/bill/invoice.rb', line 112 property :outlays, [Outlay] |
#payment ⇒ Payment (readonly)
Information on when, how, and to whom the invoice should be paid.
122 |
# File 'lib/generated/gobl/bill/invoice.rb', line 122 property :payment, Payment |
#preceding ⇒ Array<Preceding> (readonly)
Key information regarding previous invoices and potentially details as to why they were corrected.
76 |
# File 'lib/generated/gobl/bill/invoice.rb', line 76 property :preceding, [Preceding] |
#series ⇒ String (readonly)
Used as a prefix to group codes.
40 |
# File 'lib/generated/gobl/bill/invoice.rb', line 40 property :series, String |
#supplier ⇒ GOBL::Org::Party (readonly)
The taxable entity supplying the goods or services.
86 |
# File 'lib/generated/gobl/bill/invoice.rb', line 86 property :supplier, GOBL::Org::Party |
#tax ⇒ Tax (readonly)
Special tax configuration for billing.
81 |
# File 'lib/generated/gobl/bill/invoice.rb', line 81 property :tax, Tax |
#totals ⇒ Totals (readonly)
Summary of all the invoice totals, including taxes (calculated).
132 |
# File 'lib/generated/gobl/bill/invoice.rb', line 132 property :totals, Totals |
#type ⇒ GOBL::CBC::Key (readonly)
Type of invoice document subject to the requirements of the local tax regime.
34 |
# File 'lib/generated/gobl/bill/invoice.rb', line 34 property :type, GOBL::CBC::Key |
#uuid ⇒ GOBL::UUID::UUID (readonly)
Unique document ID. Not required, but always recommended in addition to the Code.
19 |
# File 'lib/generated/gobl/bill/invoice.rb', line 19 property :uuid, GOBL::UUID::UUID |
#value_date ⇒ GOBL::Cal::Date (readonly)
When the taxes of this invoice become accountable, if none set, the issue date is used.
61 |
# File 'lib/generated/gobl/bill/invoice.rb', line 61 property :value_date, GOBL::Cal::Date |