e-invoice-api 0.13.0 → 0.15.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.
@@ -152,13 +152,6 @@ module EInvoiceAPI
152
152
  # @return [String, nil]
153
153
  optional :payment_term, String, nil?: true
154
154
 
155
- # @!attribute previous_unpaid_balance
156
- # The previous unpaid balance from prior invoices, if any. Must be positive and
157
- # rounded to maximum 2 decimals
158
- #
159
- # @return [String, nil]
160
- optional :previous_unpaid_balance, String, nil?: true
161
-
162
155
  # @!attribute purchase_order
163
156
  # The purchase order reference number
164
157
  #
@@ -320,7 +313,7 @@ module EInvoiceAPI
320
313
  # @return [String, nil]
321
314
  optional :vendor_tax_id, String, nil?: true
322
315
 
323
- # @!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_company_id: 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, success: nil, tax_code: nil, tax_details: nil, total_discount: nil, total_tax: nil, ubl_document: nil, vatex: nil, vatex_note: nil, vendor_address: nil, vendor_address_recipient: nil, vendor_company_id: nil, vendor_email: nil, vendor_name: nil, vendor_tax_id: nil)
316
+ # @!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_company_id: 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, 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, success: nil, tax_code: nil, tax_details: nil, total_discount: nil, total_tax: nil, ubl_document: nil, vatex: nil, vatex_note: nil, vendor_address: nil, vendor_address_recipient: nil, vendor_company_id: nil, vendor_email: nil, vendor_name: nil, vendor_tax_id: nil)
324
317
  # Some parameter documentations has been truncated, see
325
318
  # {EInvoiceAPI::Models::DocumentCreateFromPdfResponse} for more details.
326
319
  #
@@ -372,8 +365,6 @@ module EInvoiceAPI
372
365
  #
373
366
  # @param payment_term [String, nil] The payment terms (e.g., 'Net 30', 'Due on receipt', '2/10 Net 30')
374
367
  #
375
- # @param previous_unpaid_balance [String, nil] The previous unpaid balance from prior invoices, if any. Must be positive and ro
376
- #
377
368
  # @param purchase_order [String, nil] The purchase order reference number
378
369
  #
379
370
  # @param remittance_address [String, nil] The address where payment should be sent or remitted to
@@ -432,9 +423,10 @@ module EInvoiceAPI
432
423
  optional :allowances, -> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::Allowance] }, nil?: true
433
424
 
434
425
  # @!attribute amount
435
- # The total amount of the line item, exclusive of VAT, after subtracting line
436
- # level allowances and adding line level charges. Must be rounded to maximum 2
437
- # decimals
426
+ # The invoice line net amount (BT-131), exclusive of VAT, inclusive of line level
427
+ # allowances and charges. Calculated as: ((unit_price / price_base_quantity) \*
428
+ # quantity) - allowances + charges. Must be rounded to maximum 2 decimals. Can be
429
+ # negative for credit notes or corrections.
438
430
  #
439
431
  # @return [String, nil]
440
432
  optional :amount, String, nil?: true
@@ -464,13 +456,15 @@ module EInvoiceAPI
464
456
 
465
457
  # @!attribute quantity
466
458
  # The quantity of items (goods or services) that is the subject of the line item.
467
- # Must be rounded to maximum 4 decimals
459
+ # Must be rounded to maximum 4 decimals. Can be negative for credit notes or
460
+ # corrections.
468
461
  #
469
462
  # @return [String, nil]
470
463
  optional :quantity, String, nil?: true
471
464
 
472
465
  # @!attribute tax
473
- # The total VAT amount for the line item. Must be rounded to maximum 2 decimals
466
+ # The total VAT amount for the line item. Must be rounded to maximum 2 decimals.
467
+ # Can be negative for credit notes or corrections.
474
468
  #
475
469
  # @return [String, nil]
476
470
  optional :tax, String, nil?: true
@@ -488,7 +482,8 @@ module EInvoiceAPI
488
482
  optional :unit, enum: -> { EInvoiceAPI::UnitOfMeasureCode }, nil?: true
489
483
 
490
484
  # @!attribute unit_price
