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
|
@@ -46,6 +46,13 @@ module EInvoiceAPI
|
|
|
46
46
|
# @return [String, nil]
|
|
47
47
|
optional :billing_address_recipient, String, nil?: true
|
|
48
48
|
|
|
49
|
+
# @!attribute buyer_reference
|
|
50
|
+
# The buyer reference (BT-10), e.g. a cost centre or accounting reference
|
|
51
|
+
# requested by the buyer
|
|
52
|
+
#
|
|
53
|
+
# @return [String, nil]
|
|
54
|
+
optional :buyer_reference, String, nil?: true
|
|
55
|
+
|
|
49
56
|
# @!attribute charges
|
|
50
57
|
#
|
|
51
58
|
# @return [Array<EInvoiceAPI::Models::DocumentResponse::Charge>, nil]
|
|
@@ -66,7 +73,8 @@ module EInvoiceAPI
|
|
|
66
73
|
optional :customer_address, String, nil?: true
|
|
67
74
|
|
|
68
75
|
# @!attribute customer_address_recipient
|
|
69
|
-
# The recipient name at the customer address
|
|
76
|
+
# The recipient name at the customer address. Also the customer contact name
|
|
77
|
+
# (BT-56) in the UBL.
|
|
70
78
|
#
|
|
71
79
|
# @return [String, nil]
|
|
72
80
|
optional :customer_address_recipient, String, nil?: true
|
|
@@ -102,6 +110,12 @@ module EInvoiceAPI
|
|
|
102
110
|
# @return [String, nil]
|
|
103
111
|
optional :customer_peppol_id, String, nil?: true
|
|
104
112
|
|
|
113
|
+
# @!attribute customer_phone
|
|
114
|
+
# The telephone number of the customer contact (BT-57)
|
|
115
|
+
#
|
|
116
|
+
# @return [String, nil]
|
|
117
|
+
optional :customer_phone, String, nil?: true
|
|
118
|
+
|
|
105
119
|
# @!attribute customer_tax_id
|
|
106
120
|
# Customer tax ID. For Belgium this is the VAT number. Must include the country
|
|
107
121
|
# prefix
|
|
@@ -172,8 +186,21 @@ module EInvoiceAPI
|
|
|
172
186
|
# @return [String, nil]
|
|
173
187
|
optional :payment_term, String, nil?: true
|
|
174
188
|
|
|
189
|
+
# @!attribute preceding_invoice_date
|
|
190
|
+
# The preceding invoice issue date (BT-26)
|
|
191
|
+
#
|
|
192
|
+
# @return [Date, nil]
|
|
193
|
+
optional :preceding_invoice_date, Date, nil?: true
|
|
194
|
+
|
|
195
|
+
# @!attribute preceding_invoice_id
|
|
196
|
+
# The preceding invoice reference (BT-25): the number of the invoice this document
|
|
197
|
+
# corrects, for example the invoice a credit note credits
|
|
198
|
+
#
|
|
199
|
+
# @return [String, nil]
|
|
200
|
+
optional :preceding_invoice_id, String, nil?: true
|
|
201
|
+
|
|
175
202
|
# @!attribute purchase_order
|
|
176
|
-
# The purchase order reference number
|
|
203
|
+
# The purchase order reference number (BT-13)
|
|
177
204
|
#
|
|
178
205
|
# @return [String, nil]
|
|
179
206
|
optional :purchase_order, String, nil?: true
|
|
@@ -190,6 +217,21 @@ module EInvoiceAPI
|
|
|
190
217
|
# @return [String, nil]
|
|
191
218
|
optional :remittance_address_recipient, String, nil?: true
|
|
192
219
|
|
|
220
|
+
# @!attribute rounding_amount
|
|
221
|
+
# The amount added to the invoice total to round the amount for payment (BT-114),
|
|
222
|
+
# for example to whole kronor (amount_due = invoice_total + rounding_amount when
|
|
223
|
+
# nothing is prepaid). Can be negative. Between -5.00 and 5.00, rounded to maximum
|
|
224
|
+
# 2 decimals
|
|
225
|
+
#
|
|
226
|
+
# @return [String, nil]
|
|
227
|
+
optional :rounding_amount, String, nil?: true
|
|
228
|
+
|
|
229
|
+
# @!attribute sales_order
|
|
230
|
+
# The sales order reference (BT-14) assigned by the seller
|
|
231
|
+
#
|
|
232
|
+
# @return [String, nil]
|
|
233
|
+
optional :sales_order, String, nil?: true
|
|
234
|
+
|
|
193
235
|
# @!attribute service_address
|
|
194
236
|
# The address where services were performed or goods were delivered
|
|
195
237
|
#
|
|
@@ -221,7 +263,7 @@ module EInvoiceAPI
|
|
|
221
263
|
optional :shipping_address, String, nil?: true
|
|
222
264
|
|
|
223
265
|
# @!attribute shipping_address_recipient
|
|
224
|
-
# The
|
|
266
|
+
# The name of the deliver-to party (BT-70)
|
|
225
267
|
#
|
|
226
268
|
# @return [String, nil]
|
|
227
269
|
optional :shipping_address_recipient, String, nil?: true
|
|
@@ -247,6 +289,14 @@ module EInvoiceAPI
|
|
|
247
289
|
# @return [Symbol, EInvoiceAPI::Models::DocumentResponse::TaxCode, nil]
|
|
248
290
|
optional :tax_code, enum: -> { EInvoiceAPI::DocumentResponse::TaxCode }
|
|
249
291
|
|
|
292
|
+
# @!attribute tax_currency
|
|
293
|
+
# The VAT accounting currency (BT-6, ISO 4217 currency code), when VAT is
|
|
294
|
+
# accounted in a currency other than the invoice currency. Must differ from
|
|
295
|
+
# currency and requires total_tax_in_tax_currency
|
|
296
|
+
#
|
|
297
|
+
# @return [String, nil]
|
|
298
|
+
optional :tax_currency, String, nil?: true
|
|
299
|
+
|
|
250
300
|
# @!attribute tax_details
|
|
251
301
|
#
|
|
252
302
|
# @return [Array<EInvoiceAPI::Models::DocumentResponse::TaxDetail>, nil]
|
|
@@ -269,6 +319,13 @@ module EInvoiceAPI
|
|
|
269
319
|
# @return [String, nil]
|
|
270
320
|
optional :total_tax, String, nil?: true
|
|
271
321
|
|
|
322
|
+
# @!attribute total_tax_in_tax_currency
|
|
323
|
+
# The total VAT amount in the VAT accounting currency tax_currency (BT-111). Does
|
|
324
|
+
# not add to invoice_total. Requires tax_currency. Rounded to maximum 2 decimals
|
|
325
|
+
#
|
|
326
|
+
# @return [String, nil]
|
|
327
|
+
optional :total_tax_in_tax_currency, String, nil?: true
|
|
328
|
+
|
|
272
329
|
# @!attribute vatex
|
|
273
330
|
# VATEX code list for VAT exemption reasons
|
|
274
331
|
#
|
|
@@ -278,7 +335,8 @@ module EInvoiceAPI
|
|
|
278
335
|
optional :vatex, enum: -> { EInvoiceAPI::DocumentResponse::Vatex }, nil?: true
|
|
279
336
|
|
|
280
337
|
# @!attribute vatex_note
|
|
281
|
-
#
|
|
338
|
+
# VAT exemption reason text (BT-120). An exemption reason (vatex or vatex_note) is
|
|
339
|
+
# required for tax_code E, AE, K, G and O, and not allowed for S, Z, L and M
|
|
282
340
|
#
|
|
283
341
|
# @return [String, nil]
|
|
284
342
|
optional :vatex_note, String, nil?: true
|
|
@@ -290,7 +348,8 @@ module EInvoiceAPI
|
|
|
290
348
|
optional :vendor_address, String, nil?: true
|
|
291
349
|
|
|
292
350
|
# @!attribute vendor_address_recipient
|
|
293
|
-
# The recipient name at the vendor address
|
|
351
|
+
# The recipient name at the vendor address. Also the vendor contact name (BT-41)
|
|
352
|
+
# in the UBL, required when vendor and customer are both in Germany (DE-R-005).
|
|
294
353
|
#
|
|
295
354
|
# @return [String, nil]
|
|
296
355
|
optional :vendor_address_recipient, String, nil?: true
|
|
@@ -314,6 +373,14 @@ module EInvoiceAPI
|
|
|
314
373
|
# @return [String, nil]
|
|
315
374
|
optional :vendor_name, String, nil?: true
|
|
316
375
|
|
|
376
|
+
# @!attribute vendor_phone
|
|
377
|
+
# The telephone number of the vendor contact (BT-42). Required when vendor and
|
|
378
|
+
# customer are both in Germany (DE-R-006); it must then hold at least 3 digits
|
|
379
|
+
# (DE-R-027, a warning).
|
|
380
|
+
#
|
|
381
|
+
# @return [String, nil]
|
|
382
|
+
optional :vendor_phone, String, nil?: true
|
|
383
|
+
|
|
317
384
|
# @!attribute vendor_tax_id
|
|
318
385
|
# Vendor tax ID. For Belgium this is the VAT number. Must include the country
|
|
319
386
|
# prefix
|
|
@@ -321,7 +388,7 @@ module EInvoiceAPI
|
|
|
321
388
|
# @return [String, nil]
|
|
322
389
|
optional :vendor_tax_id, String, nil?: true
|
|
323
390
|
|
|
324
|
-
# @!method initialize(id:, created_at:, 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, 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)
|
|
391
|
+
# @!method initialize(id:, created_at:, 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, 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)
|
|
325
392
|
# Some parameter documentations has been truncated, see
|
|
326
393
|
# {EInvoiceAPI::Models::DocumentResponse} for more details.
|
|
327
394
|
#
|
|
@@ -339,13 +406,15 @@ module EInvoiceAPI
|
|
|
339
406
|
#
|
|
340
407
|
# @param billing_address_recipient [String, nil] The recipient name at the billing address
|
|
341
408
|
#
|
|
409
|
+
# @param buyer_reference [String, nil] The buyer reference (BT-10), e.g. a cost centre or accounting reference requeste
|
|
410
|
+
#
|
|
342
411
|
# @param charges [Array<EInvoiceAPI::Models::DocumentResponse::Charge>, nil]
|
|
343
412
|
#
|
|
344
413
|
# @param currency [Symbol, EInvoiceAPI::Models::CurrencyCode] Currency of the invoice (ISO 4217 currency code)
|
|
345
414
|
#
|
|
346
415
|
# @param customer_address [String, nil] The address of the customer/buyer
|
|
347
416
|
#
|
|
348
|
-
# @param customer_address_recipient [String, nil] The recipient name at the customer address
|
|
417
|
+
# @param customer_address_recipient [String, nil] The recipient name at the customer address. Also the customer contact name (BT-5
|
|
349
418
|
#
|
|
350
419
|
# @param customer_company_id [String, nil] Customer company ID. For Belgium this is the CBE number or their EUID (European
|
|
351
420
|
#
|
|
@@ -357,6 +426,8 @@ module EInvoiceAPI
|
|
|
357
426
|
#
|
|
358
427
|
# @param customer_peppol_id [String, nil] Customer Peppol ID
|
|
359
428
|
#
|
|
429
|
+
# @param customer_phone [String, nil] The telephone number of the customer contact (BT-57)
|
|
430
|
+
#
|
|
360
431
|
# @param customer_tax_id [String, nil] Customer tax ID. For Belgium this is the VAT number. Must include the country pr
|
|
361
432
|
#
|
|
362
433
|
# @param direction [Symbol, EInvoiceAPI::Models::DocumentDirection] The direction of the document: INBOUND (purchases) or OUTBOUND (sales)
|
|
@@ -379,12 +450,20 @@ module EInvoiceAPI
|
|
|
379
450
|
#
|
|
380
451
|
# @param payment_term [String, nil] The payment terms (e.g., 'Net 30', 'Due on receipt', '2/10 Net 30')
|
|
381
452
|
#
|
|
382
|
-
# @param
|
|
453
|
+
# @param preceding_invoice_date [Date, nil] The preceding invoice issue date (BT-26)
|
|
454
|
+
#
|
|
455
|
+
# @param preceding_invoice_id [String, nil] The preceding invoice reference (BT-25): the number of the invoice this document
|
|
456
|
+
#
|
|
457
|
+
# @param purchase_order [String, nil] The purchase order reference number (BT-13)
|
|
383
458
|
#
|
|
384
459
|
# @param remittance_address [String, nil] The address where payment should be sent or remitted to
|
|
385
460
|
#
|
|
386
461
|
# @param remittance_address_recipient [String, nil] The recipient name at the remittance address
|
|
387
462
|
#
|
|
463
|
+
# @param rounding_amount [String, nil] The amount added to the invoice total to round the amount for payment (BT-114),
|
|
464
|
+
#
|
|
465
|
+
# @param sales_order [String, nil] The sales order reference (BT-14) assigned by the seller
|
|
466
|
+
#
|
|
388
467
|
# @param service_address [String, nil] The address where services were performed or goods were delivered
|
|
389
468
|
#
|
|
390
469
|
# @param service_address_recipient [String, nil] The recipient name at the service address
|
|
@@ -395,7 +474,7 @@ module EInvoiceAPI
|
|
|
395
474
|
#
|
|
396
475
|
# @param shipping_address [String, nil] The shipping/delivery address
|
|
397
476
|
#
|
|
398
|
-
# @param shipping_address_recipient [String, nil] The
|
|
477
|
+
# @param shipping_address_recipient [String, nil] The name of the deliver-to party (BT-70)
|
|
399
478
|
#
|
|
400
479
|
# @param state [Symbol, EInvoiceAPI::Models::DocumentState] The current state of the document: DRAFT, TRANSIT, FAILED, SENT, or RECEIVED
|
|
401
480
|
#
|
|
@@ -403,19 +482,23 @@ module EInvoiceAPI
|
|
|
403
482
|
#
|
|
404
483
|
# @param tax_code [Symbol, EInvoiceAPI::Models::DocumentResponse::TaxCode] Tax category code of the invoice (e.g., S for standard rate, Z for zero rate, E
|
|
405
484
|
#
|
|
485
|
+
# @param tax_currency [String, nil] The VAT accounting currency (BT-6, ISO 4217 currency code), when VAT is accounte
|
|
486
|
+
#
|
|
406
487
|
# @param tax_details [Array<EInvoiceAPI::Models::DocumentResponse::TaxDetail>, nil]
|
|
407
488
|
#
|
|
408
489
|
# @param total_discount [String, nil] The net financial discount/charge of the invoice (non-VAT charges minus non-VAT
|
|
409
490
|
#
|
|
410
491
|
# @param total_tax [String, nil] The total tax amount of the invoice. Must be positive and rounded to maximum 2 d
|
|
411
492
|
#
|
|
493
|
+
# @param total_tax_in_tax_currency [String, nil] The total VAT amount in the VAT accounting currency tax_currency (BT-111). Does
|
|
494
|
+
#
|
|
412
495
|
# @param vatex [Symbol, EInvoiceAPI::Models::DocumentResponse::Vatex, nil] VATEX code list for VAT exemption reasons
|
|
413
496
|
#
|
|
414
|
-
# @param vatex_note [String, nil]
|
|
497
|
+
# @param vatex_note [String, nil] VAT exemption reason text (BT-120). An exemption reason (vatex or vatex_note) is
|
|
415
498
|
#
|
|
416
499
|
# @param vendor_address [String, nil] The address of the vendor/seller
|
|
417
500
|
#
|
|
418
|
-
# @param vendor_address_recipient [String, nil] The recipient name at the vendor address
|
|
501
|
+
# @param vendor_address_recipient [String, nil] The recipient name at the vendor address. Also the vendor contact name (BT-41) i
|
|
419
502
|
#
|
|
420
503
|
# @param vendor_company_id [String, nil] Vendor company ID. For Belgium this is the CBE number or their EUID (European Un
|
|
421
504
|
#
|
|
@@ -423,6 +506,8 @@ module EInvoiceAPI
|
|
|
423
506
|
#
|
|
424
507
|
# @param vendor_name [String, nil] The name of the vendor/seller/supplier
|
|
425
508
|
#
|
|
509
|
+
# @param vendor_phone [String, nil] The telephone number of the vendor contact (BT-42). Required when vendor and cus
|
|
510
|
+
#
|
|
426
511
|
# @param vendor_tax_id [String, nil] Vendor tax ID. For Belgium this is the VAT number. Must include the country pref
|
|
427
512
|
|
|
428
513
|
class Allowance < EInvoiceAPI::Internal::Type::BaseModel
|
|
@@ -844,11 +929,15 @@ module EInvoiceAPI
|
|
|
844
929
|
|
|
845
930
|
# @!attribute date
|
|
846
931
|
#
|
|
847
|
-
# @return [nil]
|
|
848
|
-
optional :date,
|
|
932
|
+
# @return [Date, nil]
|
|
933
|
+
optional :date, Date, nil?: true
|
|
849
934
|
|
|
850
935
|
# @!attribute description
|
|
851
|
-
# The description of the line item.
|
|
936
|
+
# The description of the line item (BT-154). Doubles as the item name when `name`
|
|
937
|
+
# is omitted, so a posted line item needs a `name` or a `description`. On a
|
|
938
|
+
# received document it holds the item description, or the item name (BT-153) when
|
|
939
|
+
# the document has no item description; CII documents with both combine them as
|
|
940
|
+
# `name: description`.
|
|
852
941
|
#
|
|
853
942
|
# @return [String, nil]
|
|
854
943
|
optional :description, String, nil?: true
|
|
@@ -863,6 +952,23 @@ module EInvoiceAPI
|
|
|
863
952
|
},
|
|
864
953
|
nil?: true
|
|
865
954
|
|
|
955
|
+
# @!attribute name
|
|
956
|
+
# The item name (BT-153), for example the product name. Written to
|
|
957
|
+
# cac:Item/cbc:Name. When omitted or blank, `description` (BT-154) is used as the
|
|
958
|
+
# item name. A posted line item needs a `name` or a `description`; a line item
|
|
959
|
+
# with neither is rejected with 422.
|
|
960
|
+
#
|
|
961
|
+
# @return [String, nil]
|
|
962
|
+
optional :name, String, nil?: true
|
|
963
|
+
|
|
964
|
+
# @!attribute price_base_quantity
|
|
965
|
+
# The item price base quantity (BT-149). The number of item units to which the
|
|
966
|
+
# unit price applies, for example 100 when the unit price is a price for each 100
|
|
967
|
+
# units. Must be greater than 0. Defaults to 1.
|
|
968
|
+
#
|
|
969
|
+
# @return [String, nil]
|
|
970
|
+
optional :price_base_quantity, String
|
|
971
|
+
|
|
866
972
|
# @!attribute product_code
|
|
867
973
|
# The product code of the line item.
|
|
868
974
|
#
|
|
@@ -903,7 +1009,7 @@ module EInvoiceAPI
|
|
|
903
1009
|
# @return [String, nil]
|
|
904
1010
|
optional :unit_price, String, nil?: true
|
|
905
1011
|
|
|
906
|
-
# @!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)
|
|
1012
|
+
# @!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)
|
|
907
1013
|
# Some parameter documentations has been truncated, see
|
|
908
1014
|
# {EInvoiceAPI::Models::DocumentResponse::Item} for more details.
|
|
909
1015
|
#
|
|
@@ -913,12 +1019,16 @@ module EInvoiceAPI
|
|
|
913
1019
|
#
|
|
914
1020
|
# @param charges [Array<EInvoiceAPI::Models::Charge>, nil] The charges of the line item.
|
|
915
1021
|
#
|
|
916
|
-
# @param date [nil]
|
|
1022
|
+
# @param date [Date, nil]
|
|
917
1023
|
#
|
|
918
|
-
# @param description [String, nil] The description of the line item.
|
|
1024
|
+
# @param description [String, nil] The description of the line item (BT-154). Doubles as the item name when `name`
|
|
919
1025
|
#
|
|
920
1026
|
# @param item_attributes [Array<EInvoiceAPI::Models::DocumentResponse::Item::ItemAttribute>, nil] Item-level attributes (BG-32) from cac:AdditionalItemProperty.
|
|
921
1027
|
#
|
|
1028
|
+
# @param name [String, nil] The item name (BT-153), for example the product name. Written to cac:Item/cbc:Na
|
|
1029
|
+
#
|
|
1030
|
+
# @param price_base_quantity [String] The item price base quantity (BT-149). The number of item units to which the uni
|
|
1031
|
+
#
|
|
922
1032
|
# @param product_code [String, nil] The product code of the line item.
|
|
923
1033
|
#
|
|
924
1034
|
# @param quantity [String, nil] The quantity of items (goods or services) that is the subject of the line item.
|
|
@@ -956,7 +1066,9 @@ module EInvoiceAPI
|
|
|
956
1066
|
|
|
957
1067
|
class PaymentDetail < EInvoiceAPI::Internal::Type::BaseModel
|
|
958
1068
|
# @!attribute bank_account_number
|
|
959
|
-
# Bank account number (for non-IBAN accounts)
|
|
1069
|
+
# Bank account number (for non-IBAN accounts). With `swift` `SE:BANKGIRO` or
|
|
1070
|
+
# `SE:PLUSGIRO`, the bankgiro or plusgiro number, with `iban` left empty; spaces
|
|
1071
|
+
# and hyphens are removed.
|
|
960
1072
|
#
|
|
961
1073
|
# @return [String, nil]
|
|
962
1074
|
optional :bank_account_number, String, nil?: true
|
|
@@ -975,7 +1087,9 @@ module EInvoiceAPI
|
|
|
975
1087
|
optional :payment_reference, String, nil?: true
|
|
976
1088
|
|
|
977
1089
|
# @!attribute swift
|
|
978
|
-
#
|
|
1090
|
+
# The payment service provider identifier (BT-86): the BIC of the payee's bank, or
|
|
1091
|
+
# `SE:BANKGIRO` / `SE:PLUSGIRO` when `bank_account_number` is a Swedish bankgiro
|
|
1092
|
+
# or plusgiro number.
|
|
979
1093
|
#
|
|
980
1094
|
# @return [String, nil]
|
|
981
1095
|
optional :swift, String, nil?: true
|
|
@@ -984,13 +1098,13 @@ module EInvoiceAPI
|
|
|
984
1098
|
# Some parameter documentations has been truncated, see
|
|
985
1099
|
# {EInvoiceAPI::Models::DocumentResponse::PaymentDetail} for more details.
|
|
986
1100
|
#
|
|
987
|
-
# @param bank_account_number [String, nil] Bank account number (for non-IBAN accounts)
|
|
1101
|
+
# @param bank_account_number [String, nil] Bank account number (for non-IBAN accounts). With `swift` `SE:BANKGIRO` or
|
|
988
1102
|
#
|
|
989
1103
|
# @param iban [String, nil] International Bank Account Number for payment transfers
|
|
990
1104
|
#
|
|
991
1105
|
# @param payment_reference [String, nil] Structured payment reference or communication (e.g., structured communication fo
|
|
992
1106
|
#
|
|
993
|
-
# @param swift [String, nil]
|
|
1107
|
+
# @param swift [String, nil] The payment service provider identifier (BT-86): the BIC of the payee's bank, or
|
|
994
1108
|
end
|
|
995
1109
|
|
|
996
1110
|
# Tax category code of the invoice (e.g., S for standard rate, Z for zero rate, E
|
|
@@ -1061,6 +1175,7 @@ module EInvoiceAPI
|
|
|
1061
1175
|
VATEX_EU_132_1_O = :"VATEX-EU-132-1O"
|
|
1062
1176
|
VATEX_EU_132_1_P = :"VATEX-EU-132-1P"
|
|
1063
1177
|
VATEX_EU_132_1_Q = :"VATEX-EU-132-1Q"
|
|
1178
|
+
VATEX_EU_135_1 = :"VATEX-EU-135-1"
|
|
1064
1179
|
VATEX_EU_143 = :"VATEX-EU-143"
|
|
1065
1180
|
VATEX_EU_143_1_A = :"VATEX-EU-143-1A"
|
|
1066
1181
|
VATEX_EU_143_1_B = :"VATEX-EU-143-1B"
|
|
@@ -1092,6 +1207,7 @@ module EInvoiceAPI
|
|
|
1092
1207
|
VATEX_EU_151_1_C = :"VATEX-EU-151-1C"
|
|
1093
1208
|
VATEX_EU_151_1_D = :"VATEX-EU-151-1D"
|
|
1094
1209
|
VATEX_EU_151_1_E = :"VATEX-EU-151-1E"
|
|
1210
|
+
VATEX_EU_153 = :"VATEX-EU-153"
|
|
1095
1211
|
VATEX_EU_159 = :"VATEX-EU-159"
|
|
1096
1212
|
VATEX_EU_309 = :"VATEX-EU-309"
|
|
1097
1213
|
VATEX_EU_AE = :"VATEX-EU-AE"
|
|
@@ -1102,6 +1218,30 @@ module EInvoiceAPI
|
|
|
1102
1218
|
VATEX_EU_IC = :"VATEX-EU-IC"
|
|
1103
1219
|
VATEX_EU_O = :"VATEX-EU-O"
|
|
1104
1220
|
VATEX_EU_J = :"VATEX-EU-J"
|
|
1221
|
+
VATEX_FR_298_SEXDECIESA = :"VATEX-FR-298SEXDECIESA"
|
|
1222
|
+
VATEX_FR_AE = :"VATEX-FR-AE"
|
|
1223
|
+
VATEX_FR_CGI261_1 = :"VATEX-FR-CGI261-1"
|
|
1224
|
+
VATEX_FR_CGI261_2 = :"VATEX-FR-CGI261-2"
|
|
1225
|
+
VATEX_FR_CGI261_3 = :"VATEX-FR-CGI261-3"
|
|
1226
|
+
VATEX_FR_CGI261_4 = :"VATEX-FR-CGI261-4"
|
|
1227
|
+
VATEX_FR_CGI261_5 = :"VATEX-FR-CGI261-5"
|
|
1228
|
+
VATEX_FR_CGI261_7 = :"VATEX-FR-CGI261-7"
|
|
1229
|
+
VATEX_FR_CGI261_8 = :"VATEX-FR-CGI261-8"
|
|
1230
|
+
VATEX_FR_CGI261A = :"VATEX-FR-CGI261A"
|
|
1231
|
+
VATEX_FR_CGI261B = :"VATEX-FR-CGI261B"
|
|
1232
|
+
VATEX_FR_CGI261C_1 = :"VATEX-FR-CGI261C-1"
|
|
1233
|
+
VATEX_FR_CGI261C_2 = :"VATEX-FR-CGI261C-2"
|
|
1234
|
+
VATEX_FR_CGI261C_3 = :"VATEX-FR-CGI261C-3"
|
|
1235
|
+
VATEX_FR_CGI261D_1 = :"VATEX-FR-CGI261D-1"
|
|
1236
|
+
VATEX_FR_CGI261D_1_BIS = :"VATEX-FR-CGI261D-1BIS"
|
|
1237
|
+
VATEX_FR_CGI261D_2 = :"VATEX-FR-CGI261D-2"
|
|
1238
|
+
VATEX_FR_CGI261D_3 = :"VATEX-FR-CGI261D-3"
|
|
1239
|
+
VATEX_FR_CGI261D_4 = :"VATEX-FR-CGI261D-4"
|
|
1240
|
+
VATEX_FR_CGI261E_1 = :"VATEX-FR-CGI261E-1"
|
|
1241
|
+
VATEX_FR_CGI261E_2 = :"VATEX-FR-CGI261E-2"
|
|
1242
|
+
VATEX_FR_CGI275 = :"VATEX-FR-CGI275"
|
|
1243
|
+
VATEX_FR_CGI277A = :"VATEX-FR-CGI277A"
|
|
1244
|
+
VATEX_FR_CGI295 = :"VATEX-FR-CGI295"
|
|
1105
1245
|
VATEX_FR_FRANCHISE = :"VATEX-FR-FRANCHISE"
|
|
1106
1246
|
VATEX_FR_CNWVAT = :"VATEX-FR-CNWVAT"
|
|
1107
1247
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module EInvoiceAPI
|
|
4
|
+
module Models
|
|
5
|
+
# @see EInvoiceAPI::Resources::Documents#timeline
|
|
6
|
+
class DocumentTimelineParams < EInvoiceAPI::Internal::Type::BaseModel
|
|
7
|
+
extend EInvoiceAPI::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include EInvoiceAPI::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute document_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :document_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(document_id:, request_options: {})
|
|
16
|
+
# @param document_id [String]
|
|
17
|
+
# @param request_options [EInvoiceAPI::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module EInvoiceAPI
|
|
4
|
+
module Models
|
|
5
|
+
# @see EInvoiceAPI::Resources::Documents#timeline
|
|
6
|
+
class DocumentTimelineResponse < EInvoiceAPI::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute document_id
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :document_id, String
|
|
11
|
+
|
|
12
|
+
# @!attribute events
|
|
13
|
+
#
|
|
14
|
+
# @return [Array<EInvoiceAPI::Models::DocumentTimelineResponse::Event>]
|
|
15
|
+
required :events,
|
|
16
|
+
-> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::Models::DocumentTimelineResponse::Event] }
|
|
17
|
+
|
|
18
|
+
# @!method initialize(document_id:, events:)
|
|
19
|
+
# @param document_id [String]
|
|
20
|
+
# @param events [Array<EInvoiceAPI::Models::DocumentTimelineResponse::Event>]
|
|
21
|
+
|
|
22
|
+
class Event < EInvoiceAPI::Internal::Type::BaseModel
|
|
23
|
+
# @!attribute event_type
|
|
24
|
+
#
|
|
25
|
+
# @return [Symbol, EInvoiceAPI::Models::DocumentTimelineResponse::Event::EventType]
|
|
26
|
+
required :event_type, enum: -> { EInvoiceAPI::Models::DocumentTimelineResponse::Event::EventType }
|
|
27
|
+
|
|
28
|
+
# @!attribute timestamp
|
|
29
|
+
#
|
|
30
|
+
# @return [Time]
|
|
31
|
+
required :timestamp, Time
|
|
32
|
+
|
|
33
|
+
# @!attribute id
|
|
34
|
+
#
|
|
35
|
+
# @return [String, nil]
|
|
36
|
+
optional :id, String, nil?: true
|
|
37
|
+
|
|
38
|
+
# @!attribute details
|
|
39
|
+
#
|
|
40
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
41
|
+
optional :details,
|
|
42
|
+
EInvoiceAPI::Internal::Type::HashOf[EInvoiceAPI::Internal::Type::Unknown],
|
|
43
|
+
nil?: true
|
|
44
|
+
|
|
45
|
+
# @!method initialize(event_type:, timestamp:, id: nil, details: nil)
|
|
46
|
+
# @param event_type [Symbol, EInvoiceAPI::Models::DocumentTimelineResponse::Event::EventType]
|
|
47
|
+
# @param timestamp [Time]
|
|
48
|
+
# @param id [String, nil]
|
|
49
|
+
# @param details [Hash{Symbol=>Object}, nil]
|
|
50
|
+
|
|
51
|
+
# @see EInvoiceAPI::Models::DocumentTimelineResponse::Event#event_type
|
|
52
|
+
module EventType
|
|
53
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
54
|
+
|
|
55
|
+
EMAIL_RECEIVED = :email_received
|
|
56
|
+
EMAIL_PROCESSED = :email_processed
|
|
57
|
+
DOCUMENT_CREATED = :document_created
|
|
58
|
+
SEND_ATTEMPTED = :send_attempted
|
|
59
|
+
SEND_FAILED = :send_failed
|
|
60
|
+
SEND_SUCCESS = :send_success
|
|
61
|
+
RECEIVE_SUCCESS = :receive_success
|
|
62
|
+
MLR_RECEIVED = :mlr_received
|
|
63
|
+
IMR_RECEIVED = :imr_received
|
|
64
|
+
|
|
65
|
+
# @!method self.values
|
|
66
|
+
# @return [Array<Symbol>]
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module EInvoiceAPI
|
|
4
|
+
module Models
|
|
5
|
+
# @see EInvoiceAPI::Resources::Drafts#list
|
|
6
|
+
class DraftListParams < EInvoiceAPI::Internal::Type::BaseModel
|
|
7
|
+
extend EInvoiceAPI::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include EInvoiceAPI::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute date_from
|
|
11
|
+
# Filter by issue date (from)
|
|
12
|
+
#
|
|
13
|
+
# @return [Time, nil]
|
|
14
|
+
optional :date_from, Time, nil?: true
|
|
15
|
+
|
|
16
|
+
# @!attribute date_to
|
|
17
|
+
# Filter by issue date (to)
|
|
18
|
+
#
|
|
19
|
+
# @return [Time, nil]
|
|
20
|
+
optional :date_to, Time, nil?: true
|
|
21
|
+
|
|
22
|
+
# @!attribute page
|
|
23
|
+
# Page number
|
|
24
|
+
#
|
|
25
|
+
# @return [Integer, nil]
|
|
26
|
+
optional :page, Integer
|
|
27
|
+
|
|
28
|
+
# @!attribute page_size
|
|
29
|
+
# Number of items per page
|
|
30
|
+
#
|
|
31
|
+
# @return [Integer, nil]
|
|
32
|
+
optional :page_size, Integer
|
|
33
|
+
|
|
34
|
+
# @!attribute search
|
|
35
|
+
# Search in invoice number, seller/buyer names
|
|
36
|
+
#
|
|
37
|
+
# @return [String, nil]
|
|
38
|
+
optional :search, String, nil?: true
|
|
39
|
+
|
|
40
|
+
# @!attribute sort_by
|
|
41
|
+
# Field to sort by
|
|
42
|
+
#
|
|
43
|
+
# @return [Symbol, EInvoiceAPI::Models::DraftListParams::SortBy, nil]
|
|
44
|
+
optional :sort_by, enum: -> { EInvoiceAPI::DraftListParams::SortBy }
|
|
45
|
+
|
|
46
|
+
# @!attribute sort_order
|
|
47
|
+
# Sort direction (asc/desc)
|
|
48
|
+
#
|
|
49
|
+
# @return [Symbol, EInvoiceAPI::Models::DraftListParams::SortOrder, nil]
|
|
50
|
+
optional :sort_order, enum: -> { EInvoiceAPI::DraftListParams::SortOrder }
|
|
51
|
+
|
|
52
|
+
# @!attribute state
|
|
53
|
+
# Filter by document state. By default return all states (DRAFT, TRANSIT, FAILED).
|
|
54
|
+
#
|
|
55
|
+
# @return [Symbol, EInvoiceAPI::Models::DocumentState, nil]
|
|
56
|
+
optional :state, enum: -> { EInvoiceAPI::DocumentState }, nil?: true
|
|
57
|
+
|
|
58
|
+
# @!attribute type
|
|
59
|
+
# Filter by document type
|
|
60
|
+
#
|
|
61
|
+
# @return [Symbol, EInvoiceAPI::Models::DocumentType, nil]
|
|
62
|
+
optional :type, enum: -> { EInvoiceAPI::DocumentType }, nil?: true
|
|
63
|
+
|
|
64
|
+
# @!method initialize(date_from: nil, date_to: nil, page: nil, page_size: nil, search: nil, sort_by: nil, sort_order: nil, state: nil, type: nil, request_options: {})
|
|
65
|
+
# @param date_from [Time, nil] Filter by issue date (from)
|
|
66
|
+
#
|
|
67
|
+
# @param date_to [Time, nil] Filter by issue date (to)
|
|
68
|
+
#
|
|
69
|
+
# @param page [Integer] Page number
|
|
70
|
+
#
|
|
71
|
+
# @param page_size [Integer] Number of items per page
|
|
72
|
+
#
|
|
73
|
+
# @param search [String, nil] Search in invoice number, seller/buyer names
|
|
74
|
+
#
|
|
75
|
+
# @param sort_by [Symbol, EInvoiceAPI::Models::DraftListParams::SortBy] Field to sort by
|
|
76
|
+
#
|
|
77
|
+
# @param sort_order [Symbol, EInvoiceAPI::Models::DraftListParams::SortOrder] Sort direction (asc/desc)
|
|
78
|
+
#
|
|
79
|
+
# @param state [Symbol, EInvoiceAPI::Models::DocumentState, nil] Filter by document state. By default return all states (DRAFT, TRANSIT, FAILED).
|
|
80
|
+
#
|
|
81
|
+
# @param type [Symbol, EInvoiceAPI::Models::DocumentType, nil] Filter by document type
|
|
82
|
+
#
|
|
83
|
+
# @param request_options [EInvoiceAPI::RequestOptions, Hash{Symbol=>Object}]
|
|
84
|
+
|
|
85
|
+
# Field to sort by
|
|
86
|
+
module SortBy
|
|
87
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
88
|
+
|
|
89
|
+
CREATED_AT = :created_at
|
|
90
|
+
INVOICE_DATE = :invoice_date
|
|
91
|
+
DUE_DATE = :due_date
|
|
92
|
+
INVOICE_TOTAL = :invoice_total
|
|
93
|
+
CUSTOMER_NAME = :customer_name
|
|
94
|
+
VENDOR_NAME = :vendor_name
|
|
95
|
+
INVOICE_ID = :invoice_id
|
|
96
|
+
|
|
97
|
+
# @!method self.values
|
|
98
|
+
# @return [Array<Symbol>]
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Sort direction (asc/desc)
|
|
102
|
+
module SortOrder
|
|
103
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
104
|
+
|
|
105
|
+
ASC = :asc
|
|
106
|
+
DESC = :desc
|
|
107
|
+
|
|
108
|
+
# @!method self.values
|
|
109
|
+
# @return [Array<Symbol>]
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
end
|