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.
@@ -9,7 +9,16 @@ module EInvoiceAPI
9
9
  # @return [String]
10
10
  required :id, String
11
11
 
12
+ # @!attribute allowances
13
+ #
14
+ # @return [Array<EInvoiceAPI::Models::DocumentResponse::Allowance>, nil]
15
+ optional :allowances,
16
+ -> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::DocumentResponse::Allowance] },
17
+ nil?: true
18
+
12
19
  # @!attribute amount_due
20
+ # The amount due of the invoice. Must be positive and rounded to maximum 2
21
+ # decimals
13
22
  #
14
23
  # @return [String, nil]
15
24
  optional :amount_due, String, nil?: true
@@ -18,7 +27,8 @@ module EInvoiceAPI
18
27
  #
19
28
  # @return [Array<EInvoiceAPI::Models::Documents::DocumentAttachment>, nil]
20
29
  optional :attachments,
21
- -> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::Documents::DocumentAttachment] }
30
+ -> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::Documents::DocumentAttachment] },
31
+ nil?: true
22
32
 
23
33
  # @!attribute billing_address
24
34
  #
@@ -30,6 +40,13 @@ module EInvoiceAPI
30
40
  # @return [String, nil]
31
41
  optional :billing_address_recipient, String, nil?: true
32
42
 
43
+ # @!attribute charges
44
+ #
45
+ # @return [Array<EInvoiceAPI::Models::DocumentResponse::Charge>, nil]
46
+ optional :charges,
47
+ -> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::DocumentResponse::Charge] },
48
+ nil?: true
49
+
33
50
  # @!attribute currency
34
51
  # Currency of the invoice
35
52
  #
@@ -92,6 +109,8 @@ module EInvoiceAPI
92
109
  optional :invoice_id, String, nil?: true
93
110
 
94
111
  # @!attribute invoice_total
112
+ # The total amount of the invoice (so invoice_total = subtotal + total_tax +
113
+ # total_discount). Must be positive and rounded to maximum 2 decimals
95
114
  #
96
115
  # @return [String, nil]
97
116
  optional :invoice_total, String, nil?: true
@@ -99,7 +118,9 @@ module EInvoiceAPI
99
118
  # @!attribute items
100
119
  #
101
120
  # @return [Array<EInvoiceAPI::Models::DocumentResponse::Item>, nil]
102
- optional :items, -> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::DocumentResponse::Item] }
121
+ optional :items,
122
+ -> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::DocumentResponse::Item] },
123
+ nil?: true
103
124
 
104
125
  # @!attribute note
105
126
  #
@@ -110,7 +131,8 @@ module EInvoiceAPI
110
131
  #
111
132
  # @return [Array<EInvoiceAPI::Models::DocumentResponse::PaymentDetail>, nil]
112
133
  optional :payment_details,
113
- -> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::DocumentResponse::PaymentDetail] }
134
+ -> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::DocumentResponse::PaymentDetail] },
135
+ nil?: true
114
136
 
115
137
  # @!attribute payment_term
116
138
  #
@@ -118,6 +140,8 @@ module EInvoiceAPI
118
140
  optional :payment_term, String, nil?: true
119
141
 
120
142
  # @!attribute previous_unpaid_balance
143
+ # The previous unpaid balance of the invoice, if any. Must be positive and rounded
144
+ # to maximum 2 decimals
121
145
  #
122
146
  # @return [String, nil]
123
147
  optional :previous_unpaid_balance, String, nil?: true
@@ -173,26 +197,53 @@ module EInvoiceAPI
173
197
  optional :state, enum: -> { EInvoiceAPI::DocumentState }
174
198
 
175
199
  # @!attribute subtotal
200
+ # The taxable base of the invoice. Should be the sum of all line items -
201
+ # allowances (for example commercial discounts) + charges with impact on VAT. Must
202
+ # be positive and rounded to maximum 2 decimals
176
203
  #
177
204
  # @return [String, nil]
178
205
  optional :subtotal, String, nil?: true
179
206
 
207
+ # @!attribute tax_code
208
+ # Tax category code of the invoice
209
+ #
210
+ # @return [Symbol, EInvoiceAPI::Models::DocumentResponse::TaxCode, nil]
211
+ optional :tax_code, enum: -> { EInvoiceAPI::DocumentResponse::TaxCode }
212
+
180
213
  # @!attribute tax_details
181
214
  #
182
215
  # @return [Array<EInvoiceAPI::Models::DocumentResponse::TaxDetail>, nil]
183
216
  optional :tax_details,
184
- -> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::DocumentResponse::TaxDetail] }
217
+ -> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::DocumentResponse::TaxDetail] },
218
+ nil?: true
185
219
 
