Class: EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Item

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

Instance Attribute 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(allowances: nil, amount_due: nil, attachments: nil, billing_address: nil, billing_address_recipient: nil, charges: nil, currency: nil, customer_address: nil, customer_address_recipient: nil, customer_company_id: nil, customer_email: nil, customer_id: nil, customer_name: nil, customer_tax_id: nil, direction: nil, document_type: nil, due_date: nil, invoice_date: nil, invoice_id: nil, invoice_total: nil, items: nil, note: nil, payment_details: nil, payment_term: nil, purchase_order: nil, remittance_address: nil, remittance_address_recipient: nil, service_address: nil, service_address_recipient: nil, service_end_date: nil, service_start_date: nil, shipping_address: nil, shipping_address_recipient: nil, state: nil, subtotal: nil, success: nil, tax_code: nil, tax_details: nil, total_discount: nil, total_tax: nil, ubl_document: nil, vatex: nil, vatex_note: nil, vendor_address: nil, vendor_address_recipient: nil, vendor_company_id: nil, vendor_email: nil, vendor_name: nil, vendor_tax_id: nil) ⇒ Object

Some parameter documentations has been truncated, see EInvoiceAPI::Models::DocumentCreateFromPdfResponse for more details.

Parameters:

  • allowances (Array<EInvoiceAPI::Models::Allowance>, nil) (defaults to: nil)
  • amount_due (String, nil) (defaults to: nil)

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

  • attachments (Array<EInvoiceAPI::Models::DocumentAttachmentCreate>, nil) (defaults to: nil)
  • billing_address (String, nil) (defaults to: nil)

    The billing address (if different from customer address)

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

    The recipient name at the billing address

  • charges (Array<EInvoiceAPI::Models::Charge>, nil) (defaults to: nil)
  • currency (Symbol, EInvoiceAPI::Models::CurrencyCode) (defaults to: nil)

    Currency of the invoice (ISO 4217 currency code)

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

    The address of the customer/buyer

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

    The recipient name at the customer address

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

    Customer company ID. For Belgium this is the CBE number or their EUID (European

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

    The email address of the customer

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

    The unique identifier for the customer in your system

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

    The company name of the customer/buyer

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

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

  • direction (Symbol, EInvoiceAPI::Models::DocumentDirection) (defaults to: nil)

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

  • document_type (Symbol, EInvoiceAPI::Models::DocumentType) (defaults to: nil)

    The type of document: INVOICE, CREDIT_NOTE, or DEBIT_NOTE

  • due_date (Date, nil) (defaults to: nil)

    The date when payment is due

  • invoice_date (Date, nil) (defaults to: nil)

    The date when the invoice was issued

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

    The unique invoice identifier/number

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

    The total amount of the invoice including tax (invoice*total = subtotal + total*

  • items (Array<EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Item>) (defaults to: nil)

    At least one line item is required

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

    Additional notes or comments for the invoice

  • payment_details (Array<EInvoiceAPI::Models::PaymentDetailCreate>, nil) (defaults to: nil)
  • payment_term (String, nil) (defaults to: nil)

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

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

    The purchase order reference number

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

    The address where payment should be sent or remitted to

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

    The recipient name at the remittance address

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

    The address where services were performed or goods were delivered

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

    The recipient name at the service address

  • service_end_date (Date, nil) (defaults to: nil)

    The end date of the service period or delivery period

  • service_start_date (Date, nil) (defaults to: nil)

    The start date of the service period or delivery period

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

    The shipping/delivery address

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

    The recipient name at the shipping address

  • state (Symbol, EInvoiceAPI::Models::DocumentState) (defaults to: nil)

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

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

    The taxable base of the invoice. Should be the sum of all line items - allowance

  • success (Boolean) (defaults to: nil)

    Whether the PDF was successfully converted into a compliant e-invoice

  • tax_code (Symbol, EInvoiceAPI::Models::DocumentCreateFromPdfResponse::TaxCode) (defaults to: nil)

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

  • tax_details (Array<EInvoiceAPI::Models::DocumentCreateFromPdfResponse::TaxDetail>, nil) (defaults to: nil)
  • total_discount (String, nil) (defaults to: nil)

    The net financial discount/charge of the invoice (non-VAT charges minus non-VAT

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

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

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

    The UBL document as an XML string

  • vatex (Symbol, EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex, nil) (defaults to: nil)

    VATEX code list for VAT exemption reasons

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

    Textual explanation for VAT exemption

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

    The address of the vendor/seller

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

    The recipient name at the vendor address

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

    Vendor company ID. For Belgium this is the CBE number or their EUID (European Un

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

    The email address of the vendor

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

    The name of the vendor/seller/supplier

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

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



418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
# File 'lib/e_invoice_api/models/document_create_from_pdf_response.rb', line 418

class Item < EInvoiceAPI::Internal::Type::BaseModel
  # @!attribute allowances
  #   The allowances of the line item.
  #
  #   @return [Array<EInvoiceAPI::Models::Allowance>, nil]
  optional :allowances, -> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::Allowance] }, nil?: true

  # @!attribute amount
  #   The invoice line net amount (BT-131), exclusive of VAT, inclusive of line level
  #   allowances and charges. Calculated as: ((unit_price / price_base_quantity) \*
  #   quantity) - allowances + charges. Must be rounded to maximum 2 decimals. Can be
  #   negative for credit notes or corrections.
  #
  #   @return [String, nil]
  optional :amount, String, nil?: true

  # @!attribute charges
  #   The charges of the line item.
  #
  #   @return [Array<EInvoiceAPI::Models::Charge>, nil]
  optional :charges, -> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::Charge] }, nil?: true

  # @!attribute date
  #
  #   @return [nil]
  optional :date, NilClass

  # @!attribute description
  #   The description of the line item.
  #
  #   @return [String, nil]
  optional :description, String, nil?: true

  # @!attribute product_code
  #   The product code of the line item.
  #
  #   @return [String, nil]
  optional :product_code, String, nil?: true

  # @!attribute quantity
  #   The quantity of items (goods or services) that is the subject of the line item.
  #   Must be rounded to maximum 4 decimals. Can be negative for credit notes or
  #   corrections.
  #
  #   @return [String, nil]
  optional :quantity, String, nil?: true

  # @!attribute tax
  #   The total VAT amount for the line item. Must be rounded to maximum 2 decimals.
  #   Can be negative for credit notes or corrections.
  #
  #   @return [String, nil]
  optional :tax, String, nil?: true

  # @!attribute tax_rate
  #   The VAT rate of the line item expressed as percentage with 2 decimals
  #
  #   @return [String, nil]
  optional :tax_rate, String, nil?: true

  # @!attribute unit
  #   Unit of Measure Codes from UNECERec20 used in Peppol BIS Billing 3.0.
  #
  #   @return [Symbol, EInvoiceAPI::Models::UnitOfMeasureCode, nil]
  optional :unit, enum: -> { EInvoiceAPI::UnitOfMeasureCode }, nil?: true

  # @!attribute unit_price
  #   The item net price (BT-146). The price of an item, exclusive of VAT, after
  #   subtracting item price discount. Must be rounded to maximum 4 decimals
  #
  #   @return [String, nil]
  optional :unit_price, String, nil?: true

  # @!method initialize(allowances: nil, amount: nil, charges: nil, date: nil, description: nil, product_code: nil, quantity: nil, tax: nil, tax_rate: nil, unit: nil, unit_price: nil)
  #   Some parameter documentations has been truncated, see
  #   {EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Item} for more details.
  #
  #   @param allowances [Array<EInvoiceAPI::Models::Allowance>, nil] The allowances of the line item.
  #
  #   @param amount [String, nil] The invoice line net amount (BT-131), exclusive of VAT, inclusive of line level
  #
  #   @param charges [Array<EInvoiceAPI::Models::Charge>, nil] The charges of the line item.
  #
  #   @param date [nil]
  #
  #   @param description [String, nil] The description of the line item.
  #
  #   @param product_code [String, nil] The product code of the line item.
  #
  #   @param quantity [String, nil] The quantity of items (goods or services) that is the subject of the line item.
  #
  #   @param tax [String, nil] The total VAT amount for the line item. Must be rounded to maximum 2 decimals. C
  #
  #   @param tax_rate [String, nil] The VAT rate of the line item expressed as percentage with 2 decimals
  #
  #   @param unit [Symbol, EInvoiceAPI::Models::UnitOfMeasureCode, nil] Unit of Measure Codes from UNECERec20 used in Peppol BIS Billing 3.0.
  #
  #   @param unit_price [String, nil] The item net price (BT-146). The price of an item, exclusive of VAT, after subtr
