e-invoice-api 0.34.0 → 0.35.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.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +23 -0
  3. data/LICENSE +201 -0
  4. data/README.md +18 -7
  5. data/SECURITY.md +6 -16
  6. data/lib/e_invoice_api/internal/transport/base_client.rb +43 -78
  7. data/lib/e_invoice_api/internal/transport/pooled_net_requester.rb +8 -8
  8. data/lib/e_invoice_api/internal/type/array_of.rb +12 -12
  9. data/lib/e_invoice_api/internal/type/base_model.rb +18 -18
  10. data/lib/e_invoice_api/internal/type/boolean.rb +6 -6
  11. data/lib/e_invoice_api/internal/type/converter.rb +24 -24
  12. data/lib/e_invoice_api/internal/type/enum.rb +6 -6
  13. data/lib/e_invoice_api/internal/type/file_input.rb +6 -6
  14. data/lib/e_invoice_api/internal/type/hash_of.rb +12 -12
  15. data/lib/e_invoice_api/internal/type/request_parameters.rb +1 -1
  16. data/lib/e_invoice_api/internal/type/union.rb +10 -10
  17. data/lib/e_invoice_api/internal/type/unknown.rb +6 -6
  18. data/lib/e_invoice_api/internal/util.rb +15 -57
  19. data/lib/e_invoice_api/models/document_create.rb +45 -12
  20. data/lib/e_invoice_api/models/document_create_from_pdf_response.rb +45 -12
  21. data/lib/e_invoice_api/models/document_response.rb +49 -14
  22. data/lib/e_invoice_api/models/payment_detail_create.rb +4 -2
  23. data/lib/e_invoice_api/models/unit_of_measure_code.rb +1349 -0
  24. data/lib/e_invoice_api/resources/conversion/pdf.rb +6 -6
  25. data/lib/e_invoice_api/resources/documents/attachments.rb +11 -11
  26. data/lib/e_invoice_api/resources/documents/ubl.rb +4 -4
  27. data/lib/e_invoice_api/resources/documents.rb +81 -81
  28. data/lib/e_invoice_api/resources/drafts.rb +10 -10
  29. data/lib/e_invoice_api/resources/inbox.rb +20 -20
  30. data/lib/e_invoice_api/resources/lookup.rb +5 -5
  31. data/lib/e_invoice_api/resources/mailbox.rb +17 -17
  32. data/lib/e_invoice_api/resources/me.rb +1 -1
  33. data/lib/e_invoice_api/resources/outbox.rb +19 -19
  34. data/lib/e_invoice_api/resources/stats.rb +4 -4
  35. data/lib/e_invoice_api/resources/validate.rb +63 -63
  36. data/lib/e_invoice_api/resources/webhooks.rb +20 -20
  37. data/lib/e_invoice_api/version.rb +1 -1
  38. data/lib/e_invoice_api.rb +0 -1
  39. data/rbi/e_invoice_api/internal/transport/base_client.rbi +2 -10
  40. data/rbi/e_invoice_api/internal/util.rbi +0 -12
  41. data/rbi/e_invoice_api/models/document_create.rbi +156 -12
  42. data/rbi/e_invoice_api/models/document_create_from_pdf_response.rbi +156 -12
  43. data/rbi/e_invoice_api/models/document_response.rbi +162 -14
  44. data/rbi/e_invoice_api/models/payment_detail_create.rbi +6 -2
  45. data/rbi/e_invoice_api/models/unit_of_measure_code.rbi +1349 -0
  46. data/rbi/e_invoice_api/resources/documents.rbi +10 -5
  47. data/rbi/e_invoice_api/resources/validate.rbi +8 -5
  48. data/sig/e_invoice_api/internal/transport/base_client.rbs +1 -4
  49. data/sig/e_invoice_api/internal/util.rbs +0 -4
  50. data/sig/e_invoice_api/models/document_create.rbs +52 -0
  51. data/sig/e_invoice_api/models/document_create_from_pdf_response.rbs +52 -0
  52. data/sig/e_invoice_api/models/document_response.rbs +52 -0
  53. data/sig/e_invoice_api/models/unit_of_measure_code.rbs +2698 -0
  54. metadata +27 -7
