Class: GOBL::Bill::Delivery

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

Overview

Delivery document used to describe the delivery of goods or potentially also services.

Constant Summary collapse

SCHEMA_ID =

The Schema ID of the GOBL Delivery structure

'https://gobl.org/draft-0/bill/delivery'
TYPE_ENUM =

Enumeration of possible values for #type with their corresponding descriptions

{
  'advice' => 'A delivery or despatch advice document send by the supplier to indicate how
an order is to be delivered.',
  'note' => 'A delivery note is a document accompanying a shipment of goods that lists the
items included in the shipment.',
  'waybill' => 'A waybill is a document issued by a carrier giving details and instructions
relating to the shipment of a consignment of goods.',
  'receipt' => 'A delivery receipt is a document that is signed by the person who receives
goods to confirm that they have been received.'
}.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

#$addons($addons) ⇒ Array<GOBL::CBC::Key> (readonly)

Addons defines a list of keys used to identify tax addons that apply special normalization, scenarios, and validation rules to a document.

Returns:



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

property :$addons, [GOBL::CBC::Key]

#$regime($regime) ⇒ GOBL::L10n::TaxCountryCode (readonly)



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

property :$regime, GOBL::L10n::TaxCountryCode

#$tags($tags) ⇒ Array<GOBL::CBC::Key> (readonly)

Tags are used to help identify specific tax scenarios or requirements that will apply changes to the contents of the invoice. Tags by design should always be optional, it should always be possible to build a valid invoice without any tags.

Returns:



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

property :$tags, [GOBL::CBC::Key]

#attachmentsArray<GOBL::Org::Attachment> (readonly)

Attachments provide additional information or supporting documents that are not included in the main document. It is important that attachments are not used for alternative versions of the PDF, for that, see “links” inside the envelope headers.

Returns:



206
# File 'lib/generated/gobl/bill/delivery.rb', line 206

property :attachments, [GOBL::Org::Attachment]

#chargesArray<GOBL::Bill::Charge> (readonly)

Charges or surcharges applied to order totals

Returns:



181
# File 'lib/generated/gobl/bill/delivery.rb', line 181

property :charges, [GOBL::Bill::Charge]

#codeGOBL::CBC::Code (readonly)

Code is a sequential identifier that uniquely identifies the delivery. The code can be left empty initially, but is required to sign the document.

Returns:



85
# File 'lib/generated/gobl/bill/delivery.rb', line 85

property :code, GOBL::CBC::Code

#complementsArray<GOBL::Schema::Object> (readonly)

Additional complementary objects that add relevant information to the delivery.

Returns:



196
# File 'lib/generated/gobl/bill/delivery.rb', line 196

property :complements, [GOBL::Schema::Object]

#courierGOBL::Org::Party (readonly)

The courier responsible for delivering the goods.

Returns:



166
# File 'lib/generated/gobl/bill/delivery.rb', line 166

property :courier, GOBL::Org::Party

#currencyGOBL::Currency::Code (readonly)

Currency for all delivery totals.



105
# File 'lib/generated/gobl/bill/delivery.rb', line 105

property :currency, GOBL::Currency::Code

#customerGOBL::Org::Party (readonly)

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

Returns:



151
# File 'lib/generated/gobl/bill/delivery.rb', line 151

property :customer, GOBL::Org::Party

#despatch_dateGOBL::Cal::Date (readonly)

DespatchDate is the date when the goods are expected to be despatched.

Returns:



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

property :despatch_date, GOBL::Cal::Date

#despatcherGOBL::Org::Party (readonly)

The party who will despatch the goods defined in the invoice.

Returns:



156
# File 'lib/generated/gobl/bill/delivery.rb', line 156

property :despatcher, GOBL::Org::Party

#discountsArray<GOBL::Bill::Discount> (readonly)

Discounts or allowances applied to order totals

Returns:



176
# File 'lib/generated/gobl/bill/delivery.rb', line 176