491
- # The unit price of the line item. Must be rounded to maximum 2 decimals
485
+ # The item net price (BT-146). The price of an item, exclusive of VAT, after
486
+ # subtracting item price discount. Must be rounded to maximum 4 decimals
492
487
  #
493
488
  # @return [String, nil]
494
489
  optional :unit_price, String, nil?: true
@@ -499,7 +494,7 @@ module EInvoiceAPI
499
494
  #
500
495
  # @param allowances [Array<EInvoiceAPI::Models::Allowance>, nil] The allowances of the line item.
501
496
  #
502
- # @param amount [String, nil] The total amount of the line item, exclusive of VAT, after subtracting line leve
497
+ # @param amount [String, nil] The invoice line net amount (BT-131), exclusive of VAT, inclusive of line level
503
498
  #
504
499
  # @param charges [Array<EInvoiceAPI::Models::Charge>, nil] The charges of the line item.
505
500
  #
@@ -511,13 +506,13 @@ module EInvoiceAPI
511
506
  #
512
507
  # @param quantity [String, nil] The quantity of items (goods or services) that is the subject of the line item.
513
508
  #
514
- # @param tax [String, nil] The total VAT amount for the line item. Must be rounded to maximum 2 decimals
509
+ # @param tax [String, nil] The total VAT amount for the line item. Must be rounded to maximum 2 decimals. C
515
510
  #
516
511
  # @param tax_rate [String, nil] The VAT rate of the line item expressed as percentage with 2 decimals
517
512
  #
518
513
  # @param unit [Symbol, EInvoiceAPI::Models::UnitOfMeasureCode, nil] Unit of Measure Codes from UNECERec20 used in Peppol BIS Billing 3.0.
519
514
  #
520
- # @param unit_price [String, nil] The unit price of the line item. Must be rounded to maximum 2 decimals
515
+ # @param unit_price [String, nil] The item net price (BT-146). The price of an item, exclusive of VAT, after subtr
521
516
  end
522
517
 
523
518
  # Tax category code of the invoice (e.g., S for standard rate, Z for zero rate, E
@@ -161,13 +161,6 @@ module EInvoiceAPI
161
161
  # @return [String, nil]
162
162
  optional :payment_term, String, nil?: true
163
163
 
164
- # @!attribute previous_unpaid_balance
165
- # The previous unpaid balance from prior invoices, if any. Must be positive and
166
- # rounded to maximum 2 decimals
167
- #
168
- # @return [String, nil]
169
- optional :previous_unpaid_balance, String, nil?: true
170
-
171
164
  # @!attribute purchase_order
172
165
  # The purchase order reference number
173
166
  #
@@ -317,7 +310,7 @@ module EInvoiceAPI
317
310
  # @return [String, nil]
318
311
  optional :vendor_tax_id, String, nil?: true
319
312
 
320
- # @!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_company_id: 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_company_id: nil, vendor_email: nil, vendor_name: nil, vendor_tax_id: nil)
313
+ # @!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_company_id: 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, 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_company_id: nil, vendor_email: nil, vendor_name: nil, vendor_tax_id: nil)
321
314
  # Some parameter documentations has been truncated, see
322
315
  # {EInvoiceAPI::Models::DocumentResponse} for more details.
323
316
  #
@@ -371,8 +364,6 @@ module EInvoiceAPI
371
364
  #
372
365
  # @param payment_term [String, nil] The payment terms (e.g., 'Net 30', 'Due on receipt', '2/10 Net 30')
373
366
  #
374
- # @param previous_unpaid_balance [String, nil] The previous unpaid balance from prior invoices, if any. Must be positive and ro
375
- #
376
367
  # @param purchase_order [String, nil] The purchase order reference number
377
368
  #
378
369
  # @param remittance_address [String, nil] The address where payment should be sent or remitted to
@@ -435,7 +426,8 @@ module EInvoiceAPI
435
426
 
436
427
  # @!attribute multiplier_factor
437
428
  # The percentage that may be used, in conjunction with the allowance base amount,
438
- # to calculate the allowance amount. To state 20%, use value 20
429
+ # to calculate the allowance amount. To state 20%, use value 20. Must be rounded
430
+ # to maximum 2 decimals
439
431
  #
