Class: EInvoiceAPI::Models::DocumentCreate

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

Defined Under Namespace

Modules: AmountDue, InvoiceTotal, PreviousUnpaidBalance, Subtotal, TaxCode, TotalDiscount, TotalTax, Vatex Classes: Allowance, Charge, Item, TaxDetail

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Internal::Type::BaseModel

#==, ==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, #initialize, 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

This class inherits a constructor from EInvoiceAPI::Internal::Type::BaseModel

Instance Attribute Details

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



9
10
11
# File 'lib/e_invoice_api/models/document_create.rb', line 9

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

#amount_dueFloat, ...

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

Returns:

  • (Float, String, nil)


17
# File 'lib/e_invoice_api/models/document_create.rb', line 17

optional :amount_due, union: -> { EInvoiceAPI::DocumentCreate::AmountDue }, nil?: true

#attachmentsArray<EInvoiceAPI::Models::DocumentAttachmentCreate>?



22
23
24
# File 'lib/e_invoice_api/models/document_create.rb', line 22

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

#billing_addressString?

The billing address (if different from customer address)

Returns:

  • (String, nil)


30
# File 'lib/e_invoice_api/models/document_create.rb', line 30

optional :billing_address, String, nil?: true

#billing_address_recipientString?

The recipient name at the billing address

Returns:

  • (String, nil)


36
# File 'lib/e_invoice_api/models/document_create.rb', line 36

optional :billing_address_recipient, String, nil?: true

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



41
42
43
# File 'lib/e_invoice_api/models/document_create.rb', line 41

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

#currencySymbol, ...

Currency of the invoice (ISO 4217 currency code)

Returns:



49
# File 'lib/e_invoice_api/models/document_create.rb', line 49

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

#customer_addressString?

The address of the customer/buyer

Returns:

  • (String, nil)


55
# File 'lib/e_invoice_api/models/document_create.rb', line 55

optional :customer_address, String, nil?: true

#customer_address_recipientString?

The recipient name at the customer address

Returns:

  • (String, nil)


61
# File 'lib/e_invoice_api/models/document_create.rb', line 61

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)


68
# File 'lib/e_invoice_api/models/document_create.rb', line 68

optional :customer_company_id, String, nil?: true

#customer_emailString?

The email address of the customer

Returns:

  • (String, nil)


74
# File 'lib/e_invoice_api/models/document_create.rb', line 74

optional :customer_email, String, nil?: true

#customer_idString?

The unique identifier for the customer in your system

Returns:

  • (String, nil)


80
# File 'lib/e_invoice_api/models/document_create.rb', line 80

optional :customer_id, String, nil?: true

#customer_nameString?

The company name of the customer/buyer

Returns:

  • (String, nil)


86
# File 'lib/e_invoice_api/models/document_create.rb', line 86

optional :customer_name, String, nil?: true

#customer_tax_idString?

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

Returns:

  • (String, nil)


93
# File 'lib/e_invoice_api/models/document_create.rb', line 93

optional :customer_tax_id, String, nil?: true

#directionSymbol, ...

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

Returns:



99
# File 'lib/e_invoice_api/models/document_create.rb', line 99

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

#document_typeSymbol, ...

The type of document: INVOICE, CREDIT_NOTE, or DEBIT_NOTE

Returns:



105
# File 'lib/e_invoice_api/models/document_create.rb', line 105

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

#due_dateDate?

The date when payment is due

Returns:

  • (Date, nil)


111
# File 'lib/e_invoice_api/models/document_create.rb', line 111

optional :due_date, Date, nil?: true

#invoice_dateDate?

The date when the invoice was issued

Returns:

  • (Date, nil)


117
# File 'lib/e_invoice_api/models/document_create.rb', line 117

optional :invoice_date, Date, nil?: true

#invoice_idString?

The unique invoice identifier/number

Returns:

  • (String, nil)


123
# File 'lib/e_invoice_api/models/document_create.rb', line 123

optional :invoice_id, String, nil?: true

#invoice_totalFloat, ...

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:

  • (Float, String, nil)


130
# File 'lib/e_invoice_api/models/document_create.rb', line 130

optional :invoice_total, union: -> { EInvoiceAPI::DocumentCreate::InvoiceTotal }, nil?: true

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

At least one line item is required



136
# File 'lib/e_invoice_api/models/document_create.rb', line 136

optional :items, -> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::DocumentCreate::Item] }

#noteString?

Additional notes or comments for the invoice

Returns:

  • (String, nil)


142
# File 'lib/e_invoice_api/models/document_create.rb', line 142

optional :note, String, nil?: true

#payment_detailsArray<EInvoiceAPI::Models::PaymentDetailCreate>?



147
148
149
# File 'lib/e_invoice_api/models/document_create.rb', line 147

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

#payment_termString?

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

Returns:

  • (String, nil)


155
# File 'lib/e_invoice_api/models/document_create.rb', line 155

optional :payment_term, String, nil?: true

#previous_unpaid_balanceFloat, ...

