e-invoice-api 0.33.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +1 -1
- data/lib/e_invoice_api/client.rb +16 -0
- data/lib/e_invoice_api/models/conversion/document_create_from_pdf_task.rb +43 -0
- data/lib/e_invoice_api/models/conversion/pdf_create_params.rb +22 -0
- data/lib/e_invoice_api/models/conversion/pdf_result_params.rb +22 -0
- data/lib/e_invoice_api/models/conversion/pdf_retrieve_params.rb +22 -0
- data/lib/e_invoice_api/models/document_create.rb +158 -5
- data/lib/e_invoice_api/models/document_create_from_pdf_response.rb +108 -5
- data/lib/e_invoice_api/models/document_lifecycle_params.rb +20 -0
- data/lib/e_invoice_api/models/document_lifecycle_response.rb +134 -0
- data/lib/e_invoice_api/models/document_response.rb +112 -7
- data/lib/e_invoice_api/models/document_timeline_params.rb +20 -0
- data/lib/e_invoice_api/models/document_timeline_response.rb +71 -0
- data/lib/e_invoice_api/models/draft_list_params.rb +113 -0
- data/lib/e_invoice_api/models/inbound_email_response.rb +129 -0
- data/lib/e_invoice_api/models/mailbox_download_attachment_params.rb +26 -0
- data/lib/e_invoice_api/models/mailbox_list_params.rb +129 -0
- data/lib/e_invoice_api/models/mailbox_reprocess_params.rb +20 -0
- data/lib/e_invoice_api/models/mailbox_retrieve_params.rb +20 -0
- data/lib/e_invoice_api/models/me_retrieve_response.rb +8 -7
- data/lib/e_invoice_api/models/payment_detail_create.rb +4 -2
- data/lib/e_invoice_api/models/stats_retrieve_params.rb +55 -0
- data/lib/e_invoice_api/models/stats_retrieve_response.rb +141 -0
- data/lib/e_invoice_api/models/ubl_document_validation.rb +10 -1
- data/lib/e_invoice_api/models/webhook_history_params.rb +20 -0
- data/lib/e_invoice_api/models/webhook_history_response.rb +17 -0
- data/lib/e_invoice_api/models/webhook_test_params.rb +37 -0
- data/lib/e_invoice_api/models/webhook_test_response.rb +35 -0
- data/lib/e_invoice_api/models.rb +24 -0
- data/lib/e_invoice_api/resources/conversion/pdf.rb +76 -0
- data/lib/e_invoice_api/resources/conversion.rb +18 -0
- data/lib/e_invoice_api/resources/documents.rb +62 -1
- data/lib/e_invoice_api/resources/drafts.rb +55 -0
- data/lib/e_invoice_api/resources/mailbox.rb +123 -0
- data/lib/e_invoice_api/resources/stats.rb +47 -0
- data/lib/e_invoice_api/resources/validate.rb +22 -2
- data/lib/e_invoice_api/resources/webhooks.rb +45 -0
- data/lib/e_invoice_api/version.rb +1 -1
- data/lib/e_invoice_api.rb +25 -0
- data/rbi/e_invoice_api/client.rbi +12 -0
- data/rbi/e_invoice_api/models/conversion/document_create_from_pdf_task.rbi +108 -0
- data/rbi/e_invoice_api/models/conversion/pdf_create_params.rbi +43 -0
- data/rbi/e_invoice_api/models/conversion/pdf_result_params.rbi +40 -0
- data/rbi/e_invoice_api/models/conversion/pdf_retrieve_params.rbi +40 -0
- data/rbi/e_invoice_api/models/document_create.rbi +210 -3
- data/rbi/e_invoice_api/models/document_create_from_pdf_response.rbi +124 -3
- data/rbi/e_invoice_api/models/document_lifecycle_params.rbi +38 -0
- data/rbi/e_invoice_api/models/document_lifecycle_response.rbi +353 -0
- data/rbi/e_invoice_api/models/document_response.rbi +130 -5
- data/rbi/e_invoice_api/models/document_timeline_params.rbi +38 -0
- data/rbi/e_invoice_api/models/document_timeline_response.rbi +168 -0
- data/rbi/e_invoice_api/models/draft_list_params.rbi +194 -0
- data/rbi/e_invoice_api/models/inbound_email_response.rbi +189 -0
- data/rbi/e_invoice_api/models/mailbox_download_attachment_params.rbi +46 -0
- data/rbi/e_invoice_api/models/mailbox_list_params.rbi +218 -0
- data/rbi/e_invoice_api/models/mailbox_reprocess_params.rbi +41 -0
- data/rbi/e_invoice_api/models/mailbox_retrieve_params.rbi +41 -0
- data/rbi/e_invoice_api/models/me_retrieve_response.rbi +10 -8
- data/rbi/e_invoice_api/models/payment_detail_create.rbi +6 -2
- data/rbi/e_invoice_api/models/stats_retrieve_params.rbi +111 -0
- data/rbi/e_invoice_api/models/stats_retrieve_response.rbi +251 -0
- data/rbi/e_invoice_api/models/ubl_document_validation.rbi +11 -1
- data/rbi/e_invoice_api/models/webhook_history_params.rbi +38 -0
- data/rbi/e_invoice_api/models/webhook_history_response.rbi +32 -0
- data/rbi/e_invoice_api/models/webhook_test_params.rbi +57 -0
- data/rbi/e_invoice_api/models/webhook_test_response.rbi +57 -0
- data/rbi/e_invoice_api/models.rbi +25 -0
- data/rbi/e_invoice_api/resources/conversion/pdf.rbi +44 -0
- data/rbi/e_invoice_api/resources/conversion.rbi +15 -0
- data/rbi/e_invoice_api/resources/documents.rbi +67 -0
- data/rbi/e_invoice_api/resources/drafts.rbi +55 -0
- data/rbi/e_invoice_api/resources/mailbox.rbi +93 -0
- data/rbi/e_invoice_api/resources/stats.rbi +38 -0
- data/rbi/e_invoice_api/resources/validate.rbi +44 -1
- data/rbi/e_invoice_api/resources/webhooks.rbi +29 -0
- data/sig/e_invoice_api/client.rbs +8 -0
- data/sig/e_invoice_api/models/conversion/document_create_from_pdf_task.rbs +45 -0
- data/sig/e_invoice_api/models/conversion/pdf_create_params.rbs +26 -0
- data/sig/e_invoice_api/models/conversion/pdf_result_params.rbs +25 -0
- data/sig/e_invoice_api/models/conversion/pdf_retrieve_params.rbs +25 -0
- data/sig/e_invoice_api/models/document_create.rbs +87 -4
- data/sig/e_invoice_api/models/document_create_from_pdf_response.rbs +61 -4
- data/sig/e_invoice_api/models/document_lifecycle_params.rbs +23 -0
- data/sig/e_invoice_api/models/document_lifecycle_response.rbs +151 -0
- data/sig/e_invoice_api/models/document_response.rbs +61 -4
- data/sig/e_invoice_api/models/document_timeline_params.rbs +23 -0
- data/sig/e_invoice_api/models/document_timeline_response.rbs +84 -0
- data/sig/e_invoice_api/models/draft_list_params.rbs +112 -0
- data/sig/e_invoice_api/models/inbound_email_response.rbs +126 -0
- data/sig/e_invoice_api/models/mailbox_download_attachment_params.rbs +28 -0
- data/sig/e_invoice_api/models/mailbox_list_params.rbs +112 -0
- data/sig/e_invoice_api/models/mailbox_reprocess_params.rbs +24 -0
- data/sig/e_invoice_api/models/mailbox_retrieve_params.rbs +24 -0
- data/sig/e_invoice_api/models/stats_retrieve_params.rbs +48 -0
- data/sig/e_invoice_api/models/stats_retrieve_response.rbs +107 -0
- data/sig/e_invoice_api/models/webhook_history_params.rbs +23 -0
- data/sig/e_invoice_api/models/webhook_history_response.rbs +13 -0
- data/sig/e_invoice_api/models/webhook_test_params.rbs +32 -0
- data/sig/e_invoice_api/models/webhook_test_response.rbs +30 -0
- data/sig/e_invoice_api/models.rbs +24 -0
- data/sig/e_invoice_api/resources/conversion/pdf.rbs +24 -0
- data/sig/e_invoice_api/resources/conversion.rbs +9 -0
- data/sig/e_invoice_api/resources/documents.rbs +19 -0
- data/sig/e_invoice_api/resources/drafts.rbs +20 -0
- data/sig/e_invoice_api/resources/mailbox.rbs +36 -0
- data/sig/e_invoice_api/resources/stats.rbs +14 -0
- data/sig/e_invoice_api/resources/validate.rbs +9 -0
- data/sig/e_invoice_api/resources/webhooks.rbs +12 -0
- metadata +77 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 63945a128a3304ea3dd731b93f3dbed91ef528da885f3348f0eec8bea0aa782a
|
|
4
|
+
data.tar.gz: 16d87f07042081d9f496c2bcf7cd481c91e2fcb53b38d550fa7ac63acc9ddec1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 12f3fe0b95f0bb38a0461fee9b6f71e6ecd45f0593463c4bd20076a1b8b2c962af143de0052f1568e4271538ceb0db526d4a0d607d22e976cb6a3ed91a1302ed
|
|
7
|
+
data.tar.gz: b2b59631c408a3adb3696a808c5ec0c157faa8d161ca7a2c51cd385da0903f657c067bc9ffaef2aff59f390c2c9e3fc153e06948e556346a4d395873fd0d0620
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
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
|
+
|
|
3
11
|
## 0.33.0 (2026-07-18)
|
|
4
12
|
|
|
5
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)
|
data/README.md
CHANGED
data/lib/e_invoice_api/client.rb
CHANGED
|
@@ -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,
|
|
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
|