440
432
  # @return [String, nil]
441
433
  optional :multiplier_factor, String, nil?: true
@@ -447,21 +439,20 @@ module EInvoiceAPI
447
439
  optional :reason, String, nil?: true
448
440
 
449
441
  # @!attribute reason_code
450
- # The code for the allowance reason
442
+ # Allowance reason codes for invoice discounts and charges
451
443
  #
452
- # @return [String, nil]
453
- optional :reason_code, String, nil?: true
444
+ # @return [Symbol, EInvoiceAPI::Models::DocumentResponse::Allowance::ReasonCode, nil]
445
+ optional :reason_code, enum: -> { EInvoiceAPI::DocumentResponse::Allowance::ReasonCode }, nil?: true
454
446
 
455
447
  # @!attribute tax_code
456
- # Duty or tax or fee category codes (Subset of UNCL5305)
457
- #
458
- # Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL
448
+ # The VAT category code that applies to the allowance
459
449
  #
460
450
  # @return [Symbol, EInvoiceAPI::Models::DocumentResponse::Allowance::TaxCode, nil]
461
- optional :tax_code, enum: -> { EInvoiceAPI::DocumentResponse::Allowance::TaxCode }, nil?: true
451
+ optional :tax_code, enum: -> { EInvoiceAPI::DocumentResponse::Allowance::TaxCode }
462
452
 
463
453
  # @!attribute tax_rate
464
- # The VAT rate, represented as percentage that applies to the allowance
454
+ # The VAT rate, represented as percentage that applies to the allowance. Must be
455
+ # rounded to maximum 2 decimals
465
456
  #
466
457
  # @return [String, nil]
467
458
  optional :tax_rate, String, nil?: true
@@ -478,15 +469,43 @@ module EInvoiceAPI
478
469
  #
479
470
  # @param reason [String, nil] The reason for the allowance
480
471
  #
481
- # @param reason_code [String, nil] The code for the allowance reason
472
+ # @param reason_code [Symbol, EInvoiceAPI::Models::DocumentResponse::Allowance::ReasonCode, nil] Allowance reason codes for invoice discounts and charges
482
473
  #
483
- # @param tax_code [Symbol, EInvoiceAPI::Models::DocumentResponse::Allowance::TaxCode, nil] Duty or tax or fee category codes (Subset of UNCL5305)
474
+ # @param tax_code [Symbol, EInvoiceAPI::Models::DocumentResponse::Allowance::TaxCode] The VAT category code that applies to the allowance
484
475
  #
485
- # @param tax_rate [String, nil] The VAT rate, represented as percentage that applies to the allowance
476
+ # @param tax_rate [String, nil] The VAT rate, represented as percentage that applies to the allowance. Must be r
486
477
 
487
- # Duty or tax or fee category codes (Subset of UNCL5305)
478
+ # Allowance reason codes for invoice discounts and charges
488
479
  #
489
- # Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL
480
+ # @see EInvoiceAPI::Models::DocumentResponse::Allowance#reason_code
481
+ module ReasonCode
482
+ extend EInvoiceAPI::Internal::Type::Enum
483
+
484
+ REASON_CODE_41 = :"41"
485
+ REASON_CODE_42 = :"42"
486
+ REASON_CODE_60 = :"60"
487
+ REASON_CODE_62 = :"62"
488
+ REASON_CODE_63 = :"63"
489
+ REASON_CODE_64 = :"64"
490
+ REASON_CODE_65 = :"65"
491
+ REASON_CODE_66 = :"66"
492
+ REASON_CODE_67 = :"67"
493
+ REASON_CODE_68 = :"68"
494
+ REASON_CODE_70 = :"70"
495
+ REASON_CODE_71 = :"71"
496
+ REASON_CODE_88 = :"88"
497
+ REASON_CODE_95 = :"95"
498
+ REASON_CODE_100 = :"100"
499
+ REASON_CODE_102 = :"102"
500
+ REASON_CODE_103 = :"103"
501
+ REASON_CODE_104 = :"104"
502
+ REASON_CODE_105 = :"105"
503
+
504
+ # @!method self.values
505
+ # @return [Array<Symbol>]
506
+ end
507
+
508
+ # The VAT category code that applies to the allowance
490
509
  #