186
220
  # @!attribute total_discount
221
+ # The total financial discount of the invoice (so discounts not subject to VAT).
222
+ # Must be positive and rounded to maximum 2 decimals
187
223
  #
188
224
  # @return [String, nil]
189
225
  optional :total_discount, String, nil?: true
190
226
 
191
227
  # @!attribute total_tax
228
+ # The total tax of the invoice. Must be positive and rounded to maximum 2 decimals
192
229
  #
193
230
  # @return [String, nil]
194
231
  optional :total_tax, String, nil?: true
195
232
 
233
+ # @!attribute vatex
234
+ # VATEX code list for VAT exemption reasons
235
+ #
236
+ # Agency: CEF Identifier: vatex
237
+ #
238
+ # @return [Symbol, EInvoiceAPI::Models::DocumentResponse::Vatex, nil]
239
+ optional :vatex, enum: -> { EInvoiceAPI::DocumentResponse::Vatex }, nil?: true
240
+
241
+ # @!attribute vatex_note
242
+ # VAT exemption note of the invoice
243
+ #
244
+ # @return [String, nil]
245
+ optional :vatex_note, String, nil?: true
246
+
196
247
  # @!attribute vendor_address
197
248
  #
198
249
  # @return [String, nil]
@@ -218,17 +269,24 @@ module EInvoiceAPI
218
269
  # @return [String, nil]
219
270
  optional :vendor_tax_id, String, nil?: true
220
271
 
221
- # @!method initialize(id:, 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)
272
+ # @!method initialize(id:, 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)
273
+ # Some parameter documentations has been truncated, see
274
+ # {EInvoiceAPI::Models::DocumentResponse} for more details.
275
+ #
222
276
  # @param id [String]
223
277
  #
224
- # @param amount_due [String, nil]
278
+ # @param allowances [Array<EInvoiceAPI::Models::DocumentResponse::Allowance>, nil]
225
279
  #
226
- # @param attachments [Array<EInvoiceAPI::Models::Documents::DocumentAttachment>]
280
+ # @param amount_due [String, nil] The amount due of the invoice. Must be positive and rounded to maximum 2 decimal
281
+ #
282
+ # @param attachments [Array<EInvoiceAPI::Models::Documents::DocumentAttachment>, nil]
227
283
  #
228
284
  # @param billing_address [String, nil]
229
285
  #
230
286
  # @param billing_address_recipient [String, nil]
231
287
  #
288
+ # @param charges [Array<EInvoiceAPI::Models::DocumentResponse::Charge>, nil]
289
+ #
232
290
  # @param currency [Symbol, EInvoiceAPI::Models::CurrencyCode] Currency of the invoice
233
291
  #
234
292
  # @param customer_address [String, nil]
@@ -253,17 +311,17 @@ module EInvoiceAPI
253
311
  #
254
312
  # @param invoice_id [String, nil]
255
313
  #
256
- # @param invoice_total [String, nil]
314
+ # @param invoice_total [String, nil] The total amount of the invoice (so invoice_total = subtotal + total_tax + total
257
315
  #
258
- # @param items [Array<EInvoiceAPI::Models::DocumentResponse::Item>]
316
+ # @param items [Array<EInvoiceAPI::Models::DocumentResponse::Item>, nil]
259
317
  #
260
318
  # @param note [String, nil]
261
319
  #
262
- # @param payment_details [Array<EInvoiceAPI::Models::DocumentResponse::PaymentDetail>]
320
+ # @param payment_details [Array<EInvoiceAPI::Models::DocumentResponse::PaymentDetail>, nil]
263
321
  #
264
322
  # @param payment_term [String, nil]
265
323
  #
266
- # @param previous_unpaid_balance [String, nil]
324
+ # @param previous_unpaid_balance [String, nil] The previous unpaid balance of the invoice, if any. Must be positive and rounded
267
325
  #
268
326
  # @param purchase_order [String, nil]
269
327
  #
@@ -285,13 +343,19 @@ module EInvoiceAPI
285
343
  #
286
344
  # @param state [Symbol, EInvoiceAPI::Models::DocumentState]
287
345
  #
288
- # @param subtotal [String, nil]
346
+ # @param subtotal [String, nil] The taxable base of the invoice. Should be the sum of all line items - allowance
347
+ #
348
+ # @param tax_code [Symbol, EInvoiceAPI::Models::DocumentResponse::TaxCode] Tax category code of the invoice
349
+ #
350
+ # @param tax_details [Array<EInvoiceAPI::Models::DocumentResponse::TaxDetail>, nil]
289
351
  #
