e-invoice-api 0.32.0 → 0.34.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 (111) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +1 -1
  4. data/lib/e_invoice_api/client.rb +16 -0
  5. data/lib/e_invoice_api/models/conversion/document_create_from_pdf_task.rb +43 -0
  6. data/lib/e_invoice_api/models/conversion/pdf_create_params.rb +22 -0
  7. data/lib/e_invoice_api/models/conversion/pdf_result_params.rb +22 -0
  8. data/lib/e_invoice_api/models/conversion/pdf_retrieve_params.rb +22 -0
  9. data/lib/e_invoice_api/models/document_create.rb +158 -5
  10. data/lib/e_invoice_api/models/document_create_from_pdf_response.rb +108 -5
  11. data/lib/e_invoice_api/models/document_lifecycle_params.rb +20 -0
  12. data/lib/e_invoice_api/models/document_lifecycle_response.rb +134 -0
  13. data/lib/e_invoice_api/models/document_response.rb +112 -7
  14. data/lib/e_invoice_api/models/document_timeline_params.rb +20 -0
  15. data/lib/e_invoice_api/models/document_timeline_response.rb +71 -0
  16. data/lib/e_invoice_api/models/draft_list_params.rb +113 -0
  17. data/lib/e_invoice_api/models/inbound_email_response.rb +129 -0
  18. data/lib/e_invoice_api/models/mailbox_download_attachment_params.rb +26 -0
  19. data/lib/e_invoice_api/models/mailbox_list_params.rb +129 -0
  20. data/lib/e_invoice_api/models/mailbox_reprocess_params.rb +20 -0
  21. data/lib/e_invoice_api/models/mailbox_retrieve_params.rb +20 -0
  22. data/lib/e_invoice_api/models/me_retrieve_response.rb +8 -7
  23. data/lib/e_invoice_api/models/payment_detail_create.rb +4 -2
  24. data/lib/e_invoice_api/models/stats_retrieve_params.rb +55 -0
  25. data/lib/e_invoice_api/models/stats_retrieve_response.rb +141 -0
  26. data/lib/e_invoice_api/models/ubl_document_validation.rb +10 -1
  27. data/lib/e_invoice_api/models/webhook_history_params.rb +20 -0
  28. data/lib/e_invoice_api/models/webhook_history_response.rb +17 -0
  29. data/lib/e_invoice_api/models/webhook_test_params.rb +37 -0
  30. data/lib/e_invoice_api/models/webhook_test_response.rb +35 -0
  31. data/lib/e_invoice_api/models.rb +24 -0
  32. data/lib/e_invoice_api/resources/conversion/pdf.rb +76 -0
  33. data/lib/e_invoice_api/resources/conversion.rb +18 -0
  34. data/lib/e_invoice_api/resources/documents.rb +62 -1
  35. data/lib/e_invoice_api/resources/drafts.rb +55 -0
  36. data/lib/e_invoice_api/resources/mailbox.rb +123 -0
  37. data/lib/e_invoice_api/resources/stats.rb +47 -0
  38. data/lib/e_invoice_api/resources/validate.rb +22 -2
  39. data/lib/e_invoice_api/resources/webhooks.rb +45 -0
  40. data/lib/e_invoice_api/version.rb +1 -1
  41. data/lib/e_invoice_api.rb +25 -0
  42. data/rbi/e_invoice_api/client.rbi +12 -0
  43. data/rbi/e_invoice_api/models/conversion/document_create_from_pdf_task.rbi +108 -0
  44. data/rbi/e_invoice_api/models/conversion/pdf_create_params.rbi +43 -0
  45. data/rbi/e_invoice_api/models/conversion/pdf_result_params.rbi +40 -0
  46. data/rbi/e_invoice_api/models/conversion/pdf_retrieve_params.rbi +40 -0
  47. data/rbi/e_invoice_api/models/document_create.rbi +210 -3
  48. data/rbi/e_invoice_api/models/document_create_from_pdf_response.rbi +124 -3
  49. data/rbi/e_invoice_api/models/document_lifecycle_params.rbi +38 -0
  50. data/rbi/e_invoice_api/models/document_lifecycle_response.rbi +353 -0
  51. data/rbi/e_invoice_api/models/document_response.rbi +130 -5
  52. data/rbi/e_invoice_api/models/document_timeline_params.rbi +38 -0
  53. data/rbi/e_invoice_api/models/document_timeline_response.rbi +168 -0
  54. data/rbi/e_invoice_api/models/draft_list_params.rbi +194 -0
  55. data/rbi/e_invoice_api/models/inbound_email_response.rbi +189 -0
  56. data/rbi/e_invoice_api/models/mailbox_download_attachment_params.rbi +46 -0
  57. data/rbi/e_invoice_api/models/mailbox_list_params.rbi +218 -0
  58. data/rbi/e_invoice_api/models/mailbox_reprocess_params.rbi +41 -0
  59. data/rbi/e_invoice_api/models/mailbox_retrieve_params.rbi +41 -0
  60. data/rbi/e_invoice_api/models/me_retrieve_response.rbi +10 -8
  61. data/rbi/e_invoice_api/models/payment_detail_create.rbi +6 -2
  62. data/rbi/e_invoice_api/models/stats_retrieve_params.rbi +111 -0
  63. data/rbi/e_invoice_api/models/stats_retrieve_response.rbi +251 -0
  64. data/rbi/e_invoice_api/models/ubl_document_validation.rbi +11 -1
  65. data/rbi/e_invoice_api/models/webhook_history_params.rbi +38 -0
  66. data/rbi/e_invoice_api/models/webhook_history_response.rbi +32 -0
  67. data/rbi/e_invoice_api/models/webhook_test_params.rbi +57 -0
  68. data/rbi/e_invoice_api/models/webhook_test_response.rbi +57 -0
  69. data/rbi/e_invoice_api/models.rbi +25 -0
  70. data/rbi/e_invoice_api/resources/conversion/pdf.rbi +44 -0
  71. data/rbi/e_invoice_api/resources/conversion.rbi +15 -0
  72. data/rbi/e_invoice_api/resources/documents.rbi +67 -0
  73. data/rbi/e_invoice_api/resources/drafts.rbi +55 -0
  74. data/rbi/e_invoice_api/resources/mailbox.rbi +93 -0
  75. data/rbi/e_invoice_api/resources/stats.rbi +38 -0
  76. data/rbi/e_invoice_api/resources/validate.rbi +44 -1
  77. data/rbi/e_invoice_api/resources/webhooks.rbi +29 -0
  78. data/sig/e_invoice_api/client.rbs +8 -0
  79. data/sig/e_invoice_api/models/conversion/document_create_from_pdf_task.rbs +45 -0
  80. data/sig/e_invoice_api/models/conversion/pdf_create_params.rbs +26 -0
  81. data/sig/e_invoice_api/models/conversion/pdf_result_params.rbs +25 -0
  82. data/sig/e_invoice_api/models/conversion/pdf_retrieve_params.rbs +25 -0
  83. data/sig/e_invoice_api/models/document_create.rbs +87 -4
  84. data/sig/e_invoice_api/models/document_create_from_pdf_response.rbs +61 -4
  85. data/sig/e_invoice_api/models/document_lifecycle_params.rbs +23 -0
  86. data/sig/e_invoice_api/models/document_lifecycle_response.rbs +151 -0
  87. data/sig/e_invoice_api/models/document_response.rbs +61 -4
  88. data/sig/e_invoice_api/models/document_timeline_params.rbs +23 -0
  89. data/sig/e_invoice_api/models/document_timeline_response.rbs +84 -0
  90. data/sig/e_invoice_api/models/draft_list_params.rbs +112 -0
  91. data/sig/e_invoice_api/models/inbound_email_response.rbs +126 -0
  92. data/sig/e_invoice_api/models/mailbox_download_attachment_params.rbs +28 -0
  93. data/sig/e_invoice_api/models/mailbox_list_params.rbs +112 -0
  94. data/sig/e_invoice_api/models/mailbox_reprocess_params.rbs +24 -0
  95. data/sig/e_invoice_api/models/mailbox_retrieve_params.rbs +24 -0
  96. data/sig/e_invoice_api/models/stats_retrieve_params.rbs +48 -0
  97. data/sig/e_invoice_api/models/stats_retrieve_response.rbs +107 -0
  98. data/sig/e_invoice_api/models/webhook_history_params.rbs +23 -0
  99. data/sig/e_invoice_api/models/webhook_history_response.rbs +13 -0
  100. data/sig/e_invoice_api/models/webhook_test_params.rbs +32 -0
  101. data/sig/e_invoice_api/models/webhook_test_response.rbs +30 -0
  102. data/sig/e_invoice_api/models.rbs +24 -0
  103. data/sig/e_invoice_api/resources/conversion/pdf.rbs +24 -0
  104. data/sig/e_invoice_api/resources/conversion.rbs +9 -0
  105. data/sig/e_invoice_api/resources/documents.rbs +19 -0
  106. data/sig/e_invoice_api/resources/drafts.rbs +20 -0
  107. data/sig/e_invoice_api/resources/mailbox.rbs +36 -0
  108. data/sig/e_invoice_api/resources/stats.rbs +14 -0
  109. data/sig/e_invoice_api/resources/validate.rbs +9 -0
  110. data/sig/e_invoice_api/resources/webhooks.rbs +12 -0
  111. metadata +77 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fb8ecdfb51c3e84b13bd5d6f4d38400dd54195e7e9af417cf68c228571d0d7e4