491
510
  # @see EInvoiceAPI::Models::DocumentResponse::Allowance#tax_code
492
511
  module TaxCode
@@ -536,10 +555,10 @@ module EInvoiceAPI
536
555
  optional :reason, String, nil?: true
537
556
 
538
557
  # @!attribute reason_code
539
- # The code for the charge reason
558
+ # Charge reason codes for invoice charges and fees
540
559
  #
541
- # @return [String, nil]
542
- optional :reason_code, String, nil?: true
560
+ # @return [Symbol, EInvoiceAPI::Models::DocumentResponse::Charge::ReasonCode, nil]
561
+ optional :reason_code, enum: -> { EInvoiceAPI::DocumentResponse::Charge::ReasonCode }, nil?: true
543
562
 
544
563
  # @!attribute tax_code
545
564
  # Duty or tax or fee category codes (Subset of UNCL5305)
@@ -567,12 +586,201 @@ module EInvoiceAPI
567
586
  #
568
587
  # @param reason [String, nil] The reason for the charge
569
588
  #
570
- # @param reason_code [String, nil] The code for the charge reason
589
+ # @param reason_code [Symbol, EInvoiceAPI::Models::DocumentResponse::Charge::ReasonCode, nil] Charge reason codes for invoice charges and fees
571
590
  #
572
591
  # @param tax_code [Symbol, EInvoiceAPI::Models::DocumentResponse::Charge::TaxCode, nil] Duty or tax or fee category codes (Subset of UNCL5305)
573
592
  #
574
593
  # @param tax_rate [String, nil] The VAT rate, represented as percentage that applies to the charge
575
594
 