290
- # @param tax_details [Array<EInvoiceAPI::Models::DocumentResponse::TaxDetail>]
352
+ # @param total_discount [String, nil] The total financial discount of the invoice (so discounts not subject to VAT). M
291
353
  #
292
- # @param total_discount [String, nil]
354
+ # @param total_tax [String, nil] The total tax of the invoice. Must be positive and rounded to maximum 2 decimals
293
355
  #
294
- # @param total_tax [String, nil]
356
+ # @param vatex [Symbol, EInvoiceAPI::Models::DocumentResponse::Vatex, nil] VATEX code list for VAT exemption reasons
357
+ #
358
+ # @param vatex_note [String, nil] VAT exemption note of the invoice
295
359
  #
296
360
  # @param vendor_address [String, nil]
297
361
  #
@@ -303,38 +367,241 @@ module EInvoiceAPI
303
367
  #
304
368
  # @param vendor_tax_id [String, nil]
305
369
 
370
+ class Allowance < EInvoiceAPI::Internal::Type::BaseModel
371
+ # @!attribute amount
372
+ # The allowance amount, without VAT. Must be rounded to maximum 2 decimals
373
+ #
374
+ # @return [String, nil]
375
+ optional :amount, String, nil?: true
376
+
377
+ # @!attribute base_amount
378
+ # The base amount that may be used, in conjunction with the allowance percentage,
379
+ # to calculate the allowance amount. Must be rounded to maximum 2 decimals
380
+ #
381
+ # @return [String, nil]
382
+ optional :base_amount, String, nil?: true
383
+
384
+ # @!attribute multiplier_factor
385
+ # The percentage that may be used, in conjunction with the allowance base amount,
386
+ # to calculate the allowance amount. To state 20%, use value 20
387
+ #
388
+ # @return [String, nil]
389
+ optional :multiplier_factor, String, nil?: true
390
+
391
+ # @!attribute reason
392
+ # The reason for the allowance
393
+ #
394
+ # @return [String, nil]
395
+ optional :reason, String, nil?: true
396
+
397
+ # @!attribute reason_code
398
+ # The code for the allowance reason
399
+ #
400
+ # @return [String, nil]
401
+ optional :reason_code, String, nil?: true
402
+
403
+ # @!attribute tax_code
404
+ # Duty or tax or fee category codes (Subset of UNCL5305)
405
+ #
406
+ # Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL
407
+ #
408
+ # @return [Symbol, EInvoiceAPI::Models::DocumentResponse::Allowance::TaxCode, nil]
409
+ optional :tax_code, enum: -> { EInvoiceAPI::DocumentResponse::Allowance::TaxCode }, nil?: true
410
+
411
+ # @!attribute tax_rate
412
+ # The VAT rate, represented as percentage that applies to the allowance
413
+ #
414
+ # @return [String, nil]
415
+ optional :tax_rate, String, nil?: true
416
+
417
+ # @!method initialize(amount: nil, base_amount: nil, multiplier_factor: nil, reason: nil, reason_code: nil, tax_code: nil, tax_rate: nil)
418
+ # Some parameter documentations has been truncated, see
419
+ # {EInvoiceAPI::Models::DocumentResponse::Allowance} for more details.
420
+ #
421
+ # @param amount [String, nil] The allowance amount, without VAT. Must be rounded to maximum 2 decimals
422
+ #
423
+ # @param base_amount [String, nil] The base amount that may be used, in conjunction with the allowance percentage,
424
+ #
425
+ # @param multiplier_factor [String, nil] The percentage that may be used, in conjunction with the allowance base amount,
426
+ #
427
+ # @param reason [String, nil] The reason for the allowance
428
+ #
429
+ # @param reason_code [String, nil] The code for the allowance reason
430
+ #
431
+ # @param tax_code [Symbol, EInvoiceAPI::Models::DocumentResponse::Allowance::TaxCode, nil] Duty or tax or fee category codes (Subset of UNCL5305)
432
+ #
433
+ # @param tax_rate [String, nil] The VAT rate, represented as percentage that applies to the allowance
434
+
435
+ # Duty or tax or fee category codes (Subset of UNCL5305)
436
+ #
437
+ # Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL
438
+ #
439
+ # @see EInvoiceAPI::Models::DocumentResponse::Allowance#tax_code
440
+ module TaxCode
441
+ extend EInvoiceAPI::Internal::Type::Enum
442
+
443
+ AE = :AE
444
+ E = :E
445
+ S = :S
446
+ Z = :Z
447
+ G = :G
448
+ O = :O
449
+ K = :K
450
+ L = :L
451
+ M = :M
452
+ B = :B
453
+
454
+ # @!method self.values
455
+ # @return [Array<Symbol>]
456
+ end
457
+ end
458
+
459
+ class Charge < EInvoiceAPI::Internal::Type::BaseModel
460
+ # @!attribute amount
461
+ # The charge amount, without VAT. Must be rounded to maximum 2 decimals
462
+ #
463
+ # @return [String, nil]
464
+ optional :amount, String, nil?: true
465
+
466
+ # @!attribute base_amount
467
+ # The base amount that may be used, in conjunction with the charge percentage, to
468
+ # calculate the charge amount. Must be rounded to maximum 2 decimals
469
+ #
470
+ # @return [String, nil]
471
+ optional :base_amount, String, nil?: true
472
+
473
+ # @!attribute multiplier_factor
474
+ # The percentage that may be used, in conjunction with the charge base amount, to
475
+ # calculate the charge amount. To state 20%, use value 20
476
+ #
477
+ # @return [String, nil]
478
+ optional :multiplier_factor, String, nil?: true
479
+
480
+ # @!attribute reason
481
+ # The reason for the charge
482
+ #
483
+ # @return [String, nil]
484
+ optional :reason, String, nil?: true
485
+
486
+ # @!attribute reason_code
487
+ # The code for the charge reason
488
+ #
489
+ # @return [String, nil]
490
+ optional :reason_code, String, nil?: true
491
+
492
+ # @!attribute tax_code
493
+ # Duty or tax or fee category codes (Subset of UNCL5305)
494
+ #
495
+ # Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL
496
+ #
497
+ # @return [Symbol, EInvoiceAPI::Models::DocumentResponse::Charge::TaxCode, nil]
498
+ optional :tax_code, enum: -> { EInvoiceAPI::DocumentResponse::Charge::TaxCode }, nil?: true
499
+
500
+ # @!attribute tax_rate
501
+ # The VAT rate, represented as percentage that applies to the charge
502
+ #
503
+ # @return [String, nil]
504
+ optional :tax_rate, String, nil?: true
505
+
506
+ # @!method initialize(amount: nil, base_amount: nil, multiplier_factor: nil, reason: nil, reason_code: nil, tax_code: nil, tax_rate: nil)
507
+ # Some parameter documentations has been truncated, see
508
+ # {EInvoiceAPI::Models::DocumentResponse::Charge} for more details.
509
+ #
510
+ # @param amount [String, nil] The charge amount, without VAT. Must be rounded to maximum 2 decimals
511
+ #
512
+ # @param base_amount [String, nil] The base amount that may be used, in conjunction with the charge percentage, to
513
+ #
514
+ # @param multiplier_factor [String, nil] The percentage that may be used, in conjunction with the charge base amount, to
515
+ #
516
+ # @param reason [String, nil] The reason for the charge
517
+ #
518
+ # @param reason_code [String, nil] The code for the charge reason
519
+ #
520
+ # @param tax_code [Symbol, EInvoiceAPI::Models::DocumentResponse::Charge::TaxCode, nil] Duty or tax or fee category codes (Subset of UNCL5305)
521
+ #
522
+ # @param tax_rate [String, nil] The VAT rate, represented as percentage that applies to the charge
523
+
524
+ # Duty or tax or fee category codes (Subset of UNCL5305)
525
+ #
526
+ # Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL
527
+ #
528
+ # @see EInvoiceAPI::Models::DocumentResponse::Charge#tax_code
529
+ module TaxCode
530
+ extend EInvoiceAPI::Internal::Type::Enum
531
+
532
+ AE = :AE
533
+ E = :E
534
+ S = :S
535
+ Z = :Z
536
+ G = :G
537
+ O = :O
538
+ K = :K
539
+ L = :L
540
+ M = :M
541
+ B = :B
542
+
543
+ # @!method self.values
544
+ # @return [Array<Symbol>]
545
+ end
546
+ end
547
+
306
548
  class Item < EInvoiceAPI::Internal::Type::BaseModel
