e-invoice-api 0.33.0 → 0.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +1 -1
  4. data/lib/e_invoice_api/client.rb +16 -0
  5. data/lib/e_invoice_api/models/conversion/document_create_from_pdf_task.rb +43 -0
  6. data/lib/e_invoice_api/models/conversion/pdf_create_params.rb +22 -0
  7. data/lib/e_invoice_api/models/conversion/pdf_result_params.rb +22 -0
  8. data/lib/e_invoice_api/models/conversion/pdf_retrieve_params.rb +22 -0
  9. data/lib/e_invoice_api/models/document_create.rb +158 -5
  10. data/lib/e_invoice_api/models/document_create_from_pdf_response.rb +108 -5
  11. data/lib/e_invoice_api/models/document_lifecycle_params.rb +20 -0
  12. data/lib/e_invoice_api/models/document_lifecycle_response.rb +134 -0
  13. data/lib/e_invoice_api/models/document_response.rb +112 -7
  14. data/lib/e_invoice_api/models/document_timeline_params.rb +20 -0
  15. data/lib/e_invoice_api/models/document_timeline_response.rb +71 -0
  16. data/lib/e_invoice_api/models/draft_list_params.rb +113 -0
  17. data/lib/e_invoice_api/models/inbound_email_response.rb +129 -0
  18. data/lib/e_invoice_api/models/mailbox_download_attachment_params.rb +26 -0
  19. data/lib/e_invoice_api/models/mailbox_list_params.rb +129 -0
  20. data/lib/e_invoice_api/models/mailbox_reprocess_params.rb +20 -0
  21. data/lib/e_invoice_api/models/mailbox_retrieve_params.rb +20 -0
  22. data/lib/e_invoice_api/models/me_retrieve_response.rb +8 -7
  23. data/lib/e_invoice_api/models/payment_detail_create.rb +4 -2
  24. data/lib/e_invoice_api/models/stats_retrieve_params.rb +55 -0
  25. data/lib/e_invoice_api/models/stats_retrieve_response.rb +141 -0
  26. data/lib/e_invoice_api/models/ubl_document_validation.rb +10 -1
  27. data/lib/e_invoice_api/models/webhook_history_params.rb +20 -0
  28. data/lib/e_invoice_api/models/webhook_history_response.rb +17 -0
  29. data/lib/e_invoice_api/models/webhook_test_params.rb +37 -0
  30. data/lib/e_invoice_api/models/webhook_test_response.rb +35 -0
  31. data/lib/e_invoice_api/models.rb +24 -0
  32. data/lib/e_invoice_api/resources/conversion/pdf.rb +76 -0
  33. data/lib/e_invoice_api/resources/conversion.rb +18 -0
  34. data/lib/e_invoice_api/resources/documents.rb +62 -1
  35. data/lib/e_invoice_api/resources/drafts.rb +55 -0
  36. data/lib/e_invoice_api/resources/mailbox.rb +123 -0
  37. data/lib/e_invoice_api/resources/stats.rb +47 -0
  38. data/lib/e_invoice_api/resources/validate.rb +22 -2
  39. data/lib/e_invoice_api/resources/webhooks.rb +45 -0
  40. data/lib/e_invoice_api/version.rb +1 -1
  41. data/lib/e_invoice_api.rb +25 -0
  42. data/rbi/e_invoice_api/client.rbi +12 -0
  43. data/rbi/e_invoice_api/models/conversion/document_create_from_pdf_task.rbi +108 -0
  44. data/rbi/e_invoice_api/models/conversion/pdf_create_params.rbi +43 -0
  45. data/rbi/e_invoice_api/models/conversion/pdf_result_params.rbi +40 -0
  46. data/rbi/e_invoice_api/models/conversion/pdf_retrieve_params.rbi +40 -0
  47. data/rbi/e_invoice_api/models/document_create.rbi +210 -3
  48. data/rbi/e_invoice_api/models/document_create_from_pdf_response.rbi +124 -3
  49. data/rbi/e_invoice_api/models/document_lifecycle_params.rbi +38 -0
  50. data/rbi/e_invoice_api/models/document_lifecycle_response.rbi +353 -0
  51. data/rbi/e_invoice_api/models/document_response.rbi +130 -5
  52. data/rbi/e_invoice_api/models/document_timeline_params.rbi +38 -0
  53. data/rbi/e_invoice_api/models/document_timeline_response.rbi +168 -0
  54. data/rbi/e_invoice_api/models/draft_list_params.rbi +194 -0
  55. data/rbi/e_invoice_api/models/inbound_email_response.rbi +189 -0
  56. data/rbi/e_invoice_api/models/mailbox_download_attachment_params.rbi +46 -0
  57. data/rbi/e_invoice_api/models/mailbox_list_params.rbi +218 -0
  58. data/rbi/e_invoice_api/models/mailbox_reprocess_params.rbi +41 -0
  59. data/rbi/e_invoice_api/models/mailbox_retrieve_params.rbi +41 -0
  60. data/rbi/e_invoice_api/models/me_retrieve_response.rbi +10 -8
  61. data/rbi/e_invoice_api/models/payment_detail_create.rbi +6 -2
  62. data/rbi/e_invoice_api/models/stats_retrieve_params.rbi +111 -0
  63. data/rbi/e_invoice_api/models/stats_retrieve_response.rbi +251 -0
  64. data/rbi/e_invoice_api/models/ubl_document_validation.rbi +11 -1
  65. data/rbi/e_invoice_api/models/webhook_history_params.rbi +38 -0
  66. data/rbi/e_invoice_api/models/webhook_history_response.rbi +32 -0
  67. data/rbi/e_invoice_api/models/webhook_test_params.rbi +57 -0
  68. data/rbi/e_invoice_api/models/webhook_test_response.rbi +57 -0
  69. data/rbi/e_invoice_api/models.rbi +25 -0
  70. data/rbi/e_invoice_api/resources/conversion/pdf.rbi +44 -0
  71. data/rbi/e_invoice_api/resources/conversion.rbi +15 -0
  72. data/rbi/e_invoice_api/resources/documents.rbi +67 -0
  73. data/rbi/e_invoice_api/resources/drafts.rbi +55 -0
  74. data/rbi/e_invoice_api/resources/mailbox.rbi +93 -0
  75. data/rbi/e_invoice_api/resources/stats.rbi +38 -0
  76. data/rbi/e_invoice_api/resources/validate.rbi +44 -1
  77. data/rbi/e_invoice_api/resources/webhooks.rbi +29 -0
  78. data/sig/e_invoice_api/client.rbs +8 -0
  79. data/sig/e_invoice_api/models/conversion/document_create_from_pdf_task.rbs +45 -0
  80. data/sig/e_invoice_api/models/conversion/pdf_create_params.rbs +26 -0
  81. data/sig/e_invoice_api/models/conversion/pdf_result_params.rbs +25 -0
  82. data/sig/e_invoice_api/models/conversion/pdf_retrieve_params.rbs +25 -0
  83. data/sig/e_invoice_api/models/document_create.rbs +87 -4
  84. data/sig/e_invoice_api/models/document_create_from_pdf_response.rbs +61 -4
  85. data/sig/e_invoice_api/models/document_lifecycle_params.rbs +23 -0
  86. data/sig/e_invoice_api/models/document_lifecycle_response.rbs +151 -0
  87. data/sig/e_invoice_api/models/document_response.rbs +61 -4
  88. data/sig/e_invoice_api/models/document_timeline_params.rbs +23 -0
  89. data/sig/e_invoice_api/models/document_timeline_response.rbs +84 -0
  90. data/sig/e_invoice_api/models/draft_list_params.rbs +112 -0
  91. data/sig/e_invoice_api/models/inbound_email_response.rbs +126 -0
  92. data/sig/e_invoice_api/models/mailbox_download_attachment_params.rbs +28 -0
  93. data/sig/e_invoice_api/models/mailbox_list_params.rbs +112 -0
  94. data/sig/e_invoice_api/models/mailbox_reprocess_params.rbs +24 -0
  95. data/sig/e_invoice_api/models/mailbox_retrieve_params.rbs +24 -0
  96. data/sig/e_invoice_api/models/stats_retrieve_params.rbs +48 -0
  97. data/sig/e_invoice_api/models/stats_retrieve_response.rbs +107 -0
  98. data/sig/e_invoice_api/models/webhook_history_params.rbs +23 -0
  99. data/sig/e_invoice_api/models/webhook_history_response.rbs +13 -0
  100. data/sig/e_invoice_api/models/webhook_test_params.rbs +32 -0
  101. data/sig/e_invoice_api/models/webhook_test_response.rbs +30 -0
  102. data/sig/e_invoice_api/models.rbs +24 -0
  103. data/sig/e_invoice_api/resources/conversion/pdf.rbs +24 -0
  104. data/sig/e_invoice_api/resources/conversion.rbs +9 -0
  105. data/sig/e_invoice_api/resources/documents.rbs +19 -0
  106. data/sig/e_invoice_api/resources/drafts.rbs +20 -0
  107. data/sig/e_invoice_api/resources/mailbox.rbs +36 -0
  108. data/sig/e_invoice_api/resources/stats.rbs +14 -0
  109. data/sig/e_invoice_api/resources/validate.rbs +9 -0
  110. data/sig/e_invoice_api/resources/webhooks.rbs +12 -0
  111. metadata +77 -2
