Class: EInvoiceAPI::Models::DocumentCreate::Allowance
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- EInvoiceAPI::Models::DocumentCreate::Allowance
- Defined in:
- lib/e_invoice_api/models/document_create.rb
Defined Under Namespace
Modules: Amount, BaseAmount, MultiplierFactor, TaxCode
Instance Attribute Summary collapse
-
#amount ⇒ Float, ...
The allowance amount, without VAT.
-
#base_amount ⇒ Float, ...
The base amount that may be used, in conjunction with the allowance percentage, to calculate the allowance amount.
-
#multiplier_factor ⇒ Float, ...
The percentage that may be used, in conjunction with the allowance base amount, to calculate the allowance amount.
-
#reason ⇒ String?
The reason for the allowance.
-
#reason_code ⇒ String?
The code for the allowance reason.
-
#tax_code ⇒ Symbol, ...
Duty or tax or fee category codes (Subset of UNCL5305).
-
#tax_rate ⇒ String?
The VAT rate, represented as percentage that applies to the allowance.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(amount: nil, base_amount: nil, multiplier_factor: nil, reason: nil, reason_code: nil, tax_code: nil, tax_rate: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see Allowance for more details.
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::Allowance for more details.
An allowance is a discount for example for early payment, volume discount, etc.
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 |
# File 'lib/e_invoice_api/models/document_create.rb', line 363 class Allowance < EInvoiceAPI::Internal::Type::BaseModel # @!attribute amount # The allowance amount, without VAT. Must be rounded to maximum 2 decimals # # @return [Float, String, nil] optional :amount, union: -> { EInvoiceAPI::DocumentCreate::Allowance::Amount }, nil?: true # @!attribute base_amount # 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 # # @return [Float, String, nil] optional :base_amount, union: -> { EInvoiceAPI::DocumentCreate::Allowance::BaseAmount }, nil?: true # @!attribute multiplier_factor # The percentage that may be used, in conjunction with the allowance base amount, # to calculate the allowance amount. To state 20%, use value 20 # # @return [Float, String, nil] optional :multiplier_factor, union: -> { EInvoiceAPI::DocumentCreate::Allowance::MultiplierFactor }, nil?: true # @!attribute reason # The reason for the allowance # # @return [String, nil] optional :reason, String, nil?: true # @!attribute reason_code # The code for the allowance reason # # @return [String, nil] optional :reason_code, String, nil?: true # @!attribute tax_code # Duty or tax or fee category codes (Subset of UNCL5305) # # Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL # # @return [Symbol, EInvoiceAPI::Models::DocumentCreate::Allowance::TaxCode, nil] optional :tax_code, enum: -> { EInvoiceAPI::DocumentCreate::Allowance::TaxCode }, nil?: true # @!attribute tax_rate # The VAT rate, represented as percentage that applies to the allowance # # @return [String, nil] optional :tax_rate, String, nil?: true # @!method initialize(amount: nil, base_amount: nil, multiplier_factor: nil, reason: nil, reason_code: nil, tax_code: nil, tax_rate: nil) # Some parameter documentations has been truncated, see # {EInvoiceAPI::Models::DocumentCreate::Allowance} for more details. # # An allowance is a discount for example for early payment, volume discount, etc. # # @param amount [Float, String, nil] The allowance amount, without VAT. Must be rounded to maximum 2 decimals # # @param base_amount [Float, String, nil] The base amount that may be used, in conjunction with the allowance percentage, # # @param multiplier_factor [Float, String, nil] The percentage that may be used, in conjunction with the allowance base amount, # # @param reason [String, nil] The reason for the allowance # # @param reason_code [String, nil] The code for the allowance reason # # @param tax_code [Symbol, EInvoiceAPI::Models::DocumentCreate::Allowance::TaxCode, nil] Duty or tax or fee category codes (Subset of UNCL5305) # # @param tax_rate [String, nil] The VAT rate, represented as percentage that applies to the allowance # The allowance amount, without VAT. Must be rounded to maximum 2 decimals # # @see EInvoiceAPI::Models::DocumentCreate::Allowance#amount module Amount extend EInvoiceAPI::Internal::Type::Union variant Float variant String # @!method self.variants # @return [Array(Float, String)] end # 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 # # @see EInvoiceAPI::Models::DocumentCreate::Allowance#base_amount module BaseAmount extend EInvoiceAPI::Internal::Type::Union variant Float variant String # @!method self.variants # @return [Array(Float, String)] end # The percentage that may be used, in conjunction with the allowance base amount, # to calculate the allowance amount. To state 20%, use value 20 # # @see EInvoiceAPI::Models::DocumentCreate::Allowance#multiplier_factor module MultiplierFactor extend EInvoiceAPI::Internal::Type::Union variant Float variant String # @!method self.variants # @return [Array(Float, String)] end # Duty or tax or fee category codes (Subset of UNCL5305) # # Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL # # @see EInvoiceAPI::Models::DocumentCreate::Allowance#tax_code module TaxCode extend EInvoiceAPI::Internal::Type::Enum AE = :AE E = :E S = :S Z = :Z G = :G O = :O K = :K L = :L M = :M B = :B # @!method self.values # @return [Array<Symbol>] end end |
Instance Attribute Details
#amount ⇒ Float, ...
The allowance amount, without VAT. Must be rounded to maximum 2 decimals
368 |
# File 'lib/e_invoice_api/models/document_create.rb', line 368 optional :amount, union: -> { EInvoiceAPI::DocumentCreate::Allowance::Amount }, nil?: true |
#base_amount ⇒ Float, ...
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
375 |
# File 'lib/e_invoice_api/models/document_create.rb', line 375 optional :base_amount, union: -> { EInvoiceAPI::DocumentCreate::Allowance::BaseAmount }, nil?: true |
#multiplier_factor ⇒ Float, ...
The percentage that may be used, in conjunction with the allowance base amount, to calculate the allowance amount. To state 20%, use value 20
382 383 384 |
# File 'lib/e_invoice_api/models/document_create.rb', line 382 optional :multiplier_factor, union: -> { EInvoiceAPI::DocumentCreate::Allowance::MultiplierFactor }, nil?: true |
#reason ⇒ String?
The reason for the allowance
390 |
# File 'lib/e_invoice_api/models/document_create.rb', line 390 optional :reason, String, nil?: true |
#reason_code ⇒ String?
The code for the allowance reason
396 |
# File 'lib/e_invoice_api/models/document_create.rb', line 396 optional :reason_code, String, nil?: true |
#tax_code ⇒ Symbol, ...
Duty or tax or fee category codes (Subset of UNCL5305)
Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL
404 |
# File 'lib/e_invoice_api/models/document_create.rb', line 404 optional :tax_code, enum: -> { EInvoiceAPI::DocumentCreate::Allowance::TaxCode }, nil?: true |
#tax_rate ⇒ String?
The VAT rate, represented as percentage that applies to the allowance
410 |
# File 'lib/e_invoice_api/models/document_create.rb', line 410 optional :tax_rate, String, nil?: true |
Class Method Details
.variants ⇒ Array(Float, String)
|
|
# File 'lib/e_invoice_api/models/document_create.rb', line 442
|