Class: EInvoiceAPI::Models::DocumentResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/e_invoice_api/models/document_response.rb

Overview

Defined Under Namespace

Modules: TaxCode, Vatex Classes: Allowance, Charge, Item, PaymentDetail, TaxDetail

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(amount: nil, rate: nil) ⇒ Object

Parameters:

  • amount (String, nil) (defaults to: nil)

    The tax amount for this tax category. Must be rounded to maximum 2 decimals

  • rate (String, nil) (defaults to: nil)

    The tax rate as a percentage (e.g., ‘21.00’, ‘6.00’, ‘0.00’)



# File 'lib/e_invoice_api/models/document_response.rb', line 896

Instance Attribute Details

#allowancesArray<EInvoiceAPI::Models::DocumentResponse::Allowance>?



20
21
22
# File 'lib/e_invoice_api/models/document_response.rb', line 20

optional :allowances,
-> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::DocumentResponse::Allowance] },
nil?: true

#amount_dueString?

The amount due for payment. Must be positive and rounded to maximum 2 decimals

Returns:

  • (String, nil)


28
# File 'lib/e_invoice_api/models/document_response.rb', line 28

optional :amount_due, String, nil?: true

#attachmentsArray<EInvoiceAPI::Models::Documents::DocumentAttachment>?



33
34
35
# File 'lib/e_invoice_api/models/document_response.rb', line 33

optional :attachments,
-> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::Documents::DocumentAttachment] },
nil?: true

#billing_addressString?

The billing address (if different from customer address)

Returns:

  • (String, nil)


41
# File 'lib/e_invoice_api/models/document_response.rb', line 41

optional :billing_address, String, nil?: true

#billing_address_recipientString?

The recipient name at the billing address

Returns:

  • (String, nil)


47
# File 'lib/e_invoice_api/models/document_response.rb', line 47

optional :billing_address_recipient, String, nil?: true

#chargesArray<EInvoiceAPI::Models::DocumentResponse::Charge>?



52
53
54
# File 'lib/e_invoice_api/models/document_response.rb', line 52

optional :charges,
-> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::DocumentResponse::Charge] },
nil?: true

#created_atTime

Returns:

  • (Time)


15
# File 'lib/e_invoice_api/models/document_response.rb', line 15

required :created_at, Time

#currencySymbol, ...

Currency of the invoice (ISO 4217 currency code)

Returns:



60
# File 'lib/e_invoice_api/models/document_response.rb', line 60

optional :currency, enum: -> { EInvoiceAPI::CurrencyCode }

#customer_addressString?

The address of the customer/buyer

Returns:

  • (String, nil)


66
# File 'lib/e_invoice_api/models/document_response.rb', line 66

optional :customer_address, String, nil?: true

#customer_address_recipientString?

The recipient name at the customer address

Returns:

  • (String, nil)


72
# File 'lib/e_invoice_api/models/document_response.rb', line 72

optional :customer_address_recipient, String, nil?: true

#customer_company_idString?

Customer company ID. For Belgium this is the CBE number or their EUID (European Unique Identifier) number. In the Netherlands this is the KVK number.

Returns:

  • (String, nil)


79
# File 'lib/e_invoice_api/models/document_response.rb', line 79

optional :customer_company_id, String, nil?: true

#customer_emailString?

The email address of the customer

Returns:

  • (String, nil)


85
# File 'lib/e_invoice_api/models/document_response.rb', line 85

optional :customer_email, String, nil?: true

#customer_idString?

The unique identifier for the customer in your system

Returns:

  • (String, nil)


91
# File 'lib/e_invoice_api/models/document_response.rb', line 91

optional :customer_id, String, nil?: true

#customer_nameString?

The company name of the customer/buyer

Returns:

  • (String, nil)


97
# File 'lib/e_invoice_api/models/document_response.rb', line 97

optional :customer_name, String, nil?: true

#customer_peppol_idString?

Customer Peppol ID

Returns:

  • (String, nil)


103
# File 'lib/e_invoice_api/models/document_response.rb', line 103

optional :customer_peppol_id, String, nil?: true

#customer_tax_idString?

Customer tax ID. For Belgium this is the VAT number. Must include the country prefix

Returns:

  • (String, nil)