@@ -32,6 +32,11 @@ module EInvoiceAPI
32
32
  sig { returns(T.nilable(String)) }
33
33
  attr_accessor :billing_address_recipient
34
34
 
35
+ # The buyer reference (BT-10), e.g. a cost centre or accounting reference
36
+ # requested by the buyer
37
+ sig { returns(T.nilable(String)) }
38
+ attr_accessor :buyer_reference
39
+
35
40
  sig { returns(T.nilable(T::Array[EInvoiceAPI::DocumentCreate::Charge])) }
36
41
  attr_accessor :charges
37
42
 
@@ -71,6 +76,10 @@ module EInvoiceAPI
71
76
  sig { returns(T.nilable(String)) }
72
77
  attr_accessor :customer_peppol_id
73
78
 
79
+ # The telephone number of the customer contact (BT-57)
80
+ sig { returns(T.nilable(String)) }
81
+ attr_accessor :customer_phone
82
+
74
83
  # Customer tax ID. For Belgium this is the VAT number. Must include the country
75
84
  # prefix
76
85
  sig { returns(T.nilable(String)) }
@@ -129,6 +138,15 @@ module EInvoiceAPI
129
138
  sig { returns(T.nilable(String)) }
130
139
  attr_accessor :payment_term
131
140
 
141
+ # The preceding invoice issue date (BT-26)
142
+ sig { returns(T.nilable(Date)) }
143
+ attr_accessor :preceding_invoice_date
144
+
145
+ # The preceding invoice reference (BT-25): the number of the invoice this document
146
+ # corrects, for example the invoice a credit note credits
147
+ sig { returns(T.nilable(String)) }
148
+ attr_accessor :preceding_invoice_id
149
+
132
150
  # The previous unpaid balance from prior invoices, if any. Must be positive and