549
+ # @!attribute allowances
550
+ # The allowances of the line item.
551
+ #
552
+ # @return [Array<EInvoiceAPI::Models::DocumentResponse::Item::Allowance>, nil]
553
+ optional :allowances,
554
+ -> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::DocumentResponse::Item::Allowance] },
555
+ nil?: true
556
+
307
557
  # @!attribute amount
558
+ # The total amount of the line item, exclusive of VAT, after subtracting line
559
+ # level allowances and adding line level charges. Must be rounded to maximum 2
560
+ # decimals
308
561
  #
309
562
  # @return [String, nil]
310
563
  optional :amount, String, nil?: true
311
564
 
565
+ # @!attribute charges
566
+ # The charges of the line item.
567
+ #
568
+ # @return [Array<EInvoiceAPI::Models::DocumentResponse::Item::Charge>, nil]
569
+ optional :charges,
570
+ -> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::DocumentResponse::Item::Charge] },
571
+ nil?: true
572
+
312
573
  # @!attribute date
313
574
  #
314
575
  # @return [nil]
315
576
  optional :date, NilClass
316
577
 
317
578
  # @!attribute description
579
+ # The description of the line item.
318
580
  #
319
581
  # @return [String, nil]
320
582
  optional :description, String, nil?: true
321
583
 