595
+ # Charge reason codes for invoice charges and fees
596
+ #
597
+ # @see EInvoiceAPI::Models::DocumentResponse::Charge#reason_code
598
+ module ReasonCode
599
+ extend EInvoiceAPI::Internal::Type::Enum
600
+
601
+ AA = :AA
602
+ AAA = :AAA
603
+ AAC = :AAC
604
+ AAD = :AAD
605
+ AAE = :AAE
606
+ AAF = :AAF
607
+ AAH = :AAH
608
+ AAI = :AAI
609
+ AAS = :AAS
610
+ AAT = :AAT
611
+ AAV = :AAV
612
+ AAY = :AAY
613
+ AAZ = :AAZ
614
+ ABA = :ABA
615
+ ABB = :ABB
616
+ ABC = :ABC
617
+ ABD = :ABD
618
+ ABF = :ABF
619
+ ABK = :ABK
620
+ ABL = :ABL
621
+ ABN = :ABN
622
+ ABR = :ABR
623
+ ABS = :ABS
624
+ ABT = :ABT
625
+ ABU = :ABU
626
+ ACF = :ACF
627
+ ACG = :ACG
628
+ ACH = :ACH
629
+ ACI = :ACI
630
+ ACJ = :ACJ
631
+ ACK = :ACK
632
+ ACL = :ACL
633
+ ACM = :ACM
634
+ ACS = :ACS
635
+ ADC = :ADC
636
+ ADE = :ADE
637
+ ADJ = :ADJ
638
+ ADK = :ADK
639
+ ADL = :ADL
640
+ ADM = :ADM
641
+ ADN = :ADN
642
+ ADO = :ADO
643
+ ADP = :ADP
644
+ ADQ = :ADQ
645
+ ADR = :ADR
646
+ ADT = :ADT
647
+ ADW = :ADW
648
+ ADY = :ADY
649
+ ADZ = :ADZ
650
+ AEA = :AEA
651
+ AEB = :AEB
652
+ AEC = :AEC
653
+ AED = :AED
654
+ AEF = :AEF
655
+ AEH = :AEH
656
+ AEI = :AEI
657
+ AEJ = :AEJ
658
+ AEK = :AEK
659
+ AEL = :AEL
660
+ AEM = :AEM
661
+ AEN = :AEN
662
+ AEO = :AEO
663
+ AEP = :AEP
664
+ AES = :AES
665
+ AET = :AET
666
+ AEU = :AEU
667
+ AEV = :AEV
668
+ AEW = :AEW
669
+ AEX = :AEX
670
+ AEY = :AEY
671
+ AEZ = :AEZ
672
+ AJ = :AJ
673
+ AU = :AU
674
+ CA = :CA
675
+ CAB = :CAB
676
+ CAD = :CAD
677
+ CAE = :CAE
678
+ CAF = :CAF
679
+ CAI = :CAI
680
+ CAJ = :CAJ
681
+ CAK = :CAK
682
+ CAL = :CAL
683
+ CAM = :CAM
684
+ CAN = :CAN
685
+ CAO = :CAO
686
+ CAP = :CAP
687
+ CAQ = :CAQ
688
+ CAR = :CAR
689
+ CAS = :CAS
690
+ CAT = :CAT
691
+ CAU = :CAU
692
+ CAV = :CAV
693
+ CAW = :CAW
694
+ CAX = :CAX
695
+ CAY = :CAY
696
+ CAZ = :CAZ
697
+ CD = :CD
698
+ CG = :CG
699
+ CS = :CS
700
+ CT = :CT
701
+ DAB = :DAB
702
+ DAC = :DAC
703
+ DAD = :DAD
704
+ DAF = :DAF
705
+ DAG = :DAG
706
+ DAH = :DAH
707
+ DAI = :DAI
708
+ DAJ = :DAJ
709
+ DAK = :DAK
710
+ DAL = :DAL
711
+ DAM = :DAM
712
+ DAN = :DAN
713
+ DAO = :DAO
714
+ DAP = :DAP
715
+ DAQ = :DAQ
716
+ DL = :DL
717
+ EG = :EG
718
+ EP = :EP
719
+ ER = :ER
720
+ FAA = :FAA
721
+ FAB = :FAB
722
+ FAC = :FAC
723
+ FC = :FC
724
+ FH = :FH
725
+ FI = :FI
726
+ GAA = :GAA
727
+ HAA = :HAA
728
+ HD = :HD
729
+ HH = :HH
730
+ IAA = :IAA
731
+ IAB = :IAB
732
+ ID = :ID
733
+ IF = :IF
734
+ IR = :IR
735
+ IS = :IS
736
+ KO = :KO
737
+ L1 = :L1
738
+ LA = :LA
739
+ LAA = :LAA
740
+ LAB = :LAB
741
+ LF = :LF
742
+ MAE = :MAE
743
+ MI = :MI
744
+ ML = :ML
745
+ NAA = :NAA
746
+ OA = :OA
747
+ PA = :PA
748
+ PAA = :PAA
749
+ PC = :PC
750
+ PL = :PL
751
+ PRV = :PRV
752
+ RAB = :RAB
753
+ RAC = :RAC
754
+ RAD = :RAD
755
+ RAF = :RAF
756
+ RE = :RE
757
+ RF = :RF
758
+ RH = :RH
759
+ RV = :RV
760
+ SA = :SA
761
+ SAA = :SAA
762
+ SAD = :SAD
763
+ SAE = :SAE
764
+ SAI = :SAI
765
+ SG = :SG
766
+ SH = :SH
767
+ SM = :SM
768
+ SU = :SU
769
+ TAB = :TAB
770
+ TAC = :TAC
771
+ TT = :TT
772
+ TV = :TV
773
+ V1 = :V1
774
+ V2 = :V2
775
+ WH = :WH
776
+ XAA = :XAA
777
+ YY = :YY
778
+ ZZZ = :ZZZ
779
+
780
+ # @!method self.values
781
+ # @return [Array<Symbol>]
782
+ end
783
+
576
784
  # Duty or tax or fee category codes (Subset of UNCL5305)
577
785
  #
578
786
  # Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL
@@ -605,9 +813,10 @@ module EInvoiceAPI
605
813
  optional :allowances, -> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::Allowance] }, nil?: true
606
814
 
607
815
  # @!attribute amount
608
- # The total amount of the line item, exclusive of VAT, after subtracting line
609
- # level allowances and adding line level charges. Must be rounded to maximum 2
610
- # decimals
816
+ # The invoice line net amount (BT-131), exclusive of VAT, inclusive of line level
817
+ # allowances and charges. Calculated as: ((unit_price / price_base_quantity) \*
818
+ # quantity) - allowances + charges. Must be rounded to maximum 2 decimals. Can be
819
+ # negative for credit notes or corrections.
611
820
  #
