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

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

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: nil, charges: nil, date: nil, description: nil, item_attributes: nil, product_code: nil, quantity: nil, tax: nil, tax_rate: nil, unit: nil, unit_price: nil) ⇒ ItemAttribute

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

Parameters:

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

    The allowances of the line item.

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

    The invoice line net amount (BT-131), exclusive of VAT, inclusive of line level

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

    The charges of the line item.

  • date (nil) (defaults to: nil)
  • description (String, nil) (defaults to: nil)

    The description of the line item.

  • item_attributes (Array<EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Item::ItemAttribute>, nil) (defaults to: nil)

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

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

    The product code of the line item.

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

    The quantity of items (goods or services) that is the subject of the line item.

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

    The total VAT amount for the line item. Must be rounded to maximum 2 decimals. C

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

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

  • unit (Symbol, EInvoiceAPI::Models::UnitOfMeasureCode, nil) (defaults to: nil)

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

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

    The item net price (BT-146). The price of an item, exclusive of VAT, after subtr

  • name: (String)
  • value: (String, nil)


551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
# File 'lib/e_invoice_api/models/document_create_from_pdf_response.rb', line 551

class ItemAttribute < EInvoiceAPI::Internal::Type::BaseModel
  # @!attribute name
  #   Attribute name (BT-160).
  #
  #   @return [String]
  required :name, String

  # @!attribute value
  #   Attribute value (BT-161).
  #
  #   @return [String, nil]
  optional :value, String, nil?: true

  # @!method initialize(name:, value: nil)
  #   An item-level attribute (BG-32 / BT-160 + BT-161) from
  #   cac:AdditionalItemProperty.
  #
  #   @param name [String] Attribute name (BT-160).
  #
  #   @param value [String, nil] Attribute value (BT-161).
end

Instance Attribute Details

#nameString

Attribute name (BT-160).

Parameters:

  • value (String)

Returns:

  • (String)


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

required :name, String

#valueString?

Attribute value (BT-161).

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :value, String, nil?: true

Instance Method Details

#to_hash{ name: String, value: String? }

Returns:

  • ({ name: String, value: String? })


380
# File 'sig/e_invoice_api/models/document_create_from_pdf_response.rbs', line 380

def to_hash: -> { name: String, value: String? }