322
584
  # @!attribute product_code
585
+ # The product code of the line item.
323
586
  #
324
587
  # @return [String, nil]
325
588
  optional :product_code, String, nil?: true
326
589
 
327
590
  # @!attribute quantity
591
+ # The quantity of items (goods or services) that is the subject of the line item.
592
+ # Must be rounded to maximum 4 decimals
328
593
  #
329
594
  # @return [String, nil]
330
595
  optional :quantity, String, nil?: true
331
596
 
332
597
  # @!attribute tax
598
+ # The total VAT amount for the line item. Must be rounded to maximum 2 decimals
333
599
  #
334
600
  # @return [String, nil]
335
601
  optional :tax, String, nil?: true
336
602
 
337
603
  # @!attribute tax_rate
604
+ # The VAT rate of the line item expressed as percentage with 2 decimals
338
605
  #
339
606
  # @return [String, nil]
340
607
  optional :tax_rate, String, nil?: true
@@ -346,28 +613,218 @@ module EInvoiceAPI
346
613
  optional :unit, enum: -> { EInvoiceAPI::UnitOfMeasureCode }, nil?: true
347
614
 
348
615
  # @!attribute unit_price
616
+ # The unit price of the line item. Must be rounded to maximum 2 decimals
349
617
  #
350
618
  # @return [String, nil]
351
619
  optional :unit_price, String, nil?: true
352
620
 
353
- # @!method initialize(amount: nil, date: nil, description: nil, product_code: nil, quantity: nil, tax: nil, tax_rate: nil, unit: nil, unit_price: nil)
354
- # @param amount [String, nil]
621
+ # @!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)
622
+ # Some parameter documentations has been truncated, see
623
+ # {EInvoiceAPI::Models::DocumentResponse::Item} for more details.
624
+ #
625
+ # @param allowances [Array<EInvoiceAPI::Models::DocumentResponse::Item::Allowance>, nil] The allowances of the line item.
626
+ #
627
+ # @param amount [String, nil] The total amount of the line item, exclusive of VAT, after subtracting line leve
628
+ #
629
+ # @param charges [Array<EInvoiceAPI::Models::DocumentResponse::Item::Charge>, nil] The charges of the line item.
355
630
  #
356
631
  # @param date [nil]
357
632
  #
358
- # @param description [String, nil]
633
+ # @param description [String, nil] The description of the line item.
359
634
  #
360
- # @param product_code [String, nil]
635
+ # @param product_code [String, nil] The product code of the line item.
361
636
  #
362
- # @param quantity [String, nil]
637
+ # @param quantity [String, nil] The quantity of items (goods or services) that is the subject of the line item.
363
638
  #
364
- # @param tax [String, nil]
639
+ # @param tax [String, nil] The total VAT amount for the line item. Must be rounded to maximum 2 decimals
365
640
  #
366
- # @param tax_rate [String, nil]
641
+ # @param tax_rate [String, nil] The VAT rate of the line item expressed as percentage with 2 decimals
367
642
  #
368
643
  # @param unit [Symbol, EInvoiceAPI::Models::UnitOfMeasureCode, nil] Unit of Measure Codes from UNECERec20 used in Peppol BIS Billing 3.0.
369
644
  #
