Class: EInvoiceAPI::Models::DocumentResponse::Item

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

Defined Under Namespace

Classes: ItemAttribute

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

#initializeObject



873
# File 'sig/e_invoice_api/models/document_response.rbs', line 873

def initialize: (

Instance Attribute Details

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

The allowances of the line item.

Parameters:

Returns:



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

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.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :amount, String, nil?: true

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

The charges of the line item.

Parameters:

Returns:



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

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

#datenil

Parameters:

  • value (nil)

Returns:

  • (nil)


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

optional :date, NilClass

#descriptionString?

The description of the line item.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :description, String, nil?: true

#item_attributesArray<EInvoiceAPI::Models::DocumentResponse::Item::ItemAttribute>?

Item-level attributes (BG-32) from cac:AdditionalItemProperty.

Parameters:

  • value (::Array[EInvoiceAPI::DocumentResponse::Item::ItemAttribute], nil)

Returns:



860
861
862
863
864
# File 'lib/e_invoice_api/models/document_response.rb', line 860

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

#product_codeString?

The product code of the line item.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

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.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

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.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :tax, String, nil?: true

#tax_rateString?

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

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :tax_rate, String, nil?: true

#unitSymbol, ...

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

Parameters:

  • value (EInvoiceAPI::Models::unit_of_measure_code, nil)

Returns:



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

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

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :unit_price, String, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


888
# File 'sig/e_invoice_api/models/document_response.rbs', line 888

def to_hash: -> {