133
151
  # rounded to maximum 2 decimals
134
152
  sig do
@@ -152,6 +170,21 @@ module EInvoiceAPI
152
170
  sig { returns(T.nilable(String)) }
153
171
  attr_accessor :remittance_address_recipient
154
172
 
173
+ # The amount added to the invoice total to round the amount for payment (BT-114),
174
+ # for example to whole kronor (amount_due = invoice_total + rounding_amount when
175
+ # nothing is prepaid). Can be negative. Between -5.00 and 5.00, rounded to maximum
176
+ # 2 decimals
177
+ sig do
178
+ returns(
179
+ T.nilable(EInvoiceAPI::DocumentCreate::RoundingAmount::Variants)
180
+ )
181
+ end
182
+ attr_accessor :rounding_amount
183
+
184
+ # The sales order reference (BT-14) assigned by the seller
185
+ sig { returns(T.nilable(String)) }
186
+ attr_accessor :sales_order
187
+
155
188
  # The address where services were performed or goods were delivered
156
189
  sig { returns(T.nilable(String)) }
157
190
  attr_accessor :service_address
@@ -201,6 +234,12 @@ module EInvoiceAPI
201
234
  end
202
235
  attr_writer :tax_code
203
236
 
237
+ # The VAT accounting currency (BT-6, ISO 4217 currency code), when VAT is
238
+ # accounted in a currency other than the invoice currency. Must differ from
239
+ # currency and requires total_tax_in_tax_currency
240
+ sig { returns(T.nilable(String)) }
241
+ attr_accessor :tax_currency
242
+
204
243
  sig do
