Class: EInvoiceAPI::Models::DocumentCreate::Item::Allowance
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- EInvoiceAPI::Models::DocumentCreate::Item::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::Item::Allowance for more details.
An allowance is a discount for example for early payment, volume discount, etc.
766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 |
# File 'lib/e_invoice_api/models/document_create.rb', line 766 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::Item::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::Item::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::Item::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::Item::Allowance::TaxCode, nil] optional :tax_code, enum: -> { EInvoiceAPI::DocumentCreate::Item::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::Item::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::Item::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::Item::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::Item::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::Item::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::Item::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
771 |
# File 'lib/e_invoice_api/models/document_create.rb', line 771 optional :amount, union: -> { EInvoiceAPI::DocumentCreate::Item::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
778 779 780 781 782 |
# File 'lib/e_invoice_api/models/document_create.rb', line 778 optional :base_amount, union: -> { EInvoiceAPI::DocumentCreate::Item::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
789 790 791 |
# File 'lib/e_invoice_api/models/document_create.rb', line 789 optional :multiplier_factor, union: -> { EInvoiceAPI::DocumentCreate::Item::Allowance::MultiplierFactor }, nil?: true |
#reason ⇒ String?
The reason for the allowance
797 |
# File 'lib/e_invoice_api/models/document_create.rb', line 797 optional :reason, String, nil?: true |
#reason_code ⇒ String?
The code for the allowance reason
803 |
# File 'lib/e_invoice_api/models/document_create.rb', line 803 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
811 |
# File 'lib/e_invoice_api/models/document_create.rb', line 811 optional :tax_code, enum: -> { EInvoiceAPI::DocumentCreate::Item::Allowance::TaxCode }, nil?: true |
#tax_rate ⇒ String?
The VAT rate, represented as percentage that applies to the allowance
817 |
# File 'lib/e_invoice_api/models/document_create.rb', line 817 optional :tax_rate, String, nil?: true |
Class Method Details
.variants ⇒ Array(Float, String)
|
|
# File 'lib/e_invoice_api/models/document_create.rb', line 849
|