Class: EInvoiceAPI::Models::DocumentCreate::Item
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- EInvoiceAPI::Models::DocumentCreate::Item
- Defined in:
- lib/e_invoice_api/models/document_create.rb,
sig/e_invoice_api/models/document_create.rbs
Defined Under Namespace
Modules: Amount, Quantity, Tax, TaxRate, UnitPrice Classes: Allowance, Charge, ItemAttribute
Instance Attribute Summary collapse
-
#allowances ⇒ Array<EInvoiceAPI::Models::DocumentCreate::Item::Allowance>?
The allowances of the line item.
-
#amount ⇒ Float, ...
The invoice line net amount (BT-131), exclusive of VAT, inclusive of line level allowances and charges.
-
#charges ⇒ Array<EInvoiceAPI::Models::DocumentCreate::Item::Charge>?
The charges of the line item.
- #date ⇒ nil
-
#description ⇒ String?
The description of the line item.
-
#item_attributes ⇒ Array<EInvoiceAPI::Models::DocumentCreate::Item::ItemAttribute>?
Item-level attributes (BG-32) from cac:AdditionalItemProperty.
-
#product_code ⇒ String?
The product code of the line item.
-
#quantity ⇒ Float, ...
The quantity of items (goods or services) that is the subject of the line item.
-
#tax ⇒ Float, ...
The total VAT amount for the line item.
-
#tax_rate ⇒ Float, ...
The VAT rate of the line item expressed as percentage with 2 decimals.
-
#unit ⇒ Symbol, ...
Unit of Measure Codes from UNECERec20 used in Peppol BIS Billing 3.0.
-
#unit_price ⇒ Float, ...
The item net price (BT-146).
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name:, value: nil) ⇒ Object
constructor
An item-level attribute (BG-32 / BT-160 + BT-161) from cac:AdditionalItemProperty.
- #to_hash ⇒ {
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(name:, value: nil) ⇒ Object
An item-level attribute (BG-32 / BT-160 + BT-161) from cac:AdditionalItemProperty.
|
|
# File 'lib/e_invoice_api/models/document_create.rb', line 1655
|
Instance Attribute Details
#allowances ⇒ Array<EInvoiceAPI::Models::DocumentCreate::Item::Allowance>?
The allowances of the line item.
978 979 980 |
# File 'lib/e_invoice_api/models/document_create.rb', line 978 optional :allowances, -> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::DocumentCreate::Item::Allowance] }, nil?: true |
#amount ⇒ Float, ...
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.
989 |
# File 'lib/e_invoice_api/models/document_create.rb', line 989 optional :amount, union: -> { EInvoiceAPI::DocumentCreate::Item::Amount }, nil?: true |
#charges ⇒ Array<EInvoiceAPI::Models::DocumentCreate::Item::Charge>?
The charges of the line item.
995 996 997 |
# File 'lib/e_invoice_api/models/document_create.rb', line 995 optional :charges, -> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::DocumentCreate::Item::Charge] }, nil?: true |
#date ⇒ nil
1002 |
# File 'lib/e_invoice_api/models/document_create.rb', line 1002 optional :date, NilClass |
#description ⇒ String?
The description of the line item.
1008 |
# File 'lib/e_invoice_api/models/document_create.rb', line 1008 optional :description, String, nil?: true |
#item_attributes ⇒ Array<EInvoiceAPI::Models::DocumentCreate::Item::ItemAttribute>?
Item-level attributes (BG-32) from cac:AdditionalItemProperty.
1014 1015 1016 1017 1018 |
# File 'lib/e_invoice_api/models/document_create.rb', line 1014 optional :item_attributes, -> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::DocumentCreate::Item::ItemAttribute] }, nil?: true |
#product_code ⇒ String?
The product code of the line item.
1024 |
# File 'lib/e_invoice_api/models/document_create.rb', line 1024 optional :product_code, String, nil?: true |
#quantity ⇒ Float, ...
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.
1032 |
# File 'lib/e_invoice_api/models/document_create.rb', line 1032 optional :quantity, union: -> { EInvoiceAPI::DocumentCreate::Item::Quantity }, nil?: true |
#tax ⇒ Float, ...
The total VAT amount for the line item. Must be rounded to maximum 2 decimals. Can be negative for credit notes or corrections.
1039 |
# File 'lib/e_invoice_api/models/document_create.rb', line 1039 optional :tax, union: -> { EInvoiceAPI::DocumentCreate::Item::Tax }, nil?: true |
#tax_rate ⇒ Float, ...
The VAT rate of the line item expressed as percentage with 2 decimals
1045 |
# File 'lib/e_invoice_api/models/document_create.rb', line 1045 optional :tax_rate, union: -> { EInvoiceAPI::DocumentCreate::Item::TaxRate }, nil?: true |
#unit ⇒ Symbol, ...
Unit of Measure Codes from UNECERec20 used in Peppol BIS Billing 3.0.
1051 |
# File 'lib/e_invoice_api/models/document_create.rb', line 1051 optional :unit, enum: -> { EInvoiceAPI::UnitOfMeasureCode }, nil?: true |
#unit_price ⇒ Float, ...
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
1058 |
# File 'lib/e_invoice_api/models/document_create.rb', line 1058 optional :unit_price, union: -> { EInvoiceAPI::DocumentCreate::Item::UnitPrice }, nil?: true |
Class Method Details
.variants ⇒ Array(Float, String)
|
|
# File 'lib/e_invoice_api/models/document_create.rb', line 1272
|
Instance Method Details
#to_hash ⇒ {
967 |
# File 'sig/e_invoice_api/models/document_create.rbs', line 967
def to_hash: -> {
|