205
244
  returns(T.nilable(T::Array[EInvoiceAPI::DocumentCreate::TaxDetail]))
206
245
  end
@@ -221,6 +260,17 @@ module EInvoiceAPI
221
260
  end
222
261
  attr_accessor :total_tax
223
262
 
263
+ # The total VAT amount in the VAT accounting currency tax_currency (BT-111). Does
264
+ # not add to invoice_total. Requires tax_currency. Rounded to maximum 2 decimals
265
+ sig do
266
+ returns(
267
+ T.nilable(
268
+ EInvoiceAPI::DocumentCreate::TotalTaxInTaxCurrency::Variants
269
+ )
270
+ )
271
+ end
272
+ attr_accessor :total_tax_in_tax_currency
273
+
224
274
  # VATEX code list for VAT exemption reasons
225
275
  #
226
276
  # Agency: CEF Identifier: vatex
@@ -252,6 +302,12 @@ module EInvoiceAPI
252
302
  sig { returns(T.nilable(String)) }
253
303
  attr_accessor :vendor_name
254
304
 
305
+ # The telephone number of the vendor contact (BT-42). Required when vendor and
306
+ # customer are both in Germany (DE-R-006); it must then hold at least 3 digits
307
+ # (DE-R-027, a warning).
308
+ sig { returns(T.nilable(String)) }
309
+ attr_accessor :vendor_phone
310
+
255
311
  # Vendor tax ID. For Belgium this is the VAT number. Must include the country
256
312
  # prefix
257
313
  sig { returns(T.nilable(String)) }
@@ -267,6 +323,7 @@ module EInvoiceAPI
267
323
  T.nilable(T::Array[EInvoiceAPI::DocumentAttachmentCreate::OrHash]),
268
324
  billing_address: T.nilable(String),
269
325
  billing_address_recipient: T.nilable(String),
326
+ buyer_reference: T.nilable(String),
270
327
  charges:
271
328
  T.nilable(T::Array[EInvoiceAPI::DocumentCreate::Charge::OrHash]),
272
329
  currency: EInvoiceAPI::CurrencyCode::OrSymbol,
@@ -277,6 +334,7 @@ module EInvoiceAPI
277
334
  customer_id: T.nilable(String),
278
335
  customer_name: T.nilable(String),
279
336
  customer_peppol_id: T.nilable(String),
337
+ customer_phone: T.nilable(String),
280
338
  customer_tax_id: T.nilable(String),
281
339
  direction: EInvoiceAPI::DocumentDirection::OrSymbol,
282
340
  document_type: EInvoiceAPI::DocumentType::OrSymbol,
@@ -290,6 +348,8 @@ module EInvoiceAPI
290
348
  payment_details:
291
349
  T.nilable(T::Array[EInvoiceAPI::PaymentDetailCreate::OrHash]),
292
350
  payment_term: T.nilable(String),
351
+ preceding_invoice_date: T.nilable(Date),
352
+ preceding_invoice_id: T.nilable(String),
293
353
  previous_unpaid_balance:
294
354
  T.nilable(
295
355
  EInvoiceAPI::DocumentCreate::PreviousUnpaidBalance::Variants
@@ -297,6 +357,9 @@ module EInvoiceAPI
297
357
  purchase_order: T.nilable(String),
298
358
  remittance_address: T.nilable(String),
299
359
  remittance_address_recipient: T.nilable(String),
360
+ rounding_amount:
361
+ T.nilable(EInvoiceAPI::DocumentCreate::RoundingAmount::Variants),
362
+ sales_order: T.nilable(String),
300
363
  service_address: T.nilable(String),
301
364
  service_address_recipient: T.nilable(String),
302
365
  service_end_date: T.nilable(Date),
@@ -306,11 +369,16 @@ module EInvoiceAPI
306
369
  state: EInvoiceAPI::DocumentState::OrSymbol,
307
370
  subtotal: T.nilable(EInvoiceAPI::DocumentCreate::Subtotal::Variants),
308
371
  tax_code: EInvoiceAPI::DocumentCreate::TaxCode::OrSymbol,
372
+ tax_currency: T.nilable(String),
309
373
  tax_details:
310
374
  T.nilable(T::Array[EInvoiceAPI::DocumentCreate::TaxDetail::OrHash]),
311
375
  total_discount:
312
376
  T.nilable(EInvoiceAPI::DocumentCreate::TotalDiscount::Variants),
313
377
  total_tax: T.nilable(EInvoiceAPI::DocumentCreate::TotalTax::Variants),
378
+ total_tax_in_tax_currency:
379
+ T.nilable(
380
+ EInvoiceAPI::DocumentCreate::TotalTaxInTaxCurrency::Variants
381
+ ),
314
382
  vatex: T.nilable(EInvoiceAPI::DocumentCreate::Vatex::OrSymbol),
315
383
  vatex_note: T.nilable(String),
316
384
  vendor_address: T.nilable(String),
@@ -318,6 +386,7 @@ module EInvoiceAPI
318
386
  vendor_company_id: T.nilable(String),
319
387
  vendor_email: T.nilable(String),
320
388
  vendor_name: T.nilable(String),
389
+ vendor_phone: T.nilable(String),
321
390
  vendor_tax_id: T.nilable(String)
322
391
  ).returns(T.attached_class)
