e-invoice-api 0.6.0 → 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,6 +197,9 @@ 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
@@ -187,14 +214,18 @@ module EInvoiceAPI
187
214
  #
188
215
  # @return [Array<EInvoiceAPI::Models::DocumentResponse::TaxDetail>, nil]
189
216
  optional :tax_details,
190
- -> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::DocumentResponse::TaxDetail] }
217
+ -> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::DocumentResponse::TaxDetail] },
218
+ nil?: true
191
219
 
192
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
193
223
  #
194
224
  # @return [String, nil]
195
225
  optional :total_discount, String, nil?: true
196
226
 
197
227
  # @!attribute total_tax
228
+ # The total tax of the invoice. Must be positive and rounded to maximum 2 decimals
198
229
  #
199
230
  # @return [String, nil]
200
231
  optional :total_tax, String, nil?: true
@@ -238,20 +269,24 @@ module EInvoiceAPI
238
269
  # @return [String, nil]
239
270
  optional :vendor_tax_id, String, nil?: true
240
271
 
241
- # @!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_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)
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)
242
273
  # Some parameter documentations has been truncated, see
243
274
  # {EInvoiceAPI::Models::DocumentResponse} for more details.
244
275
  #
245
276
  # @param id [String]
246
277
  #
247
- # @param amount_due [String, nil]
278
+ # @param allowances [Array<EInvoiceAPI::Models::DocumentResponse::Allowance>, nil]
279
+ #
280
+ # @param amount_due [String, nil] The amount due of the invoice. Must be positive and rounded to maximum 2 decimal
248
281
  #
249
- # @param attachments [Array<EInvoiceAPI::Models::Documents::DocumentAttachment>]
282
+ # @param attachments [Array<EInvoiceAPI::Models::Documents::DocumentAttachment>, nil]
250
283
  #
251
284
  # @param billing_address [String, nil]
252
285
  #
253
286
  # @param billing_address_recipient [String, nil]
254
287
  #
288
+ # @param charges [Array<EInvoiceAPI::Models::DocumentResponse::Charge>, nil]
289
+ #
255
290
  # @param currency [Symbol, EInvoiceAPI::Models::CurrencyCode] Currency of the invoice
256
291
  #
257
292
  # @param customer_address [String, nil]
@@ -276,17 +311,17 @@ module EInvoiceAPI
276
311
  #
277
312
  # @param invoice_id [String, nil]
278
313
  #
279
- # @param invoice_total [String, nil]
314
+ # @param invoice_total [String, nil] The total amount of the invoice (so invoice_total = subtotal + total_tax + total
280
315
  #
281
- # @param items [Array<EInvoiceAPI::Models::DocumentResponse::Item>]
316
+ # @param items [Array<EInvoiceAPI::Models::DocumentResponse::Item>, nil]
282
317
  #
283
318
  # @param note [String, nil]
284
319
  #
285
- # @param payment_details [Array<EInvoiceAPI::Models::DocumentResponse::PaymentDetail>]
320
+ # @param payment_details [Array<EInvoiceAPI::Models::DocumentResponse::PaymentDetail>, nil]
286
321
  #
287
322
  # @param payment_term [String, nil]
288
323
  #
289
- # @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
290
325
  #
291
326
  # @param purchase_order [String, nil]
292
327
  #
@@ -308,15 +343,15 @@ module EInvoiceAPI
308
343
  #
309
344
  # @param state [Symbol, EInvoiceAPI::Models::DocumentState]
310
345
  #
311
- # @param subtotal [String, nil]
346
+ # @param subtotal [String, nil] The taxable base of the invoice. Should be the sum of all line items - allowance
312
347
  #
313
348
  # @param tax_code [Symbol, EInvoiceAPI::Models::DocumentResponse::TaxCode] Tax category code of the invoice
314
349
  #