property :discounts, [GOBL::Bill::Discount]

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

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

Returns:



110
# File 'lib/generated/gobl/bill/delivery.rb', line 110

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

#issue_dateGOBL::Cal::Date (readonly)

When the delivery document is to be issued.

Returns:



90
# File 'lib/generated/gobl/bill/delivery.rb', line 90

property :issue_date, GOBL::Cal::Date

#issue_timeGOBL::Cal::Time (readonly)

IssueTime is an optional field that may be useful to indicate the time of day when the delivery was issued. Some regions and formats may require this field to be set. An empty string will be automatically updated to reflect the current time, otherwise the field can be left with a nil value.

Returns:



95
# File 'lib/generated/gobl/bill/delivery.rb', line 95

property :issue_time, GOBL::Cal::Time

#linesArray<GOBL::Bill::Line> (readonly)

List of lines representing each of the items to be ordered.

Returns:



171
# File 'lib/generated/gobl/bill/delivery.rb', line 171

property :lines, [GOBL::Bill::Line]

#metaGOBL::CBC::Meta (readonly)

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

Returns:



201
# File 'lib/generated/gobl/bill/delivery.rb', line 201

property :meta, GOBL::CBC::Meta

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

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

Returns:



191
# File 'lib/generated/gobl/bill/delivery.rb', line 191

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

#orderingGOBL::Bill::Ordering (readonly)

Ordering details for the delivery, including links to other documents.



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

property :ordering, GOBL::Bill::Ordering

#precedingArray<GOBL::Org::DocumentRef> (readonly)

Key information regarding previous delivery documents that this one will either extend or replace.

Returns:



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

property :preceding, [GOBL::Org::DocumentRef]

#receive_dateGOBL::Cal::Date (readonly)

ReceiveDate is the date when the goods are expected to be received.

Returns:



135
# File 'lib/generated/gobl/bill/delivery.rb', line 135

property :receive_date, GOBL::Cal::Date

#receiverGOBL::Org::Party (readonly)

The party who will receive delivery of the goods defined in the invoice.

Returns:



161
# File 'lib/generated/gobl/bill/delivery.rb', line 161

property :receiver, GOBL::Org::Party

#seriesGOBL::CBC::Code (readonly)

Series is used to identify groups of deliveries by date, business area, project, type, customer, a combination of any, or other company specific data. If the output format does not support the series as a separate field, it will be prepended to the code for presentation with a dash (‘-`) for separation.

Returns:



80
# File 'lib/generated/gobl/bill/delivery.rb', line 80

property :series, GOBL::CBC::Code

#supplierGOBL::Org::Party (readonly)

The entity supplying the goods or services and usually responsible for paying taxes.

Returns:



145
# File 'lib/generated/gobl/bill/delivery.rb', line 145

property :supplier, GOBL::Org::Party

#taxGOBL::Bill::Tax (readonly)

Special tax configuration for calculating totals.

Returns:



140
# File 'lib/generated/gobl/bill/delivery.rb', line 140

property :tax, GOBL::Bill::Tax

#totalsGOBL::Bill::Totals (readonly)

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

Returns:



186
# File 'lib/generated/gobl/bill/delivery.rb', line 186

property :totals, GOBL::Bill::Totals

#trackingTracking (readonly)

Tracking is used to define specific codes or IDs that may be used to identify and track delivery.

Returns:



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

property :tracking, Tracking

#typeGOBL::CBC::Key (readonly)

Type of delivery document.

Returns:



73
# File 'lib/generated/gobl/bill/delivery.rb', line 73

property :type, GOBL::CBC::Key

#uuidString (readonly)

Universally Unique Identifier.

Returns:

  • (String)


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

property :uuid, String

#value_dateGOBL::Cal::Date (readonly)

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

Returns:



100
# File 'lib/generated/gobl/bill/delivery.rb', line 100

property :value_date, GOBL::Cal::Date