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, 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::Item::Allowance for more details.
An allowance is a discount for example for early payment, volume discount, etc.
1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 |
# File 'lib/e_invoice_api/models/document_create.rb', line 1068 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. Must be rounded # to maximum 2 decimals # # @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 # Allowance reason codes for invoice discounts and charges # # @return [Symbol, EInvoiceAPI::Models::DocumentCreate::Item::Allowance::ReasonCode, nil] optional :reason_code, enum: -> { EInvoiceAPI::DocumentCreate::Item::Allowance::ReasonCode }, nil?: true # @!attribute tax_code # The VAT category code that applies to the allowance # # @return [Symbol, EInvoiceAPI::Models::DocumentCreate::Item::Allowance::TaxCode, nil] optional :tax_code, enum: -> { EInvoiceAPI::DocumentCreate::Item::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::Item::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::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 [Symbol, EInvoiceAPI::Models::DocumentCreate::Item::Allowance::ReasonCode, nil] Allowance reason codes for invoice discounts and charges # # @param tax_code [Symbol, EInvoiceAPI::Models::DocumentCreate::Item::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::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. Must be rounded # to maximum 2 decimals # # @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 # Allowance reason codes for invoice discounts and charges # # @see EInvoiceAPI::Models::DocumentCreate::Item::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::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 # The VAT rate, represented as percentage that applies to the allowance. Must be # rounded to maximum 2 decimals # # @see EInvoiceAPI::Models::DocumentCreate::Item::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
1073 |
# File 'lib/e_invoice_api/models/document_create.rb', line 1073 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
1080 1081 1082 1083 1084 |
# File 'lib/e_invoice_api/models/document_create.rb', line 1080 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. Must be rounded to maximum 2 decimals
1092 1093 1094 |
# File 'lib/e_invoice_api/models/document_create.rb', line 1092 optional :multiplier_factor, union: -> { EInvoiceAPI::DocumentCreate::Item::Allowance::MultiplierFactor }, nil?: true |
#reason ⇒ String?
The reason for the allowance
1100 |
# File 'lib/e_invoice_api/models/document_create.rb', line 1100 optional :reason, String, nil?: true |
#reason_code ⇒ Symbol, ...
Allowance reason codes for invoice discounts and charges
1106 1107 1108 1109 1110 |
# File 'lib/e_invoice_api/models/document_create.rb', line 1106 optional :reason_code, enum: -> { EInvoiceAPI::DocumentCreate::Item::Allowance::ReasonCode }, nil?: true |
#tax_code ⇒ Symbol, ...
The VAT category code that applies to the allowance
1116 |
# File 'lib/e_invoice_api/models/document_create.rb', line 1116 optional :tax_code, enum: -> { EInvoiceAPI::DocumentCreate::Item::Allowance::TaxCode } |
#tax_rate ⇒ Float, ...
The VAT rate, represented as percentage that applies to the allowance. Must be rounded to maximum 2 decimals
1123 |
# File 'lib/e_invoice_api/models/document_create.rb', line 1123 optional :tax_rate, union: -> { EInvoiceAPI::DocumentCreate::Item::Allowance::TaxRate }, nil?: true |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/e_invoice_api/models/document_create.rb', line 1216
|
.variants ⇒ Array(Float, String)
|
|
# File 'lib/e_invoice_api/models/document_create.rb', line 1155
|