323
392
  end
@@ -330,6 +399,9 @@ module EInvoiceAPI
330
399
  billing_address: nil,
331
400
  # The recipient name at the billing address
332
401
  billing_address_recipient: nil,
402
+ # The buyer reference (BT-10), e.g. a cost centre or accounting reference
403
+ # requested by the buyer
404
+ buyer_reference: nil,
333
405
  charges: nil,
334
406
  # Currency of the invoice (ISO 4217 currency code)
335
407
  currency: nil,
@@ -348,6 +420,8 @@ module EInvoiceAPI
348
420
  customer_name: nil,
349
421
  # Customer Peppol ID
350
422
  customer_peppol_id: nil,
423
+ # The telephone number of the customer contact (BT-57)
424
+ customer_phone: nil,
351
425
  # Customer tax ID. For Belgium this is the VAT number. Must include the country
352
426
  # prefix
353
427
  customer_tax_id: nil,
@@ -371,6 +445,11 @@ module EInvoiceAPI
371
445
  payment_details: nil,
372
446
  # The payment terms (e.g., 'Net 30', 'Due on receipt', '2/10 Net 30')
373
447
  payment_term: nil,
448
+ # The preceding invoice issue date (BT-26)
449
+ preceding_invoice_date: nil,
450
+ # The preceding invoice reference (BT-25): the number of the invoice this document
451
+ # corrects, for example the invoice a credit note credits
452
+ preceding_invoice_id: nil,
374
453
  # The previous unpaid balance from prior invoices, if any. Must be positive and
375
454
  # rounded to maximum 2 decimals
376
455
  previous_unpaid_balance: nil,
@@ -380,6 +459,13 @@ module EInvoiceAPI
380
459
  remittance_address: nil,
381
460
  # The recipient name at the remittance address
382
461
  remittance_address_recipient: nil,
462
+ # The amount added to the invoice total to round the amount for payment (BT-114),
463
+ # for example to whole kronor (amount_due = invoice_total + rounding_amount when
464
+ # nothing is prepaid). Can be negative. Between -5.00 and 5.00, rounded to maximum
465
+ # 2 decimals
466
+ rounding_amount: nil,
467
+ # The sales order reference (BT-14) assigned by the seller
468
+ sales_order: nil,
383
469
  # The address where services were performed or goods were delivered
384
470
  service_address: nil,
385
471
  # The recipient name at the service address
@@ -401,6 +487,10 @@ module EInvoiceAPI
401
487
  # Tax category code of the invoice (e.g., S for standard rate, Z for zero rate, E
402
488
  # for exempt)
403
489
  tax_code: nil,
490
+ # The VAT accounting currency (BT-6, ISO 4217 currency code), when VAT is
491
+ # accounted in a currency other than the invoice currency. Must differ from
492
+ # currency and requires total_tax_in_tax_currency
493
+ tax_currency: nil,
404
494
  tax_details: nil,
405
495
  # The net financial discount/charge of the invoice (non-VAT charges minus non-VAT
406
496
  # allowances). Can be positive (net charge), negative (net discount), or zero.