end

Instance Attribute Details

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

The allowances of the line item.

Returns:



423
# File 'lib/e_invoice_api/models/document_create_from_pdf_response.rb', line 423

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

#amountString?

The invoice line net amount (BT-131), exclusive of VAT, inclusive of line level allowances and charges. Calculated as: ((unit_price / price_base_quantity) * quantity) - allowances + charges. Must be rounded to maximum 2 decimals. Can be negative for credit notes or corrections.

Returns:

  • (String, nil)


432
# File 'lib/e_invoice_api/models/document_create_from_pdf_response.rb', line 432

optional :amount, String, nil?: true

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

The charges of the line item.

Returns:



438
# File 'lib/e_invoice_api/models/document_create_from_pdf_response.rb', line 438

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

#datenil

Returns:

  • (nil)


443
# File 'lib/e_invoice_api/models/document_create_from_pdf_response.rb', line 443

optional :date, NilClass

#descriptionString?

The description of the line item.

Returns:

  • (String, nil)


449
# File 'lib/e_invoice_api/models/document_create_from_pdf_response.rb', line 449

optional :description, String, nil?: true

#product_codeString?

The product code of the line item.

Returns:

  • (String, nil)


455
# File 'lib/e_invoice_api/models/document_create_from_pdf_response.rb', line 455