4
- data.tar.gz: dddba2ac6cfabe7eb829c26cdaf3c66e2ddafb778ea76fc455feba319e9c905b
3
+ metadata.gz: 63945a128a3304ea3dd731b93f3dbed91ef528da885f3348f0eec8bea0aa782a
4
+ data.tar.gz: 16d87f07042081d9f496c2bcf7cd481c91e2fcb53b38d550fa7ac63acc9ddec1
5
5
  SHA512:
6
- metadata.gz: 04e375f8d71dfd324b93f7b95980a897a4baa0314962750d8f315af7f6f4a4809b512d1d580039d359aab59e0452d7891d8e4a2d600956c55cdc3beffa997620
7
- data.tar.gz: 0eadfd086d168a20ec602ca2ef6593c4ea4e16a828aef6238a83785d7bf9be30875ff5d14614abe8e1b7f8ac746e65f86b0b5c13fd0bf590b89b1adb91ed0ed3
6
+ metadata.gz: 12f3fe0b95f0bb38a0461fee9b6f71e6ecd45f0593463c4bd20076a1b8b2c962af143de0052f1568e4271538ceb0db526d4a0d607d22e976cb6a3ed91a1302ed
7
+ data.tar.gz: b2b59631c408a3adb3696a808c5ec0c157faa8d161ca7a2c51cd385da0903f657c067bc9ffaef2aff59f390c2c9e3fc153e06948e556346a4d395873fd0d0620
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.34.0 (2026-11-03)
4
+
5
+ Full Changelog: [v0.33.0...v0.34.0](https://github.com/e-invoice-be/e-invoice-rb/compare/v0.33.0...v0.34.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** sync SDK with live OpenAPI spec ([#77](https://github.com/e-invoice-be/e-invoice-rb/issues/77)) ([c4a220b](https://github.com/e-invoice-be/e-invoice-rb/commit/c4a220b9729c0735f6b73b36fa66e5e6e5bf3e2b))
10
+
11
+ ## 0.33.0 (2026-07-18)
12
+
13
+ Full Changelog: [v0.32.0...v0.33.0](https://github.com/e-invoice-be/e-invoice-rb/compare/v0.32.0...v0.33.0)
14
+
15
+ ### Features
16
+
17
+ * **stlc:** configurable CI runner and private-production-repo support in workflow templates ([1635ea6](https://github.com/e-invoice-be/e-invoice-rb/commit/1635ea68fd31813091e7a69e07d3ae4360867d1c))
18
+
3
19
  ## 0.32.0 (2026-07-17)
4
20
 
5
21
  Full Changelog: [v0.31.1...v0.32.0](https://github.com/e-invoice-be/e-invoice-rb/compare/v0.31.1...v0.32.0)
data/README.md CHANGED
@@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
26
26
  <!-- x-release-please-start-version -->
27
27
 
28
28
  ```ruby
29
- gem "e-invoice-api", "~> 0.32.0"
29
+ gem "e-invoice-api", "~> 0.34.0"
30
30
  ```
31
31
 
32
32
  <!-- x-release-please-end -->
@@ -39,6 +39,18 @@ module EInvoiceAPI
39
39
  # @return [EInvoiceAPI::Resources::Webhooks]
40
40
  attr_reader :webhooks
41
41
 
42
+ # @return [EInvoiceAPI::Resources::Drafts]
43
+ attr_reader :drafts
44
+
45
+ # @return [EInvoiceAPI::Resources::Conversion]
46
+ attr_reader :conversion
47
+
48
+ # @return [EInvoiceAPI::Resources::Stats]
49
+ attr_reader :stats
50
+
51
+ # @return [EInvoiceAPI::Resources::Mailbox]
52
+ attr_reader :mailbox
53
+
42
54
  # @api private
43
55
  #
44
56
  # @return [Hash{String=>String}]
@@ -107,6 +119,10 @@ module EInvoiceAPI
107
119
  @lookup = EInvoiceAPI::Resources::Lookup.new(client: self)
108
120
  @me = EInvoiceAPI::Resources::Me.new(client: self)
109
121
  @webhooks = EInvoiceAPI::Resources::Webhooks.new(client: self)
122
+ @drafts = EInvoiceAPI::Resources::Drafts.new(client: self)
123
+ @conversion = EInvoiceAPI::Resources::Conversion.new(client: self)
124
+ @stats = EInvoiceAPI::Resources::Stats.new(client: self)
125
+ @mailbox = EInvoiceAPI::Resources::Mailbox.new(client: self)
110
126
  end
111
127
  end
112
128
  end
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ module EInvoiceAPI
4
+ module Models
5
+ module Conversion
6
+ # @see EInvoiceAPI::Resources::Conversion::Pdf#create
7
+ class DocumentCreateFromPdfTask < EInvoiceAPI::Internal::Type::BaseModel
8
+ # @!attribute task_id
9
+ # The ID of the task that will process the PDF
10
+ #
11
+ # @return [String]
12
+ required :task_id, String
13
+
14
+ # @!attribute status
15
+ # The status of the task
16
+ #
17
+ # @return [Symbol, EInvoiceAPI::Models::Conversion::DocumentCreateFromPdfTask::Status, nil]
18
+ optional :status, enum: -> { EInvoiceAPI::Conversion::DocumentCreateFromPdfTask::Status }
19
+
20
+ # @!method initialize(task_id:, status: nil)
21
+ # @param task_id [String] The ID of the task that will process the PDF
22
+ #
23
+ # @param status [Symbol, EInvoiceAPI::Models::Conversion::DocumentCreateFromPdfTask::Status] The status of the task
24
+
25
+ # The status of the task
26
+ #
27
+ # @see EInvoiceAPI::Models::Conversion::DocumentCreateFromPdfTask#status
28
+ module Status
29
+ extend EInvoiceAPI::Internal::Type::Enum
30
+
31
+ PENDING = :pending
32
+ COMPLETED = :completed
33
+ FAILED = :failed
34
+
35
+ # @!method self.values
36
+ # @return [Array<Symbol>]
37
+ end
38
+ end
39
+ end
40
+
41
+ DocumentCreateFromPdfTask = Conversion::DocumentCreateFromPdfTask
42
+ end
43
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module EInvoiceAPI
4
+ module Models
5
+ module Conversion
6
+ # @see EInvoiceAPI::Resources::Conversion::Pdf#create
7
+ class PdfCreateParams < EInvoiceAPI::Internal::Type::BaseModel
8
+ extend EInvoiceAPI::Internal::Type::RequestParameters::Converter
9
+ include EInvoiceAPI::Internal::Type::RequestParameters
10
+
11
+ # @!attribute file
12
+ #
13
+ # @return [Pathname, StringIO, IO, String, EInvoiceAPI::FilePart]
14
+ required :file, EInvoiceAPI::Internal::Type::FileInput
15
+
16
+ # @!method initialize(file:, request_options: {})
17
+ # @param file [Pathname, StringIO, IO, String, EInvoiceAPI::FilePart]
18
+ # @param request_options [EInvoiceAPI::RequestOptions, Hash{Symbol=>Object}]
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module EInvoiceAPI
4
+ module Models
5
+ module Conversion
6
+ # @see EInvoiceAPI::Resources::Conversion::Pdf#result
7
+ class PdfResultParams < EInvoiceAPI::Internal::Type::BaseModel
8
+ extend EInvoiceAPI::Internal::Type::RequestParameters::Converter
9
+ include EInvoiceAPI::Internal::Type::RequestParameters
10
+
11
+ # @!attribute task_id
12
+ #
13
+ # @return [String]
14
+ required :task_id, String
15
+
16
+ # @!method initialize(task_id:, request_options: {})
17
+ # @param task_id [String]
18
+ # @param request_options [EInvoiceAPI::RequestOptions, Hash{Symbol=>Object}]
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module EInvoiceAPI
4
+ module Models
5
+ module Conversion
6
+ # @see EInvoiceAPI::Resources::Conversion::Pdf#retrieve
7
+ class PdfRetrieveParams < EInvoiceAPI::Internal::Type::BaseModel
8
+ extend EInvoiceAPI::Internal::Type::RequestParameters::Converter
9
+ include EInvoiceAPI::Internal::Type::RequestParameters
10
+
11
+ # @!attribute task_id
12
+ #
13
+ # @return [String]
14
+ required :task_id, String
15
+
16
+ # @!method initialize(task_id:, request_options: {})
17
+ # @param task_id [String]
18
+ # @param request_options [EInvoiceAPI::RequestOptions, Hash{Symbol=>Object}]
19
+ end
20
+ end
21
+ end
22
+ end
@@ -35,6 +35,13 @@ module EInvoiceAPI
35
35
  # @return [String, nil]
36
36
  optional :billing_address_recipient, String, nil?: true
37
37
 
38
+ # @!attribute buyer_reference
39
+ # The buyer reference (BT-10), e.g. a cost centre or accounting reference
40
+ # requested by the buyer
41
+ #
42
+ # @return [String, nil]
43
+ optional :buyer_reference, String, nil?: true
44
+
38
45
  # @!attribute charges
39
46
  #
40
47
  # @return [Array<EInvoiceAPI::Models::DocumentCreate::Charge>, nil]
@@ -91,6 +98,12 @@ module EInvoiceAPI
91
98
  # @return [String, nil]
92
99
  optional :customer_peppol_id, String, nil?: true
93
100
 
101
+ # @!attribute customer_phone
102
+ # The telephone number of the customer contact (BT-57)
103
+ #
104
+ # @return [String, nil]
105
+ optional :customer_phone, String, nil?: true
106
+
94
107
  # @!attribute customer_tax_id
95
108
  # Customer tax ID. For Belgium this is the VAT number. Must include the country
96
109
  # prefix
@@ -160,6 +173,19 @@ module EInvoiceAPI
160
173
  # @return [String, nil]
161
174
  optional :payment_term, String, nil?: true
162
175
 
176
+ # @!attribute preceding_invoice_date
177
+ # The preceding invoice issue date (BT-26)
178
+ #
179
+ # @return [Date, nil]
180
+ optional :preceding_invoice_date, Date, nil?: true
181
+
182
+ # @!attribute preceding_invoice_id
183
+ # The preceding invoice reference (BT-25): the number of the invoice this document
184
+ # corrects, for example the invoice a credit note credits
185
+ #
186
+ # @return [String, nil]
187
+ optional :preceding_invoice_id, String, nil?: true
188
+
163
189
  # @!attribute previous_unpaid_balance
164
190
  # The previous unpaid balance from prior invoices, if any. Must be positive and
165
191
  # rounded to maximum 2 decimals
@@ -187,6 +213,21 @@ module EInvoiceAPI
187
213
  # @return [String, nil]
188
214
  optional :remittance_address_recipient, String, nil?: true
189
215
 
216
+ # @!attribute rounding_amount
217
+ # The amount added to the invoice total to round the amount for payment (BT-114),
218
+ # for example to whole kronor (amount_due = invoice_total + rounding_amount when
219
+ # nothing is prepaid). Can be negative. Between -5.00 and 5.00, rounded to maximum
220
+ # 2 decimals
221
+ #
222
+ # @return [Float, String, nil]
223
+ optional :rounding_amount, union: -> { EInvoiceAPI::DocumentCreate::RoundingAmount }, nil?: true
224
+
225
+ # @!attribute sales_order
226
+ # The sales order reference (BT-14) assigned by the seller
227
+ #
228
+ # @return [String, nil]
229
+ optional :sales_order, String, nil?: true
230
+
190
231
  # @!attribute service_address
191
232
  # The address where services were performed or goods were delivered
192
233
  #
@@ -244,6 +285,14 @@ module EInvoiceAPI
244
285
  # @return [Symbol, EInvoiceAPI::Models::DocumentCreate::TaxCode, nil]
245
286
  optional :tax_code, enum: -> { EInvoiceAPI::DocumentCreate::TaxCode }
246
287
 
288
+ # @!attribute tax_currency
289
+ # The VAT accounting currency (BT-6, ISO 4217 currency code), when VAT is
290
+ # accounted in a currency other than the invoice currency. Must differ from
291
+ # currency and requires total_tax_in_tax_currency
292
+ #
293
+ # @return [String, nil]
294
+ optional :tax_currency, String, nil?: true
295
+
247
296
  # @!attribute tax_details
248
297
  #
249
298
  # @return [Array<EInvoiceAPI::Models::DocumentCreate::TaxDetail>, nil]
@@ -266,6 +315,15 @@ module EInvoiceAPI
266
315
  # @return [Float, String, nil]
267
316
  optional :total_tax, union: -> { EInvoiceAPI::DocumentCreate::TotalTax }, nil?: true
268
317
 
318
+ # @!attribute total_tax_in_tax_currency
319
+ # The total VAT amount in the VAT accounting currency tax_currency (BT-111). Does
320
+ # not add to invoice_total. Requires tax_currency. Rounded to maximum 2 decimals
321
+ #
322
+ # @return [Float, String, nil]
323
+ optional :total_tax_in_tax_currency,
324
+ union: -> { EInvoiceAPI::DocumentCreate::TotalTaxInTaxCurrency },
325
+ nil?: true
326
+
269
327
  # @!attribute vatex
270
328
  # VATEX code list for VAT exemption reasons
271
329
  #
@@ -311,6 +369,14 @@ module EInvoiceAPI
311
369
  # @return [String, nil]
312
370
  optional :vendor_name, String, nil?: true
313
371
 
372
+ # @!attribute vendor_phone
373
+ # The telephone number of the vendor contact (BT-42). Required when vendor and
374
+ # customer are both in Germany (DE-R-006); it must then hold at least 3 digits
375
+ # (DE-R-027, a warning).
376
+ #
377
+ # @return [String, nil]
378
+ optional :vendor_phone, String, nil?: true
379
+
314
380
  # @!attribute vendor_tax_id
315
381
  # Vendor tax ID. For Belgium this is the VAT number. Must include the country
316
382
  # prefix
@@ -318,7 +384,7 @@ module EInvoiceAPI
318
384
  # @return [String, nil]
319
385
  optional :vendor_tax_id, String, nil?: true
320
386
 
321
- # @!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_peppol_id: 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)
387
+ # @!method initialize(allowances: nil, amount_due: nil, attachments: nil, billing_address: nil, billing_address_recipient: nil, buyer_reference: 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_peppol_id: nil, customer_phone: 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, preceding_invoice_date: nil, preceding_invoice_id: nil, previous_unpaid_balance: nil, purchase_order: nil, remittance_address: nil, remittance_address_recipient: nil, rounding_amount: nil, sales_order: 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_currency: nil, tax_details: nil, total_discount: nil, total_tax: nil, total_tax_in_tax_currency: nil, vatex: nil, vatex_note: nil, vendor_address: nil, vendor_address_recipient: nil, vendor_company_id: nil, vendor_email: nil, vendor_name: nil, vendor_phone: nil, vendor_tax_id: nil)
322
388
  # Some parameter documentations has been truncated, see
323
389
  # {EInvoiceAPI::Models::DocumentCreate} for more details.
324
390
  #
@@ -332,6 +398,8 @@ module EInvoiceAPI
332
398
  #
333
399
  # @param billing_address_recipient [String, nil] The recipient name at the billing address
334
400
  #
401
+ # @param buyer_reference [String, nil] The buyer reference (BT-10), e.g. a cost centre or accounting reference requeste
402
+ #
335
403
  # @param charges [Array<EInvoiceAPI::Models::DocumentCreate::Charge>, nil]
336
404
  #
337
405
  # @param currency [Symbol, EInvoiceAPI::Models::CurrencyCode] Currency of the invoice (ISO 4217 currency code)
@@ -350,6 +418,8 @@ module EInvoiceAPI
350
418
  #
351
419
  # @param customer_peppol_id [String, nil] Customer Peppol ID
352
420
  #
421
+ # @param customer_phone [String, nil] The telephone number of the customer contact (BT-57)
422
+ #
353
423
  # @param customer_tax_id [String, nil] Customer tax ID. For Belgium this is the VAT number. Must include the country pr
354
424
  #
355
425
  # @param direction [Symbol, EInvoiceAPI::Models::DocumentDirection] The direction of the document: INBOUND (purchases) or OUTBOUND (sales)
@@ -372,6 +442,10 @@ module EInvoiceAPI
372
442
  #
373
443
  # @param payment_term [String, nil] The payment terms (e.g., 'Net 30', 'Due on receipt', '2/10 Net 30')
374
444
  #
445
+ # @param preceding_invoice_date [Date, nil] The preceding invoice issue date (BT-26)
446
+ #
447
+ # @param preceding_invoice_id [String, nil] The preceding invoice reference (BT-25): the number of the invoice this document
448
+ #
375
449
  # @param previous_unpaid_balance [Float, String, nil] The previous unpaid balance from prior invoices, if any. Must be positive and ro
376
450
  #
377
451
  # @param purchase_order [String, nil] The purchase order reference number
@@ -380,6 +454,10 @@ module EInvoiceAPI
380
454
  #
381
455
  # @param remittance_address_recipient [String, nil] The recipient name at the remittance address
382
456
  #
457
+ # @param rounding_amount [Float, String, nil] The amount added to the invoice total to round the amount for payment (BT-114),
458
+ #
459
+ # @param sales_order [String, nil] The sales order reference (BT-14) assigned by the seller
460
+ #
383
461
  # @param service_address [String, nil] The address where services were performed or goods were delivered
384
462
  #
385
463
  # @param service_address_recipient [String, nil] The recipient name at the service address
@@ -398,12 +476,16 @@ module EInvoiceAPI
398
476
  #
399
477
  # @param tax_code [Symbol, EInvoiceAPI::Models::DocumentCreate::TaxCode] Tax category code of the invoice (e.g., S for standard rate, Z for zero rate, E
400
478
  #
479
+ # @param tax_currency [String, nil] The VAT accounting currency (BT-6, ISO 4217 currency code), when VAT is accounte
480
+ #
401
481
  # @param tax_details [Array<EInvoiceAPI::Models::DocumentCreate::TaxDetail>, nil]
402
482
  #
403
483
  # @param total_discount [Float, String, nil] The net financial discount/charge of the invoice (non-VAT charges minus non-VAT
404
484
  #
405
485
  # @param total_tax [Float, String, nil] The total tax amount of the invoice. Must be positive and rounded to maximum 2 d
406
486
  #
487
+ # @param total_tax_in_tax_currency [Float, String, nil] The total VAT amount in the VAT accounting currency tax_currency (BT-111). Does
488
+ #
407
489
  # @param vatex [Symbol, EInvoiceAPI::Models::DocumentCreate::Vatex, nil] VATEX code list for VAT exemption reasons
408
490
  #
409
491
  # @param vatex_note [String, nil] Textual explanation for VAT exemption
@@ -418,6 +500,8 @@ module EInvoiceAPI
418
500
  #
419
501
  # @param vendor_name [String, nil] The name of the vendor/seller/supplier
420
502
  #
503
+ # @param vendor_phone [String, nil] The telephone number of the vendor contact (BT-42). Required when vendor and cus
504
+ #
421
505
  # @param vendor_tax_id [String, nil] Vendor tax ID. For Belgium this is the VAT number. Must include the country pref
422
506
 
423
507
  class Allowance < EInvoiceAPI::Internal::Type::BaseModel
@@ -998,8 +1082,8 @@ module EInvoiceAPI
998
1082
 
999
1083
  # @!attribute date
1000
1084
  #
1001
- # @return [nil]
1002
- optional :date, NilClass
1085
+ # @return [Date, nil]
1086
+ optional :date, Date, nil?: true
1003
1087
 
1004
1088
  # @!attribute description
1005
1089
  # The description of the line item.
@@ -1017,6 +1101,23 @@ module EInvoiceAPI
1017
1101
  },
1018
1102
  nil?: true
1019
1103
 
1104
+ # @!attribute name
1105
+ # The item name (BT-153), for example the product name. Written to
1106
+ # cac:Item/cbc:Name. When omitted or blank, `description` (BT-154) is used as the
1107
+ # item name. A posted line item needs a `name` or a `description`; a line item
1108
+ # with neither is rejected with 422.
1109
+ #
1110
+ # @return [String, nil]
1111
+ optional :name, String, nil?: true
1112
+
1113
+ # @!attribute price_base_quantity
1114
+ # The item price base quantity (BT-149). The number of item units to which the
1115
+ # unit price applies, for example 100 when the unit price is a price for each 100
1116
+ # units. Must be greater than 0. Defaults to 1.
1117
+ #
1118
+ # @return [Float, String, nil]
1119
+ optional :price_base_quantity, union: -> { EInvoiceAPI::DocumentCreate::Item::PriceBaseQuantity }
1120
+
1020
1121
  # @!attribute product_code
1021
1122
  # The product code of the line item.
1022
1123
  #
@@ -1057,7 +1158,7 @@ module EInvoiceAPI
1057
1158
  # @return [Float, String, nil]
1058
1159
  optional :unit_price, union: -> { EInvoiceAPI::DocumentCreate::Item::UnitPrice }, nil?: true
1059
1160
 
1060
- # @!method initialize(allowances: nil, amount: nil, charges: nil, date: nil, description: nil, item_attributes: nil, product_code: nil, quantity: nil, tax: nil, tax_rate: nil, unit: nil, unit_price: nil)
1161
+ # @!method initialize(allowances: nil, amount: nil, charges: nil, date: nil, description: nil, item_attributes: nil, name: nil, price_base_quantity: nil, product_code: nil, quantity: nil, tax: nil, tax_rate: nil, unit: nil, unit_price: nil)
1061
1162
  # Some parameter documentations has been truncated, see
1062
1163
  # {EInvoiceAPI::Models::DocumentCreate::Item} for more details.
1063
1164
  #
@@ -1067,12 +1168,16 @@ module EInvoiceAPI
1067
1168
  #
1068
1169
  # @param charges [Array<EInvoiceAPI::Models::DocumentCreate::Item::Charge>, nil] The charges of the line item.
1069
1170
  #
1070
- # @param date [nil]
1171
+ # @param date [Date, nil]
1071
1172
  #
1072
1173
  # @param description [String, nil] The description of the line item.
1073
1174
  #
1074
1175
  # @param item_attributes [Array<EInvoiceAPI::Models::DocumentCreate::Item::ItemAttribute>, nil] Item-level attributes (BG-32) from cac:AdditionalItemProperty.
1075
1176
  #
1177
+ # @param name [String, nil] The item name (BT-153), for example the product name. Written to cac:Item/cbc:Na
1178
+ #
1179
+ # @param price_base_quantity [Float, String] The item price base quantity (BT-149). The number of item units to which the uni
1180
+ #
1076
1181
  # @param product_code [String, nil] The product code of the line item.
1077
1182
  #
1078
1183
  # @param quantity [Float, String, nil] The quantity of items (goods or services) that is the subject of the line item.
@@ -1661,6 +1766,22 @@ module EInvoiceAPI
1661
1766
  # @param value [String, nil] Attribute value (BT-161).
1662
1767
  end
1663
1768
 
1769
+ # The item price base quantity (BT-149). The number of item units to which the
1770
+ # unit price applies, for example 100 when the unit price is a price for each 100
1771
+ # units. Must be greater than 0. Defaults to 1.
1772
+ #
1773
+ # @see EInvoiceAPI::Models::DocumentCreate::Item#price_base_quantity
1774
+ module PriceBaseQuantity
1775
+ extend EInvoiceAPI::Internal::Type::Union
1776
+
1777
+ variant Float
1778
+
1779
+ variant String
1780
+
1781
+ # @!method self.variants
1782
+ # @return [Array(Float, String)]
1783
+ end
1784
+
1664
1785
  # The quantity of items (goods or services) that is the subject of the line item.
1665
1786
  # Must be rounded to maximum 4 decimals. Can be negative for credit notes or
1666
1787
  # corrections.
@@ -1737,6 +1858,23 @@ module EInvoiceAPI
1737
1858
  # @return [Array(Float, String)]
1738
1859
  end
1739
1860
 
1861
+ # The amount added to the invoice total to round the amount for payment (BT-114),
1862
+ # for example to whole kronor (amount_due = invoice_total + rounding_amount when
1863
+ # nothing is prepaid). Can be negative. Between -5.00 and 5.00, rounded to maximum
1864
+ # 2 decimals
1865
+ #
1866
+ # @see EInvoiceAPI::Models::DocumentCreate#rounding_amount
1867
+ module RoundingAmount
1868
+ extend EInvoiceAPI::Internal::Type::Union
1869
+
1870
+ variant Float
1871
+
1872
+ variant String
1873
+
1874
+ # @!method self.variants
1875
+ # @return [Array(Float, String)]
1876
+ end
1877
+
1740
1878
  # The taxable base of the invoice. Should be the sum of all line items -
1741
1879
  # allowances (for example commercial discounts) + charges with impact on VAT. Must
1742
1880
  # be positive and rounded to maximum 2 decimals
@@ -1839,6 +1977,21 @@ module EInvoiceAPI
1839
1977
  # @return [Array(Float, String)]
1840
1978
  end
1841
1979
 
1980
+ # The total VAT amount in the VAT accounting currency tax_currency (BT-111). Does
1981
+ # not add to invoice_total. Requires tax_currency. Rounded to maximum 2 decimals
1982
+ #
1983
+ # @see EInvoiceAPI::Models::DocumentCreate#total_tax_in_tax_currency
1984
+ module TotalTaxInTaxCurrency
1985
+ extend EInvoiceAPI::Internal::Type::Union
1986
+
1987
+ variant Float
1988
+
1989
+ variant String
1990
+
1991
+ # @!method self.variants
1992
+ # @return [Array(Float, String)]
1993
+ end
1994
+
1842
1995
  # VATEX code list for VAT exemption reasons
1843
1996
  #
1844
1997
  # Agency: CEF Identifier: vatex