@@ -409,6 +499,9 @@ module EInvoiceAPI
409
499
  # The total tax amount of the invoice. Must be positive and rounded to maximum 2
410
500
  # decimals
411
501
  total_tax: nil,
502
+ # The total VAT amount in the VAT accounting currency tax_currency (BT-111). Does
503
+ # not add to invoice_total. Requires tax_currency. Rounded to maximum 2 decimals
504
+ total_tax_in_tax_currency: nil,
412
505
  # VATEX code list for VAT exemption reasons
413
506
  #
414
507
  # Agency: CEF Identifier: vatex
@@ -426,6 +519,10 @@ module EInvoiceAPI
426
519
  vendor_email: nil,
427
520
  # The name of the vendor/seller/supplier
428
521
  vendor_name: nil,
522
+ # The telephone number of the vendor contact (BT-42). Required when vendor and
523
+ # customer are both in Germany (DE-R-006); it must then hold at least 3 digits
524
+ # (DE-R-027, a warning).
525
+ vendor_phone: nil,
429
526
  # Vendor tax ID. For Belgium this is the VAT number. Must include the country
430
527
  # prefix
431
528
  vendor_tax_id: nil
@@ -443,6 +540,7 @@ module EInvoiceAPI
443
540
  T.nilable(T::Array[EInvoiceAPI::DocumentAttachmentCreate]),
444
541
  billing_address: T.nilable(String),
445
542
  billing_address_recipient: T.nilable(String),
543
+ buyer_reference: T.nilable(String),
446
544
  charges: T.nilable(T::Array[EInvoiceAPI::DocumentCreate::Charge]),
447
545
  currency: EInvoiceAPI::CurrencyCode::OrSymbol,
448
546
  customer_address: T.nilable(String),
@@ -452,6 +550,7 @@ module EInvoiceAPI
452
550
  customer_id: T.nilable(String),
453
551
  customer_name: T.nilable(String),
454
552
  customer_peppol_id: T.nilable(String),
553
+ customer_phone: T.nilable(String),
455
554
  customer_tax_id: T.nilable(String),
456
555
  direction: EInvoiceAPI::DocumentDirection::OrSymbol,
457
556
  document_type: EInvoiceAPI::DocumentType::OrSymbol,
@@ -465,6 +564,8 @@ module EInvoiceAPI
465
564
  payment_details:
466
565
  T.nilable(T::Array[EInvoiceAPI::PaymentDetailCreate]),
467
566
  payment_term: T.nilable(String),
567
+ preceding_invoice_date: T.nilable(Date),
568
+ preceding_invoice_id: T.nilable(String),
468
569
  previous_unpaid_balance:
469
570
  T.nilable(
470
571
  EInvoiceAPI::DocumentCreate::PreviousUnpaidBalance::Variants
@@ -472,6 +573,9 @@ module EInvoiceAPI
472
573
  purchase_order: T.nilable(String),
473
574
  remittance_address: T.nilable(String),
474
575
  remittance_address_recipient: T.nilable(String),
576
+ rounding_amount:
577
+ T.nilable(EInvoiceAPI::DocumentCreate::RoundingAmount::Variants),
578
+ sales_order: T.nilable(String),
475
579
  service_address: T.nilable(String),
476
580
  service_address_recipient: T.nilable(String),
477
581
  service_end_date: T.nilable(Date),
@@ -482,12 +586,17 @@ module EInvoiceAPI
482
586
  subtotal:
483
587
  T.nilable(EInvoiceAPI::DocumentCreate::Subtotal::Variants),
484
588
  tax_code: EInvoiceAPI::DocumentCreate::TaxCode::OrSymbol,
589
+ tax_currency: T.nilable(String),
485
590
  tax_details:
486
591
  T.nilable(T::Array[EInvoiceAPI::DocumentCreate::TaxDetail]),
487
592
  total_discount:
488
593
  T.nilable(EInvoiceAPI::DocumentCreate::TotalDiscount::Variants),
489
594
  total_tax:
490
595
  T.nilable(EInvoiceAPI::DocumentCreate::TotalTax::Variants),
596
+ total_tax_in_tax_currency:
597
+ T.nilable(
598
+ EInvoiceAPI::DocumentCreate::TotalTaxInTaxCurrency::Variants
599
+ ),
491
600
  vatex: T.nilable(EInvoiceAPI::DocumentCreate::Vatex::OrSymbol),
492
601
  vatex_note: T.nilable(String),
493
602
  vendor_address: T.nilable(String),
@@ -495,6 +604,7 @@ module EInvoiceAPI
495
604
  vendor_company_id: T.nilable(String),
496
605
  vendor_email: T.nilable(String),
497
606
  vendor_name: T.nilable(String),
607
+ vendor_phone: T.nilable(String),
498
608
  vendor_tax_id: T.nilable(String)
499
609
  }