110
# File 'lib/e_invoice_api/models/document_response.rb', line 110

optional :customer_tax_id, String, nil?: true

#directionSymbol, ...

The direction of the document: INBOUND (purchases) or OUTBOUND (sales)

Returns:



116
# File 'lib/e_invoice_api/models/document_response.rb', line 116

optional :direction, enum: -> { EInvoiceAPI::DocumentDirection }

#document_typeSymbol, ...

The type of document: INVOICE, CREDIT_NOTE, or DEBIT_NOTE

Returns:



122
# File 'lib/e_invoice_api/models/document_response.rb', line 122

optional :document_type, enum: -> { EInvoiceAPI::DocumentType }

#due_dateDate?

The date when payment is due

Returns:

  • (Date, nil)


128
# File 'lib/e_invoice_api/models/document_response.rb', line 128

optional :due_date, Date, nil?: true

#idString

Returns:

  • (String)


10
# File 'lib/e_invoice_api/models/document_response.rb', line 10

required :id, String

#invoice_dateDate?

The date when the invoice was issued

Returns:

  • (Date, nil)


134
# File 'lib/e_invoice_api/models/document_response.rb', line 134

optional :invoice_date, Date, nil?: true

#invoice_idString?

The unique invoice identifier/number

Returns:

  • (String, nil)


140
# File 'lib/e_invoice_api/models/document_response.rb', line 140

optional :invoice_id, String, nil?: true

#invoice_totalString?

The total amount of the invoice including tax (invoice_total = subtotal + total_tax + total_discount). Must be positive and rounded to maximum 2 decimals

Returns:

  • (String, nil)


147
# File 'lib/e_invoice_api/models/document_response.rb', line 147

optional :invoice_total, String, nil?: true

#itemsArray<EInvoiceAPI::Models::DocumentResponse::Item>?



152
153
154
# File 'lib/e_invoice_api/models/document_response.rb', line 152

optional :items,
-> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::DocumentResponse::Item] },
nil?: true

#noteString?

Additional notes or comments for the invoice

Returns:

  • (String, nil)


160
# File 'lib/e_invoice_api/models/document_response.rb', line 160

optional :note, String, nil?: true

#payment_detailsArray<EInvoiceAPI::Models::DocumentResponse::PaymentDetail>?



165
166
167
# File 'lib/e_invoice_api/models/document_response.rb', line 165

optional :payment_details,
-> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::DocumentResponse::PaymentDetail] },
nil?: true

#payment_termString?

The payment terms (e.g., ‘Net 30’, ‘Due on receipt’, ‘2/10 Net 30’)

Returns:

  • (String, nil)


173
# File 'lib/e_invoice_api/models/document_response.rb', line 173

optional :payment_term, String, nil?: true

#purchase_orderString?

The purchase order reference number

Returns:

  • (String, nil)


179
# File 'lib/e_invoice_api/models/document_response.rb', line 179

optional :purchase_order, String, nil?: true

#remittance_addressString?

The address where payment should be sent or remitted to

Returns:

  • (String, nil)


185
# File 'lib/e_invoice_api/models/document_response.rb', line 185

optional :remittance_address, String, nil?: true

#remittance_address_recipientString?

The recipient name at the remittance address

Returns:

  • (String, nil)


191
# File 'lib/e_invoice_api/models/document_response.rb', line 191

optional :remittance_address_recipient, String, nil?: true

#service_addressString?

The address where services were performed or goods were delivered

Returns:

  • (String, nil)


197
# File 'lib/e_invoice_api/models/document_response.rb', line 197

optional :service_address, String, nil?: true

#service_address_recipientString?

The recipient name at the service address

Returns:

  • (String, nil)


203
# File 'lib/e_invoice_api/models/document_response.rb', line 203

optional :service_address_recipient, String, nil?: true

#service_end_dateDate?

The end date of the service period or delivery period

Returns:

  • (Date, nil)


209
# File 'lib/e_invoice_api/models/document_response.rb', line 209

optional :service_end_date, Date, nil?: true

#service_start_dateDate?

The start date of the service period or delivery period

Returns:

  • (Date, nil)


215
# File 'lib/e_invoice_api/models/document_response.rb', line 215

optional :service_start_date, Date, nil?: true