612
821
  # @return [String, nil]
613
822
  optional :amount, String, nil?: true
@@ -637,13 +846,15 @@ module EInvoiceAPI
637
846
 
638
847
  # @!attribute quantity
639
848
  # The quantity of items (goods or services) that is the subject of the line item.
640
- # Must be rounded to maximum 4 decimals
849
+ # Must be rounded to maximum 4 decimals. Can be negative for credit notes or
850
+ # corrections.
641
851
  #
642
852
  # @return [String, nil]
643
853
  optional :quantity, String, nil?: true
644
854
 
645
855
  # @!attribute tax
646
- # The total VAT amount for the line item. Must be rounded to maximum 2 decimals
856
+ # The total VAT amount for the line item. Must be rounded to maximum 2 decimals.
857
+ # Can be negative for credit notes or corrections.
647
858
  #
648
859
  # @return [String, nil]
649
860
  optional :tax, String, nil?: true
@@ -661,7 +872,8 @@ module EInvoiceAPI
661
872
  optional :unit, enum: -> { EInvoiceAPI::UnitOfMeasureCode }, nil?: true
662
873
 
663
874
  # @!attribute unit_price
664
- # The unit price of the line item. Must be rounded to maximum 2 decimals
875
+ # The item net price (BT-146). The price of an item, exclusive of VAT, after
876
+ # subtracting item price discount. Must be rounded to maximum 4 decimals
665
877
  #
666
878
  # @return [String, nil]
667
879
  optional :unit_price, String, nil?: true
@@ -672,7 +884,7 @@ module EInvoiceAPI
672
884
  #
673
885
  # @param allowances [Array<EInvoiceAPI::Models::Allowance>, nil] The allowances of the line item.
674
886
  #
675
- # @param amount [String, nil] The total amount of the line item, exclusive of VAT, after subtracting line leve
887
+ # @param amount [String, nil] The invoice line net amount (BT-131), exclusive of VAT, inclusive of line level
676
888
  #
677
889
  # @param charges [Array<EInvoiceAPI::Models::Charge>, nil] The charges of the line item.
678
890
  #
@@ -684,13 +896,13 @@ module EInvoiceAPI
684
896
  #
685
897
  # @param quantity [String, nil] The quantity of items (goods or services) that is the subject of the line item.
686
898
  #
687
- # @param tax [String, nil] The total VAT amount for the line item. Must be rounded to maximum 2 decimals
899
+ # @param tax [String, nil] The total VAT amount for the line item. Must be rounded to maximum 2 decimals. C
688
900
  #
689
901
  # @param tax_rate [String, nil] The VAT rate of the line item expressed as percentage with 2 decimals
690
902
  #
691
903
  # @param unit [Symbol, EInvoiceAPI::Models::UnitOfMeasureCode, nil] Unit of Measure Codes from UNECERec20 used in Peppol BIS Billing 3.0.
692
904
  #
693
- # @param unit_price [String, nil] The unit price of the line item. Must be rounded to maximum 2 decimals
905
+ # @param unit_price [String, nil] The item net price (BT-146). The price of an item, exclusive of VAT, after subtr
694
906
  end
695
907
 
696
908
  class PaymentDetail < EInvoiceAPI::Internal::Type::BaseModel
@@ -474,7 +474,6 @@ module EInvoiceAPI
474
474
  MIN = :MIN
475
475
  MON = :MON
476
476
  ONZ = :ONZ
477
- PCE = :PCE
478
477
  LBR = :LBR
479
478
  QT = :QT
480
479
  SEC = :SEC
@@ -1037,6 +1036,7 @@ module EInvoiceAPI
1037
1036
  NAR = :NAR
1038
1037
  C62 = :C62
1039
1038
  LTR = :LTR
1039
+ H87 = :H87
1040
1040
 
1041
1041
  # @!method self.values
1042
1042
  # @return [Array<Symbol>]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EInvoiceAPI