500
610
  )
@@ -2188,7 +2298,7 @@ module EInvoiceAPI
2188
2298
  end
2189
2299
  attr_accessor :charges
2190
2300
 
2191
- sig { returns(NilClass) }
2301
+ sig { returns(T.nilable(Date)) }
2192
2302
  attr_accessor :date
2193
2303
 
2194
2304
  # The description of the line item.
@@ -2205,6 +2315,33 @@ module EInvoiceAPI
2205
2315
  end
2206
2316
  attr_accessor :item_attributes
2207
2317
 
2318
+ # The item name (BT-153), for example the product name. Written to
2319
+ # cac:Item/cbc:Name. When omitted or blank, `description` (BT-154) is used as the
2320
+ # item name. A posted line item needs a `name` or a `description`; a line item
2321
+ # with neither is rejected with 422.
2322
+ sig { returns(T.nilable(String)) }
2323
+ attr_accessor :name
2324
+
2325
+ # The item price base quantity (BT-149). The number of item units to which the
2326
+ # unit price applies, for example 100 when the unit price is a price for each 100
2327
+ # units. Must be greater than 0. Defaults to 1.
2328
+ sig do
2329
+ returns(
2330
+ T.nilable(
2331
+ EInvoiceAPI::DocumentCreate::Item::PriceBaseQuantity::Variants
2332
+ )
2333
+ )
2334
+ end
2335
+ attr_reader :price_base_quantity
2336
+
2337
+ sig do
2338
+ params(
2339
+ price_base_quantity:
2340
+ EInvoiceAPI::DocumentCreate::Item::PriceBaseQuantity::Variants
2341
+ ).void
2342
+ end
2343
+ attr_writer :price_base_quantity
2344
+
2208
2345
  # The product code of the line item.
2209
2346
  sig { returns(T.nilable(String)) }
2210
2347
  attr_accessor :product_code
@@ -2259,7 +2396,7 @@ module EInvoiceAPI
2259
2396
  T.nilable(
2260
2397
  T::Array[EInvoiceAPI::DocumentCreate::Item::Charge::OrHash]
2261
2398
  ),
2262
- date: NilClass,
2399
+ date: T.nilable(Date),
2263
2400
  description: T.nilable(String),
2264
2401
  item_attributes:
2265
2402
  T.nilable(
@@ -2267,6 +2404,9 @@ module EInvoiceAPI
2267
2404
  EInvoiceAPI::DocumentCreate::Item::ItemAttribute::OrHash
2268
2405
  ]
2269
2406
  ),
2407
+ name: T.nilable(String),
2408
+ price_base_quantity:
2409
+ EInvoiceAPI::DocumentCreate::Item::PriceBaseQuantity::Variants,
2270
2410
  product_code: T.nilable(String),
2271
2411
  quantity:
2272
2412
  T.nilable(EInvoiceAPI::DocumentCreate::Item::Quantity::Variants),
@@ -2293,6 +2433,15 @@ module EInvoiceAPI
2293
2433
  description: nil,
2294
2434
  # Item-level attributes (BG-32) from cac:AdditionalItemProperty.
2295
2435
  item_attributes: nil,
2436
+ # The item name (BT-153), for example the product name. Written to
2437
+ # cac:Item/cbc:Name. When omitted or blank, `description` (BT-154) is used as the
2438
+ # item name. A posted line item needs a `name` or a `description`; a line item
2439
+ # with neither is rejected with 422.
2440
+ name: nil,
2441
+ # The item price base quantity (BT-149). The number of item units to which the
2442
+ # unit price applies, for example 100 when the unit price is a price for each 100
2443
+ # units. Must be greater than 0. Defaults to 1.
2444
+ price_base_quantity: nil,
2296
2445
  # The product code of the line item.
