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, ReasonCode, TaxCode, TaxRate
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 ⇒ Symbol, ...
Allowance reason codes for invoice discounts and charges.
-
#tax_code ⇒ Symbol, ...
The VAT category code that applies to the allowance.
-
#tax_rate ⇒ Float, ...
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.
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 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 |
# File 'lib/e_invoice_api/models/document_create.rb', line 415 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. Must be rounded # to maximum 2 decimals # # @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 # Allowance reason codes for invoice discounts and charges # # @return [Symbol, EInvoiceAPI::Models::DocumentCreate::Allowance::ReasonCode, nil] optional :reason_code, enum: -> { EInvoiceAPI::DocumentCreate::Allowance::ReasonCode }, nil?: true # @!attribute tax_code # The VAT category code that applies to the allowance # # @return [Symbol, EInvoiceAPI::Models::DocumentCreate::Allowance::TaxCode, nil] optional :tax_code, enum: -> { EInvoiceAPI::DocumentCreate::Allowance::TaxCode } # @!attribute tax_rate # The VAT rate, represented as percentage that applies to the allowance. Must be # rounded to maximum 2 decimals # # @return [Float, String, nil] optional :tax_rate, union: -> { EInvoiceAPI::DocumentCreate::Allowance::TaxRate }, 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 [Symbol, EInvoiceAPI::Models::DocumentCreate::Allowance::ReasonCode, nil] Allowance reason codes for invoice discounts and charges # # @param tax_code [Symbol, EInvoiceAPI::Models::DocumentCreate::Allowance::TaxCode] The VAT category code that applies to the allowance # # @param tax_rate [Float, String, nil] The VAT rate, represented as percentage that applies to the allowance. Must be r # 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. Must be rounded # to maximum 2 decimals # # @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 # Allowance reason codes for invoice discounts and charges # # @see EInvoiceAPI::Models::DocumentCreate::Allowance#reason_code module ReasonCode extend EInvoiceAPI::Internal::Type::Enum REASON_CODE_41 = :"41" REASON_CODE_42 = :"42" REASON_CODE_60 = :"60" REASON_CODE_62 = :"62" REASON_CODE_63 = :"63" REASON_CODE_64 = :"64" REASON_CODE_65 = :"65" REASON_CODE_66 = :"66" REASON_CODE_67 = :"67" REASON_CODE_68 = :"68" REASON_CODE_70 = :"70" REASON_CODE_71 = :"71" REASON_CODE_88 = :"88" REASON_CODE_95 = :"95" REASON_CODE_100 = :"100" REASON_CODE_102 = :"102" REASON_CODE_103 = :"103" REASON_CODE_104 = :"104" REASON_CODE_105 = :"105" # @!method self.values # @return [Array<Symbol>] end # The VAT category code that applies to the allowance # # @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 # The VAT rate, represented as percentage that applies to the allowance. Must be # rounded to maximum 2 decimals # # @see EInvoiceAPI::Models::DocumentCreate::Allowance#tax_rate module TaxRate extend EInvoiceAPI::Internal::Type::Union variant Float variant String # @!method self.variants # @return [Array(Float, String)] end end |
Instance Attribute Details
#amount ⇒ Float, ...
The allowance amount, without VAT. Must be rounded to maximum 2 decimals
420 |
# File 'lib/e_invoice_api/models/document_create.rb', line 420 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
427 |
# File 'lib/e_invoice_api/models/document_create.rb', line 427 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. Must be rounded to maximum 2 decimals
435 436 437 |
# File 'lib/e_invoice_api/models/document_create.rb', line 435 optional :multiplier_factor, union: -> { EInvoiceAPI::DocumentCreate::Allowance::MultiplierFactor }, nil?: true |
#reason ⇒ String?
The reason for the allowance
443 |
# File 'lib/e_invoice_api/models/document_create.rb', line 443 optional :reason, String, nil?: true |
#reason_code ⇒ Symbol, ...
Allowance reason codes for invoice discounts and charges
449 |
# File 'lib/e_invoice_api/models/document_create.rb', line 449 optional :reason_code, enum: -> { EInvoiceAPI::DocumentCreate::Allowance::ReasonCode }, nil?: true |
#tax_code ⇒ Symbol, ...
The VAT category code that applies to the allowance
455 |
# File 'lib/e_invoice_api/models/document_create.rb', line 455 optional :tax_code, enum: -> { EInvoiceAPI::DocumentCreate::Allowance::TaxCode } |
#tax_rate ⇒ Float, ...
The VAT rate, represented as percentage that applies to the allowance. Must be rounded to maximum 2 decimals
462 |
# File 'lib/e_invoice_api/models/document_create.rb', line 462 optional :tax_rate, union: -> { EInvoiceAPI::DocumentCreate::Allowance::TaxRate }, nil?: true |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/e_invoice_api/models/document_create.rb', line 555
|
.variants ⇒ Array(Float, String)
|
|
# File 'lib/e_invoice_api/models/document_create.rb', line 494
|