Class: EInvoiceAPI::Models::DocumentCreate::Item::Charge

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

Defined Under Namespace

Modules: Amount, BaseAmount, MultiplierFactor, ReasonCode, TaxCode, TaxRate

Instance Attribute Summary collapse

Class Method 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(amount: nil, base_amount: nil, multiplier_factor: nil, reason: nil, reason_code: nil, tax_code: nil, tax_rate: nil) ⇒ Object

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

A charge is an additional fee for example for late payment, late delivery, etc.

Parameters:

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

    The charge amount, without VAT. Must be rounded to maximum 2 decimals

  • base_amount (Float, String, nil) (defaults to: nil)

    The base amount that may be used, in conjunction with the charge percentage, to

  • multiplier_factor (Float, String, nil) (defaults to: nil)

    The percentage that may be used, in conjunction with the charge base amount, to

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

    The reason for the charge

  • reason_code (Symbol, EInvoiceAPI::Models::DocumentCreate::Item::Charge::ReasonCode, nil) (defaults to: nil)

    Charge reason codes for invoice charges and fees

  • tax_code (Symbol, EInvoiceAPI::Models::DocumentCreate::Item::Charge::TaxCode, nil) (defaults to: nil)

    Duty or tax or fee category codes (Subset of UNCL5305)

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

    The VAT rate, represented as percentage that applies to the charge



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


Instance Attribute Details

#amountFloat, ...

The charge amount, without VAT. Must be rounded to maximum 2 decimals

Returns:

  • (Float, String, nil)


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

optional :amount, union: -> { EInvoiceAPI::DocumentCreate::Item::Charge::Amount }, nil?: true

#base_amountFloat, ...

The base amount that may be used, in conjunction with the charge percentage, to calculate the charge amount. Must be rounded to maximum 2 decimals

Returns:

  • (Float, String, nil)


1286
1287
1288
1289
1290
# File 'lib/e_invoice_api/models/document_create.rb', line 1286

optional :base_amount,
union: -> {
  EInvoiceAPI::DocumentCreate::Item::Charge::BaseAmount
},
nil?: true

#multiplier_factorFloat, ...

The percentage that may be used, in conjunction with the charge base amount, to calculate the charge amount. To state 20%, use value 20

Returns:

  • (Float, String, nil)


1297
1298
1299
# File 'lib/e_invoice_api/models/document_create.rb', line 1297

optional :multiplier_factor,
union: -> { EInvoiceAPI::DocumentCreate::Item::Charge::MultiplierFactor },
nil?: true

#reasonString?

The reason for the charge

Returns:

  • (String, nil)


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

optional :reason, String, nil?: true

#reason_codeSymbol, ...

Charge reason codes for invoice charges and fees



1311
1312
1313
1314
1315
# File 'lib/e_invoice_api/models/document_create.rb', line 1311

optional :reason_code,
enum: -> {
  EInvoiceAPI::DocumentCreate::Item::Charge::ReasonCode
},
nil?: true

#tax_codeSymbol, ...

Duty or tax or fee category codes (Subset of UNCL5305)

Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL



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

optional :tax_code, enum: -> { EInvoiceAPI::DocumentCreate::Item::Charge::TaxCode }, nil?: true

#tax_rateFloat, ...

The VAT rate, represented as percentage that applies to the charge

Returns:

  • (Float, String, nil)


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

optional :tax_rate, union: -> { EInvoiceAPI::DocumentCreate::Item::Charge::TaxRate }, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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


.variantsArray(Float, String)

Returns:

  • (Array(Float, String))


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