370
- # @param unit_price [String, nil]
645
+ # @param unit_price [String, nil] The unit price of the line item. Must be rounded to maximum 2 decimals
646
+
647
+ class Allowance < EInvoiceAPI::Internal::Type::BaseModel
648
+ # @!attribute amount
649
+ # The allowance amount, without VAT. Must be rounded to maximum 2 decimals
650
+ #
651
+ # @return [String, nil]
652
+ optional :amount, String, nil?: true
653
+
654
+ # @!attribute base_amount
655
+ # The base amount that may be used, in conjunction with the allowance percentage,
656
+ # to calculate the allowance amount. Must be rounded to maximum 2 decimals
657
+ #
658
+ # @return [String, nil]
659
+ optional :base_amount, String, nil?: true
660
+
661
+ # @!attribute multiplier_factor
662
+ # The percentage that may be used, in conjunction with the allowance base amount,
663
+ # to calculate the allowance amount. To state 20%, use value 20
664
+ #
665
+ # @return [String, nil]
666
+ optional :multiplier_factor, String, nil?: true
667
+
668
+ # @!attribute reason
669
+ # The reason for the allowance
670
+ #
671
+ # @return [String, nil]
672
+ optional :reason, String, nil?: true
673
+
674
+ # @!attribute reason_code
675
+ # The code for the allowance reason
676
+ #
677
+ # @return [String, nil]
678
+ optional :reason_code, String, nil?: true
679
+
680
+ # @!attribute tax_code
681
+ # Duty or tax or fee category codes (Subset of UNCL5305)
682
+ #
683
+ # Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL
684
+ #
685
+ # @return [Symbol, EInvoiceAPI::Models::DocumentResponse::Item::Allowance::TaxCode, nil]
686
+ optional :tax_code, enum: -> { EInvoiceAPI::DocumentResponse::Item::Allowance::TaxCode }, nil?: true
687
+
688
+ # @!attribute tax_rate
689
+ # The VAT rate, represented as percentage that applies to the allowance
690
+ #
691
+ # @return [String, nil]
692
+ optional :tax_rate, String, nil?: true
693
+
694
+ # @!method initialize(amount: nil, base_amount: nil, multiplier_factor: nil, reason: nil, reason_code: nil, tax_code: nil, tax_rate: nil)
695
+ # Some parameter documentations has been truncated, see
696
+ # {EInvoiceAPI::Models::DocumentResponse::Item::Allowance} for more details.
697
+ #
698
+ # An allowance is a discount for example for early payment, volume discount, etc.
699
+ #
700
+ # @param amount [String, nil] The allowance amount, without VAT. Must be rounded to maximum 2 decimals
701
+ #
702
+ # @param base_amount [String, nil] The base amount that may be used, in conjunction with the allowance percentage,
703
+ #
704
+ # @param multiplier_factor [String, nil] The percentage that may be used, in conjunction with the allowance base amount,
705
+ #
706
+ # @param reason [String, nil] The reason for the allowance
707
+ #
708
+ # @param reason_code [String, nil] The code for the allowance reason
709
+ #
710
+ # @param tax_code [Symbol, EInvoiceAPI::Models::DocumentResponse::Item::Allowance::TaxCode, nil] Duty or tax or fee category codes (Subset of UNCL5305)
711
+ #
712
+ # @param tax_rate [String, nil] The VAT rate, represented as percentage that applies to the allowance
713
+
714
+ # Duty or tax or fee category codes (Subset of UNCL5305)
715
+ #
716
+ # Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL
717
+ #
718
+ # @see EInvoiceAPI::Models::DocumentResponse::Item::Allowance#tax_code
719
+ module TaxCode
720
+ extend EInvoiceAPI::Internal::Type::Enum
721
+
722
+ AE = :AE
723
+ E = :E
724
+ S = :S
725
+ Z = :Z
726
+ G = :G
727
+ O = :O
728
+ K = :K
729
+ L = :L
730
+ M = :M
731
+ B = :B
732
+
733
+ # @!method self.values
734
+ # @return [Array<Symbol>]
735
+ end
736
+ end
737
+
738
+ class Charge < EInvoiceAPI::Internal::Type::BaseModel
739
+ # @!attribute amount
740
+ # The charge amount, without VAT. Must be rounded to maximum 2 decimals
741
+ #
742
+ # @return [String, nil]
743
+ optional :amount, String, nil?: true
744
+
745
+ # @!attribute base_amount
746
+ # The base amount that may be used, in conjunction with the charge percentage, to
747
+ # calculate the charge amount. Must be rounded to maximum 2 decimals
748
+ #
749
+ # @return [String, nil]
750
+ optional :base_amount, String, nil?: true
751
+
752
+ # @!attribute multiplier_factor
753
+ # The percentage that may be used, in conjunction with the charge base amount, to
754
+ # calculate the charge amount. To state 20%, use value 20
755
+ #
756
+ # @return [String, nil]
757
+ optional :multiplier_factor, String, nil?: true
758
+
759
+ # @!attribute reason
760
+ # The reason for the charge
761
+ #
762
+ # @return [String, nil]
763
+ optional :reason, String, nil?: true
764
+
765
+ # @!attribute reason_code
766
+ # The code for the charge reason
767
+ #
768
+ # @return [String, nil]
769
+ optional :reason_code, String, nil?: true
770
+
771
+ # @!attribute tax_code
772
+ # Duty or tax or fee category codes (Subset of UNCL5305)
773
+ #
774
+ # Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL
775
+ #
776
+ # @return [Symbol, EInvoiceAPI::Models::DocumentResponse::Item::Charge::TaxCode, nil]
777
+ optional :tax_code, enum: -> { EInvoiceAPI::DocumentResponse::Item::Charge::TaxCode }, nil?: true
778
+
779
+ # @!attribute tax_rate
780
+ # The VAT rate, represented as percentage that applies to the charge
781
+ #
782
+ # @return [String, nil]
783
+ optional :tax_rate, String, nil?: true
784
+
785
+ # @!method initialize(amount: nil, base_amount: nil, multiplier_factor: nil, reason: nil, reason_code: nil, tax_code: nil, tax_rate: nil)
786
+ # Some parameter documentations has been truncated, see
787
+ # {EInvoiceAPI::Models::DocumentResponse::Item::Charge} for more details.
788
+ #
789
+ # A charge is an additional fee for example for late payment, late delivery, etc.
790
+ #
791
+ # @param amount [String, nil] The charge amount, without VAT. Must be rounded to maximum 2 decimals
792
+ #
793
+ # @param base_amount [String, nil] The base amount that may be used, in conjunction with the charge percentage, to
794
+ #
795
+ # @param multiplier_factor [String, nil] The percentage that may be used, in conjunction with the charge base amount, to
796
+ #
797
+ # @param reason [String, nil] The reason for the charge
798
+ #
799
+ # @param reason_code [String, nil] The code for the charge reason
800
+ #
801
+ # @param tax_code [Symbol, EInvoiceAPI::Models::DocumentResponse::Item::Charge::TaxCode, nil] Duty or tax or fee category codes (Subset of UNCL5305)
802
+ #
803
+ # @param tax_rate [String, nil] The VAT rate, represented as percentage that applies to the charge
804
+
805
+ # Duty or tax or fee category codes (Subset of UNCL5305)
806
+ #
807
+ # Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL
808
+ #
809
+ # @see EInvoiceAPI::Models::DocumentResponse::Item::Charge#tax_code
810
+ module TaxCode
811
+ extend EInvoiceAPI::Internal::Type::Enum
812
+
813
+ AE = :AE
814
+ E = :E
815
+ S = :S
816
+ Z = :Z
817
+ G = :G
818
+ O = :O
819
+ K = :K
820
+ L = :L
821
+ M = :M
822
+ B = :B
823
+
824
+ # @!method self.values
825
+ # @return [Array<Symbol>]
826
+ end
827
+ end
371
828
  end