The previous unpaid balance from prior invoices, if any. Must be positive and rounded to maximum 2 decimals

Returns:

  • (Float, String, nil)


162
163
164
# File 'lib/e_invoice_api/models/document_create.rb', line 162

optional :previous_unpaid_balance,
union: -> { EInvoiceAPI::DocumentCreate::PreviousUnpaidBalance },
nil?: true

#purchase_orderString?

The purchase order reference number

Returns:

  • (String, nil)


170
# File 'lib/e_invoice_api/models/document_create.rb', line 170

optional :purchase_order, String, nil?: true

#remittance_addressString?

The address where payment should be sent or remitted to

Returns:

  • (String, nil)


176
# File 'lib/e_invoice_api/models/document_create.rb', line 176

optional :remittance_address, String, nil?: true

#remittance_address_recipientString?

The recipient name at the remittance address

Returns:

  • (String, nil)


182
# File 'lib/e_invoice_api/models/document_create.rb', line 182

optional :remittance_address_recipient, String, nil?: true

#service_addressString?

The address where services were performed or goods were delivered

Returns:

  • (String, nil)


188
# File 'lib/e_invoice_api/models/document_create.rb', line 188

optional :service_address, String, nil?: true

#service_address_recipientString?

The recipient name at the service address

Returns:

  • (String, nil)


194
# File 'lib/e_invoice_api/models/document_create.rb', line 194

optional :service_address_recipient, String, nil?: true

#service_end_dateDate?

The end date of the service period or delivery period

Returns:

  • (Date, nil)


200
# File 'lib/e_invoice_api/models/document_create.rb', line 200

optional :service_end_date, Date, nil?: true

#service_start_dateDate?

The start date of the service period or delivery period

Returns:

  • (Date, nil)


206
# File 'lib/e_invoice_api/models/document_create.rb', line 206

optional :service_start_date, Date, nil?: true

#shipping_addressString?

The shipping/delivery address

Returns:

  • (String, nil)


212
# File 'lib/e_invoice_api/models/document_create.rb', line 212

optional :shipping_address, String, nil?: true

#shipping_address_recipientString?

The recipient name at the shipping address

Returns:

  • (String, nil)


218
# File 'lib/e_invoice_api/models/document_create.rb', line 218

optional :shipping_address_recipient, String, nil?: true

#stateSymbol, ...

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

Returns:



224
# File 'lib/e_invoice_api/models/document_create.rb', line 224

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

#subtotalFloat, ...

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:

  • (Float, String, nil)


232
# File 'lib/e_invoice_api/models/document_create.rb', line 232

optional :subtotal, union: -> { EInvoiceAPI::DocumentCreate::Subtotal }, nil?: true

#tax_codeSymbol, ...

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



239
# File 'lib/e_invoice_api/models/document_create.rb', line 239

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

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



244
245
246
# File 'lib/e_invoice_api/models/document_create.rb', line 244

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

#total_discountFloat, ...

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:

  • (Float, String, nil)


254
# File 'lib/e_invoice_api/models/document_create.rb', line 254

optional :total_discount, union: -> { EInvoiceAPI::DocumentCreate::TotalDiscount }, nil?: true

#total_taxFloat, ...

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

Returns:

  • (Float, String, nil)


261
# File 'lib/e_invoice_api/models/document_create.rb', line 261

optional :total_tax, union: -> { EInvoiceAPI::DocumentCreate::TotalTax }, nil?: true

#vatexSymbol, ...

VATEX code list for VAT exemption reasons

Agency: CEF Identifier: vatex



269
# File 'lib/e_invoice_api/models/document_create.rb', line 269

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

#vatex_noteString?

Textual explanation for VAT exemption

Returns:

  • (String, nil)


275
# File 'lib/e_invoice_api/models/document_create.rb', line 275

optional :vatex_note, String, nil?: true

#vendor_addressString?

The address of the vendor/seller

Returns:

  • (String, nil)


281
# File 'lib/e_invoice_api/models/document_create.rb', line 281

optional :vendor_address, String, nil?: true

#vendor_address_recipientString?

The recipient name at the vendor address

Returns:

  • (String, nil)


287
# File 'lib/e_invoice_api/models/document_create.rb', line 287

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)


294
# File 'lib/e_invoice_api/models/document_create.rb', line 294

optional :vendor_company_id, String, nil?: true

#vendor_emailString?

The email address of the vendor

Returns:

  • (String, nil)


300
# File 'lib/e_invoice_api/models/document_create.rb', line 300

optional :vendor_email, String, nil?: true

#vendor_nameString?

The name of the vendor/seller/supplier

Returns:

  • (String, nil)


306
# File 'lib/e_invoice_api/models/document_create.rb', line 306

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)


313
# File 'lib/e_invoice_api/models/document_create.rb', line 313

optional :vendor_tax_id, String, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/e_invoice_api/models/document_create.rb', line 1732


.variantsArray(Float, String)

Returns:

  • (Array(Float, String))


# File 'lib/e_invoice_api/models/document_create.rb', line 591