@@ -57,7 +57,8 @@ module EInvoiceAPI
57
57
  sig { returns(T.nilable(String)) }
58
58
  attr_accessor :customer_address
59
59
 
60
- # The recipient name at the customer address
60
+ # The recipient name at the customer address. Also the customer contact name
61
+ # (BT-56) in the UBL.
61
62
  sig { returns(T.nilable(String)) }
62
63
  attr_accessor :customer_address_recipient
63
64
 
@@ -149,7 +150,7 @@ module EInvoiceAPI
149
150
  sig { returns(T.nilable(String)) }
150
151
  attr_accessor :preceding_invoice_id
151
152
 
152
- # The purchase order reference number
153
+ # The purchase order reference number (BT-13)
153
154
  sig { returns(T.nilable(String)) }
154
155
  attr_accessor :purchase_order
155
156
 
@@ -192,7 +193,7 @@ module EInvoiceAPI
192
193
  sig { returns(T.nilable(String)) }
193
194
  attr_accessor :shipping_address
194
195
 
195
- # The recipient name at the shipping address
196
+ # The name of the deliver-to party (BT-70)
196
197
  sig { returns(T.nilable(String)) }
197
198
  attr_accessor :shipping_address_recipient
198
199
 
@@ -256,7 +257,8 @@ module EInvoiceAPI
256
257
  end
257
258
  attr_accessor :vatex
258
259
 
259
- # Textual explanation for VAT exemption
260
+ # VAT exemption reason text (BT-120). An exemption reason (vatex or vatex_note) is
261
+ # required for tax_code E, AE, K, G and O, and not allowed for S, Z, L and M
260
262
  sig { returns(T.nilable(String)) }
261
263
  attr_accessor :vatex_note
262
264
 
@@ -264,7 +266,8 @@ module EInvoiceAPI
264
266
  sig { returns(T.nilable(String)) }
265
267
  attr_accessor :vendor_address
266
268
 
267
- # The recipient name at the vendor address
269
+ # The recipient name at the vendor address. Also the vendor contact name (BT-41)
270
+ # in the UBL, required when vendor and customer are both in Germany (DE-R-005).
268
271
  sig { returns(T.nilable(String)) }
269
272
  attr_accessor :vendor_address_recipient
270
273
 
@@ -388,7 +391,8 @@ module EInvoiceAPI
388
391
  currency: nil,
389
392
  # The address of the customer/buyer
390
393
  customer_address: nil,
391
- # The recipient name at the customer address
394
+ # The recipient name at the customer address. Also the customer contact name
395
+ # (BT-56) in the UBL.
392
396
  customer_address_recipient: nil,
393
397
  # Customer company ID. For Belgium this is the CBE number or their EUID (European
394
398
  # Unique Identifier) number. In the Netherlands this is the KVK number.
@@ -430,7 +434,7 @@ module EInvoiceAPI
430
434
  # The preceding invoice reference (BT-25): the number of the invoice this document
431
435
  # corrects, for example the invoice a credit note credits
432
436
  preceding_invoice_id: nil,
433
- # The purchase order reference number
437
+ # The purchase order reference number (BT-13)
434
438
  purchase_order: nil,
435
439
  # The address where payment should be sent or remitted to
436
440
  remittance_address: nil,
@@ -453,7 +457,7 @@ module EInvoiceAPI
453
457
  service_start_date: nil,
454
458
  # The shipping/delivery address
455
459
  shipping_address: nil,
456
- # The recipient name at the shipping address
460
+ # The name of the deliver-to party (BT-70)
457
461
  shipping_address_recipient: nil,
458
462
  # The current state of the document: DRAFT, TRANSIT, FAILED, SENT, or RECEIVED
459
463
  state: nil,
@@ -483,11 +487,13 @@ module EInvoiceAPI
483
487
  #
484
488
  # Agency: CEF Identifier: vatex
485
489
  vatex: nil,