#shipping_addressString?

The shipping/delivery address

Returns:

  • (String, nil)


221
# File 'lib/e_invoice_api/models/document_response.rb', line 221

optional :shipping_address, String, nil?: true

#shipping_address_recipientString?

The recipient name at the shipping address

Returns:

  • (String, nil)


227
# File 'lib/e_invoice_api/models/document_response.rb', line 227

optional :shipping_address_recipient, String, nil?: true

#stateSymbol, ...

The current state of the document: DRAFT, TRANSIT, FAILED, SENT, or RECEIVED

Returns:



233
# File 'lib/e_invoice_api/models/document_response.rb', line 233

optional :state, enum: -> { EInvoiceAPI::DocumentState }

#subtotalString?

The taxable base of the invoice. Should be the sum of all line items - allowances (for example commercial discounts) + charges with impact on VAT. Must be positive and rounded to maximum 2 decimals

Returns:

  • (String, nil)


241
# File 'lib/e_invoice_api/models/document_response.rb', line 241

optional :subtotal, String, nil?: true

#tax_codeSymbol, ...

Tax category code of the invoice (e.g., S for standard rate, Z for zero rate, E for exempt)



248
# File 'lib/e_invoice_api/models/document_response.rb', line 248

optional :tax_code, enum: -> { EInvoiceAPI::DocumentResponse::TaxCode }

#tax_detailsArray<EInvoiceAPI::Models::DocumentResponse::TaxDetail>?



253
254
255
# File 'lib/e_invoice_api/models/document_response.rb', line 253

optional :tax_details,
-> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::DocumentResponse::TaxDetail] },
nil?: true

#total_discountString?

The net financial discount/charge of the invoice (non-VAT charges minus non-VAT allowances). Can be positive (net charge), negative (net discount), or zero. Must be rounded to maximum 2 decimals

Returns:

  • (String, nil)


263
# File 'lib/e_invoice_api/models/document_response.rb', line 263

optional :total_discount, String, nil?: true

#total_taxString?

The total tax amount of the invoice. Must be positive and rounded to maximum 2 decimals

Returns:

  • (String, nil)


270
# File 'lib/e_invoice_api/models/document_response.rb', line 270

optional :total_tax, String, nil?: true

#vatexSymbol, ...

VATEX code list for VAT exemption reasons

Agency: CEF Identifier: vatex



278
# File 'lib/e_invoice_api/models/document_response.rb', line 278

optional :vatex, enum: -> { EInvoiceAPI::DocumentResponse::Vatex }, nil?: true

#vatex_noteString?

Textual explanation for VAT exemption

Returns:

  • (String, nil)


284
# File 'lib/e_invoice_api/models/document_response.rb', line 284

optional :vatex_note, String, nil?: true

#vendor_addressString?

The address of the vendor/seller

Returns:

  • (String, nil)


290
# File 'lib/e_invoice_api/models/document_response.rb', line 290

optional :vendor_address, String, nil?: true

#vendor_address_recipientString?

The recipient name at the vendor address

Returns:

  • (String, nil)


296
# File 'lib/e_invoice_api/models/document_response.rb', line 296

optional :vendor_address_recipient, String, nil?: true

#vendor_company_idString?

Vendor company ID. For Belgium this is the CBE number or their EUID (European Unique Identifier) number. In the Netherlands this is the KVK number.

Returns:

  • (String, nil)


303
# File 'lib/e_invoice_api/models/document_response.rb', line 303

optional :vendor_company_id, String, nil?: true

#vendor_emailString?

The email address of the vendor

Returns:

  • (String, nil)


309
# File 'lib/e_invoice_api/models/document_response.rb', line 309

optional :vendor_email, String, nil?: true

#vendor_nameString?

The name of the vendor/seller/supplier

Returns:

  • (String, nil)


315
# File 'lib/e_invoice_api/models/document_response.rb', line 315

optional :vendor_name, String, nil?: true

#vendor_tax_idString?

Vendor tax ID. For Belgium this is the VAT number. Must include the country prefix

Returns:

  • (String, nil)


322
# File 'lib/e_invoice_api/models/document_response.rb', line 322

optional :vendor_tax_id, String, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/e_invoice_api/models/document_response.rb', line 540