2297
2446
  product_code: nil,
2298
2447
  # The quantity of items (goods or services) that is the subject of the line item.
@@ -2323,12 +2472,15 @@ module EInvoiceAPI
2323
2472
  T.nilable(EInvoiceAPI::DocumentCreate::Item::Amount::Variants),
2324
2473
  charges:
2325
2474
  T.nilable(T::Array[EInvoiceAPI::DocumentCreate::Item::Charge]),
2326
- date: NilClass,
2475
+ date: T.nilable(Date),
2327
2476
  description: T.nilable(String),
2328
2477
  item_attributes:
2329
2478
  T.nilable(
2330
2479
  T::Array[EInvoiceAPI::DocumentCreate::Item::ItemAttribute]
2331
2480
  ),
2481
+ name: T.nilable(String),
2482
+ price_base_quantity:
2483
+ EInvoiceAPI::DocumentCreate::Item::PriceBaseQuantity::Variants,
2332
2484
  product_code: T.nilable(String),
2333
2485
  quantity:
2334
2486
  T.nilable(
@@ -4064,6 +4216,25 @@ module EInvoiceAPI
4064
4216
  end
4065
4217
  end
4066
4218
 
4219
+ # The item price base quantity (BT-149). The number of item units to which the
4220
+ # unit price applies, for example 100 when the unit price is a price for each 100
4221
+ # units. Must be greater than 0. Defaults to 1.
4222
+ module PriceBaseQuantity
4223
+ extend EInvoiceAPI::Internal::Type::Union
4224
+
4225
+ Variants = T.type_alias { T.any(Float, String) }
4226
+
4227
+ sig do
4228
+ override.returns(
4229
+ T::Array[
4230
+ EInvoiceAPI::DocumentCreate::Item::PriceBaseQuantity::Variants
4231
+ ]
4232
+ )
4233
+ end
4234
+ def self.variants
4235
+ end
4236
+ end
4237
+
4067
4238
  # The quantity of items (goods or services) that is the subject of the line item.
4068
4239
  # Must be rounded to maximum 4 decimals. Can be negative for credit notes or
4069
4240
  # corrections.
@@ -4147,6 +4318,24 @@ module EInvoiceAPI
4147
4318
  end
4148
4319
  end
4149
4320
 
4321
+ # The amount added to the invoice total to round the amount for payment (BT-114),
4322
+ # for example to whole kronor (amount_due = invoice_total + rounding_amount when
4323
+ # nothing is prepaid). Can be negative. Between -5.00 and 5.00, rounded to maximum
4324
+ # 2 decimals
4325
+ module RoundingAmount
4326
+ extend EInvoiceAPI::Internal::Type::Union
4327
+
4328
+ Variants = T.type_alias { T.any(Float, String) }
4329
+
4330
+ sig do
4331
+ override.returns(
4332
+ T::Array[EInvoiceAPI::DocumentCreate::RoundingAmount::Variants]
4333
+ )
4334
+ end
4335
+ def self.variants
4336
+ end
4337
+ end
4338
+
4150
4339
  # The taxable base of the invoice. Should be the sum of all line items -
4151
4340
  # allowances (for example commercial discounts) + charges with impact on VAT. Must
4152
4341
  # be positive and rounded to maximum 2 decimals
@@ -4294,6 +4483,24 @@ module EInvoiceAPI
4294
4483
  end
4295
4484
  end
4296
4485
 
4486
+ # The total VAT amount in the VAT accounting currency tax_currency (BT-111). Does
4487
+ # not add to invoice_total. Requires tax_currency. Rounded to maximum 2 decimals
4488
+ module TotalTaxInTaxCurrency
4489
+ extend EInvoiceAPI::Internal::Type::Union
4490
+
4491
+ Variants = T.type_alias { T.any(Float, String) }
4492
+
4493
+ sig do
4494
+ override.returns(
4495
+ T::Array[
4496
+ EInvoiceAPI::DocumentCreate::TotalTaxInTaxCurrency::Variants
4497
+ ]
4498
+ )
4499
+ end
4500
+ def self.variants
4501
+ end
4502
+ end
4503
+
4297
4504
  # VATEX code list for VAT exemption reasons
4298
4505
  #
4299
4506
  # Agency: CEF Identifier: vatex