486
- # Textual explanation for VAT exemption
490
+ # VAT exemption reason text (BT-120). An exemption reason (vatex or vatex_note) is
491
+ # required for tax_code E, AE, K, G and O, and not allowed for S, Z, L and M
487
492
  vatex_note: nil,
488
493
  # The address of the vendor/seller
489
494
  vendor_address: nil,
490
- # The recipient name at the vendor address
495
+ # The recipient name at the vendor address. Also the vendor contact name (BT-41)
496
+ # in the UBL, required when vendor and customer are both in Germany (DE-R-005).
491
497
  vendor_address_recipient: nil,
492
498
  # Vendor company ID. For Belgium this is the CBE number or their EUID (European
493
499
  # Unique Identifier) number. In the Netherlands this is the KVK number.
@@ -2018,7 +2024,11 @@ module EInvoiceAPI
2018
2024
  sig { returns(T.nilable(Date)) }
2019
2025
  attr_accessor :date
2020
2026
 
2021
- # The description of the line item.
2027
+ # The description of the line item (BT-154). Doubles as the item name when `name`
2028
+ # is omitted, so a posted line item needs a `name` or a `description`. On a
2029
+ # received document it holds the item description, or the item name (BT-153) when
2030
+ # the document has no item description; CII documents with both combine them as
2031
+ # `name: description`.
2022
2032
  sig { returns(T.nilable(String)) }
2023
2033
  attr_accessor :description
2024
2034
 
@@ -2110,7 +2120,11 @@ module EInvoiceAPI
2110
2120
  # The charges of the line item.
2111
2121
  charges: nil,
2112
2122
  date: nil,
2113
- # The description of the line item.
2123
+ # The description of the line item (BT-154). Doubles as the item name when `name`
2124
+ # is omitted, so a posted line item needs a `name` or a `description`. On a
2125
+ # received document it holds the item description, or the item name (BT-153) when
2126
+ # the document has no item description; CII documents with both combine them as
2127
+ # `name: description`.
2114
2128
  description: nil,
2115
2129
  # Item-level attributes (BG-32) from cac:AdditionalItemProperty.
2116
2130
  item_attributes: nil,
@@ -2215,7 +2229,9 @@ module EInvoiceAPI
2215
2229
  )
2216
2230
  end
2217
2231
 
2218
- # Bank account number (for non-IBAN accounts)
2232
+ # Bank account number (for non-IBAN accounts). With `swift` `SE:BANKGIRO` or
2233
+ # `SE:PLUSGIRO`, the bankgiro or plusgiro number, with `iban` left empty; spaces
2234
+ # and hyphens are removed.
2219
2235
  sig { returns(T.nilable(String)) }
2220
2236
  attr_accessor :bank_account_number
2221
2237
 
@@ -2243,7 +2259,9 @@ module EInvoiceAPI
2243
2259
  ).returns(T.attached_class)
2244
2260
  end
2245
2261
  def self.new(
2246
- # Bank account number (for non-IBAN accounts)
2262
+ # Bank account number (for non-IBAN accounts). With `swift` `SE:BANKGIRO` or
2263
+ # `SE:PLUSGIRO`, the bankgiro or plusgiro number, with `iban` left empty; spaces
2264
+ # and hyphens are removed.
2247
2265
  bank_account_number: nil,
2248
2266
  # International Bank Account Number for payment transfers
2249
2267
  iban: nil,
@@ -2444,6 +2462,11 @@ module EInvoiceAPI
2444
2462
  :"VATEX-EU-132-1Q",
2445
2463
  EInvoiceAPI::DocumentResponse::Vatex::TaggedSymbol
2446
2464
  )
2465
+ VATEX_EU_135_1 =
2466
+ T.let(
2467
+ :"VATEX-EU-135-1",
2468
+ EInvoiceAPI::DocumentResponse::Vatex::TaggedSymbol
2469
+ )
2447
2470
  VATEX_EU_143 =