4
- VERSION = "0.13.0"
4
+ VERSION = "0.15.0"
5
5
  end
@@ -18,7 +18,8 @@ module EInvoiceAPI
18
18
  attr_accessor :base_amount
19
19
 
20
20
  # The percentage that may be used, in conjunction with the allowance base amount,
21
- # to calculate the allowance amount. To state 20%, use value 20
21
+ # to calculate the allowance amount. To state 20%, use value 20. Must be rounded
22
+ # to maximum 2 decimals
22
23
  sig { returns(T.nilable(String)) }
23
24
  attr_accessor :multiplier_factor
24
25
 
@@ -26,17 +27,21 @@ module EInvoiceAPI
26
27
  sig { returns(T.nilable(String)) }
27
28
  attr_accessor :reason
28
29
 
29
- # The code for the allowance reason
30
- sig { returns(T.nilable(String)) }
30
+ # Allowance reason codes for invoice discounts and charges
31
+ sig do
32
+ returns(T.nilable(EInvoiceAPI::Allowance::ReasonCode::TaggedSymbol))
33
+ end
31
34
  attr_accessor :reason_code
32
35
 
33
- # Duty or tax or fee category codes (Subset of UNCL5305)
34
- #
35
- # Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL
36
+ # The VAT category code that applies to the allowance
36
37
  sig { returns(T.nilable(EInvoiceAPI::Allowance::TaxCode::TaggedSymbol)) }
37
- attr_accessor :tax_code
38
+ attr_reader :tax_code
38
39
 
39
- # The VAT rate, represented as percentage that applies to the allowance
40
+ sig { params(tax_code: EInvoiceAPI::Allowance::TaxCode::OrSymbol).void }
41
+ attr_writer :tax_code
42
+
43
+ # The VAT rate, represented as percentage that applies to the allowance. Must be
44
+ # rounded to maximum 2 decimals
40
45
  sig { returns(T.nilable(String)) }
41
46
  attr_accessor :tax_rate
42
47
 
@@ -47,8 +52,8 @@ module EInvoiceAPI
47
52
  base_amount: T.nilable(String),
48
53
  multiplier_factor: T.nilable(String),
49
54
  reason: T.nilable(String),
50
- reason_code: T.nilable(String),
51
- tax_code: T.nilable(EInvoiceAPI::Allowance::TaxCode::OrSymbol),
55
+ reason_code: T.nilable(EInvoiceAPI::Allowance::ReasonCode::OrSymbol),
56
+ tax_code: EInvoiceAPI::Allowance::TaxCode::OrSymbol,
52
57
  tax_rate: T.nilable(String)
53
58
  ).returns(T.attached_class)
54
59
  end
@@ -59,17 +64,17 @@ module EInvoiceAPI
59
64
  # to calculate the allowance amount. Must be rounded to maximum 2 decimals
60
65
  base_amount: nil,
61
66
  # The percentage that may be used, in conjunction with the allowance base amount,
62
- # to calculate the allowance amount. To state 20%, use value 20
67
+ # to calculate the allowance amount. To state 20%, use value 20. Must be rounded
68
+ # to maximum 2 decimals
63
69
  multiplier_factor: nil,
64
70
  # The reason for the allowance
65
71
  reason: nil,
66
- # The code for the allowance reason
72
+ # Allowance reason codes for invoice discounts and charges
67
73
  reason_code: nil,
68
- # Duty or tax or fee category codes (Subset of UNCL5305)
69
- #
70
- # Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL
74
+ # The VAT category code that applies to the allowance
71
75
  tax_code: nil,
72
- # The VAT rate, represented as percentage that applies to the allowance
76
+ # The VAT rate, represented as percentage that applies to the allowance. Must be
77
+ # rounded to maximum 2 decimals
73
78
  tax_rate: nil
74
79
  )
75
80
  end
@@ -81,8 +86,9 @@ module EInvoiceAPI
81
86
  base_amount: T.nilable(String),
82
87
  multiplier_factor: T.nilable(String),
83
88
  reason: T.nilable(String),
