Class: EInvoiceAPI::Models::Allowance

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

Defined Under Namespace

Modules: ReasonCode, TaxCode

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::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 (Symbol, EInvoiceAPI::Models::Allowance::ReasonCode, nil) (defaults to: nil)

    Allowance reason codes for invoice discounts and charges

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

    The VAT category code that applies to the allowance

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

    The VAT rate, represented as percentage that applies to the allowance. Must be r



# 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. Must be rounded to maximum 2 decimals

Returns:

  • (String, nil)


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

optional :multiplier_factor, String, nil?: true

#reasonString?

The reason for the allowance

Returns:

  • (String, nil)


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

optional :reason, String, nil?: true

#reason_codeSymbol, ...

Allowance reason codes for invoice discounts and charges



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

optional :reason_code, enum: -> { EInvoiceAPI::Allowance::ReasonCode }, nil?: true

#tax_codeSymbol, ...

The VAT category code that applies to the allowance

Returns:



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

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

#tax_rateString?

The VAT rate, represented as percentage that applies to the allowance. Must be rounded to maximum 2 decimals

Returns:

  • (String, nil)


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

optional :tax_rate, String, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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