e-invoice-api 0.32.0 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -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
|
@@ -36,6 +36,11 @@ module EInvoiceAPI
|
|
|
36
36
|
sig { returns(T.nilable(String)) }
|
|
37
37
|
attr_accessor :billing_address_recipient
|
|
38
38
|
|
|
39
|
+
# The buyer reference (BT-10), e.g. a cost centre or accounting reference
|
|
40
|
+
# requested by the buyer
|
|
41
|
+
sig { returns(T.nilable(String)) }
|
|
42
|
+
attr_accessor :buyer_reference
|
|
43
|
+
|
|
39
44
|
sig do
|
|
40
45
|
returns(T.nilable(T::Array[EInvoiceAPI::DocumentResponse::Charge]))
|
|
41
46
|
end
|
|
@@ -77,6 +82,10 @@ module EInvoiceAPI
|
|
|
77
82
|
sig { returns(T.nilable(String)) }
|
|
78
83
|
attr_accessor :customer_peppol_id
|
|
79
84
|
|
|
85
|
+
# The telephone number of the customer contact (BT-57)
|
|
86
|
+
sig { returns(T.nilable(String)) }
|
|
87
|
+
attr_accessor :customer_phone
|
|
88
|
+
|
|
80
89
|
# Customer tax ID. For Belgium this is the VAT number. Must include the country
|
|
81
90
|
# prefix
|
|
82
91
|
sig { returns(T.nilable(String)) }
|
|
@@ -131,6 +140,15 @@ module EInvoiceAPI
|
|
|
131
140
|
sig { returns(T.nilable(String)) }
|
|
132
141
|
attr_accessor :payment_term
|
|
133
142
|
|
|
143
|
+
# The preceding invoice issue date (BT-26)
|
|
144
|
+
sig { returns(T.nilable(Date)) }
|
|
145
|
+
attr_accessor :preceding_invoice_date
|
|
146
|
+
|
|
147
|
+
# The preceding invoice reference (BT-25): the number of the invoice this document
|
|
148
|
+
# corrects, for example the invoice a credit note credits
|
|
149
|
+
sig { returns(T.nilable(String)) }
|
|
150
|
+
attr_accessor :preceding_invoice_id
|
|
151
|
+
|
|
134
152
|
# The purchase order reference number
|
|
135
153
|
sig { returns(T.nilable(String)) }
|
|
136
154
|
attr_accessor :purchase_order
|
|
@@ -143,6 +161,17 @@ module EInvoiceAPI
|
|
|
143
161
|
sig { returns(T.nilable(String)) }
|
|
144
162
|
attr_accessor :remittance_address_recipient
|
|
145
163
|
|
|
164
|
+
# The amount added to the invoice total to round the amount for payment (BT-114),
|
|
165
|
+
# for example to whole kronor (amount_due = invoice_total + rounding_amount when
|
|
166
|
+
# nothing is prepaid). Can be negative. Between -5.00 and 5.00, rounded to maximum
|
|
167
|
+
# 2 decimals
|
|
168
|
+
sig { returns(T.nilable(String)) }
|
|
169
|
+
attr_accessor :rounding_amount
|
|
170
|
+
|
|
171
|
+
# The sales order reference (BT-14) assigned by the seller
|
|
172
|
+
sig { returns(T.nilable(String)) }
|
|
173
|
+
attr_accessor :sales_order
|
|
174
|
+
|
|
146
175
|
# The address where services were performed or goods were delivered
|
|
147
176
|
sig { returns(T.nilable(String)) }
|
|
148
177
|
attr_accessor :service_address
|
|
@@ -192,6 +221,12 @@ module EInvoiceAPI
|
|
|
192
221
|
end
|
|
193
222
|
attr_writer :tax_code
|
|
194
223
|
|
|
224
|
+
# The VAT accounting currency (BT-6, ISO 4217 currency code), when VAT is
|
|
225
|
+
# accounted in a currency other than the invoice currency. Must differ from
|
|
226
|
+
# currency and requires total_tax_in_tax_currency
|
|
227
|
+
sig { returns(T.nilable(String)) }
|
|
228
|
+
attr_accessor :tax_currency
|
|
229
|
+
|
|
195
230
|
sig do
|
|
196
231
|
returns(T.nilable(T::Array[EInvoiceAPI::DocumentResponse::TaxDetail]))
|
|
197
232
|
end
|
|
@@ -208,6 +243,11 @@ module EInvoiceAPI
|
|
|
208
243
|
sig { returns(T.nilable(String)) }
|
|
209
244
|
attr_accessor :total_tax
|
|
210
245
|
|
|
246
|
+
# The total VAT amount in the VAT accounting currency tax_currency (BT-111). Does
|
|
247
|
+
# not add to invoice_total. Requires tax_currency. Rounded to maximum 2 decimals
|
|
248
|
+
sig { returns(T.nilable(String)) }
|
|
249
|
+
attr_accessor :total_tax_in_tax_currency
|
|
250
|
+
|
|
211
251
|
# VATEX code list for VAT exemption reasons
|
|
212
252
|
#
|
|
213
253
|
# Agency: CEF Identifier: vatex
|
|
@@ -241,6 +281,12 @@ module EInvoiceAPI
|
|
|
241
281
|
sig { returns(T.nilable(String)) }
|
|
242
282
|
attr_accessor :vendor_name
|
|
243
283
|
|
|
284
|
+
# The telephone number of the vendor contact (BT-42). Required when vendor and
|
|
285
|
+
# customer are both in Germany (DE-R-006); it must then hold at least 3 digits
|
|
286
|
+
# (DE-R-027, a warning).
|
|
287
|
+
sig { returns(T.nilable(String)) }
|
|
288
|
+
attr_accessor :vendor_phone
|
|
289
|
+
|
|
244
290
|
# Vendor tax ID. For Belgium this is the VAT number. Must include the country
|
|
245
291
|
# prefix
|
|
246
292
|
sig { returns(T.nilable(String)) }
|
|
@@ -261,6 +307,7 @@ module EInvoiceAPI
|
|
|
261
307
|
),
|
|
262
308
|
billing_address: T.nilable(String),
|
|
263
309
|
billing_address_recipient: T.nilable(String),
|
|
310
|
+
buyer_reference: T.nilable(String),
|
|
264
311
|
charges:
|
|
265
312
|
T.nilable(T::Array[EInvoiceAPI::DocumentResponse::Charge::OrHash]),
|
|
266
313
|
currency: EInvoiceAPI::CurrencyCode::OrSymbol,
|
|
@@ -271,6 +318,7 @@ module EInvoiceAPI
|
|
|
271
318
|
customer_id: T.nilable(String),
|
|
272
319
|
customer_name: T.nilable(String),
|
|
273
320
|
customer_peppol_id: T.nilable(String),
|
|
321
|
+
customer_phone: T.nilable(String),
|
|
274
322
|
customer_tax_id: T.nilable(String),
|
|
275
323
|
direction: EInvoiceAPI::DocumentDirection::OrSymbol,
|
|
276
324
|
document_type: EInvoiceAPI::DocumentType::OrSymbol,
|
|
@@ -286,9 +334,13 @@ module EInvoiceAPI
|
|
|
286
334
|
T::Array[EInvoiceAPI::DocumentResponse::PaymentDetail::OrHash]
|
|
287
335
|
),
|
|
288
336
|
payment_term: T.nilable(String),
|
|
337
|
+
preceding_invoice_date: T.nilable(Date),
|
|
338
|
+
preceding_invoice_id: T.nilable(String),
|
|
289
339
|
purchase_order: T.nilable(String),
|
|
290
340
|
remittance_address: T.nilable(String),
|
|
291
341
|
remittance_address_recipient: T.nilable(String),
|
|
342
|
+
rounding_amount: T.nilable(String),
|
|
343
|
+
sales_order: T.nilable(String),
|
|
292
344
|
service_address: T.nilable(String),
|
|
293
345
|
service_address_recipient: T.nilable(String),
|
|
294
346
|
service_end_date: T.nilable(Date),
|
|
@@ -298,12 +350,14 @@ module EInvoiceAPI
|
|
|
298
350
|
state: EInvoiceAPI::DocumentState::OrSymbol,
|
|
299
351
|
subtotal: T.nilable(String),
|
|
300
352
|
tax_code: EInvoiceAPI::DocumentResponse::TaxCode::OrSymbol,
|
|
353
|
+
tax_currency: T.nilable(String),
|
|
301
354
|
tax_details:
|
|
302
355
|
T.nilable(
|
|
303
356
|
T::Array[EInvoiceAPI::DocumentResponse::TaxDetail::OrHash]
|
|
304
357
|
),
|
|
305
358
|
total_discount: T.nilable(String),
|
|
306
359
|
total_tax: T.nilable(String),
|
|
360
|
+
total_tax_in_tax_currency: T.nilable(String),
|
|
307
361
|
vatex: T.nilable(EInvoiceAPI::DocumentResponse::Vatex::OrSymbol),
|
|
308
362
|
vatex_note: T.nilable(String),
|
|
309
363
|
vendor_address: T.nilable(String),
|
|
@@ -311,6 +365,7 @@ module EInvoiceAPI
|
|
|
311
365
|
vendor_company_id: T.nilable(String),
|
|
312
366
|
vendor_email: T.nilable(String),
|
|
313
367
|
vendor_name: T.nilable(String),
|
|
368
|
+
vendor_phone: T.nilable(String),
|
|
314
369
|
vendor_tax_id: T.nilable(String)
|
|
315
370
|
).returns(T.attached_class)
|
|
316
371
|
end
|
|
@@ -325,6 +380,9 @@ module EInvoiceAPI
|
|
|
325
380
|
billing_address: nil,
|
|
326
381
|
# The recipient name at the billing address
|
|
327
382
|
billing_address_recipient: nil,
|
|
383
|
+
# The buyer reference (BT-10), e.g. a cost centre or accounting reference
|
|
384
|
+
# requested by the buyer
|
|
385
|
+
buyer_reference: nil,
|
|
328
386
|
charges: nil,
|
|
329
387
|
# Currency of the invoice (ISO 4217 currency code)
|
|
330
388
|
currency: nil,
|
|
@@ -343,6 +401,8 @@ module EInvoiceAPI
|
|
|
343
401
|
customer_name: nil,
|
|
344
402
|
# Customer Peppol ID
|
|
345
403
|
customer_peppol_id: nil,
|
|
404
|
+
# The telephone number of the customer contact (BT-57)
|
|
405
|
+
customer_phone: nil,
|
|
346
406
|
# Customer tax ID. For Belgium this is the VAT number. Must include the country
|
|
347
407
|
# prefix
|
|
348
408
|
customer_tax_id: nil,
|
|
@@ -365,12 +425,24 @@ module EInvoiceAPI
|
|
|
365
425
|
payment_details: nil,
|
|
366
426
|
# The payment terms (e.g., 'Net 30', 'Due on receipt', '2/10 Net 30')
|
|
367
427
|
payment_term: nil,
|
|
428
|
+
# The preceding invoice issue date (BT-26)
|
|
429
|
+
preceding_invoice_date: nil,
|
|
430
|
+
# The preceding invoice reference (BT-25): the number of the invoice this document
|
|
431
|
+
# corrects, for example the invoice a credit note credits
|
|
432
|
+
preceding_invoice_id: nil,
|
|
368
433
|
# The purchase order reference number
|
|
369
434
|
purchase_order: nil,
|
|
370
435
|
# The address where payment should be sent or remitted to
|
|
371
436
|
remittance_address: nil,
|
|
372
437
|
# The recipient name at the remittance address
|
|
373
438
|
remittance_address_recipient: nil,
|
|
439
|
+
# The amount added to the invoice total to round the amount for payment (BT-114),
|
|
440
|
+
# for example to whole kronor (amount_due = invoice_total + rounding_amount when
|
|
441
|
+
# nothing is prepaid). Can be negative. Between -5.00 and 5.00, rounded to maximum
|
|
442
|
+
# 2 decimals
|
|
443
|
+
rounding_amount: nil,
|
|
444
|
+
# The sales order reference (BT-14) assigned by the seller
|
|
445
|
+
sales_order: nil,
|
|
374
446
|
# The address where services were performed or goods were delivered
|
|
375
447
|
service_address: nil,
|
|
376
448
|
# The recipient name at the service address
|
|
@@ -392,6 +464,10 @@ module EInvoiceAPI
|
|
|
392
464
|
# Tax category code of the invoice (e.g., S for standard rate, Z for zero rate, E
|
|
393
465
|
# for exempt)
|
|
394
466
|
tax_code: nil,
|
|
467
|
+
# The VAT accounting currency (BT-6, ISO 4217 currency code), when VAT is
|
|
468
|
+
# accounted in a currency other than the invoice currency. Must differ from
|
|
469
|
+
# currency and requires total_tax_in_tax_currency
|
|
470
|
+
tax_currency: nil,
|
|
395
471
|
tax_details: nil,
|
|
396
472
|
# The net financial discount/charge of the invoice (non-VAT charges minus non-VAT
|
|
397
473
|
# allowances). Can be positive (net charge), negative (net discount), or zero.
|
|
@@ -400,6 +476,9 @@ module EInvoiceAPI
|
|
|
400
476
|
# The total tax amount of the invoice. Must be positive and rounded to maximum 2
|
|
401
477
|
# decimals
|
|
402
478
|
total_tax: nil,
|
|
479
|
+
# The total VAT amount in the VAT accounting currency tax_currency (BT-111). Does
|
|
480
|
+
# not add to invoice_total. Requires tax_currency. Rounded to maximum 2 decimals
|
|
481
|
+
total_tax_in_tax_currency: nil,
|
|
403
482
|
# VATEX code list for VAT exemption reasons
|
|
404
483
|
#
|
|
405
484
|
# Agency: CEF Identifier: vatex
|
|
@@ -417,6 +496,10 @@ module EInvoiceAPI
|
|
|
417
496
|
vendor_email: nil,
|
|
418
497
|
# The name of the vendor/seller/supplier
|
|
419
498
|
vendor_name: nil,
|
|
499
|
+
# The telephone number of the vendor contact (BT-42). Required when vendor and
|
|
500
|
+
# customer are both in Germany (DE-R-006); it must then hold at least 3 digits
|
|
501
|
+
# (DE-R-027, a warning).
|
|
502
|
+
vendor_phone: nil,
|
|
420
503
|
# Vendor tax ID. For Belgium this is the VAT number. Must include the country
|
|
421
504
|
# prefix
|
|
422
505
|
vendor_tax_id: nil
|
|
@@ -435,6 +518,7 @@ module EInvoiceAPI
|
|
|
435
518
|
T.nilable(T::Array[EInvoiceAPI::Documents::DocumentAttachment]),
|
|
436
519
|
billing_address: T.nilable(String),
|
|
437
520
|
billing_address_recipient: T.nilable(String),
|
|
521
|
+
buyer_reference: T.nilable(String),
|
|
438
522
|
charges: T.nilable(T::Array[EInvoiceAPI::DocumentResponse::Charge]),
|
|
439
523
|
currency: EInvoiceAPI::CurrencyCode::TaggedSymbol,
|
|
440
524
|
customer_address: T.nilable(String),
|
|
@@ -444,6 +528,7 @@ module EInvoiceAPI
|
|
|
444
528
|
customer_id: T.nilable(String),
|
|
445
529
|
customer_name: T.nilable(String),
|
|
446
530
|
customer_peppol_id: T.nilable(String),
|
|
531
|
+
customer_phone: T.nilable(String),
|
|
447
532
|
customer_tax_id: T.nilable(String),
|
|
448
533
|
direction: EInvoiceAPI::DocumentDirection::TaggedSymbol,
|
|
449
534
|
document_type: EInvoiceAPI::DocumentType::TaggedSymbol,
|
|
@@ -456,9 +541,13 @@ module EInvoiceAPI
|
|
|
456
541
|
payment_details:
|
|
457
542
|
T.nilable(T::Array[EInvoiceAPI::DocumentResponse::PaymentDetail]),
|
|
458
543
|
payment_term: T.nilable(String),
|
|
544
|
+
preceding_invoice_date: T.nilable(Date),
|
|
545
|
+
preceding_invoice_id: T.nilable(String),
|
|
459
546
|
purchase_order: T.nilable(String),
|
|
460
547
|
remittance_address: T.nilable(String),
|
|
461
548
|
remittance_address_recipient: T.nilable(String),
|
|
549
|
+
rounding_amount: T.nilable(String),
|
|
550
|
+
sales_order: T.nilable(String),
|
|
462
551
|
service_address: T.nilable(String),
|
|
463
552
|
service_address_recipient: T.nilable(String),
|
|
464
553
|
service_end_date: T.nilable(Date),
|
|
@@ -468,10 +557,12 @@ module EInvoiceAPI
|
|
|
468
557
|
state: EInvoiceAPI::DocumentState::TaggedSymbol,
|
|
469
558
|
subtotal: T.nilable(String),
|
|
470
559
|
tax_code: EInvoiceAPI::DocumentResponse::TaxCode::TaggedSymbol,
|
|
560
|
+
tax_currency: T.nilable(String),
|
|
471
561
|
tax_details:
|
|
472
562
|
T.nilable(T::Array[EInvoiceAPI::DocumentResponse::TaxDetail]),
|
|
473
563
|
total_discount: T.nilable(String),
|
|
474
564
|
total_tax: T.nilable(String),
|
|
565
|
+
total_tax_in_tax_currency: T.nilable(String),
|
|
475
566
|
vatex:
|
|
476
567
|
T.nilable(EInvoiceAPI::DocumentResponse::Vatex::TaggedSymbol),
|
|
477
568
|
vatex_note: T.nilable(String),
|
|
@@ -480,6 +571,7 @@ module EInvoiceAPI
|
|
|
480
571
|
vendor_company_id: T.nilable(String),
|
|
481
572
|
vendor_email: T.nilable(String),
|
|
482
573
|
vendor_name: T.nilable(String),
|
|
574
|
+
vendor_phone: T.nilable(String),
|
|
483
575
|
vendor_tax_id: T.nilable(String)
|
|
484
576
|
}
|
|
485
577
|
)
|
|
@@ -1923,7 +2015,7 @@ module EInvoiceAPI
|
|
|
1923
2015
|
sig { returns(T.nilable(T::Array[EInvoiceAPI::Charge])) }
|
|
1924
2016
|
attr_accessor :charges
|
|
1925
2017
|
|
|
1926
|
-
sig { returns(
|
|
2018
|
+
sig { returns(T.nilable(Date)) }
|
|
1927
2019
|
attr_accessor :date
|
|
1928
2020
|
|
|
1929
2021
|
# The description of the line item.
|
|
@@ -1940,6 +2032,22 @@ module EInvoiceAPI
|
|
|
1940
2032
|
end
|
|
1941
2033
|
attr_accessor :item_attributes
|
|
1942
2034
|
|
|
2035
|
+
# The item name (BT-153), for example the product name. Written to
|
|
2036
|
+
# cac:Item/cbc:Name. When omitted or blank, `description` (BT-154) is used as the
|
|
2037
|
+
# item name. A posted line item needs a `name` or a `description`; a line item
|
|
2038
|
+
# with neither is rejected with 422.
|
|
2039
|
+
sig { returns(T.nilable(String)) }
|
|
2040
|
+
attr_accessor :name
|
|
2041
|
+
|
|
2042
|
+
# The item price base quantity (BT-149). The number of item units to which the
|
|
2043
|
+
# unit price applies, for example 100 when the unit price is a price for each 100
|
|
2044
|
+
# units. Must be greater than 0. Defaults to 1.
|
|
2045
|
+
sig { returns(T.nilable(String)) }
|
|
2046
|
+
attr_reader :price_base_quantity
|
|
2047
|
+
|
|
2048
|
+
sig { params(price_base_quantity: String).void }
|
|
2049
|
+
attr_writer :price_base_quantity
|
|
2050
|
+
|
|
1943
2051
|
# The product code of the line item.
|
|
1944
2052
|
sig { returns(T.nilable(String)) }
|
|
1945
2053
|
attr_accessor :product_code
|
|
@@ -1973,7 +2081,7 @@ module EInvoiceAPI
|
|
|
1973
2081
|
allowances: T.nilable(T::Array[EInvoiceAPI::Allowance::OrHash]),
|
|
1974
2082
|
amount: T.nilable(String),
|
|
1975
2083
|
charges: T.nilable(T::Array[EInvoiceAPI::Charge::OrHash]),
|
|
1976
|
-
date:
|
|
2084
|
+
date: T.nilable(Date),
|
|
1977
2085
|
description: T.nilable(String),
|
|
1978
2086
|
item_attributes:
|
|
1979
2087
|
T.nilable(
|
|
@@ -1981,6 +2089,8 @@ module EInvoiceAPI
|
|
|
1981
2089
|
EInvoiceAPI::DocumentResponse::Item::ItemAttribute::OrHash
|
|
1982
2090
|
]
|
|
1983
2091
|
),
|
|
2092
|
+
name: T.nilable(String),
|
|
2093
|
+
price_base_quantity: String,
|
|
1984
2094
|
product_code: T.nilable(String),
|
|
1985
2095
|
quantity: T.nilable(String),
|
|
1986
2096
|
tax: T.nilable(String),
|
|
@@ -2004,6 +2114,15 @@ module EInvoiceAPI
|
|
|
2004
2114
|
description: nil,
|
|
2005
2115
|
# Item-level attributes (BG-32) from cac:AdditionalItemProperty.
|
|
2006
2116
|
item_attributes: nil,
|
|
2117
|
+
# The item name (BT-153), for example the product name. Written to
|
|
2118
|
+
# cac:Item/cbc:Name. When omitted or blank, `description` (BT-154) is used as the
|
|
2119
|
+
# item name. A posted line item needs a `name` or a `description`; a line item
|
|
2120
|
+
# with neither is rejected with 422.
|
|
2121
|
+
name: nil,
|
|
2122
|
+
# The item price base quantity (BT-149). The number of item units to which the
|
|
2123
|
+
# unit price applies, for example 100 when the unit price is a price for each 100
|
|
2124
|
+
# units. Must be greater than 0. Defaults to 1.
|
|
2125
|
+
price_base_quantity: nil,
|
|
2007
2126
|
# The product code of the line item.
|
|
2008
2127
|
product_code: nil,
|
|
2009
2128
|
# The quantity of items (goods or services) that is the subject of the line item.
|
|
@@ -2029,12 +2148,14 @@ module EInvoiceAPI
|
|
|
2029
2148
|
allowances: T.nilable(T::Array[EInvoiceAPI::Allowance]),
|
|
2030
2149
|
amount: T.nilable(String),
|
|
2031
2150
|
charges: T.nilable(T::Array[EInvoiceAPI::Charge]),
|
|
2032
|
-
date:
|
|
2151
|
+
date: T.nilable(Date),
|
|
2033
2152
|
description: T.nilable(String),
|
|
2034
2153
|
item_attributes:
|
|
2035
2154
|
T.nilable(
|
|
2036
2155
|
T::Array[EInvoiceAPI::DocumentResponse::Item::ItemAttribute]
|
|
2037
2156
|
),
|
|
2157
|
+
name: T.nilable(String),
|
|
2158
|
+
price_base_quantity: String,
|
|
2038
2159
|
product_code: T.nilable(String),
|
|
2039
2160
|
quantity: T.nilable(String),
|
|
2040
2161
|
tax: T.nilable(String),
|
|
@@ -2107,7 +2228,9 @@ module EInvoiceAPI
|
|
|
2107
2228
|
sig { returns(T.nilable(String)) }
|
|
2108
2229
|
attr_accessor :payment_reference
|
|
2109
2230
|
|
|
2110
|
-
#
|
|
2231
|
+
# The payment service provider identifier (BT-86): the BIC of the payee's bank, or
|
|
2232
|
+
# `SE:BANKGIRO` / `SE:PLUSGIRO` when `bank_account_number` is a Swedish bankgiro
|
|
2233
|
+
# or plusgiro number.
|
|
2111
2234
|
sig { returns(T.nilable(String)) }
|
|
2112
2235
|
attr_accessor :swift
|
|
2113
2236
|
|
|
@@ -2127,7 +2250,9 @@ module EInvoiceAPI
|
|
|
2127
2250
|
# Structured payment reference or communication (e.g., structured communication
|
|
2128
2251
|
# for Belgian bank transfers)
|
|
2129
2252
|
payment_reference: nil,
|
|
2130
|
-
#
|
|
2253
|
+
# The payment service provider identifier (BT-86): the BIC of the payee's bank, or
|
|
2254
|
+
# `SE:BANKGIRO` / `SE:PLUSGIRO` when `bank_account_number` is a Swedish bankgiro
|
|
2255
|
+
# or plusgiro number.
|
|
2131
2256
|
swift: nil
|
|
2132
2257
|
)
|
|
2133
2258
|
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module EInvoiceAPI
|
|
4
|
+
module Models
|
|
5
|
+
class DocumentTimelineParams < EInvoiceAPI::Internal::Type::BaseModel
|
|
6
|
+
extend EInvoiceAPI::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include EInvoiceAPI::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
EInvoiceAPI::DocumentTimelineParams,
|
|
13
|
+
EInvoiceAPI::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :document_id
|
|
19
|
+
|
|
20
|
+
sig do
|
|
21
|
+
params(
|
|
22
|
+
document_id: String,
|
|
23
|
+
request_options: EInvoiceAPI::RequestOptions::OrHash
|
|
24
|
+
).returns(T.attached_class)
|
|
25
|
+
end
|
|
26
|
+
def self.new(document_id:, request_options: {})
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
sig do
|
|
30
|
+
override.returns(
|
|
31
|
+
{ document_id: String, request_options: EInvoiceAPI::RequestOptions }
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
def to_hash
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module EInvoiceAPI
|
|
4
|
+
module Models
|
|
5
|
+
class DocumentTimelineResponse < EInvoiceAPI::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
EInvoiceAPI::Models::DocumentTimelineResponse,
|
|
10
|
+
EInvoiceAPI::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :document_id
|
|
16
|
+
|
|
17
|
+
sig do
|
|
18
|
+
returns(T::Array[EInvoiceAPI::Models::DocumentTimelineResponse::Event])
|
|
19
|
+
end
|
|
20
|
+
attr_accessor :events
|
|
21
|
+
|
|
22
|
+
sig do
|
|
23
|
+
params(
|
|
24
|
+
document_id: String,
|
|
25
|
+
events:
|
|
26
|
+
T::Array[
|
|
27
|
+
EInvoiceAPI::Models::DocumentTimelineResponse::Event::OrHash
|
|
28
|
+
]
|
|
29
|
+
).returns(T.attached_class)
|
|
30
|
+
end
|
|
31
|
+
def self.new(document_id:, events:)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
sig do
|
|
35
|
+
override.returns(
|
|
36
|
+
{
|
|
37
|
+
document_id: String,
|
|
38
|
+
events:
|
|
39
|
+
T::Array[EInvoiceAPI::Models::DocumentTimelineResponse::Event]
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
end
|
|
43
|
+
def to_hash
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
class Event < EInvoiceAPI::Internal::Type::BaseModel
|
|
47
|
+
OrHash =
|
|
48
|
+
T.type_alias do
|
|
49
|
+
T.any(
|
|
50
|
+
EInvoiceAPI::Models::DocumentTimelineResponse::Event,
|
|
51
|
+
EInvoiceAPI::Internal::AnyHash
|
|
52
|
+
)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
sig do
|
|
56
|
+
returns(
|
|
57
|
+
EInvoiceAPI::Models::DocumentTimelineResponse::Event::EventType::TaggedSymbol
|
|
58
|
+
)
|
|
59
|
+
end
|
|
60
|
+
attr_accessor :event_type
|
|
61
|
+
|
|
62
|
+
sig { returns(Time) }
|
|
63
|
+
attr_accessor :timestamp
|
|
64
|
+
|
|
65
|
+
sig { returns(T.nilable(String)) }
|
|
66
|
+
attr_accessor :id
|
|
67
|
+
|
|
68
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
69
|
+
attr_accessor :details
|
|
70
|
+
|
|
71
|
+
sig do
|
|
72
|
+
params(
|
|
73
|
+
event_type:
|
|
74
|
+
EInvoiceAPI::Models::DocumentTimelineResponse::Event::EventType::OrSymbol,
|
|
75
|
+
timestamp: Time,
|
|
76
|
+
id: T.nilable(String),
|
|
77
|
+
details: T.nilable(T::Hash[Symbol, T.anything])
|
|
78
|
+
).returns(T.attached_class)
|
|
79
|
+
end
|
|
80
|
+
def self.new(event_type:, timestamp:, id: nil, details: nil)
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
sig do
|
|
84
|
+
override.returns(
|
|
85
|
+
{
|
|
86
|
+
event_type:
|
|
87
|
+
EInvoiceAPI::Models::DocumentTimelineResponse::Event::EventType::TaggedSymbol,
|
|
88
|
+
timestamp: Time,
|
|
89
|
+
id: T.nilable(String),
|
|
90
|
+
details: T.nilable(T::Hash[Symbol, T.anything])
|
|
91
|
+
}
|
|
92
|
+
)
|
|
93
|
+
end
|
|
94
|
+
def to_hash
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
module EventType
|
|
98
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
99
|
+
|
|
100
|
+
TaggedSymbol =
|
|
101
|
+
T.type_alias do
|
|
102
|
+
T.all(
|
|
103
|
+
Symbol,
|
|
104
|
+
EInvoiceAPI::Models::DocumentTimelineResponse::Event::EventType
|
|
105
|
+
)
|
|
106
|
+
end
|
|
107
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
108
|
+
|
|
109
|
+
EMAIL_RECEIVED =
|
|
110
|
+
T.let(
|
|
111
|
+
:email_received,
|
|
112
|
+
EInvoiceAPI::Models::DocumentTimelineResponse::Event::EventType::TaggedSymbol
|
|
113
|
+
)
|
|
114
|
+
EMAIL_PROCESSED =
|
|
115
|
+
T.let(
|
|
116
|
+
:email_processed,
|
|
117
|
+
EInvoiceAPI::Models::DocumentTimelineResponse::Event::EventType::TaggedSymbol
|
|
118
|
+
)
|
|
119
|
+
DOCUMENT_CREATED =
|
|
120
|
+
T.let(
|
|
121
|
+
:document_created,
|
|
122
|
+
EInvoiceAPI::Models::DocumentTimelineResponse::Event::EventType::TaggedSymbol
|
|
123
|
+
)
|
|
124
|
+
SEND_ATTEMPTED =
|
|
125
|
+
T.let(
|
|
126
|
+
:send_attempted,
|
|
127
|
+
EInvoiceAPI::Models::DocumentTimelineResponse::Event::EventType::TaggedSymbol
|
|
128
|
+
)
|
|
129
|
+
SEND_FAILED =
|
|
130
|
+
T.let(
|
|
131
|
+
:send_failed,
|
|
132
|
+
EInvoiceAPI::Models::DocumentTimelineResponse::Event::EventType::TaggedSymbol
|
|
133
|
+
)
|
|
134
|
+
SEND_SUCCESS =
|
|
135
|
+
T.let(
|
|
136
|
+
:send_success,
|
|
137
|
+
EInvoiceAPI::Models::DocumentTimelineResponse::Event::EventType::TaggedSymbol
|
|
138
|
+
)
|
|
139
|
+
RECEIVE_SUCCESS =
|
|
140
|
+
T.let(
|
|
141
|
+
:receive_success,
|
|
142
|
+
EInvoiceAPI::Models::DocumentTimelineResponse::Event::EventType::TaggedSymbol
|
|
143
|
+
)
|
|
144
|
+
MLR_RECEIVED =
|
|
145
|
+
T.let(
|
|
146
|
+
:mlr_received,
|
|
147
|
+
EInvoiceAPI::Models::DocumentTimelineResponse::Event::EventType::TaggedSymbol
|
|
148
|
+
)
|
|
149
|
+
IMR_RECEIVED =
|
|
150
|
+
T.let(
|
|
151
|
+
:imr_received,
|
|
152
|
+
EInvoiceAPI::Models::DocumentTimelineResponse::Event::EventType::TaggedSymbol
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
sig do
|
|
156
|
+
override.returns(
|
|
157
|
+
T::Array[
|
|
158
|
+
EInvoiceAPI::Models::DocumentTimelineResponse::Event::EventType::TaggedSymbol
|
|
159
|
+
]
|
|
160
|
+
)
|
|
161
|
+
end
|
|
162
|
+
def self.values
|
|
163
|
+
end
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
end
|
|
168
|
+
end
|