84
- reason_code: T.nilable(String),
85
- tax_code: T.nilable(EInvoiceAPI::Allowance::TaxCode::TaggedSymbol),
89
+ reason_code:
90
+ T.nilable(EInvoiceAPI::Allowance::ReasonCode::TaggedSymbol),
91
+ tax_code: EInvoiceAPI::Allowance::TaxCode::TaggedSymbol,
86
92
  tax_rate: T.nilable(String)
87
93
  }
88
94
  )
@@ -90,9 +96,63 @@ module EInvoiceAPI
90
96
  def to_hash
91
97
  end
92
98
 
93
- # Duty or tax or fee category codes (Subset of UNCL5305)
94
- #
95
- # Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL
99
+ # Allowance reason codes for invoice discounts and charges
100
+ module ReasonCode
101
+ extend EInvoiceAPI::Internal::Type::Enum
102
+
103
+ TaggedSymbol =
104
+ T.type_alias { T.all(Symbol, EInvoiceAPI::Allowance::ReasonCode) }
105
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
106
+
107
+ REASON_CODE_41 =
108
+ T.let(:"41", EInvoiceAPI::Allowance::ReasonCode::TaggedSymbol)
109
+ REASON_CODE_42 =
110
+ T.let(:"42", EInvoiceAPI::Allowance::ReasonCode::TaggedSymbol)
111
+ REASON_CODE_60 =
112
+ T.let(:"60", EInvoiceAPI::Allowance::ReasonCode::TaggedSymbol)
113
+ REASON_CODE_62 =
114
+ T.let(:"62", EInvoiceAPI::Allowance::ReasonCode::TaggedSymbol)
115
+ REASON_CODE_63 =
116
+ T.let(:"63", EInvoiceAPI::Allowance::ReasonCode::TaggedSymbol)
117
+ REASON_CODE_64 =
118
+ T.let(:"64", EInvoiceAPI::Allowance::ReasonCode::TaggedSymbol)
119
+ REASON_CODE_65 =
120
+ T.let(:"65", EInvoiceAPI::Allowance::ReasonCode::TaggedSymbol)
121
+ REASON_CODE_66 =
122
+ T.let(:"66", EInvoiceAPI::Allowance::ReasonCode::TaggedSymbol)
123
+ REASON_CODE_67 =
124
+ T.let(:"67", EInvoiceAPI::Allowance::ReasonCode::TaggedSymbol)
125
+ REASON_CODE_68 =
126
+ T.let(:"68", EInvoiceAPI::Allowance::ReasonCode::TaggedSymbol)
127
+ REASON_CODE_70 =
128
+ T.let(:"70", EInvoiceAPI::Allowance::ReasonCode::TaggedSymbol)
129
+ REASON_CODE_71 =
130
+ T.let(:"71", EInvoiceAPI::Allowance::ReasonCode::TaggedSymbol)
131
+ REASON_CODE_88 =
132
+ T.let(:"88", EInvoiceAPI::Allowance::ReasonCode::TaggedSymbol)
133
+ REASON_CODE_95 =
134
+ T.let(:"95", EInvoiceAPI::Allowance::ReasonCode::TaggedSymbol)
135
+ REASON_CODE_100 =
136
+ T.let(:"100", EInvoiceAPI::Allowance::ReasonCode::TaggedSymbol)
137
+ REASON_CODE_102 =
138
+ T.let(:"102", EInvoiceAPI::Allowance::ReasonCode::TaggedSymbol)
139
+ REASON_CODE_103 =
140
+ T.let(:"103", EInvoiceAPI::Allowance::ReasonCode::TaggedSymbol)
141
+ REASON_CODE_104 =
142
+ T.let(:"104", EInvoiceAPI::Allowance::ReasonCode::TaggedSymbol)
143
+ REASON_CODE_105 =
144
+ T.let(:"105", EInvoiceAPI::Allowance::ReasonCode::TaggedSymbol)
145
+
146
+ sig do
147
+ override.returns(
148
+ T::Array[EInvoiceAPI::Allowance::ReasonCode::TaggedSymbol]
149
+ )
150
+ end
151
+ def self.values
152
+ end
153
+ end
154
+
155
+ # The VAT category code that applies to the allowance
96
156
  module TaxCode
97
157
  extend EInvoiceAPI::Internal::Type::Enum
98
158