372
829
 
373
830
  class PaymentDetail < EInvoiceAPI::Internal::Type::BaseModel
@@ -398,6 +855,27 @@ module EInvoiceAPI
398
855
  # @param swift [String, nil]
399
856
  end
400
857
 
858
+ # Tax category code of the invoice
859
+ #
860
+ # @see EInvoiceAPI::Models::DocumentResponse#tax_code
861
+ module TaxCode
862
+ extend EInvoiceAPI::Internal::Type::Enum
863
+
864
+ AE = :AE
865
+ E = :E
866
+ S = :S
867
+ Z = :Z
868
+ G = :G
869
+ O = :O
870
+ K = :K
871
+ L = :L
872
+ M = :M
873
+ B = :B
874
+
875
+ # @!method self.values
876
+ # @return [Array<Symbol>]
877
+ end
878
+
401
879
  class TaxDetail < EInvoiceAPI::Internal::Type::BaseModel
402
880
  # @!attribute amount
403
881
  #
@@ -413,6 +891,81 @@ module EInvoiceAPI
413
891
  # @param amount [String, nil]
414
892
  # @param rate [String, nil]
415
893
  end
894
+
895
+ # VATEX code list for VAT exemption reasons
896
+ #
897
+ # Agency: CEF Identifier: vatex
898
+ #
899
+ # @see EInvoiceAPI::Models::DocumentResponse#vatex
900
+ module Vatex
901
+ extend EInvoiceAPI::Internal::Type::Enum
902
+
903
+ VATEX_EU_79_C = :"VATEX-EU-79-C"
904
+ VATEX_EU_132 = :"VATEX-EU-132"
905
+ VATEX_EU_132_1_A = :"VATEX-EU-132-1A"
906
+ VATEX_EU_132_1_B = :"VATEX-EU-132-1B"
907
+ VATEX_EU_132_1_C = :"VATEX-EU-132-1C"
908
+ VATEX_EU_132_1_D = :"VATEX-EU-132-1D"
909
+ VATEX_EU_132_1_E = :"VATEX-EU-132-1E"
910
+ VATEX_EU_132_1_F = :"VATEX-EU-132-1F"
911
+ VATEX_EU_132_1_G = :"VATEX-EU-132-1G"
912
+ VATEX_EU_132_1_H = :"VATEX-EU-132-1H"
913
+ VATEX_EU_132_1_I = :"VATEX-EU-132-1I"
914
+ VATEX_EU_132_1_J = :"VATEX-EU-132-1J"
915
+ VATEX_EU_132_1_K = :"VATEX-EU-132-1K"
916
+ VATEX_EU_132_1_L = :"VATEX-EU-132-1L"
917
+ VATEX_EU_132_1_M = :"VATEX-EU-132-1M"
918
+ VATEX_EU_132_1_N = :"VATEX-EU-132-1N"
919
+ VATEX_EU_132_1_O = :"VATEX-EU-132-1O"
920
+ VATEX_EU_132_1_P = :"VATEX-EU-132-1P"
921
+ VATEX_EU_132_1_Q = :"VATEX-EU-132-1Q"
922
+ VATEX_EU_143 = :"VATEX-EU-143"
923
+ VATEX_EU_143_1_A = :"VATEX-EU-143-1A"
924
+ VATEX_EU_143_1_B = :"VATEX-EU-143-1B"
925
+ VATEX_EU_143_1_C = :"VATEX-EU-143-1C"
926
+ VATEX_EU_143_1_D = :"VATEX-EU-143-1D"
927
+ VATEX_EU_143_1_E = :"VATEX-EU-143-1E"
928
+ VATEX_EU_143_1_F = :"VATEX-EU-143-1F"
929
+ VATEX_EU_143_1_FA = :"VATEX-EU-143-1FA"
930
+ VATEX_EU_143_1_G = :"VATEX-EU-143-1G"
931
+ VATEX_EU_143_1_H = :"VATEX-EU-143-1H"
932
+ VATEX_EU_143_1_I = :"VATEX-EU-143-1I"
933
+ VATEX_EU_143_1_J = :"VATEX-EU-143-1J"
934
+ VATEX_EU_143_1_K = :"VATEX-EU-143-1K"
935
+ VATEX_EU_143_1_L = :"VATEX-EU-143-1L"
936
+ VATEX_EU_144 = :"VATEX-EU-144"
937
+ VATEX_EU_146_1_E = :"VATEX-EU-146-1E"
938
+ VATEX_EU_148 = :"VATEX-EU-148"
939
+ VATEX_EU_148_A = :"VATEX-EU-148-A"
940
+ VATEX_EU_148_B = :"VATEX-EU-148-B"
941
+ VATEX_EU_148_C = :"VATEX-EU-148-C"
942
+ VATEX_EU_148_D = :"VATEX-EU-148-D"
943
+ VATEX_EU_148_E = :"VATEX-EU-148-E"
944
+ VATEX_EU_148_F = :"VATEX-EU-148-F"
945
+ VATEX_EU_148_G = :"VATEX-EU-148-G"
946
+ VATEX_EU_151 = :"VATEX-EU-151"
947
+ VATEX_EU_151_1_A = :"VATEX-EU-151-1A"
948
+ VATEX_EU_151_1_AA = :"VATEX-EU-151-1AA"
949
+ VATEX_EU_151_1_B = :"VATEX-EU-151-1B"
950
+ VATEX_EU_151_1_C = :"VATEX-EU-151-1C"
951
+ VATEX_EU_151_1_D = :"VATEX-EU-151-1D"
952
+ VATEX_EU_151_1_E = :"VATEX-EU-151-1E"
953
+ VATEX_EU_159 = :"VATEX-EU-159"
954
+ VATEX_EU_309 = :"VATEX-EU-309"
955
+ VATEX_EU_AE = :"VATEX-EU-AE"
956
+ VATEX_EU_D = :"VATEX-EU-D"
957
+ VATEX_EU_F = :"VATEX-EU-F"
958
+ VATEX_EU_G = :"VATEX-EU-G"
959
+ VATEX_EU_I = :"VATEX-EU-I"
960
+ VATEX_EU_IC = :"VATEX-EU-IC"
961
+ VATEX_EU_O = :"VATEX-EU-O"
962
+ VATEX_EU_J = :"VATEX-EU-J"
963
+ VATEX_FR_FRANCHISE = :"VATEX-FR-FRANCHISE"
964
+ VATEX_FR_CNWVAT = :"VATEX-FR-CNWVAT"
965
+
966
+ # @!method self.values
967
+ # @return [Array<Symbol>]
968
+ end
416
969
  end
417
970
  end
418
971
  end