e-invoice-api 0.5.3 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +1 -1
- data/lib/e_invoice_api/models/document_create.rb +791 -19
- data/lib/e_invoice_api/models/document_response.rb +576 -23
- data/lib/e_invoice_api/resources/documents.rb +21 -8
- data/lib/e_invoice_api/resources/validate.rb +21 -8
- data/lib/e_invoice_api/version.rb +1 -1
- data/rbi/e_invoice_api/models/document_create.rbi +1553 -3
- data/rbi/e_invoice_api/models/document_response.rbi +1232 -41
- data/rbi/e_invoice_api/resources/documents.rbi +31 -1
- data/rbi/e_invoice_api/resources/validate.rbi +31 -1
- data/sig/e_invoice_api/models/document_create.rbs +559 -4
- data/sig/e_invoice_api/models/document_response.rbs +470 -31
- data/sig/e_invoice_api/resources/documents.rbs +6 -1
- data/sig/e_invoice_api/resources/validate.rbs +6 -1
- metadata +2 -2
|
@@ -3,7 +3,16 @@
|
|
|
3
3
|
module EInvoiceAPI
|
|
4
4
|
module Models
|
|
5
5
|
class DocumentCreate < EInvoiceAPI::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute allowances
|
|
7
|
+
#
|
|
8
|
+
# @return [Array<EInvoiceAPI::Models::DocumentCreate::Allowance>, nil]
|
|
9
|
+
optional :allowances,
|
|
10
|
+
-> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::DocumentCreate::Allowance] },
|
|
11
|
+
nil?: true
|
|
12
|
+
|
|
6
13
|
# @!attribute amount_due
|
|
14
|
+
# The amount due of the invoice. Must be positive and rounded to maximum 2
|
|
15
|
+
# decimals
|
|
7
16
|
#
|
|
8
17
|
# @return [Float, String, nil]
|
|
9
18
|
optional :amount_due, union: -> { EInvoiceAPI::DocumentCreate::AmountDue }, nil?: true
|
|
@@ -25,6 +34,13 @@ module EInvoiceAPI
|
|
|
25
34
|
# @return [String, nil]
|
|
26
35
|
optional :billing_address_recipient, String, nil?: true
|
|
27
36
|
|
|
37
|
+
# @!attribute charges
|
|
38
|
+
#
|
|
39
|
+
# @return [Array<EInvoiceAPI::Models::DocumentCreate::Charge>, nil]
|
|
40
|
+
optional :charges,
|
|
41
|
+
-> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::DocumentCreate::Charge] },
|
|
42
|
+
nil?: true
|
|
43
|
+
|
|
28
44
|
# @!attribute currency
|
|
29
45
|
# Currency of the invoice
|
|
30
46
|
#
|
|
@@ -87,16 +103,17 @@ module EInvoiceAPI
|
|
|
87
103
|
optional :invoice_id, String, nil?: true
|
|
88
104
|
|
|
89
105
|
# @!attribute invoice_total
|
|
106
|
+
# The total amount of the invoice (so invoice_total = subtotal + total_tax +
|
|
107
|
+
# total_discount). Must be positive and rounded to maximum 2 decimals
|
|
90
108
|
#
|
|
91
109
|
# @return [Float, String, nil]
|
|
92
110
|
optional :invoice_total, union: -> { EInvoiceAPI::DocumentCreate::InvoiceTotal }, nil?: true
|
|
93
111
|
|
|
94
112
|
# @!attribute items
|
|
113
|
+
# At least one line item is required
|
|
95
114
|
#
|
|
96
115
|
# @return [Array<EInvoiceAPI::Models::DocumentCreate::Item>, nil]
|
|
97
|
-
optional :items,
|
|
98
|
-
-> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::DocumentCreate::Item] },
|
|
99
|
-
nil?: true
|
|
116
|
+
optional :items, -> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::DocumentCreate::Item] }
|
|
100
117
|
|
|
101
118
|
# @!attribute note
|
|
102
119
|
#
|
|
@@ -116,6 +133,8 @@ module EInvoiceAPI
|
|
|
116
133
|
optional :payment_term, String, nil?: true
|
|
117
134
|
|
|
118
135
|
# @!attribute previous_unpaid_balance
|
|
136
|
+
# The previous unpaid balance of the invoice, if any. Must be positive and rounded
|
|
137
|
+
# to maximum 2 decimals
|
|
119
138
|
#
|
|
120
139
|
# @return [Float, String, nil]
|
|
121
140
|
optional :previous_unpaid_balance,
|
|
@@ -173,10 +192,19 @@ module EInvoiceAPI
|
|
|
173
192
|
optional :state, enum: -> { EInvoiceAPI::DocumentState }
|
|
174
193
|
|
|
175
194
|
# @!attribute subtotal
|
|
195
|
+
# The taxable base of the invoice. Should be the sum of all line items -
|
|
196
|
+
# allowances (for example commercial discounts) + charges with impact on VAT. Must
|
|
197
|
+
# be positive and rounded to maximum 2 decimals
|
|
176
198
|
#
|
|
177
199
|
# @return [Float, String, nil]
|
|
178
200
|
optional :subtotal, union: -> { EInvoiceAPI::DocumentCreate::Subtotal }, nil?: true
|
|
179
201
|
|
|
202
|
+
# @!attribute tax_code
|
|
203
|
+
# Tax category code of the invoice
|
|
204
|
+
#
|
|
205
|
+
# @return [Symbol, EInvoiceAPI::Models::DocumentCreate::TaxCode, nil]
|
|
206
|
+
optional :tax_code, enum: -> { EInvoiceAPI::DocumentCreate::TaxCode }
|
|
207
|
+
|
|
180
208
|
# @!attribute tax_details
|
|
181
209
|
#
|
|
182
210
|
# @return [Array<EInvoiceAPI::Models::DocumentCreate::TaxDetail>, nil]
|
|
@@ -185,15 +213,32 @@ module EInvoiceAPI
|
|
|
185
213
|
nil?: true
|
|
186
214
|
|
|
187
215
|
# @!attribute total_discount
|
|
216
|
+
# The total financial discount of the invoice (so discounts not subject to VAT).
|
|
217
|
+
# Must be positive and rounded to maximum 2 decimals
|
|
188
218
|
#
|
|
189
219
|
# @return [Float, String, nil]
|
|
190
220
|
optional :total_discount, union: -> { EInvoiceAPI::DocumentCreate::TotalDiscount }, nil?: true
|
|
191
221
|
|
|
192
222
|
# @!attribute total_tax
|
|
223
|
+
# The total tax of the invoice. Must be positive and rounded to maximum 2 decimals
|
|
193
224
|
#
|
|
194
225
|
# @return [Float, String, nil]
|
|
195
226
|
optional :total_tax, union: -> { EInvoiceAPI::DocumentCreate::TotalTax }, nil?: true
|
|
196
227
|
|
|
228
|
+
# @!attribute vatex
|
|
229
|
+
# VATEX code list for VAT exemption reasons
|
|
230
|
+
#
|
|
231
|
+
# Agency: CEF Identifier: vatex
|
|
232
|
+
#
|
|
233
|
+
# @return [Symbol, EInvoiceAPI::Models::DocumentCreate::Vatex, nil]
|
|
234
|
+
optional :vatex, enum: -> { EInvoiceAPI::DocumentCreate::Vatex }, nil?: true
|
|
235
|
+
|
|
236
|
+
# @!attribute vatex_note
|
|
237
|
+
# VAT exemption note of the invoice
|
|
238
|
+
#
|
|
239
|
+
# @return [String, nil]
|
|
240
|
+
optional :vatex_note, String, nil?: true
|
|
241
|
+
|
|
197
242
|
# @!attribute vendor_address
|
|
198
243
|
#
|
|
199
244
|
# @return [String, nil]
|
|
@@ -219,8 +264,13 @@ module EInvoiceAPI
|
|
|
219
264
|
# @return [String, nil]
|
|
220
265
|
optional :vendor_tax_id, String, nil?: true
|
|
221
266
|
|
|
222
|
-
# @!method initialize(amount_due: nil, attachments: nil, billing_address: nil, billing_address_recipient: nil, currency: nil, customer_address: nil, customer_address_recipient: nil, customer_email: nil, customer_id: nil, customer_name: nil, customer_tax_id: nil, direction: nil, document_type: nil, due_date: nil, invoice_date: nil, invoice_id: nil, invoice_total: nil, items: nil, note: nil, payment_details: nil, payment_term: nil, previous_unpaid_balance: nil, purchase_order: nil, remittance_address: nil, remittance_address_recipient: nil, service_address: nil, service_address_recipient: nil, service_end_date: nil, service_start_date: nil, shipping_address: nil, shipping_address_recipient: nil, state: nil, subtotal: nil, tax_details: nil, total_discount: nil, total_tax: nil, vendor_address: nil, vendor_address_recipient: nil, vendor_email: nil, vendor_name: nil, vendor_tax_id: nil)
|
|
223
|
-
#
|
|
267
|
+
# @!method initialize(allowances: nil, amount_due: nil, attachments: nil, billing_address: nil, billing_address_recipient: nil, charges: nil, currency: nil, customer_address: nil, customer_address_recipient: nil, customer_email: nil, customer_id: nil, customer_name: nil, customer_tax_id: nil, direction: nil, document_type: nil, due_date: nil, invoice_date: nil, invoice_id: nil, invoice_total: nil, items: nil, note: nil, payment_details: nil, payment_term: nil, previous_unpaid_balance: nil, purchase_order: nil, remittance_address: nil, remittance_address_recipient: nil, service_address: nil, service_address_recipient: nil, service_end_date: nil, service_start_date: nil, shipping_address: nil, shipping_address_recipient: nil, state: nil, subtotal: nil, tax_code: nil, tax_details: nil, total_discount: nil, total_tax: nil, vatex: nil, vatex_note: nil, vendor_address: nil, vendor_address_recipient: nil, vendor_email: nil, vendor_name: nil, vendor_tax_id: nil)
|
|
268
|
+
# Some parameter documentations has been truncated, see
|
|
269
|
+
# {EInvoiceAPI::Models::DocumentCreate} for more details.
|
|
270
|
+
#
|
|
271
|
+
# @param allowances [Array<EInvoiceAPI::Models::DocumentCreate::Allowance>, nil]
|
|
272
|
+
#
|
|
273
|
+
# @param amount_due [Float, String, nil] The amount due of the invoice. Must be positive and rounded to maximum 2 decimal
|
|
224
274
|
#
|
|
225
275
|
# @param attachments [Array<EInvoiceAPI::Models::DocumentAttachmentCreate>, nil]
|
|
226
276
|
#
|
|
@@ -228,6 +278,8 @@ module EInvoiceAPI
|
|
|
228
278
|
#
|
|
229
279
|
# @param billing_address_recipient [String, nil]
|
|
230
280
|
#
|
|
281
|
+
# @param charges [Array<EInvoiceAPI::Models::DocumentCreate::Charge>, nil]
|
|
282
|
+
#
|
|
231
283
|
# @param currency [Symbol, EInvoiceAPI::Models::CurrencyCode] Currency of the invoice
|
|
232
284
|
#
|
|
233
285
|
# @param customer_address [String, nil]
|
|
@@ -252,9 +304,9 @@ module EInvoiceAPI
|
|
|
252
304
|
#
|
|
253
305
|
# @param invoice_id [String, nil]
|
|
254
306
|
#
|
|
255
|
-
# @param invoice_total [Float, String, nil]
|
|
307
|
+
# @param invoice_total [Float, String, nil] The total amount of the invoice (so invoice_total = subtotal + total_tax + total
|
|
256
308
|
#
|
|
257
|
-
# @param items [Array<EInvoiceAPI::Models::DocumentCreate::Item
|
|
309
|
+
# @param items [Array<EInvoiceAPI::Models::DocumentCreate::Item>] At least one line item is required
|
|
258
310
|
#
|
|
259
311
|
# @param note [String, nil]
|
|
260
312
|
#
|
|
@@ -262,7 +314,7 @@ module EInvoiceAPI
|
|
|
262
314
|
#
|
|
263
315
|
# @param payment_term [String, nil]
|
|
264
316
|
#
|
|
265
|
-
# @param previous_unpaid_balance [Float, String, nil]
|
|
317
|
+
# @param previous_unpaid_balance [Float, String, nil] The previous unpaid balance of the invoice, if any. Must be positive and rounded
|
|
266
318
|
#
|
|
267
319
|
# @param purchase_order [String, nil]
|
|
268
320
|
#
|
|
@@ -284,13 +336,19 @@ module EInvoiceAPI
|
|
|
284
336
|
#
|
|
285
337
|
# @param state [Symbol, EInvoiceAPI::Models::DocumentState]
|
|
286
338
|
#
|
|
287
|
-
# @param subtotal [Float, String, nil]
|
|
339
|
+
# @param subtotal [Float, String, nil] The taxable base of the invoice. Should be the sum of all line items - allowance
|
|
340
|
+
#
|
|
341
|
+
# @param tax_code [Symbol, EInvoiceAPI::Models::DocumentCreate::TaxCode] Tax category code of the invoice
|
|
288
342
|
#
|
|
289
343
|
# @param tax_details [Array<EInvoiceAPI::Models::DocumentCreate::TaxDetail>, nil]
|
|
290
344
|
#
|
|
291
|
-
# @param total_discount [Float, String, nil]
|
|
345
|
+
# @param total_discount [Float, String, nil] The total financial discount of the invoice (so discounts not subject to VAT). M
|
|
346
|
+
#
|
|
347
|
+
# @param total_tax [Float, String, nil] The total tax of the invoice. Must be positive and rounded to maximum 2 decimals
|
|
348
|
+
#
|
|
349
|
+
# @param vatex [Symbol, EInvoiceAPI::Models::DocumentCreate::Vatex, nil] VATEX code list for VAT exemption reasons
|
|
292
350
|
#
|
|
293
|
-
# @param
|
|
351
|
+
# @param vatex_note [String, nil] VAT exemption note of the invoice
|
|
294
352
|
#
|
|
295
353
|
# @param vendor_address [String, nil]
|
|
296
354
|
#
|
|
@@ -302,6 +360,146 @@ module EInvoiceAPI
|
|
|
302
360
|
#
|
|
303
361
|
# @param vendor_tax_id [String, nil]
|
|
304
362
|
|
|
363
|
+
class Allowance < EInvoiceAPI::Internal::Type::BaseModel
|
|
364
|
+
# @!attribute amount
|
|
365
|
+
# The allowance amount, without VAT. Must be rounded to maximum 2 decimals
|
|
366
|
+
#
|
|
367
|
+
# @return [Float, String, nil]
|
|
368
|
+
optional :amount, union: -> { EInvoiceAPI::DocumentCreate::Allowance::Amount }, nil?: true
|
|
369
|
+
|
|
370
|
+
# @!attribute base_amount
|
|
371
|
+
# The base amount that may be used, in conjunction with the allowance percentage,
|
|
372
|
+
# to calculate the allowance amount. Must be rounded to maximum 2 decimals
|
|
373
|
+
#
|
|
374
|
+
# @return [Float, String, nil]
|
|
375
|
+
optional :base_amount, union: -> { EInvoiceAPI::DocumentCreate::Allowance::BaseAmount }, nil?: true
|
|
376
|
+
|
|
377
|
+
# @!attribute multiplier_factor
|
|
378
|
+
# The percentage that may be used, in conjunction with the allowance base amount,
|
|
379
|
+
# to calculate the allowance amount. To state 20%, use value 20
|
|
380
|
+
#
|
|
381
|
+
# @return [Float, String, nil]
|
|
382
|
+
optional :multiplier_factor,
|
|
383
|
+
union: -> { EInvoiceAPI::DocumentCreate::Allowance::MultiplierFactor },
|
|
384
|
+
nil?: true
|
|
385
|
+
|
|
386
|
+
# @!attribute reason
|
|
387
|
+
# The reason for the allowance
|
|
388
|
+
#
|
|
389
|
+
# @return [String, nil]
|
|
390
|
+
optional :reason, String, nil?: true
|
|
391
|
+
|
|
392
|
+
# @!attribute reason_code
|
|
393
|
+
# The code for the allowance reason
|
|
394
|
+
#
|
|
395
|
+
# @return [String, nil]
|
|
396
|
+
optional :reason_code, String, nil?: true
|
|
397
|
+
|
|
398
|
+
# @!attribute tax_code
|
|
399
|
+
# Duty or tax or fee category codes (Subset of UNCL5305)
|
|
400
|
+
#
|
|
401
|
+
# Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL
|
|
402
|
+
#
|
|
403
|
+
# @return [Symbol, EInvoiceAPI::Models::DocumentCreate::Allowance::TaxCode, nil]
|
|
404
|
+
optional :tax_code, enum: -> { EInvoiceAPI::DocumentCreate::Allowance::TaxCode }, nil?: true
|
|
405
|
+
|
|
406
|
+
# @!attribute tax_rate
|
|
407
|
+
# The VAT rate, represented as percentage that applies to the allowance
|
|
408
|
+
#
|
|
409
|
+
# @return [String, nil]
|
|
410
|
+
optional :tax_rate, String, nil?: true
|
|
411
|
+
|
|
412
|
+
# @!method initialize(amount: nil, base_amount: nil, multiplier_factor: nil, reason: nil, reason_code: nil, tax_code: nil, tax_rate: nil)
|
|
413
|
+
# Some parameter documentations has been truncated, see
|
|
414
|
+
# {EInvoiceAPI::Models::DocumentCreate::Allowance} for more details.
|
|
415
|
+
#
|
|
416
|
+
# An allowance is a discount for example for early payment, volume discount, etc.
|
|
417
|
+
#
|
|
418
|
+
# @param amount [Float, String, nil] The allowance amount, without VAT. Must be rounded to maximum 2 decimals
|
|
419
|
+
#
|
|
420
|
+
# @param base_amount [Float, String, nil] The base amount that may be used, in conjunction with the allowance percentage,
|
|
421
|
+
#
|
|
422
|
+
# @param multiplier_factor [Float, String, nil] The percentage that may be used, in conjunction with the allowance base amount,
|
|
423
|
+
#
|
|
424
|
+
# @param reason [String, nil] The reason for the allowance
|
|
425
|
+
#
|
|
426
|
+
# @param reason_code [String, nil] The code for the allowance reason
|
|
427
|
+
#
|
|
428
|
+
# @param tax_code [Symbol, EInvoiceAPI::Models::DocumentCreate::Allowance::TaxCode, nil] Duty or tax or fee category codes (Subset of UNCL5305)
|
|
429
|
+
#
|
|
430
|
+
# @param tax_rate [String, nil] The VAT rate, represented as percentage that applies to the allowance
|
|
431
|
+
|
|
432
|
+
# The allowance amount, without VAT. Must be rounded to maximum 2 decimals
|
|
433
|
+
#
|
|
434
|
+
# @see EInvoiceAPI::Models::DocumentCreate::Allowance#amount
|
|
435
|
+
module Amount
|
|
436
|
+
extend EInvoiceAPI::Internal::Type::Union
|
|
437
|
+
|
|
438
|
+
variant Float
|
|
439
|
+
|
|
440
|
+
variant String
|
|
441
|
+
|
|
442
|
+
# @!method self.variants
|
|
443
|
+
# @return [Array(Float, String)]
|
|
444
|
+
end
|
|
445
|
+
|
|
446
|
+
# The base amount that may be used, in conjunction with the allowance percentage,
|
|
447
|
+
# to calculate the allowance amount. Must be rounded to maximum 2 decimals
|
|
448
|
+
#
|
|
449
|
+
# @see EInvoiceAPI::Models::DocumentCreate::Allowance#base_amount
|
|
450
|
+
module BaseAmount
|
|
451
|
+
extend EInvoiceAPI::Internal::Type::Union
|
|
452
|
+
|
|
453
|
+
variant Float
|
|
454
|
+
|
|
455
|
+
variant String
|
|
456
|
+
|
|
457
|
+
# @!method self.variants
|
|
458
|
+
# @return [Array(Float, String)]
|
|
459
|
+
end
|
|
460
|
+
|
|
461
|
+
# The percentage that may be used, in conjunction with the allowance base amount,
|
|
462
|
+
# to calculate the allowance amount. To state 20%, use value 20
|
|
463
|
+
#
|
|
464
|
+
# @see EInvoiceAPI::Models::DocumentCreate::Allowance#multiplier_factor
|
|
465
|
+
module MultiplierFactor
|
|
466
|
+
extend EInvoiceAPI::Internal::Type::Union
|
|
467
|
+
|
|
468
|
+
variant Float
|
|
469
|
+
|
|
470
|
+
variant String
|
|
471
|
+
|
|
472
|
+
# @!method self.variants
|
|
473
|
+
# @return [Array(Float, String)]
|
|
474
|
+
end
|
|
475
|
+
|
|
476
|
+
# Duty or tax or fee category codes (Subset of UNCL5305)
|
|
477
|
+
#
|
|
478
|
+
# Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL
|
|
479
|
+
#
|
|
480
|
+
# @see EInvoiceAPI::Models::DocumentCreate::Allowance#tax_code
|
|
481
|
+
module TaxCode
|
|
482
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
483
|
+
|
|
484
|
+
AE = :AE
|
|
485
|
+
E = :E
|
|
486
|
+
S = :S
|
|
487
|
+
Z = :Z
|
|
488
|
+
G = :G
|
|
489
|
+
O = :O
|
|
490
|
+
K = :K
|
|
491
|
+
L = :L
|
|
492
|
+
M = :M
|
|
493
|
+
B = :B
|
|
494
|
+
|
|
495
|
+
# @!method self.values
|
|
496
|
+
# @return [Array<Symbol>]
|
|
497
|
+
end
|
|
498
|
+
end
|
|
499
|
+
|
|
500
|
+
# The amount due of the invoice. Must be positive and rounded to maximum 2
|
|
501
|
+
# decimals
|
|
502
|
+
#
|
|
305
503
|
# @see EInvoiceAPI::Models::DocumentCreate#amount_due
|
|
306
504
|
module AmountDue
|
|
307
505
|
extend EInvoiceAPI::Internal::Type::Union
|
|
@@ -314,6 +512,146 @@ module EInvoiceAPI
|
|
|
314
512
|
# @return [Array(Float, String)]
|
|
315
513
|
end
|
|
316
514
|
|
|
515
|
+
class Charge < EInvoiceAPI::Internal::Type::BaseModel
|
|
516
|
+
# @!attribute amount
|
|
517
|
+
# The charge amount, without VAT. Must be rounded to maximum 2 decimals
|
|
518
|
+
#
|
|
519
|
+
# @return [Float, String, nil]
|
|
520
|
+
optional :amount, union: -> { EInvoiceAPI::DocumentCreate::Charge::Amount }, nil?: true
|
|
521
|
+
|
|
522
|
+
# @!attribute base_amount
|
|
523
|
+
# The base amount that may be used, in conjunction with the charge percentage, to
|
|
524
|
+
# calculate the charge amount. Must be rounded to maximum 2 decimals
|
|
525
|
+
#
|
|
526
|
+
# @return [Float, String, nil]
|
|
527
|
+
optional :base_amount, union: -> { EInvoiceAPI::DocumentCreate::Charge::BaseAmount }, nil?: true
|
|
528
|
+
|
|
529
|
+
# @!attribute multiplier_factor
|
|
530
|
+
# The percentage that may be used, in conjunction with the charge base amount, to
|
|
531
|
+
# calculate the charge amount. To state 20%, use value 20
|
|
532
|
+
#
|
|
533
|
+
# @return [Float, String, nil]
|
|
534
|
+
optional :multiplier_factor,
|
|
535
|
+
union: -> { EInvoiceAPI::DocumentCreate::Charge::MultiplierFactor },
|
|
536
|
+
nil?: true
|
|
537
|
+
|
|
538
|
+
# @!attribute reason
|
|
539
|
+
# The reason for the charge
|
|
540
|
+
#
|
|
541
|
+
# @return [String, nil]
|
|
542
|
+
optional :reason, String, nil?: true
|
|
543
|
+
|
|
544
|
+
# @!attribute reason_code
|
|
545
|
+
# The code for the charge reason
|
|
546
|
+
#
|
|
547
|
+
# @return [String, nil]
|
|
548
|
+
optional :reason_code, String, nil?: true
|
|
549
|
+
|
|
550
|
+
# @!attribute tax_code
|
|
551
|
+
# Duty or tax or fee category codes (Subset of UNCL5305)
|
|
552
|
+
#
|
|
553
|
+
# Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL
|
|
554
|
+
#
|
|
555
|
+
# @return [Symbol, EInvoiceAPI::Models::DocumentCreate::Charge::TaxCode, nil]
|
|
556
|
+
optional :tax_code, enum: -> { EInvoiceAPI::DocumentCreate::Charge::TaxCode }, nil?: true
|
|
557
|
+
|
|
558
|
+
# @!attribute tax_rate
|
|
559
|
+
# The VAT rate, represented as percentage that applies to the charge
|
|
560
|
+
#
|
|
561
|
+
# @return [String, nil]
|
|
562
|
+
optional :tax_rate, String, nil?: true
|
|
563
|
+
|
|
564
|
+
# @!method initialize(amount: nil, base_amount: nil, multiplier_factor: nil, reason: nil, reason_code: nil, tax_code: nil, tax_rate: nil)
|
|
565
|
+
# Some parameter documentations has been truncated, see
|
|
566
|
+
# {EInvoiceAPI::Models::DocumentCreate::Charge} for more details.
|
|
567
|
+
#
|
|
568
|
+
# A charge is an additional fee for example for late payment, late delivery, etc.
|
|
569
|
+
#
|
|
570
|
+
# @param amount [Float, String, nil] The charge amount, without VAT. Must be rounded to maximum 2 decimals
|
|
571
|
+
#
|
|
572
|
+
# @param base_amount [Float, String, nil] The base amount that may be used, in conjunction with the charge percentage, to
|
|
573
|
+
#
|
|
574
|
+
# @param multiplier_factor [Float, String, nil] The percentage that may be used, in conjunction with the charge base amount, to
|
|
575
|
+
#
|
|
576
|
+
# @param reason [String, nil] The reason for the charge
|
|
577
|
+
#
|
|
578
|
+
# @param reason_code [String, nil] The code for the charge reason
|
|
579
|
+
#
|
|
580
|
+
# @param tax_code [Symbol, EInvoiceAPI::Models::DocumentCreate::Charge::TaxCode, nil] Duty or tax or fee category codes (Subset of UNCL5305)
|
|
581
|
+
#
|
|
582
|
+
# @param tax_rate [String, nil] The VAT rate, represented as percentage that applies to the charge
|
|
583
|
+
|
|
584
|
+
# The charge amount, without VAT. Must be rounded to maximum 2 decimals
|
|
585
|
+
#
|
|
586
|
+
# @see EInvoiceAPI::Models::DocumentCreate::Charge#amount
|
|
587
|
+
module Amount
|
|
588
|
+
extend EInvoiceAPI::Internal::Type::Union
|
|
589
|
+
|
|
590
|
+
variant Float
|
|
591
|
+
|
|
592
|
+
variant String
|
|
593
|
+
|
|
594
|
+
# @!method self.variants
|
|
595
|
+
# @return [Array(Float, String)]
|
|
596
|
+
end
|
|
597
|
+
|
|
598
|
+
# The base amount that may be used, in conjunction with the charge percentage, to
|
|
599
|
+
# calculate the charge amount. Must be rounded to maximum 2 decimals
|
|
600
|
+
#
|
|
601
|
+
# @see EInvoiceAPI::Models::DocumentCreate::Charge#base_amount
|
|
602
|
+
module BaseAmount
|
|
603
|
+
extend EInvoiceAPI::Internal::Type::Union
|
|
604
|
+
|
|
605
|
+
variant Float
|
|
606
|
+
|
|
607
|
+
variant String
|
|
608
|
+
|
|
609
|
+
# @!method self.variants
|
|
610
|
+
# @return [Array(Float, String)]
|
|
611
|
+
end
|
|
612
|
+
|
|
613
|
+
# The percentage that may be used, in conjunction with the charge base amount, to
|
|
614
|
+
# calculate the charge amount. To state 20%, use value 20
|
|
615
|
+
#
|
|
616
|
+
# @see EInvoiceAPI::Models::DocumentCreate::Charge#multiplier_factor
|
|
617
|
+
module MultiplierFactor
|
|
618
|
+
extend EInvoiceAPI::Internal::Type::Union
|
|
619
|
+
|
|
620
|
+
variant Float
|
|
621
|
+
|
|
622
|
+
variant String
|
|
623
|
+
|
|
624
|
+
# @!method self.variants
|
|
625
|
+
# @return [Array(Float, String)]
|
|
626
|
+
end
|
|
627
|
+
|
|
628
|
+
# Duty or tax or fee category codes (Subset of UNCL5305)
|
|
629
|
+
#
|
|
630
|
+
# Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL
|
|
631
|
+
#
|
|
632
|
+
# @see EInvoiceAPI::Models::DocumentCreate::Charge#tax_code
|
|
633
|
+
module TaxCode
|
|
634
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
635
|
+
|
|
636
|
+
AE = :AE
|
|
637
|
+
E = :E
|
|
638
|
+
S = :S
|
|
639
|
+
Z = :Z
|
|
640
|
+
G = :G
|
|
641
|
+
O = :O
|
|
642
|
+
K = :K
|
|
643
|
+
L = :L
|
|
644
|
+
M = :M
|
|
645
|
+
B = :B
|
|
646
|
+
|
|
647
|
+
# @!method self.values
|
|
648
|
+
# @return [Array<Symbol>]
|
|
649
|
+
end
|
|
650
|
+
end
|
|
651
|
+
|
|
652
|
+
# The total amount of the invoice (so invoice_total = subtotal + total_tax +
|
|
653
|
+
# total_discount). Must be positive and rounded to maximum 2 decimals
|
|
654
|
+
#
|
|
317
655
|
# @see EInvoiceAPI::Models::DocumentCreate#invoice_total
|
|
318
656
|
module InvoiceTotal
|
|
319
657
|
extend EInvoiceAPI::Internal::Type::Union
|
|
@@ -327,37 +665,62 @@ module EInvoiceAPI
|
|
|
327
665
|
end
|
|
328
666
|
|
|
329
667
|
class Item < EInvoiceAPI::Internal::Type::BaseModel
|
|
668
|
+
# @!attribute allowances
|
|
669
|
+
# The allowances of the line item.
|
|
670
|
+
#
|
|
671
|
+
# @return [Array<EInvoiceAPI::Models::DocumentCreate::Item::Allowance>, nil]
|
|
672
|
+
optional :allowances,
|
|
673
|
+
-> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::DocumentCreate::Item::Allowance] },
|
|
674
|
+
nil?: true
|
|
675
|
+
|
|
330
676
|
# @!attribute amount
|
|
677
|
+
# The total amount of the line item, exclusive of VAT, after subtracting line
|
|
678
|
+
# level allowances and adding line level charges. Must be rounded to maximum 2
|
|
679
|
+
# decimals
|
|
331
680
|
#
|
|
332
681
|
# @return [Float, String, nil]
|
|
333
682
|
optional :amount, union: -> { EInvoiceAPI::DocumentCreate::Item::Amount }, nil?: true
|
|
334
683
|
|
|
684
|
+
# @!attribute charges
|
|
685
|
+
# The charges of the line item.
|
|
686
|
+
#
|
|
687
|
+
# @return [Array<EInvoiceAPI::Models::DocumentCreate::Item::Charge>, nil]
|
|
688
|
+
optional :charges,
|
|
689
|
+
-> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::DocumentCreate::Item::Charge] },
|
|
690
|
+
nil?: true
|
|
691
|
+
|
|
335
692
|
# @!attribute date
|
|
336
693
|
#
|
|
337
694
|
# @return [nil]
|
|
338
695
|
optional :date, NilClass
|
|
339
696
|
|
|
340
697
|
# @!attribute description
|
|
698
|
+
# The description of the line item.
|
|
341
699
|
#
|
|
342
700
|
# @return [String, nil]
|
|
343
701
|
optional :description, String, nil?: true
|
|
344
702
|
|
|
345
703
|
# @!attribute product_code
|
|
704
|
+
# The product code of the line item.
|
|
346
705
|
#
|
|
347
706
|
# @return [String, nil]
|
|
348
707
|
optional :product_code, String, nil?: true
|
|
349
708
|
|
|
350
709
|
# @!attribute quantity
|
|
710
|
+
# The quantity of items (goods or services) that is the subject of the line item.
|
|
711
|
+
# Must be rounded to maximum 4 decimals
|
|
351
712
|
#
|
|
352
713
|
# @return [Float, String, nil]
|
|
353
714
|
optional :quantity, union: -> { EInvoiceAPI::DocumentCreate::Item::Quantity }, nil?: true
|
|
354
715
|
|
|
355
716
|
# @!attribute tax
|
|
717
|
+
# The total VAT amount for the line item. Must be rounded to maximum 2 decimals
|
|
356
718
|
#
|
|
357
719
|
# @return [Float, String, nil]
|
|
358
720
|
optional :tax, union: -> { EInvoiceAPI::DocumentCreate::Item::Tax }, nil?: true
|
|
359
721
|
|
|
360
722
|
# @!attribute tax_rate
|
|
723
|
+
# The VAT rate of the line item expressed as percentage with 2 decimals
|
|
361
724
|
#
|
|
362
725
|
# @return [String, nil]
|
|
363
726
|
optional :tax_rate, String, nil?: true
|
|
@@ -369,29 +732,182 @@ module EInvoiceAPI
|
|
|
369
732
|
optional :unit, enum: -> { EInvoiceAPI::UnitOfMeasureCode }, nil?: true
|
|
370
733
|
|
|
371
734
|
# @!attribute unit_price
|
|
735
|
+
# The unit price of the line item. Must be rounded to maximum 2 decimals
|
|
372
736
|
#
|
|
373
737
|
# @return [Float, String, nil]
|
|
374
738
|
optional :unit_price, union: -> { EInvoiceAPI::DocumentCreate::Item::UnitPrice }, nil?: true
|
|
375
739
|
|
|
376
|
-
# @!method initialize(amount: nil, date: nil, description: nil, product_code: nil, quantity: nil, tax: nil, tax_rate: nil, unit: nil, unit_price: nil)
|
|
377
|
-
#
|
|
740
|
+
# @!method initialize(allowances: nil, amount: nil, charges: nil, date: nil, description: nil, product_code: nil, quantity: nil, tax: nil, tax_rate: nil, unit: nil, unit_price: nil)
|
|
741
|
+
# Some parameter documentations has been truncated, see
|
|
742
|
+
# {EInvoiceAPI::Models::DocumentCreate::Item} for more details.
|
|
743
|
+
#
|
|
744
|
+
# @param allowances [Array<EInvoiceAPI::Models::DocumentCreate::Item::Allowance>, nil] The allowances of the line item.
|
|
745
|
+
#
|
|
746
|
+
# @param amount [Float, String, nil] The total amount of the line item, exclusive of VAT, after subtracting line leve
|
|
747
|
+
#
|
|
748
|
+
# @param charges [Array<EInvoiceAPI::Models::DocumentCreate::Item::Charge>, nil] The charges of the line item.
|
|
378
749
|
#
|
|
379
750
|
# @param date [nil]
|
|
380
751
|
#
|
|
381
|
-
# @param description [String, nil]
|
|
752
|
+
# @param description [String, nil] The description of the line item.
|
|
382
753
|
#
|
|
383
|
-
# @param product_code [String, nil]
|
|
754
|
+
# @param product_code [String, nil] The product code of the line item.
|
|
384
755
|
#
|
|
385
|
-
# @param quantity [Float, String, nil]
|
|
756
|
+
# @param quantity [Float, String, nil] The quantity of items (goods or services) that is the subject of the line item.
|
|
386
757
|
#
|
|
387
|
-
# @param tax [Float, String, nil]
|
|
758
|
+
# @param tax [Float, String, nil] The total VAT amount for the line item. Must be rounded to maximum 2 decimals
|
|
388
759
|
#
|
|
389
|
-
# @param tax_rate [String, nil]
|
|
760
|
+
# @param tax_rate [String, nil] The VAT rate of the line item expressed as percentage with 2 decimals
|
|
390
761
|
#
|
|
391
762
|
# @param unit [Symbol, EInvoiceAPI::Models::UnitOfMeasureCode, nil] Unit of Measure Codes from UNECERec20 used in Peppol BIS Billing 3.0.
|
|
392
763
|
#
|
|
393
|
-
# @param unit_price [Float, String, nil]
|
|
764
|
+
# @param unit_price [Float, String, nil] The unit price of the line item. Must be rounded to maximum 2 decimals
|
|
765
|
+
|
|
766
|
+
class Allowance < EInvoiceAPI::Internal::Type::BaseModel
|
|
767
|
+
# @!attribute amount
|
|
768
|
+
# The allowance amount, without VAT. Must be rounded to maximum 2 decimals
|
|
769
|
+
#
|
|
770
|
+
# @return [Float, String, nil]
|
|
771
|
+
optional :amount, union: -> { EInvoiceAPI::DocumentCreate::Item::Allowance::Amount }, nil?: true
|
|
772
|
+
|
|
773
|
+
# @!attribute base_amount
|
|
774
|
+
# The base amount that may be used, in conjunction with the allowance percentage,
|
|
775
|
+
# to calculate the allowance amount. Must be rounded to maximum 2 decimals
|
|
776
|
+
#
|
|
777
|
+
# @return [Float, String, nil]
|
|
778
|
+
optional :base_amount,
|
|
779
|
+
union: -> {
|
|
780
|
+
EInvoiceAPI::DocumentCreate::Item::Allowance::BaseAmount
|
|
781
|
+
},
|
|
782
|
+
nil?: true
|
|
783
|
+
|
|
784
|
+
# @!attribute multiplier_factor
|
|
785
|
+
# The percentage that may be used, in conjunction with the allowance base amount,
|
|
786
|
+
# to calculate the allowance amount. To state 20%, use value 20
|
|
787
|
+
#
|
|
788
|
+
# @return [Float, String, nil]
|
|
789
|
+
optional :multiplier_factor,
|
|
790
|
+
union: -> { EInvoiceAPI::DocumentCreate::Item::Allowance::MultiplierFactor },
|
|
791
|
+
nil?: true
|
|
792
|
+
|
|
793
|
+
# @!attribute reason
|
|
794
|
+
# The reason for the allowance
|
|
795
|
+
#
|
|
796
|
+
# @return [String, nil]
|
|
797
|
+
optional :reason, String, nil?: true
|
|
798
|
+
|
|
799
|
+
# @!attribute reason_code
|
|
800
|
+
# The code for the allowance reason
|
|
801
|
+
#
|
|
802
|
+
# @return [String, nil]
|
|
803
|
+
optional :reason_code, String, nil?: true
|
|
804
|
+
|
|
805
|
+
# @!attribute tax_code
|
|
806
|
+
# Duty or tax or fee category codes (Subset of UNCL5305)
|
|
807
|
+
#
|
|
808
|
+
# Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL
|
|
809
|
+
#
|
|
810
|
+
# @return [Symbol, EInvoiceAPI::Models::DocumentCreate::Item::Allowance::TaxCode, nil]
|
|
811
|
+
optional :tax_code, enum: -> { EInvoiceAPI::DocumentCreate::Item::Allowance::TaxCode }, nil?: true
|
|
812
|
+
|
|
813
|
+
# @!attribute tax_rate
|
|
814
|
+
# The VAT rate, represented as percentage that applies to the allowance
|
|
815
|
+
#
|
|
816
|
+
# @return [String, nil]
|
|
817
|
+
optional :tax_rate, String, nil?: true
|
|
818
|
+
|
|
819
|
+
# @!method initialize(amount: nil, base_amount: nil, multiplier_factor: nil, reason: nil, reason_code: nil, tax_code: nil, tax_rate: nil)
|
|
820
|
+
# Some parameter documentations has been truncated, see
|
|
821
|
+
# {EInvoiceAPI::Models::DocumentCreate::Item::Allowance} for more details.
|
|
822
|
+
#
|
|
823
|
+
# An allowance is a discount for example for early payment, volume discount, etc.
|
|
824
|
+
#
|
|
825
|
+
# @param amount [Float, String, nil] The allowance amount, without VAT. Must be rounded to maximum 2 decimals
|
|
826
|
+
#
|
|
827
|
+
# @param base_amount [Float, String, nil] The base amount that may be used, in conjunction with the allowance percentage,
|
|
828
|
+
#
|
|
829
|
+
# @param multiplier_factor [Float, String, nil] The percentage that may be used, in conjunction with the allowance base amount,
|
|
830
|
+
#
|
|
831
|
+
# @param reason [String, nil] The reason for the allowance
|
|
832
|
+
#
|
|
833
|
+
# @param reason_code [String, nil] The code for the allowance reason
|
|
834
|
+
#
|
|
835
|
+
# @param tax_code [Symbol, EInvoiceAPI::Models::DocumentCreate::Item::Allowance::TaxCode, nil] Duty or tax or fee category codes (Subset of UNCL5305)
|
|
836
|
+
#
|
|
837
|
+
# @param tax_rate [String, nil] The VAT rate, represented as percentage that applies to the allowance
|
|
838
|
+
|
|
839
|
+
# The allowance amount, without VAT. Must be rounded to maximum 2 decimals
|
|
840
|
+
#
|
|
841
|
+
# @see EInvoiceAPI::Models::DocumentCreate::Item::Allowance#amount
|
|
842
|
+
module Amount
|
|
843
|
+
extend EInvoiceAPI::Internal::Type::Union
|
|
844
|
+
|
|
845
|
+
variant Float
|
|
846
|
+
|
|
847
|
+
variant String
|
|
848
|
+
|
|
849
|
+
# @!method self.variants
|
|
850
|
+
# @return [Array(Float, String)]
|
|
851
|
+
end
|
|
852
|
+
|
|
853
|
+
# The base amount that may be used, in conjunction with the allowance percentage,
|
|
854
|
+
# to calculate the allowance amount. Must be rounded to maximum 2 decimals
|
|
855
|
+
#
|
|
856
|
+
# @see EInvoiceAPI::Models::DocumentCreate::Item::Allowance#base_amount
|
|
857
|
+
module BaseAmount
|
|
858
|
+
extend EInvoiceAPI::Internal::Type::Union
|
|
859
|
+
|
|
860
|
+
variant Float
|
|
861
|
+
|
|
862
|
+
variant String
|
|
863
|
+
|
|
864
|
+
# @!method self.variants
|
|
865
|
+
# @return [Array(Float, String)]
|
|
866
|
+
end
|
|
867
|
+
|
|
868
|
+
# The percentage that may be used, in conjunction with the allowance base amount,
|
|
869
|
+
# to calculate the allowance amount. To state 20%, use value 20
|
|
870
|
+
#
|
|
871
|
+
# @see EInvoiceAPI::Models::DocumentCreate::Item::Allowance#multiplier_factor
|
|
872
|
+
module MultiplierFactor
|
|
873
|
+
extend EInvoiceAPI::Internal::Type::Union
|
|
874
|
+
|
|
875
|
+
variant Float
|
|
876
|
+
|
|
877
|
+
variant String
|
|
878
|
+
|
|
879
|
+
# @!method self.variants
|
|
880
|
+
# @return [Array(Float, String)]
|
|
881
|
+
end
|
|
882
|
+
|
|
883
|
+
# Duty or tax or fee category codes (Subset of UNCL5305)
|
|
884
|
+
#
|
|
885
|
+
# Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL
|
|
886
|
+
#
|
|
887
|
+
# @see EInvoiceAPI::Models::DocumentCreate::Item::Allowance#tax_code
|
|
888
|
+
module TaxCode
|
|
889
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
890
|
+
|
|
891
|
+
AE = :AE
|
|
892
|
+
E = :E
|
|
893
|
+
S = :S
|
|
894
|
+
Z = :Z
|
|
895
|
+
G = :G
|
|
896
|
+
O = :O
|
|
897
|
+
K = :K
|
|
898
|
+
L = :L
|
|
899
|
+
M = :M
|
|
900
|
+
B = :B
|
|
901
|
+
|
|
902
|
+
# @!method self.values
|
|
903
|
+
# @return [Array<Symbol>]
|
|
904
|
+
end
|
|
905
|
+
end
|
|
394
906
|
|
|
907
|
+
# The total amount of the line item, exclusive of VAT, after subtracting line
|
|
908
|
+
# level allowances and adding line level charges. Must be rounded to maximum 2
|
|
909
|
+
# decimals
|
|
910
|
+
#
|
|
395
911
|
# @see EInvoiceAPI::Models::DocumentCreate::Item#amount
|
|
396
912
|
module Amount
|
|
397
913
|
extend EInvoiceAPI::Internal::Type::Union
|
|
@@ -404,6 +920,150 @@ module EInvoiceAPI
|
|
|
404
920
|
# @return [Array(Float, String)]
|
|
405
921
|
end
|
|
406
922
|
|
|
923
|
+
class Charge < EInvoiceAPI::Internal::Type::BaseModel
|
|
924
|
+
# @!attribute amount
|
|
925
|
+
# The charge amount, without VAT. Must be rounded to maximum 2 decimals
|
|
926
|
+
#
|
|
927
|
+
# @return [Float, String, nil]
|
|
928
|
+
optional :amount, union: -> { EInvoiceAPI::DocumentCreate::Item::Charge::Amount }, nil?: true
|
|
929
|
+
|
|
930
|
+
# @!attribute base_amount
|
|
931
|
+
# The base amount that may be used, in conjunction with the charge percentage, to
|
|
932
|
+
# calculate the charge amount. Must be rounded to maximum 2 decimals
|
|
933
|
+
#
|
|
934
|
+
# @return [Float, String, nil]
|
|
935
|
+
optional :base_amount,
|
|
936
|
+
union: -> {
|
|
937
|
+
EInvoiceAPI::DocumentCreate::Item::Charge::BaseAmount
|
|
938
|
+
},
|
|
939
|
+
nil?: true
|
|
940
|
+
|
|
941
|
+
# @!attribute multiplier_factor
|
|
942
|
+
# The percentage that may be used, in conjunction with the charge base amount, to
|
|
943
|
+
# calculate the charge amount. To state 20%, use value 20
|
|
944
|
+
#
|
|
945
|
+
# @return [Float, String, nil]
|
|
946
|
+
optional :multiplier_factor,
|
|
947
|
+
union: -> { EInvoiceAPI::DocumentCreate::Item::Charge::MultiplierFactor },
|
|
948
|
+
nil?: true
|
|
949
|
+
|
|
950
|
+
# @!attribute reason
|
|
951
|
+
# The reason for the charge
|
|
952
|
+
#
|
|
953
|
+
# @return [String, nil]
|
|
954
|
+
optional :reason, String, nil?: true
|
|
955
|
+
|
|
956
|
+
# @!attribute reason_code
|
|
957
|
+
# The code for the charge reason
|
|
958
|
+
#
|
|
959
|
+
# @return [String, nil]
|
|
960
|
+
optional :reason_code, String, nil?: true
|
|
961
|
+
|
|
962
|
+
# @!attribute tax_code
|
|
963
|
+
# Duty or tax or fee category codes (Subset of UNCL5305)
|
|
964
|
+
#
|
|
965
|
+
# Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL
|
|
966
|
+
#
|
|
967
|
+
# @return [Symbol, EInvoiceAPI::Models::DocumentCreate::Item::Charge::TaxCode, nil]
|
|
968
|
+
optional :tax_code, enum: -> { EInvoiceAPI::DocumentCreate::Item::Charge::TaxCode }, nil?: true
|
|
969
|
+
|
|
970
|
+
# @!attribute tax_rate
|
|
971
|
+
# The VAT rate, represented as percentage that applies to the charge
|
|
972
|
+
#
|
|
973
|
+
# @return [String, nil]
|
|
974
|
+
optional :tax_rate, String, nil?: true
|
|
975
|
+
|
|
976
|
+
# @!method initialize(amount: nil, base_amount: nil, multiplier_factor: nil, reason: nil, reason_code: nil, tax_code: nil, tax_rate: nil)
|
|
977
|
+
# Some parameter documentations has been truncated, see
|
|
978
|
+
# {EInvoiceAPI::Models::DocumentCreate::Item::Charge} for more details.
|
|
979
|
+
#
|
|
980
|
+
# A charge is an additional fee for example for late payment, late delivery, etc.
|
|
981
|
+
#
|
|
982
|
+
# @param amount [Float, String, nil] The charge amount, without VAT. Must be rounded to maximum 2 decimals
|
|
983
|
+
#
|
|
984
|
+
# @param base_amount [Float, String, nil] The base amount that may be used, in conjunction with the charge percentage, to
|
|
985
|
+
#
|
|
986
|
+
# @param multiplier_factor [Float, String, nil] The percentage that may be used, in conjunction with the charge base amount, to
|
|
987
|
+
#
|
|
988
|
+
# @param reason [String, nil] The reason for the charge
|
|
989
|
+
#
|
|
990
|
+
# @param reason_code [String, nil] The code for the charge reason
|
|
991
|
+
#
|
|
992
|
+
# @param tax_code [Symbol, EInvoiceAPI::Models::DocumentCreate::Item::Charge::TaxCode, nil] Duty or tax or fee category codes (Subset of UNCL5305)
|
|
993
|
+
#
|
|
994
|
+
# @param tax_rate [String, nil] The VAT rate, represented as percentage that applies to the charge
|
|
995
|
+
|
|
996
|
+
# The charge amount, without VAT. Must be rounded to maximum 2 decimals
|
|
997
|
+
#
|
|
998
|
+
# @see EInvoiceAPI::Models::DocumentCreate::Item::Charge#amount
|
|
999
|
+
module Amount
|
|
1000
|
+
extend EInvoiceAPI::Internal::Type::Union
|
|
1001
|
+
|
|
1002
|
+
variant Float
|
|
1003
|
+
|
|
1004
|
+
variant String
|
|
1005
|
+
|
|
1006
|
+
# @!method self.variants
|
|
1007
|
+
# @return [Array(Float, String)]
|
|
1008
|
+
end
|
|
1009
|
+
|
|
1010
|
+
# The base amount that may be used, in conjunction with the charge percentage, to
|
|
1011
|
+
# calculate the charge amount. Must be rounded to maximum 2 decimals
|
|
1012
|
+
#
|
|
1013
|
+
# @see EInvoiceAPI::Models::DocumentCreate::Item::Charge#base_amount
|
|
1014
|
+
module BaseAmount
|
|
1015
|
+
extend EInvoiceAPI::Internal::Type::Union
|
|
1016
|
+
|
|
1017
|
+
variant Float
|
|
1018
|
+
|
|
1019
|
+
variant String
|
|
1020
|
+
|
|
1021
|
+
# @!method self.variants
|
|
1022
|
+
# @return [Array(Float, String)]
|
|
1023
|
+
end
|
|
1024
|
+
|
|
1025
|
+
# The percentage that may be used, in conjunction with the charge base amount, to
|
|
1026
|
+
# calculate the charge amount. To state 20%, use value 20
|
|
1027
|
+
#
|
|
1028
|
+
# @see EInvoiceAPI::Models::DocumentCreate::Item::Charge#multiplier_factor
|
|
1029
|
+
module MultiplierFactor
|
|
1030
|
+
extend EInvoiceAPI::Internal::Type::Union
|
|
1031
|
+
|
|
1032
|
+
variant Float
|
|
1033
|
+
|
|
1034
|
+
variant String
|
|
1035
|
+
|
|
1036
|
+
# @!method self.variants
|
|
1037
|
+
# @return [Array(Float, String)]
|
|
1038
|
+
end
|
|
1039
|
+
|
|
1040
|
+
# Duty or tax or fee category codes (Subset of UNCL5305)
|
|
1041
|
+
#
|
|
1042
|
+
# Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL
|
|
1043
|
+
#
|
|
1044
|
+
# @see EInvoiceAPI::Models::DocumentCreate::Item::Charge#tax_code
|
|
1045
|
+
module TaxCode
|
|
1046
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
1047
|
+
|
|
1048
|
+
AE = :AE
|
|
1049
|
+
E = :E
|
|
1050
|
+
S = :S
|
|
1051
|
+
Z = :Z
|
|
1052
|
+
G = :G
|
|
1053
|
+
O = :O
|
|
1054
|
+
K = :K
|
|
1055
|
+
L = :L
|
|
1056
|
+
M = :M
|
|
1057
|
+
B = :B
|
|
1058
|
+
|
|
1059
|
+
# @!method self.values
|
|
1060
|
+
# @return [Array<Symbol>]
|
|
1061
|
+
end
|
|
1062
|
+
end
|
|
1063
|
+
|
|
1064
|
+
# The quantity of items (goods or services) that is the subject of the line item.
|
|
1065
|
+
# Must be rounded to maximum 4 decimals
|
|
1066
|
+
#
|
|
407
1067
|
# @see EInvoiceAPI::Models::DocumentCreate::Item#quantity
|
|
408
1068
|
module Quantity
|
|
409
1069
|
extend EInvoiceAPI::Internal::Type::Union
|
|
@@ -416,6 +1076,8 @@ module EInvoiceAPI
|
|
|
416
1076
|
# @return [Array(Float, String)]
|
|
417
1077
|
end
|
|
418
1078
|
|
|
1079
|
+
# The total VAT amount for the line item. Must be rounded to maximum 2 decimals
|
|
1080
|
+
#
|
|
419
1081
|
# @see EInvoiceAPI::Models::DocumentCreate::Item#tax
|
|
420
1082
|
module Tax
|
|
421
1083
|
extend EInvoiceAPI::Internal::Type::Union
|
|
@@ -428,6 +1090,8 @@ module EInvoiceAPI
|
|
|
428
1090
|
# @return [Array(Float, String)]
|
|
429
1091
|
end
|
|
430
1092
|
|
|
1093
|
+
# The unit price of the line item. Must be rounded to maximum 2 decimals
|
|
1094
|
+
#
|
|
431
1095
|
# @see EInvoiceAPI::Models::DocumentCreate::Item#unit_price
|
|
432
1096
|
module UnitPrice
|
|
433
1097
|
extend EInvoiceAPI::Internal::Type::Union
|
|
@@ -441,6 +1105,9 @@ module EInvoiceAPI
|
|
|
441
1105
|
end
|
|
442
1106
|
end
|
|
443
1107
|
|
|
1108
|
+
# The previous unpaid balance of the invoice, if any. Must be positive and rounded
|
|
1109
|
+
# to maximum 2 decimals
|
|
1110
|
+
#
|
|
444
1111
|
# @see EInvoiceAPI::Models::DocumentCreate#previous_unpaid_balance
|
|
445
1112
|
module PreviousUnpaidBalance
|
|
446
1113
|
extend EInvoiceAPI::Internal::Type::Union
|
|
@@ -453,6 +1120,10 @@ module EInvoiceAPI
|
|
|
453
1120
|
# @return [Array(Float, String)]
|
|
454
1121
|
end
|
|
455
1122
|
|
|
1123
|
+
# The taxable base of the invoice. Should be the sum of all line items -
|
|
1124
|
+
# allowances (for example commercial discounts) + charges with impact on VAT. Must
|
|
1125
|
+
# be positive and rounded to maximum 2 decimals
|
|
1126
|
+
#
|
|
456
1127
|
# @see EInvoiceAPI::Models::DocumentCreate#subtotal
|
|
457
1128
|
module Subtotal
|
|
458
1129
|
extend EInvoiceAPI::Internal::Type::Union
|
|
@@ -465,6 +1136,27 @@ module EInvoiceAPI
|
|
|
465
1136
|
# @return [Array(Float, String)]
|
|
466
1137
|
end
|
|
467
1138
|
|
|
1139
|
+
# Tax category code of the invoice
|
|
1140
|
+
#
|
|
1141
|
+
# @see EInvoiceAPI::Models::DocumentCreate#tax_code
|
|
1142
|
+
module TaxCode
|
|
1143
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
1144
|
+
|
|
1145
|
+
AE = :AE
|
|
1146
|
+
E = :E
|
|
1147
|
+
S = :S
|
|
1148
|
+
Z = :Z
|
|
1149
|
+
G = :G
|
|
1150
|
+
O = :O
|
|
1151
|
+
K = :K
|
|
1152
|
+
L = :L
|
|
1153
|
+
M = :M
|
|
1154
|
+
B = :B
|
|
1155
|
+
|
|
1156
|
+
# @!method self.values
|
|
1157
|
+
# @return [Array<Symbol>]
|
|
1158
|
+
end
|
|
1159
|
+
|
|
468
1160
|
class TaxDetail < EInvoiceAPI::Internal::Type::BaseModel
|
|
469
1161
|
# @!attribute amount
|
|
470
1162
|
#
|
|
@@ -493,6 +1185,9 @@ module EInvoiceAPI
|
|
|
493
1185
|
end
|
|
494
1186
|
end
|
|
495
1187
|
|
|
1188
|
+
# The total financial discount of the invoice (so discounts not subject to VAT).
|
|
1189
|
+
# Must be positive and rounded to maximum 2 decimals
|
|
1190
|
+
#
|
|
496
1191
|
# @see EInvoiceAPI::Models::DocumentCreate#total_discount
|
|
497
1192
|
module TotalDiscount
|
|
498
1193
|
extend EInvoiceAPI::Internal::Type::Union
|
|
@@ -505,6 +1200,8 @@ module EInvoiceAPI
|
|
|
505
1200
|
# @return [Array(Float, String)]
|
|
506
1201
|
end
|
|
507
1202
|
|
|
1203
|
+
# The total tax of the invoice. Must be positive and rounded to maximum 2 decimals
|
|
1204
|
+
#
|
|
508
1205
|
# @see EInvoiceAPI::Models::DocumentCreate#total_tax
|
|
509
1206
|
module TotalTax
|
|
510
1207
|
extend EInvoiceAPI::Internal::Type::Union
|
|
@@ -516,6 +1213,81 @@ module EInvoiceAPI
|
|
|
516
1213
|
# @!method self.variants
|
|
517
1214
|
# @return [Array(Float, String)]
|
|
518
1215
|
end
|
|
1216
|
+
|
|
1217
|
+
# VATEX code list for VAT exemption reasons
|
|
1218
|
+
#
|
|
1219
|
+
# Agency: CEF Identifier: vatex
|
|
1220
|
+
#
|
|
1221
|
+
# @see EInvoiceAPI::Models::DocumentCreate#vatex
|
|
1222
|
+
module Vatex
|
|
1223
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
1224
|
+
|
|
1225
|
+
VATEX_EU_79_C = :"VATEX-EU-79-C"
|
|
1226
|
+
VATEX_EU_132 = :"VATEX-EU-132"
|
|
1227
|
+
VATEX_EU_132_1_A = :"VATEX-EU-132-1A"
|
|
1228
|
+
VATEX_EU_132_1_B = :"VATEX-EU-132-1B"
|
|
1229
|
+
VATEX_EU_132_1_C = :"VATEX-EU-132-1C"
|
|
1230
|
+
VATEX_EU_132_1_D = :"VATEX-EU-132-1D"
|
|
1231
|
+
VATEX_EU_132_1_E = :"VATEX-EU-132-1E"
|
|
1232
|
+
VATEX_EU_132_1_F = :"VATEX-EU-132-1F"
|
|
1233
|
+
VATEX_EU_132_1_G = :"VATEX-EU-132-1G"
|
|
1234
|
+
VATEX_EU_132_1_H = :"VATEX-EU-132-1H"
|
|
1235
|
+
VATEX_EU_132_1_I = :"VATEX-EU-132-1I"
|
|
1236
|
+
VATEX_EU_132_1_J = :"VATEX-EU-132-1J"
|
|
1237
|
+
VATEX_EU_132_1_K = :"VATEX-EU-132-1K"
|
|
1238
|
+
VATEX_EU_132_1_L = :"VATEX-EU-132-1L"
|
|
1239
|
+
VATEX_EU_132_1_M = :"VATEX-EU-132-1M"
|
|
1240
|
+
VATEX_EU_132_1_N = :"VATEX-EU-132-1N"
|
|
1241
|
+
VATEX_EU_132_1_O = :"VATEX-EU-132-1O"
|
|
1242
|
+
VATEX_EU_132_1_P = :"VATEX-EU-132-1P"
|
|
1243
|
+
VATEX_EU_132_1_Q = :"VATEX-EU-132-1Q"
|
|
1244
|
+
VATEX_EU_143 = :"VATEX-EU-143"
|
|
1245
|
+
VATEX_EU_143_1_A = :"VATEX-EU-143-1A"
|
|
1246
|
+
VATEX_EU_143_1_B = :"VATEX-EU-143-1B"
|
|
1247
|
+
VATEX_EU_143_1_C = :"VATEX-EU-143-1C"
|
|
1248
|
+
VATEX_EU_143_1_D = :"VATEX-EU-143-1D"
|
|
1249
|
+
VATEX_EU_143_1_E = :"VATEX-EU-143-1E"
|
|
1250
|
+
VATEX_EU_143_1_F = :"VATEX-EU-143-1F"
|
|
1251
|
+
VATEX_EU_143_1_FA = :"VATEX-EU-143-1FA"
|
|
1252
|
+
VATEX_EU_143_1_G = :"VATEX-EU-143-1G"
|
|
1253
|
+
VATEX_EU_143_1_H = :"VATEX-EU-143-1H"
|
|
1254
|
+
VATEX_EU_143_1_I = :"VATEX-EU-143-1I"
|
|
1255
|
+
VATEX_EU_143_1_J = :"VATEX-EU-143-1J"
|
|
1256
|
+
VATEX_EU_143_1_K = :"VATEX-EU-143-1K"
|
|
1257
|
+
VATEX_EU_143_1_L = :"VATEX-EU-143-1L"
|
|
1258
|
+
VATEX_EU_144 = :"VATEX-EU-144"
|
|
1259
|
+
VATEX_EU_146_1_E = :"VATEX-EU-146-1E"
|
|
1260
|
+
VATEX_EU_148 = :"VATEX-EU-148"
|
|
1261
|
+
VATEX_EU_148_A = :"VATEX-EU-148-A"
|
|
1262
|
+
VATEX_EU_148_B = :"VATEX-EU-148-B"
|
|
1263
|
+
VATEX_EU_148_C = :"VATEX-EU-148-C"
|
|
1264
|
+
VATEX_EU_148_D = :"VATEX-EU-148-D"
|
|
1265
|
+
VATEX_EU_148_E = :"VATEX-EU-148-E"
|
|
1266
|
+
VATEX_EU_148_F = :"VATEX-EU-148-F"
|
|
1267
|
+
VATEX_EU_148_G = :"VATEX-EU-148-G"
|
|
1268
|
+
VATEX_EU_151 = :"VATEX-EU-151"
|
|
1269
|
+
VATEX_EU_151_1_A = :"VATEX-EU-151-1A"
|
|
1270
|
+
VATEX_EU_151_1_AA = :"VATEX-EU-151-1AA"
|
|
1271
|
+
VATEX_EU_151_1_B = :"VATEX-EU-151-1B"
|
|
1272
|
+
VATEX_EU_151_1_C = :"VATEX-EU-151-1C"
|
|
1273
|
+
VATEX_EU_151_1_D = :"VATEX-EU-151-1D"
|
|
1274
|
+
VATEX_EU_151_1_E = :"VATEX-EU-151-1E"
|
|
1275
|
+
VATEX_EU_159 = :"VATEX-EU-159"
|
|
1276
|
+
VATEX_EU_309 = :"VATEX-EU-309"
|
|
1277
|
+
VATEX_EU_AE = :"VATEX-EU-AE"
|
|
1278
|
+
VATEX_EU_D = :"VATEX-EU-D"
|
|
1279
|
+
VATEX_EU_F = :"VATEX-EU-F"
|
|
1280
|
+
VATEX_EU_G = :"VATEX-EU-G"
|
|
1281
|
+
VATEX_EU_I = :"VATEX-EU-I"
|
|
1282
|
+
VATEX_EU_IC = :"VATEX-EU-IC"
|
|
1283
|
+
VATEX_EU_O = :"VATEX-EU-O"
|
|
1284
|
+
VATEX_EU_J = :"VATEX-EU-J"
|
|
1285
|
+
VATEX_FR_FRANCHISE = :"VATEX-FR-FRANCHISE"
|
|
1286
|
+
VATEX_FR_CNWVAT = :"VATEX-FR-CNWVAT"
|
|
1287
|
+
|
|
1288
|
+
# @!method self.values
|
|
1289
|
+
# @return [Array<Symbol>]
|
|
1290
|
+
end
|
|
519
1291
|
end
|
|
520
1292
|
end
|
|
521
1293
|
end
|