e-invoice-api 0.33.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +31 -0
- data/LICENSE +201 -0
- data/README.md +18 -7
- data/SECURITY.md +6 -16
- data/lib/e_invoice_api/client.rb +16 -0
- data/lib/e_invoice_api/internal/transport/base_client.rb +43 -78
- data/lib/e_invoice_api/internal/transport/pooled_net_requester.rb +8 -8
- data/lib/e_invoice_api/internal/type/array_of.rb +12 -12
- data/lib/e_invoice_api/internal/type/base_model.rb +18 -18
- data/lib/e_invoice_api/internal/type/boolean.rb +6 -6
- data/lib/e_invoice_api/internal/type/converter.rb +24 -24
- data/lib/e_invoice_api/internal/type/enum.rb +6 -6
- data/lib/e_invoice_api/internal/type/file_input.rb +6 -6
- data/lib/e_invoice_api/internal/type/hash_of.rb +12 -12
- data/lib/e_invoice_api/internal/type/request_parameters.rb +1 -1
- data/lib/e_invoice_api/internal/type/union.rb +10 -10
- data/lib/e_invoice_api/internal/type/unknown.rb +6 -6
- data/lib/e_invoice_api/internal/util.rb +15 -57
- 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 +203 -17
- data/lib/e_invoice_api/models/document_create_from_pdf_response.rb +153 -17
- 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 +161 -21
- 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 +8 -4
- 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/unit_of_measure_code.rb +1349 -0
- 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/attachments.rb +11 -11
- data/lib/e_invoice_api/resources/documents/ubl.rb +4 -4
- data/lib/e_invoice_api/resources/documents.rb +130 -69
- data/lib/e_invoice_api/resources/drafts.rb +55 -0
- data/lib/e_invoice_api/resources/inbox.rb +20 -20
- data/lib/e_invoice_api/resources/lookup.rb +5 -5
- data/lib/e_invoice_api/resources/mailbox.rb +123 -0
- data/lib/e_invoice_api/resources/me.rb +1 -1
- data/lib/e_invoice_api/resources/outbox.rb +19 -19
- data/lib/e_invoice_api/resources/stats.rb +47 -0
- data/lib/e_invoice_api/resources/validate.rb +76 -56
- data/lib/e_invoice_api/resources/webhooks.rb +59 -14
- data/lib/e_invoice_api/version.rb +1 -1
- data/lib/e_invoice_api.rb +25 -1
- data/rbi/e_invoice_api/client.rbi +12 -0
- data/rbi/e_invoice_api/internal/transport/base_client.rbi +2 -10
- data/rbi/e_invoice_api/internal/util.rbi +0 -12
- 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 +366 -15
- data/rbi/e_invoice_api/models/document_create_from_pdf_response.rbi +280 -15
- 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 +292 -19
- 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 +12 -4
- 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/unit_of_measure_code.rbi +1349 -0
- 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 +77 -5
- 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 +52 -6
- data/rbi/e_invoice_api/resources/webhooks.rbi +29 -0
- data/sig/e_invoice_api/client.rbs +8 -0
- data/sig/e_invoice_api/internal/transport/base_client.rbs +1 -4
- data/sig/e_invoice_api/internal/util.rbs +0 -4
- 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 +139 -4
- data/sig/e_invoice_api/models/document_create_from_pdf_response.rbs +113 -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 +113 -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/unit_of_measure_code.rbs +2698 -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 +102 -7
|
@@ -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]
|
|
@@ -55,7 +62,8 @@ module EInvoiceAPI
|
|
|
55
62
|
optional :customer_address, String, nil?: true
|
|
56
63
|
|
|
57
64
|
# @!attribute customer_address_recipient
|
|
58
|
-
# The recipient name at the customer address
|
|
65
|
+
# The recipient name at the customer address. Also the customer contact name
|
|
66
|
+
# (BT-56) in the UBL.
|
|
59
67
|
#
|
|
60
68
|
# @return [String, nil]
|
|
61
69
|
optional :customer_address_recipient, String, nil?: true
|
|
@@ -91,6 +99,12 @@ module EInvoiceAPI
|
|
|
91
99
|
# @return [String, nil]
|
|
92
100
|
optional :customer_peppol_id, String, nil?: true
|
|
93
101
|
|
|
102
|
+
# @!attribute customer_phone
|
|
103
|
+
# The telephone number of the customer contact (BT-57)
|
|
104
|
+
#
|
|
105
|
+
# @return [String, nil]
|
|
106
|
+
optional :customer_phone, String, nil?: true
|
|
107
|
+
|
|
94
108
|
# @!attribute customer_tax_id
|
|
95
109
|
# Customer tax ID. For Belgium this is the VAT number. Must include the country
|
|
96
110
|
# prefix
|
|
@@ -160,6 +174,19 @@ module EInvoiceAPI
|
|
|
160
174
|
# @return [String, nil]
|
|
161
175
|
optional :payment_term, String, nil?: true
|
|
162
176
|
|
|
177
|
+
# @!attribute preceding_invoice_date
|
|
178
|
+
# The preceding invoice issue date (BT-26)
|
|
179
|
+
#
|
|
180
|
+
# @return [Date, nil]
|
|
181
|
+
optional :preceding_invoice_date, Date, nil?: true
|
|
182
|
+
|
|
183
|
+
# @!attribute preceding_invoice_id
|
|
184
|
+
# The preceding invoice reference (BT-25): the number of the invoice this document
|
|
185
|
+
# corrects, for example the invoice a credit note credits
|
|
186
|
+
#
|
|
187
|
+
# @return [String, nil]
|
|
188
|
+
optional :preceding_invoice_id, String, nil?: true
|
|
189
|
+
|
|
163
190
|
# @!attribute previous_unpaid_balance
|
|
164
191
|
# The previous unpaid balance from prior invoices, if any. Must be positive and
|
|
165
192
|
# rounded to maximum 2 decimals
|
|
@@ -170,7 +197,7 @@ module EInvoiceAPI
|
|
|
170
197
|
nil?: true
|
|
171
198
|
|
|
172
199
|
# @!attribute purchase_order
|
|
173
|
-
# The purchase order reference number
|
|
200
|
+
# The purchase order reference number (BT-13)
|
|
174
201
|
#
|
|
175
202
|
# @return [String, nil]
|
|
176
203
|
optional :purchase_order, String, nil?: true
|
|
@@ -187,6 +214,21 @@ module EInvoiceAPI
|
|
|
187
214
|
# @return [String, nil]
|
|
188
215
|
optional :remittance_address_recipient, String, nil?: true
|
|
189
216
|
|
|
217
|
+
# @!attribute rounding_amount
|
|
218
|
+
# The amount added to the invoice total to round the amount for payment (BT-114),
|
|
219
|
+
# for example to whole kronor (amount_due = invoice_total + rounding_amount when
|
|
220
|
+
# nothing is prepaid). Can be negative. Between -5.00 and 5.00, rounded to maximum
|
|
221
|
+
# 2 decimals
|
|
222
|
+
#
|
|
223
|
+
# @return [Float, String, nil]
|
|
224
|
+
optional :rounding_amount, union: -> { EInvoiceAPI::DocumentCreate::RoundingAmount }, nil?: true
|
|
225
|
+
|
|
226
|
+
# @!attribute sales_order
|
|
227
|
+
# The sales order reference (BT-14) assigned by the seller
|
|
228
|
+
#
|
|
229
|
+
# @return [String, nil]
|
|
230
|
+
optional :sales_order, String, nil?: true
|
|
231
|
+
|
|
190
232
|
# @!attribute service_address
|
|
191
233
|
# The address where services were performed or goods were delivered
|
|
192
234
|
#
|
|
@@ -218,7 +260,7 @@ module EInvoiceAPI
|
|
|
218
260
|
optional :shipping_address, String, nil?: true
|
|
219
261
|
|
|
220
262
|
# @!attribute shipping_address_recipient
|
|
221
|
-
# The
|
|
263
|
+
# The name of the deliver-to party (BT-70)
|
|
222
264
|
#
|
|
223
265
|
# @return [String, nil]
|
|
224
266
|
optional :shipping_address_recipient, String, nil?: true
|
|
@@ -244,6 +286,14 @@ module EInvoiceAPI
|
|
|
244
286
|
# @return [Symbol, EInvoiceAPI::Models::DocumentCreate::TaxCode, nil]
|
|
245
287
|
optional :tax_code, enum: -> { EInvoiceAPI::DocumentCreate::TaxCode }
|
|
246
288
|
|
|
289
|
+
# @!attribute tax_currency
|
|
290
|
+
# The VAT accounting currency (BT-6, ISO 4217 currency code), when VAT is
|
|
291
|
+
# accounted in a currency other than the invoice currency. Must differ from
|
|
292
|
+
# currency and requires total_tax_in_tax_currency
|
|
293
|
+
#
|
|
294
|
+
# @return [String, nil]
|
|
295
|
+
optional :tax_currency, String, nil?: true
|
|
296
|
+
|
|
247
297
|
# @!attribute tax_details
|
|
248
298
|
#
|
|
249
299
|
# @return [Array<EInvoiceAPI::Models::DocumentCreate::TaxDetail>, nil]
|
|
@@ -266,6 +316,15 @@ module EInvoiceAPI
|
|
|
266
316
|
# @return [Float, String, nil]
|
|
267
317
|
optional :total_tax, union: -> { EInvoiceAPI::DocumentCreate::TotalTax }, nil?: true
|
|
268
318
|
|
|
319
|
+
# @!attribute total_tax_in_tax_currency
|
|
320
|
+
# The total VAT amount in the VAT accounting currency tax_currency (BT-111). Does
|
|
321
|
+
# not add to invoice_total. Requires tax_currency. Rounded to maximum 2 decimals
|
|
322
|
+
#
|
|
323
|
+
# @return [Float, String, nil]
|
|
324
|
+
optional :total_tax_in_tax_currency,
|
|
325
|
+
union: -> { EInvoiceAPI::DocumentCreate::TotalTaxInTaxCurrency },
|
|
326
|
+
nil?: true
|
|
327
|
+
|
|
269
328
|
# @!attribute vatex
|
|
270
329
|
# VATEX code list for VAT exemption reasons
|
|
271
330
|
#
|
|
@@ -275,7 +334,8 @@ module EInvoiceAPI
|
|
|
275
334
|
optional :vatex, enum: -> { EInvoiceAPI::DocumentCreate::Vatex }, nil?: true
|
|
276
335
|
|
|
277
336
|
# @!attribute vatex_note
|
|
278
|
-
#
|
|
337
|
+
# VAT exemption reason text (BT-120). An exemption reason (vatex or vatex_note) is
|
|
338
|
+
# required for tax_code E, AE, K, G and O, and not allowed for S, Z, L and M
|
|
279
339
|
#
|
|
280
340
|
# @return [String, nil]
|
|
281
341
|
optional :vatex_note, String, nil?: true
|
|
@@ -287,7 +347,8 @@ module EInvoiceAPI
|
|
|
287
347
|
optional :vendor_address, String, nil?: true
|
|
288
348
|
|
|
289
349
|
# @!attribute vendor_address_recipient
|
|
290
|
-
# The recipient name at the vendor address
|
|
350
|
+
# The recipient name at the vendor address. Also the vendor contact name (BT-41)
|
|
351
|
+
# in the UBL, required when vendor and customer are both in Germany (DE-R-005).
|
|
291
352
|
#
|
|
292
353
|
# @return [String, nil]
|
|
293
354
|
optional :vendor_address_recipient, String, nil?: true
|
|
@@ -311,6 +372,14 @@ module EInvoiceAPI
|
|
|
311
372
|
# @return [String, nil]
|
|
312
373
|
optional :vendor_name, String, nil?: true
|
|
313
374
|
|
|
375
|
+
# @!attribute vendor_phone
|
|
376
|
+
# The telephone number of the vendor contact (BT-42). Required when vendor and
|
|
377
|
+
# customer are both in Germany (DE-R-006); it must then hold at least 3 digits
|
|
378
|
+
# (DE-R-027, a warning).
|
|
379
|
+
#
|
|
380
|
+
# @return [String, nil]
|
|
381
|
+
optional :vendor_phone, String, nil?: true
|
|
382
|
+
|
|
314
383
|
# @!attribute vendor_tax_id
|
|
315
384
|
# Vendor tax ID. For Belgium this is the VAT number. Must include the country
|
|
316
385
|
# prefix
|
|
@@ -318,7 +387,7 @@ module EInvoiceAPI
|
|
|
318
387
|
# @return [String, nil]
|
|
319
388
|
optional :vendor_tax_id, String, nil?: true
|
|
320
389
|
|
|
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)
|
|
390
|
+
# @!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
391
|
# Some parameter documentations has been truncated, see
|
|
323
392
|
# {EInvoiceAPI::Models::DocumentCreate} for more details.
|
|
324
393
|
#
|
|
@@ -332,13 +401,15 @@ module EInvoiceAPI
|
|
|
332
401
|
#
|
|
333
402
|
# @param billing_address_recipient [String, nil] The recipient name at the billing address
|
|
334
403
|
#
|
|
404
|
+
# @param buyer_reference [String, nil] The buyer reference (BT-10), e.g. a cost centre or accounting reference requeste
|
|
405
|
+
#
|
|
335
406
|
# @param charges [Array<EInvoiceAPI::Models::DocumentCreate::Charge>, nil]
|
|
336
407
|
#
|
|
337
408
|
# @param currency [Symbol, EInvoiceAPI::Models::CurrencyCode] Currency of the invoice (ISO 4217 currency code)
|
|
338
409
|
#
|
|
339
410
|
# @param customer_address [String, nil] The address of the customer/buyer
|
|
340
411
|
#
|
|
341
|
-
# @param customer_address_recipient [String, nil] The recipient name at the customer address
|
|
412
|
+
# @param customer_address_recipient [String, nil] The recipient name at the customer address. Also the customer contact name (BT-5
|
|
342
413
|
#
|
|
343
414
|
# @param customer_company_id [String, nil] Customer company ID. For Belgium this is the CBE number or their EUID (European
|
|
344
415
|
#
|
|
@@ -350,6 +421,8 @@ module EInvoiceAPI
|
|
|
350
421
|
#
|
|
351
422
|
# @param customer_peppol_id [String, nil] Customer Peppol ID
|
|
352
423
|
#
|
|
424
|
+
# @param customer_phone [String, nil] The telephone number of the customer contact (BT-57)
|
|
425
|
+
#
|
|
353
426
|
# @param customer_tax_id [String, nil] Customer tax ID. For Belgium this is the VAT number. Must include the country pr
|
|
354
427
|
#
|
|
355
428
|
# @param direction [Symbol, EInvoiceAPI::Models::DocumentDirection] The direction of the document: INBOUND (purchases) or OUTBOUND (sales)
|
|
@@ -372,14 +445,22 @@ module EInvoiceAPI
|
|
|
372
445
|
#
|
|
373
446
|
# @param payment_term [String, nil] The payment terms (e.g., 'Net 30', 'Due on receipt', '2/10 Net 30')
|
|
374
447
|
#
|
|
448
|
+
# @param preceding_invoice_date [Date, nil] The preceding invoice issue date (BT-26)
|
|
449
|
+
#
|
|
450
|
+
# @param preceding_invoice_id [String, nil] The preceding invoice reference (BT-25): the number of the invoice this document
|
|
451
|
+
#
|
|
375
452
|
# @param previous_unpaid_balance [Float, String, nil] The previous unpaid balance from prior invoices, if any. Must be positive and ro
|
|
376
453
|
#
|
|
377
|
-
# @param purchase_order [String, nil] The purchase order reference number
|
|
454
|
+
# @param purchase_order [String, nil] The purchase order reference number (BT-13)
|
|
378
455
|
#
|
|
379
456
|
# @param remittance_address [String, nil] The address where payment should be sent or remitted to
|
|
380
457
|
#
|
|
381
458
|
# @param remittance_address_recipient [String, nil] The recipient name at the remittance address
|
|
382
459
|
#
|
|
460
|
+
# @param rounding_amount [Float, String, nil] The amount added to the invoice total to round the amount for payment (BT-114),
|
|
461
|
+
#
|
|
462
|
+
# @param sales_order [String, nil] The sales order reference (BT-14) assigned by the seller
|
|
463
|
+
#
|
|
383
464
|
# @param service_address [String, nil] The address where services were performed or goods were delivered
|
|
384
465
|
#
|
|
385
466
|
# @param service_address_recipient [String, nil] The recipient name at the service address
|
|
@@ -390,7 +471,7 @@ module EInvoiceAPI
|
|
|
390
471
|
#
|
|
391
472
|
# @param shipping_address [String, nil] The shipping/delivery address
|
|
392
473
|
#
|
|
393
|
-
# @param shipping_address_recipient [String, nil] The
|
|
474
|
+
# @param shipping_address_recipient [String, nil] The name of the deliver-to party (BT-70)
|
|
394
475
|
#
|
|
395
476
|
# @param state [Symbol, EInvoiceAPI::Models::DocumentState] The current state of the document: DRAFT, TRANSIT, FAILED, SENT, or RECEIVED
|
|
396
477
|
#
|
|
@@ -398,19 +479,23 @@ module EInvoiceAPI
|
|
|
398
479
|
#
|
|
399
480
|
# @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
481
|
#
|
|
482
|
+
# @param tax_currency [String, nil] The VAT accounting currency (BT-6, ISO 4217 currency code), when VAT is accounte
|
|
483
|
+
#
|
|
401
484
|
# @param tax_details [Array<EInvoiceAPI::Models::DocumentCreate::TaxDetail>, nil]
|
|
402
485
|
#
|
|
403
486
|
# @param total_discount [Float, String, nil] The net financial discount/charge of the invoice (non-VAT charges minus non-VAT
|
|
404
487
|
#
|
|
405
488
|
# @param total_tax [Float, String, nil] The total tax amount of the invoice. Must be positive and rounded to maximum 2 d
|
|
406
489
|
#
|
|
490
|
+
# @param total_tax_in_tax_currency [Float, String, nil] The total VAT amount in the VAT accounting currency tax_currency (BT-111). Does
|
|
491
|
+
#
|
|
407
492
|
# @param vatex [Symbol, EInvoiceAPI::Models::DocumentCreate::Vatex, nil] VATEX code list for VAT exemption reasons
|
|
408
493
|
#
|
|
409
|
-
# @param vatex_note [String, nil]
|
|
494
|
+
# @param vatex_note [String, nil] VAT exemption reason text (BT-120). An exemption reason (vatex or vatex_note) is
|
|
410
495
|
#
|
|
411
496
|
# @param vendor_address [String, nil] The address of the vendor/seller
|
|
412
497
|
#
|
|
413
|
-
# @param vendor_address_recipient [String, nil] The recipient name at the vendor address
|
|
498
|
+
# @param vendor_address_recipient [String, nil] The recipient name at the vendor address. Also the vendor contact name (BT-41) i
|
|
414
499
|
#
|
|
415
500
|
# @param vendor_company_id [String, nil] Vendor company ID. For Belgium this is the CBE number or their EUID (European Un
|
|
416
501
|
#
|
|
@@ -418,6 +503,8 @@ module EInvoiceAPI
|
|
|
418
503
|
#
|
|
419
504
|
# @param vendor_name [String, nil] The name of the vendor/seller/supplier
|
|
420
505
|
#
|
|
506
|
+
# @param vendor_phone [String, nil] The telephone number of the vendor contact (BT-42). Required when vendor and cus
|
|
507
|
+
#
|
|
421
508
|
# @param vendor_tax_id [String, nil] Vendor tax ID. For Belgium this is the VAT number. Must include the country pref
|
|
422
509
|
|
|
423
510
|
class Allowance < EInvoiceAPI::Internal::Type::BaseModel
|
|
@@ -998,11 +1085,15 @@ module EInvoiceAPI
|
|
|
998
1085
|
|
|
999
1086
|
# @!attribute date
|
|
1000
1087
|
#
|
|
1001
|
-
# @return [nil]
|
|
1002
|
-
optional :date,
|
|
1088
|
+
# @return [Date, nil]
|
|
1089
|
+
optional :date, Date, nil?: true
|
|
1003
1090
|
|
|
1004
1091
|
# @!attribute description
|
|
1005
|
-
# The description of the line item.
|
|
1092
|
+
# The description of the line item (BT-154). Doubles as the item name when `name`
|
|
1093
|
+
# is omitted, so a posted line item needs a `name` or a `description`. On a
|
|
1094
|
+
# received document it holds the item description, or the item name (BT-153) when
|
|
1095
|
+
# the document has no item description; CII documents with both combine them as
|
|
1096
|
+
# `name: description`.
|
|
1006
1097
|
#
|
|
1007
1098
|
# @return [String, nil]
|
|
1008
1099
|
optional :description, String, nil?: true
|
|
@@ -1017,6 +1108,23 @@ module EInvoiceAPI
|
|
|
1017
1108
|
},
|
|
1018
1109
|
nil?: true
|
|
1019
1110
|
|
|
1111
|
+
# @!attribute name
|
|
1112
|
+
# The item name (BT-153), for example the product name. Written to
|
|
1113
|
+
# cac:Item/cbc:Name. When omitted or blank, `description` (BT-154) is used as the
|
|
1114
|
+
# item name. A posted line item needs a `name` or a `description`; a line item
|
|
1115
|
+
# with neither is rejected with 422.
|
|
1116
|
+
#
|
|
1117
|
+
# @return [String, nil]
|
|
1118
|
+
optional :name, String, nil?: true
|
|
1119
|
+
|
|
1120
|
+
# @!attribute price_base_quantity
|
|
1121
|
+
# The item price base quantity (BT-149). The number of item units to which the
|
|
1122
|
+
# unit price applies, for example 100 when the unit price is a price for each 100
|
|
1123
|
+
# units. Must be greater than 0. Defaults to 1.
|
|
1124
|
+
#
|
|
1125
|
+
# @return [Float, String, nil]
|
|
1126
|
+
optional :price_base_quantity, union: -> { EInvoiceAPI::DocumentCreate::Item::PriceBaseQuantity }
|
|
1127
|
+
|
|
1020
1128
|
# @!attribute product_code
|
|
1021
1129
|
# The product code of the line item.
|
|
1022
1130
|
#
|
|
@@ -1057,7 +1165,7 @@ module EInvoiceAPI
|
|
|
1057
1165
|
# @return [Float, String, nil]
|
|
1058
1166
|
optional :unit_price, union: -> { EInvoiceAPI::DocumentCreate::Item::UnitPrice }, nil?: true
|
|
1059
1167
|
|
|
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)
|
|
1168
|
+
# @!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
1169
|
# Some parameter documentations has been truncated, see
|
|
1062
1170
|
# {EInvoiceAPI::Models::DocumentCreate::Item} for more details.
|
|
1063
1171
|
#
|
|
@@ -1067,12 +1175,16 @@ module EInvoiceAPI
|
|
|
1067
1175
|
#
|
|
1068
1176
|
# @param charges [Array<EInvoiceAPI::Models::DocumentCreate::Item::Charge>, nil] The charges of the line item.
|
|
1069
1177
|
#
|
|
1070
|
-
# @param date [nil]
|
|
1178
|
+
# @param date [Date, nil]
|
|
1071
1179
|
#
|
|
1072
|
-
# @param description [String, nil] The description of the line item.
|
|
1180
|
+
# @param description [String, nil] The description of the line item (BT-154). Doubles as the item name when `name`
|
|
1073
1181
|
#
|
|
1074
1182
|
# @param item_attributes [Array<EInvoiceAPI::Models::DocumentCreate::Item::ItemAttribute>, nil] Item-level attributes (BG-32) from cac:AdditionalItemProperty.
|
|
1075
1183
|
#
|
|
1184
|
+
# @param name [String, nil] The item name (BT-153), for example the product name. Written to cac:Item/cbc:Na
|
|
1185
|
+
#
|
|
1186
|
+
# @param price_base_quantity [Float, String] The item price base quantity (BT-149). The number of item units to which the uni
|
|
1187
|
+
#
|
|
1076
1188
|
# @param product_code [String, nil] The product code of the line item.
|
|
1077
1189
|
#
|
|
1078
1190
|
# @param quantity [Float, String, nil] The quantity of items (goods or services) that is the subject of the line item.
|
|
@@ -1661,6 +1773,22 @@ module EInvoiceAPI
|
|
|
1661
1773
|
# @param value [String, nil] Attribute value (BT-161).
|
|
1662
1774
|
end
|
|
1663
1775
|
|
|
1776
|
+
# The item price base quantity (BT-149). The number of item units to which the
|
|
1777
|
+
# unit price applies, for example 100 when the unit price is a price for each 100
|
|
1778
|
+
# units. Must be greater than 0. Defaults to 1.
|
|
1779
|
+
#
|
|
1780
|
+
# @see EInvoiceAPI::Models::DocumentCreate::Item#price_base_quantity
|
|
1781
|
+
module PriceBaseQuantity
|
|
1782
|
+
extend EInvoiceAPI::Internal::Type::Union
|
|
1783
|
+
|
|
1784
|
+
variant Float
|
|
1785
|
+
|
|
1786
|
+
variant String
|
|
1787
|
+
|
|
1788
|
+
# @!method self.variants
|
|
1789
|
+
# @return [Array(Float, String)]
|
|
1790
|
+
end
|
|
1791
|
+
|
|
1664
1792
|
# The quantity of items (goods or services) that is the subject of the line item.
|
|
1665
1793
|
# Must be rounded to maximum 4 decimals. Can be negative for credit notes or
|
|
1666
1794
|
# corrections.
|
|
@@ -1737,6 +1865,23 @@ module EInvoiceAPI
|
|
|
1737
1865
|
# @return [Array(Float, String)]
|
|
1738
1866
|
end
|
|
1739
1867
|
|
|
1868
|
+
# The amount added to the invoice total to round the amount for payment (BT-114),
|
|
1869
|
+
# for example to whole kronor (amount_due = invoice_total + rounding_amount when
|
|
1870
|
+
# nothing is prepaid). Can be negative. Between -5.00 and 5.00, rounded to maximum
|
|
1871
|
+
# 2 decimals
|
|
1872
|
+
#
|
|
1873
|
+
# @see EInvoiceAPI::Models::DocumentCreate#rounding_amount
|
|
1874
|
+
module RoundingAmount
|
|
1875
|
+
extend EInvoiceAPI::Internal::Type::Union
|
|
1876
|
+
|
|
1877
|
+
variant Float
|
|
1878
|
+
|
|
1879
|
+
variant String
|
|
1880
|
+
|
|
1881
|
+
# @!method self.variants
|
|
1882
|
+
# @return [Array(Float, String)]
|
|
1883
|
+
end
|
|
1884
|
+
|
|
1740
1885
|
# The taxable base of the invoice. Should be the sum of all line items -
|
|
1741
1886
|
# allowances (for example commercial discounts) + charges with impact on VAT. Must
|
|
1742
1887
|
# be positive and rounded to maximum 2 decimals
|
|
@@ -1839,6 +1984,21 @@ module EInvoiceAPI
|
|
|
1839
1984
|
# @return [Array(Float, String)]
|
|
1840
1985
|
end
|
|
1841
1986
|
|
|
1987
|
+
# The total VAT amount in the VAT accounting currency tax_currency (BT-111). Does
|
|
1988
|
+
# not add to invoice_total. Requires tax_currency. Rounded to maximum 2 decimals
|
|
1989
|
+
#
|
|
1990
|
+
# @see EInvoiceAPI::Models::DocumentCreate#total_tax_in_tax_currency
|
|
1991
|
+
module TotalTaxInTaxCurrency
|
|
1992
|
+
extend EInvoiceAPI::Internal::Type::Union
|
|
1993
|
+
|
|
1994
|
+
variant Float
|
|
1995
|
+
|
|
1996
|
+
variant String
|
|
1997
|
+
|
|
1998
|
+
# @!method self.variants
|
|
1999
|
+
# @return [Array(Float, String)]
|
|
2000
|
+
end
|
|
2001
|
+
|
|
1842
2002
|
# VATEX code list for VAT exemption reasons
|
|
1843
2003
|
#
|
|
1844
2004
|
# Agency: CEF Identifier: vatex
|
|
@@ -1866,6 +2026,7 @@ module EInvoiceAPI
|
|
|
1866
2026
|
VATEX_EU_132_1_O = :"VATEX-EU-132-1O"
|
|
1867
2027
|
VATEX_EU_132_1_P = :"VATEX-EU-132-1P"
|
|
1868
2028
|
VATEX_EU_132_1_Q = :"VATEX-EU-132-1Q"
|
|
2029
|
+
VATEX_EU_135_1 = :"VATEX-EU-135-1"
|
|
1869
2030
|
VATEX_EU_143 = :"VATEX-EU-143"
|
|
1870
2031
|
VATEX_EU_143_1_A = :"VATEX-EU-143-1A"
|
|
1871
2032
|
VATEX_EU_143_1_B = :"VATEX-EU-143-1B"
|
|
@@ -1897,6 +2058,7 @@ module EInvoiceAPI
|
|
|
1897
2058
|
VATEX_EU_151_1_C = :"VATEX-EU-151-1C"
|
|
1898
2059
|
VATEX_EU_151_1_D = :"VATEX-EU-151-1D"
|
|
1899
2060
|
VATEX_EU_151_1_E = :"VATEX-EU-151-1E"
|
|
2061
|
+
VATEX_EU_153 = :"VATEX-EU-153"
|
|
1900
2062
|
VATEX_EU_159 = :"VATEX-EU-159"
|
|
1901
2063
|
VATEX_EU_309 = :"VATEX-EU-309"
|
|
1902
2064
|
VATEX_EU_AE = :"VATEX-EU-AE"
|
|
@@ -1907,6 +2069,30 @@ module EInvoiceAPI
|
|
|
1907
2069
|
VATEX_EU_IC = :"VATEX-EU-IC"
|
|
1908
2070
|
VATEX_EU_O = :"VATEX-EU-O"
|
|
1909
2071
|
VATEX_EU_J = :"VATEX-EU-J"
|
|
2072
|
+
VATEX_FR_298_SEXDECIESA = :"VATEX-FR-298SEXDECIESA"
|
|
2073
|
+
VATEX_FR_AE = :"VATEX-FR-AE"
|
|
2074
|
+
VATEX_FR_CGI261_1 = :"VATEX-FR-CGI261-1"
|
|
2075
|
+
VATEX_FR_CGI261_2 = :"VATEX-FR-CGI261-2"
|
|
2076
|
+
VATEX_FR_CGI261_3 = :"VATEX-FR-CGI261-3"
|
|
2077
|
+
VATEX_FR_CGI261_4 = :"VATEX-FR-CGI261-4"
|
|
2078
|
+
VATEX_FR_CGI261_5 = :"VATEX-FR-CGI261-5"
|
|
2079
|
+
VATEX_FR_CGI261_7 = :"VATEX-FR-CGI261-7"
|
|
2080
|
+
VATEX_FR_CGI261_8 = :"VATEX-FR-CGI261-8"
|
|
2081
|
+
VATEX_FR_CGI261A = :"VATEX-FR-CGI261A"
|
|
2082
|
+
VATEX_FR_CGI261B = :"VATEX-FR-CGI261B"
|
|
2083
|
+
VATEX_FR_CGI261C_1 = :"VATEX-FR-CGI261C-1"
|
|
2084
|
+
VATEX_FR_CGI261C_2 = :"VATEX-FR-CGI261C-2"
|
|
2085
|
+
VATEX_FR_CGI261C_3 = :"VATEX-FR-CGI261C-3"
|
|
2086
|
+
VATEX_FR_CGI261D_1 = :"VATEX-FR-CGI261D-1"
|
|
2087
|
+
VATEX_FR_CGI261D_1_BIS = :"VATEX-FR-CGI261D-1BIS"
|
|
2088
|
+
VATEX_FR_CGI261D_2 = :"VATEX-FR-CGI261D-2"
|
|
2089
|
+
VATEX_FR_CGI261D_3 = :"VATEX-FR-CGI261D-3"
|
|
2090
|
+
VATEX_FR_CGI261D_4 = :"VATEX-FR-CGI261D-4"
|
|
2091
|
+
VATEX_FR_CGI261E_1 = :"VATEX-FR-CGI261E-1"
|
|
2092
|
+
VATEX_FR_CGI261E_2 = :"VATEX-FR-CGI261E-2"
|
|
2093
|
+
VATEX_FR_CGI275 = :"VATEX-FR-CGI275"
|
|
2094
|
+
VATEX_FR_CGI277A = :"VATEX-FR-CGI277A"
|
|
2095
|
+
VATEX_FR_CGI295 = :"VATEX-FR-CGI295"
|
|
1910
2096
|
VATEX_FR_FRANCHISE = :"VATEX-FR-FRANCHISE"
|
|
1911
2097
|
VATEX_FR_CNWVAT = :"VATEX-FR-CNWVAT"
|
|
1912
2098
|
|