Class: EInvoiceAPI::Models::Allowance

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

Defined Under Namespace

Modules: TaxCode

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(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::Allowance for more details.

An allowance is a discount for example for early payment, volume discount, etc.

Parameters:

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

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

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

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

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

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

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

    The reason for the allowance

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

    The code for the allowance reason

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

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

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

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



# File 'lib/e_invoice_api/models/allowance.rb', line 52

Instance Attribute Details

#amountString?

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

Returns:

  • (String, nil)


10
# File 'lib/e_invoice_api/models/allowance.rb', line 10

optional :amount, String, nil?: true

#base_amountString?

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

Returns:

  • (String, nil)


17
# File 'lib/e_invoice_api/models/allowance.rb', line 17

optional :base_amount, String, nil?: true

#multiplier_factorString?

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

Returns:

  • (String, nil)


24
# File 'lib/e_invoice_api/models/allowance.rb', line 24

optional :multiplier_factor, String, nil?: true

#reasonString?

The reason for the allowance

Returns:

  • (String, nil)


30
# File 'lib/e_invoice_api/models/allowance.rb', line 30

optional :reason, String, nil?: true

#reason_codeString?

The code for the allowance reason

Returns:

  • (String, nil)


36
# File 'lib/e_invoice_api/models/allowance.rb', line 36

optional :reason_code, String, nil?: true

#tax_codeSymbol, ...

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

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

Returns:



44
# File 'lib/e_invoice_api/models/allowance.rb', line 44

optional :tax_code, enum: -> { EInvoiceAPI::Allowance::TaxCode }, nil?: true

#tax_rateString?

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

Returns:

  • (String, nil)


50
# File 'lib/e_invoice_api/models/allowance.rb', line 50

optional :tax_rate, String, nil?: true