315
- # @param tax_details [Array<EInvoiceAPI::Models::DocumentResponse::TaxDetail>]
350
+ # @param tax_details [Array<EInvoiceAPI::Models::DocumentResponse::TaxDetail>, nil]
316
351
  #
317
- # @param total_discount [String, nil]
352
+ # @param total_discount [String, nil] The total financial discount of the invoice (so discounts not subject to VAT). M
318
353
  #
319
- # @param total_tax [String, nil]
354
+ # @param total_tax [String, nil] The total tax of the invoice. Must be positive and rounded to maximum 2 decimals
320
355
  #
321
356
  # @param vatex [Symbol, EInvoiceAPI::Models::DocumentResponse::Vatex, nil] VATEX code list for VAT exemption reasons
322
357
  #
@@ -332,38 +367,241 @@ module EInvoiceAPI
332
367
  #
333
368
  # @param vendor_tax_id [String, nil]
334
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
+
335
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
+
336
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
337
561
  #
338
562
  # @return [String, nil]
339
563
  optional :amount, String, nil?: true
340
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
+
341
573
  # @!attribute date
342
574
  #
343
575
  # @return [nil]
344
576
  optional :date, NilClass
345
577
 
346
578
  # @!attribute description
579
+ # The description of the line item.
347
580
  #
348
581
  # @return [String, nil]
349
582
  optional :description, String, nil?: true
350
583
 
351
584
  # @!attribute product_code
585
+ # The product code of the line item.
352
586
  #
353
587
  # @return [String, nil]
354
588
  optional :product_code, String, nil?: true
355
589
 
356
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
357
593
  #
358
594
  # @return [String, nil]
359
595
  optional :quantity, String, nil?: true
360
596
 
361
597
  # @!attribute tax
598
+ # The total VAT amount for the line item. Must be rounded to maximum 2 decimals
362
599
  #
363
600
  # @return [String, nil]
364
601
  optional :tax, String, nil?: true
365
602
 
366
603
  # @!attribute tax_rate
604
+ # The VAT rate of the line item expressed as percentage with 2 decimals
367
605
  #
368
606
  # @return [String, nil]
369
607
  optional :tax_rate, String, nil?: true
@@ -375,28 +613,218 @@ module EInvoiceAPI
375
613
  optional :unit, enum: -> { EInvoiceAPI::UnitOfMeasureCode }, nil?: true
376
614
 
377
615
  # @!attribute unit_price
616
+ # The unit price of the line item. Must be rounded to maximum 2 decimals
378
617
  #
379
618
  # @return [String, nil]
380
619
  optional :unit_price, String, nil?: true
381
620
 
382
- # @!method initialize(amount: nil, date: nil, description: nil, product_code: nil, quantity: nil, tax: nil, tax_rate: nil, unit: nil, unit_price: nil)
383
- # @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.
384
630
  #
385
631
  # @param date [nil]
386
632
  #
387
- # @param description [String, nil]
633
+ # @param description [String, nil] The description of the line item.
388
634
  #
389
- # @param product_code [String, nil]
635
+ # @param product_code [String, nil] The product code of the line item.
390
636
  #
391
- # @param quantity [String, nil]
637
+ # @param quantity [String, nil] The quantity of items (goods or services) that is the subject of the line item.
392
638
  #
393
- # @param tax [String, nil]
639
+ # @param tax [String, nil] The total VAT amount for the line item. Must be rounded to maximum 2 decimals
394
640
  #
395
- # @param tax_rate [String, nil]
641
+ # @param tax_rate [String, nil] The VAT rate of the line item expressed as percentage with 2 decimals
396
642
  #
397
643
  # @param unit [Symbol, EInvoiceAPI::Models::UnitOfMeasureCode, nil] Unit of Measure Codes from UNECERec20 used in Peppol BIS Billing 3.0.
398
644
  #
399
- # @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
400
828
  end
401
829
 
402
830
  class PaymentDetail < EInvoiceAPI::Internal::Type::BaseModel