2448
2471
  T.let(
2449
2472
  :"VATEX-EU-143",
@@ -2599,6 +2622,11 @@ module EInvoiceAPI
2599
2622
  :"VATEX-EU-151-1E",
2600
2623
  EInvoiceAPI::DocumentResponse::Vatex::TaggedSymbol
2601
2624
  )
2625
+ VATEX_EU_153 =
2626
+ T.let(
2627
+ :"VATEX-EU-153",
2628
+ EInvoiceAPI::DocumentResponse::Vatex::TaggedSymbol
2629
+ )
2602
2630
  VATEX_EU_159 =
2603
2631
  T.let(
2604
2632
  :"VATEX-EU-159",
@@ -2649,6 +2677,126 @@ module EInvoiceAPI
2649
2677
  :"VATEX-EU-J",
2650
2678
  EInvoiceAPI::DocumentResponse::Vatex::TaggedSymbol
2651
2679
  )
2680
+ VATEX_FR_298_SEXDECIESA =
2681
+ T.let(
2682
+ :"VATEX-FR-298SEXDECIESA",
2683
+ EInvoiceAPI::DocumentResponse::Vatex::TaggedSymbol
2684
+ )
2685
+ VATEX_FR_AE =
2686
+ T.let(
2687
+ :"VATEX-FR-AE",
2688
+ EInvoiceAPI::DocumentResponse::Vatex::TaggedSymbol
2689
+ )
2690
+ VATEX_FR_CGI261_1 =
2691
+ T.let(
2692
+ :"VATEX-FR-CGI261-1",
2693
+ EInvoiceAPI::DocumentResponse::Vatex::TaggedSymbol
2694
+ )
2695
+ VATEX_FR_CGI261_2 =
2696
+ T.let(
2697
+ :"VATEX-FR-CGI261-2",
2698
+ EInvoiceAPI::DocumentResponse::Vatex::TaggedSymbol
2699
+ )
2700
+ VATEX_FR_CGI261_3 =
2701
+ T.let(
2702
+ :"VATEX-FR-CGI261-3",
2703
+ EInvoiceAPI::DocumentResponse::Vatex::TaggedSymbol
2704
+ )
2705
+ VATEX_FR_CGI261_4 =
2706
+ T.let(
2707
+ :"VATEX-FR-CGI261-4",
2708
+ EInvoiceAPI::DocumentResponse::Vatex::TaggedSymbol
2709
+ )
2710
+ VATEX_FR_CGI261_5 =
2711
+ T.let(
2712
+ :"VATEX-FR-CGI261-5",
2713
+ EInvoiceAPI::DocumentResponse::Vatex::TaggedSymbol
2714
+ )
2715
+ VATEX_FR_CGI261_7 =
2716
+ T.let(
2717
+ :"VATEX-FR-CGI261-7",
2718
+ EInvoiceAPI::DocumentResponse::Vatex::TaggedSymbol
2719
+ )
2720
+ VATEX_FR_CGI261_8 =
2721
+ T.let(
2722
+ :"VATEX-FR-CGI261-8",
2723
+ EInvoiceAPI::DocumentResponse::Vatex::TaggedSymbol
2724
+ )
2725
+ VATEX_FR_CGI261A =
2726
+ T.let(
2727
+ :"VATEX-FR-CGI261A",
2728
+ EInvoiceAPI::DocumentResponse::Vatex::TaggedSymbol
2729
+ )
2730
+ VATEX_FR_CGI261B =
2731
+ T.let(
2732
+ :"VATEX-FR-CGI261B",
2733
+ EInvoiceAPI::DocumentResponse::Vatex::TaggedSymbol
2734
+ )
2735
+ VATEX_FR_CGI261C_1 =
2736
+ T.let(
2737
+ :"VATEX-FR-CGI261C-1",
2738
+ EInvoiceAPI::DocumentResponse::Vatex::TaggedSymbol
2739
+ )
2740
+ VATEX_FR_CGI261C_2 =
2741
+ T.let(
2742
+ :"VATEX-FR-CGI261C-2",
2743
+ EInvoiceAPI::DocumentResponse::Vatex::TaggedSymbol
2744
+ )
2745
+ VATEX_FR_CGI261C_3 =
2746
+ T.let(
2747
+ :"VATEX-FR-CGI261C-3",
2748
+ EInvoiceAPI::DocumentResponse::Vatex::TaggedSymbol
2749
+ )
2750
+ VATEX_FR_CGI261D_1 =
2751
+ T.let(
2752
+ :"VATEX-FR-CGI261D-1",
2753
+ EInvoiceAPI::DocumentResponse::Vatex::TaggedSymbol
2754
+ )
2755
+ VATEX_FR_CGI261D_1_BIS =
2756
+ T.let(
2757
+ :"VATEX-FR-CGI261D-1BIS",
2758
+ EInvoiceAPI::DocumentResponse::Vatex::TaggedSymbol
2759
+ )
2760
+ VATEX_FR_CGI261D_2 =
2761
+ T.let(
2762
+ :"VATEX-FR-CGI261D-2",
2763
+ EInvoiceAPI::DocumentResponse::Vatex::TaggedSymbol
2764
+ )
2765
+ VATEX_FR_CGI261D_3 =
2766
+ T.let(
2767
+ :"VATEX-FR-CGI261D-3",
2768
+ EInvoiceAPI::DocumentResponse::Vatex::TaggedSymbol
2769
+ )
2770
+ VATEX_FR_CGI261D_4 =
2771
+ T.let(
2772
+ :"VATEX-FR-CGI261D-4",
2773
+ EInvoiceAPI::DocumentResponse::Vatex::TaggedSymbol
2774
+ )
2775
+ VATEX_FR_CGI261E_1 =
2776
+ T.let(
2777
+ :"VATEX-FR-CGI261E-1",
2778
+ EInvoiceAPI::DocumentResponse::Vatex::TaggedSymbol
2779
+ )
2780
+ VATEX_FR_CGI261E_2 =
2781
+ T.let(
2782
+ :"VATEX-FR-CGI261E-2",
2783
+ EInvoiceAPI::DocumentResponse::Vatex::TaggedSymbol
2784
+ )
2785
+ VATEX_FR_CGI275 =
2786
+ T.let(
2787
+ :"VATEX-FR-CGI275",
2788
+ EInvoiceAPI::DocumentResponse::Vatex::TaggedSymbol
2789
+ )
2790
+ VATEX_FR_CGI277A =
2791
+ T.let(
2792
+ :"VATEX-FR-CGI277A",
2793
+ EInvoiceAPI::DocumentResponse::Vatex::TaggedSymbol
2794
+ )
2795
+ VATEX_FR_CGI295 =
2796
+ T.let(
2797
+ :"VATEX-FR-CGI295",
2798
+ EInvoiceAPI::DocumentResponse::Vatex::TaggedSymbol
2799
+ )
2652
2800
  VATEX_FR_FRANCHISE =
2653
2801
  T.let(
2654
2802
  :"VATEX-FR-FRANCHISE",
@@ -11,7 +11,9 @@ module EInvoiceAPI
11
11
  )
12
12
  end
13
13
 
14
- # Bank account number (for non-IBAN accounts)
14
+ # Bank account number (for non-IBAN accounts). With `swift` `SE:BANKGIRO` or
15
+ # `SE:PLUSGIRO`, the bankgiro or plusgiro number, with `iban` left empty; spaces
16
+ # and hyphens are removed.
15
17
  sig { returns(T.nilable(String)) }
16
18
  attr_accessor :bank_account_number
17
19
 
@@ -39,7 +41,9 @@ module EInvoiceAPI
39
41
  ).returns(T.attached_class)
40
42
  end
41
43
  def self.new(
42
- # Bank account number (for non-IBAN accounts)
44
+ # Bank account number (for non-IBAN accounts). With `swift` `SE:BANKGIRO` or
45
+ # `SE:PLUSGIRO`, the bankgiro or plusgiro number, with `iban` left empty; spaces
46
+ # and hyphens are removed.
43
47
  bank_account_number: nil,
44
48
  # International Bank Account Number for payment transfers
45
49
  iban: nil,