optional :product_code, String, nil?: true

#quantityString?

The quantity of items (goods or services) that is the subject of the line item. Must be rounded to maximum 4 decimals. Can be negative for credit notes or corrections.

Returns:

  • (String, nil)


463
# File 'lib/e_invoice_api/models/document_create_from_pdf_response.rb', line 463

optional :quantity, String, nil?: true

#taxString?

The total VAT amount for the line item. Must be rounded to maximum 2 decimals. Can be negative for credit notes or corrections.

Returns:

  • (String, nil)


470
# File 'lib/e_invoice_api/models/document_create_from_pdf_response.rb', line 470

optional :tax, String, nil?: true

#tax_rateString?

The VAT rate of the line item expressed as percentage with 2 decimals

Returns:

  • (String, nil)


476
# File 'lib/e_invoice_api/models/document_create_from_pdf_response.rb', line 476

optional :tax_rate, String, nil?: true

#unitSymbol, ...

Unit of Measure Codes from UNECERec20 used in Peppol BIS Billing 3.0.

Returns:



482
# File 'lib/e_invoice_api/models/document_create_from_pdf_response.rb', line 482

optional :unit, enum: -> { EInvoiceAPI::UnitOfMeasureCode }, nil?: true

#unit_priceString?

The item net price (BT-146). The price of an item, exclusive of VAT, after subtracting item price discount. Must be rounded to maximum 4 decimals

Returns:

  • (String, nil)


489
# File 'lib/e_invoice_api/models/document_create_from_pdf_response.rb', line 489

optional :unit_price, String, nil?: true