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
@@ -31,6 +31,11 @@ module EInvoiceAPI
31
31
  sig { returns(T.nilable(String)) }
32
32
  attr_accessor :billing_address_recipient
33
33
 
34
+ # The buyer reference (BT-10), e.g. a cost centre or accounting reference
35
+ # requested by the buyer
36
+ sig { returns(T.nilable(String)) }
37
+ attr_accessor :buyer_reference
38
+
34
39
  sig { returns(T.nilable(T::Array[EInvoiceAPI::Charge])) }
35
40
  attr_accessor :charges
36
41
 
@@ -70,6 +75,10 @@ module EInvoiceAPI
70
75
  sig { returns(T.nilable(String)) }
71
76
  attr_accessor :customer_peppol_id
72
77
 
78
+ # The telephone number of the customer contact (BT-57)
79
+ sig { returns(T.nilable(String)) }
80
+ attr_accessor :customer_phone
81
+
73
82
  # Customer tax ID. For Belgium this is the VAT number. Must include the country
74
83
  # prefix
75
84
  sig { returns(T.nilable(String)) }
@@ -145,6 +154,15 @@ module EInvoiceAPI
145
154
  sig { returns(T.nilable(String)) }
146
155
  attr_accessor :payment_term
147
156
 
157
+ # The preceding invoice issue date (BT-26)
158
+ sig { returns(T.nilable(Date)) }
159
+ attr_accessor :preceding_invoice_date
160
+
161
+ # The preceding invoice reference (BT-25): the number of the invoice this document
162
+ # corrects, for example the invoice a credit note credits
163
+ sig { returns(T.nilable(String)) }
164
+ attr_accessor :preceding_invoice_id
165
+
148
166
  # The purchase order reference number
149
167
  sig { returns(T.nilable(String)) }
150
168
  attr_accessor :purchase_order
@@ -157,6 +175,17 @@ module EInvoiceAPI
157
175
  sig { returns(T.nilable(String)) }
158
176
  attr_accessor :remittance_address_recipient
159
177
 
178
+ # The amount added to the invoice total to round the amount for payment (BT-114),
179
+ # for example to whole kronor (amount_due = invoice_total + rounding_amount when
180
+ # nothing is prepaid). Can be negative. Between -5.00 and 5.00, rounded to maximum
181
+ # 2 decimals
182
+ sig { returns(T.nilable(String)) }
183
+ attr_accessor :rounding_amount
184
+
185
+ # The sales order reference (BT-14) assigned by the seller
186
+ sig { returns(T.nilable(String)) }
187
+ attr_accessor :sales_order
188
+
160
189
  # The address where services were performed or goods were delivered
161
190
  sig { returns(T.nilable(String)) }
162
191
  attr_accessor :service_address
@@ -220,6 +249,12 @@ module EInvoiceAPI
220
249
  end
221
250
  attr_writer :tax_code
222
251
 
252
+ # The VAT accounting currency (BT-6, ISO 4217 currency code), when VAT is
253
+ # accounted in a currency other than the invoice currency. Must differ from
254
+ # currency and requires total_tax_in_tax_currency
255
+ sig { returns(T.nilable(String)) }
256
+ attr_accessor :tax_currency
257
+
223
258
  sig do
224
259
  returns(
225
260
  T.nilable(
@@ -242,6 +277,11 @@ module EInvoiceAPI
242
277
  sig { returns(T.nilable(String)) }
243
278
  attr_accessor :total_tax
244
279
 
280
+ # The total VAT amount in the VAT accounting currency tax_currency (BT-111). Does
281
+ # not add to invoice_total. Requires tax_currency. Rounded to maximum 2 decimals
282
+ sig { returns(T.nilable(String)) }
283
+ attr_accessor :total_tax_in_tax_currency
284
+
245
285
  # The UBL document as an XML string
246
286
  sig { returns(T.nilable(String)) }
247
287
  attr_accessor :ubl_document
@@ -283,6 +323,12 @@ module EInvoiceAPI
283
323
  sig { returns(T.nilable(String)) }
284
324
  attr_accessor :vendor_name
285
325
 
326
+ # The telephone number of the vendor contact (BT-42). Required when vendor and
327
+ # customer are both in Germany (DE-R-006); it must then hold at least 3 digits
328
+ # (DE-R-027, a warning).
329
+ sig { returns(T.nilable(String)) }
330
+ attr_accessor :vendor_phone
331
+
286
332
  # Vendor tax ID. For Belgium this is the VAT number. Must include the country
287
333
  # prefix
288
334
  sig { returns(T.nilable(String)) }
@@ -296,6 +342,7 @@ module EInvoiceAPI
296
342
  T.nilable(T::Array[EInvoiceAPI::DocumentAttachmentCreate::OrHash]),
297
343
  billing_address: T.nilable(String),
298
344
  billing_address_recipient: T.nilable(String),
345
+ buyer_reference: T.nilable(String),
299
346
  charges: T.nilable(T::Array[EInvoiceAPI::Charge::OrHash]),
300
347
  currency: EInvoiceAPI::CurrencyCode::OrSymbol,
301
348
  customer_address: T.nilable(String),
@@ -305,6 +352,7 @@ module EInvoiceAPI
305
352
  customer_id: T.nilable(String),
306
353
  customer_name: T.nilable(String),
307
354
  customer_peppol_id: T.nilable(String),
355
+ customer_phone: T.nilable(String),
308
356
  customer_tax_id: T.nilable(String),
309
357
  direction: EInvoiceAPI::DocumentDirection::OrSymbol,
310
358
  document_type: EInvoiceAPI::DocumentType::OrSymbol,
@@ -322,9 +370,13 @@ module EInvoiceAPI
322
370
  payment_details:
323
371
  T.nilable(T::Array[EInvoiceAPI::PaymentDetailCreate::OrHash]),
324
372
  payment_term: T.nilable(String),
373
+ preceding_invoice_date: T.nilable(Date),
374
+ preceding_invoice_id: T.nilable(String),
325
375
  purchase_order: T.nilable(String),
326
376
  remittance_address: T.nilable(String),
327
377
  remittance_address_recipient: T.nilable(String),
378
+ rounding_amount: T.nilable(String),
379
+ sales_order: T.nilable(String),
328
380
  service_address: T.nilable(String),
329
381
  service_address_recipient: T.nilable(String),
330
382
  service_end_date: T.nilable(Date),
@@ -336,6 +388,7 @@ module EInvoiceAPI
336
388
  success: T::Boolean,
337
389
  tax_code:
338
390
  EInvoiceAPI::Models::DocumentCreateFromPdfResponse::TaxCode::OrSymbol,
391
+ tax_currency: T.nilable(String),
339
392
  tax_details:
340
393
  T.nilable(
341
394
  T::Array[
@@ -344,6 +397,7 @@ module EInvoiceAPI
344
397
  ),
345
398
  total_discount: T.nilable(String),
346
399
  total_tax: T.nilable(String),
400
+ total_tax_in_tax_currency: T.nilable(String),
347
401
  ubl_document: T.nilable(String),
348
402
  vatex:
349
403
  T.nilable(
@@ -355,6 +409,7 @@ module EInvoiceAPI
355
409
  vendor_company_id: T.nilable(String),
356
410
  vendor_email: T.nilable(String),
357
411
  vendor_name: T.nilable(String),
412
+ vendor_phone: T.nilable(String),
358
413
  vendor_tax_id: T.nilable(String)
359
414
  ).returns(T.attached_class)
360
415
  end
@@ -367,6 +422,9 @@ module EInvoiceAPI
367
422
  billing_address: nil,
368
423
  # The recipient name at the billing address
369
424
  billing_address_recipient: nil,
425
+ # The buyer reference (BT-10), e.g. a cost centre or accounting reference
426
+ # requested by the buyer
427
+ buyer_reference: nil,
370
428
  charges: nil,
371
429
  # Currency of the invoice (ISO 4217 currency code)
372
430
  currency: nil,
@@ -385,6 +443,8 @@ module EInvoiceAPI
385
443
  customer_name: nil,
386
444
  # Customer Peppol ID
387
445
  customer_peppol_id: nil,
446
+ # The telephone number of the customer contact (BT-57)
447
+ customer_phone: nil,
388
448
  # Customer tax ID. For Belgium this is the VAT number. Must include the country
389
449
  # prefix
390
450
  customer_tax_id: nil,
@@ -412,12 +472,24 @@ module EInvoiceAPI
412
472
  payment_details: nil,
413
473
  # The payment terms (e.g., 'Net 30', 'Due on receipt', '2/10 Net 30')
414
474
  payment_term: nil,
475
+ # The preceding invoice issue date (BT-26)
476
+ preceding_invoice_date: nil,
477
+ # The preceding invoice reference (BT-25): the number of the invoice this document
478
+ # corrects, for example the invoice a credit note credits
479
+ preceding_invoice_id: nil,
415
480
  # The purchase order reference number
416
481
  purchase_order: nil,
417
482
  # The address where payment should be sent or remitted to
418
483
  remittance_address: nil,
419
484
  # The recipient name at the remittance address
420
485
  remittance_address_recipient: nil,
486
+ # The amount added to the invoice total to round the amount for payment (BT-114),
487
+ # for example to whole kronor (amount_due = invoice_total + rounding_amount when
488
+ # nothing is prepaid). Can be negative. Between -5.00 and 5.00, rounded to maximum
489
+ # 2 decimals
490
+ rounding_amount: nil,
491
+ # The sales order reference (BT-14) assigned by the seller
492
+ sales_order: nil,
421
493
  # The address where services were performed or goods were delivered
422
494
  service_address: nil,
423
495
  # The recipient name at the service address
@@ -441,6 +513,10 @@ module EInvoiceAPI
441
513
  # Tax category code of the invoice (e.g., S for standard rate, Z for zero rate, E
442
514
  # for exempt)
443
515
  tax_code: nil,
516
+ # The VAT accounting currency (BT-6, ISO 4217 currency code), when VAT is
517
+ # accounted in a currency other than the invoice currency. Must differ from
518
+ # currency and requires total_tax_in_tax_currency
519
+ tax_currency: nil,
444
520
  tax_details: nil,
445
521
  # The net financial discount/charge of the invoice (non-VAT charges minus non-VAT
446
522
  # allowances). Can be positive (net charge), negative (net discount), or zero.
@@ -449,6 +525,9 @@ module EInvoiceAPI
449
525
  # The total tax amount of the invoice. Must be positive and rounded to maximum 2
450
526
  # decimals
451
527
  total_tax: nil,
528
+ # The total VAT amount in the VAT accounting currency tax_currency (BT-111). Does
529
+ # not add to invoice_total. Requires tax_currency. Rounded to maximum 2 decimals
530
+ total_tax_in_tax_currency: nil,
452
531
  # The UBL document as an XML string
453
532
  ubl_document: nil,
454
533
  # VATEX code list for VAT exemption reasons
@@ -468,6 +547,10 @@ module EInvoiceAPI
468
547
  vendor_email: nil,
469
548
  # The name of the vendor/seller/supplier
470
549
  vendor_name: nil,
550
+ # The telephone number of the vendor contact (BT-42). Required when vendor and
551
+ # customer are both in Germany (DE-R-006); it must then hold at least 3 digits
552
+ # (DE-R-027, a warning).
553
+ vendor_phone: nil,
471
554
  # Vendor tax ID. For Belgium this is the VAT number. Must include the country
472
555
  # prefix
473
556
  vendor_tax_id: nil
@@ -483,6 +566,7 @@ module EInvoiceAPI
483
566
  T.nilable(T::Array[EInvoiceAPI::DocumentAttachmentCreate]),
484
567
  billing_address: T.nilable(String),
485
568
  billing_address_recipient: T.nilable(String),
569
+ buyer_reference: T.nilable(String),
486
570
  charges: T.nilable(T::Array[EInvoiceAPI::Charge]),
487
571
  currency: EInvoiceAPI::CurrencyCode::TaggedSymbol,
488
572
  customer_address: T.nilable(String),
@@ -492,6 +576,7 @@ module EInvoiceAPI
492
576
  customer_id: T.nilable(String),
493
577
  customer_name: T.nilable(String),
494
578
  customer_peppol_id: T.nilable(String),
579
+ customer_phone: T.nilable(String),
495
580
  customer_tax_id: T.nilable(String),
496
581
  direction: EInvoiceAPI::DocumentDirection::TaggedSymbol,
497
582
  document_type: EInvoiceAPI::DocumentType::TaggedSymbol,
@@ -509,9 +594,13 @@ module EInvoiceAPI
509
594
  payment_details:
510
595
  T.nilable(T::Array[EInvoiceAPI::PaymentDetailCreate]),
511
596
  payment_term: T.nilable(String),
597
+ preceding_invoice_date: T.nilable(Date),
598
+ preceding_invoice_id: T.nilable(String),
512
599
  purchase_order: T.nilable(String),
513
600
  remittance_address: T.nilable(String),
514
601
  remittance_address_recipient: T.nilable(String),
602
+ rounding_amount: T.nilable(String),
603
+ sales_order: T.nilable(String),
515
604
  service_address: T.nilable(String),
516
605
  service_address_recipient: T.nilable(String),
517
606
  service_end_date: T.nilable(Date),
@@ -523,6 +612,7 @@ module EInvoiceAPI
523
612
  success: T::Boolean,
524
613
  tax_code:
525
614
  EInvoiceAPI::Models::DocumentCreateFromPdfResponse::TaxCode::TaggedSymbol,
615
+ tax_currency: T.nilable(String),
526
616
  tax_details:
527
617
  T.nilable(
528
618
  T::Array[
@@ -531,6 +621,7 @@ module EInvoiceAPI
531
621
  ),
532
622
  total_discount: T.nilable(String),
533
623
  total_tax: T.nilable(String),
624
+ total_tax_in_tax_currency: T.nilable(String),
534
625
  ubl_document: T.nilable(String),
535
626
  vatex:
536
627
  T.nilable(
@@ -542,6 +633,7 @@ module EInvoiceAPI
542
633
  vendor_company_id: T.nilable(String),
543
634
  vendor_email: T.nilable(String),
544
635
  vendor_name: T.nilable(String),
636
+ vendor_phone: T.nilable(String),
545
637
  vendor_tax_id: T.nilable(String)
546
638
  }
547
639
  )
@@ -573,7 +665,7 @@ module EInvoiceAPI
573
665
  sig { returns(T.nilable(T::Array[EInvoiceAPI::Charge])) }
574
666
  attr_accessor :charges
575
667
 
576
- sig { returns(NilClass) }
668
+ sig { returns(T.nilable(Date)) }
577
669
  attr_accessor :date
578
670
 
579
671
  # The description of the line item.
@@ -592,6 +684,22 @@ module EInvoiceAPI
592
684
  end
593
685
  attr_accessor :item_attributes
594
686
 
687
+ # The item name (BT-153), for example the product name. Written to
688
+ # cac:Item/cbc:Name. When omitted or blank, `description` (BT-154) is used as the
689
+ # item name. A posted line item needs a `name` or a `description`; a line item
690
+ # with neither is rejected with 422.
691
+ sig { returns(T.nilable(String)) }
692
+ attr_accessor :name
693
+
694
+ # The item price base quantity (BT-149). The number of item units to which the
695
+ # unit price applies, for example 100 when the unit price is a price for each 100
696
+ # units. Must be greater than 0. Defaults to 1.
697
+ sig { returns(T.nilable(String)) }
698
+ attr_reader :price_base_quantity
699
+
700
+ sig { params(price_base_quantity: String).void }
701
+ attr_writer :price_base_quantity
702
+
595
703
  # The product code of the line item.
596
704
  sig { returns(T.nilable(String)) }
597
705
  attr_accessor :product_code
@@ -625,7 +733,7 @@ module EInvoiceAPI
625
733
  allowances: T.nilable(T::Array[EInvoiceAPI::Allowance::OrHash]),
626
734
  amount: T.nilable(String),
627
735
  charges: T.nilable(T::Array[EInvoiceAPI::Charge::OrHash]),
628
- date: NilClass,
736
+ date: T.nilable(Date),
629
737
  description: T.nilable(String),
630
738
  item_attributes:
631
739
  T.nilable(
@@ -633,6 +741,8 @@ module EInvoiceAPI
633
741
  EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Item::ItemAttribute::OrHash
634
742
  ]
635
743
  ),
744
+ name: T.nilable(String),
745
+ price_base_quantity: String,
636
746
  product_code: T.nilable(String),
637
747
  quantity: T.nilable(String),
638
748
  tax: T.nilable(String),
@@ -656,6 +766,15 @@ module EInvoiceAPI
656
766
  description: nil,
657
767
  # Item-level attributes (BG-32) from cac:AdditionalItemProperty.
658
768
  item_attributes: nil,
769
+ # The item name (BT-153), for example the product name. Written to
770
+ # cac:Item/cbc:Name. When omitted or blank, `description` (BT-154) is used as the
771
+ # item name. A posted line item needs a `name` or a `description`; a line item
772
+ # with neither is rejected with 422.
773
+ name: nil,
774
+ # The item price base quantity (BT-149). The number of item units to which the
775
+ # unit price applies, for example 100 when the unit price is a price for each 100
776
+ # units. Must be greater than 0. Defaults to 1.
777
+ price_base_quantity: nil,
659
778
  # The product code of the line item.
660
779
  product_code: nil,
661
780
  # The quantity of items (goods or services) that is the subject of the line item.
@@ -681,7 +800,7 @@ module EInvoiceAPI
681
800
  allowances: T.nilable(T::Array[EInvoiceAPI::Allowance]),
682
801
  amount: T.nilable(String),
683
802
  charges: T.nilable(T::Array[EInvoiceAPI::Charge]),
684
- date: NilClass,
803
+ date: T.nilable(Date),
685
804
  description: T.nilable(String),
686
805
  item_attributes:
687
806
  T.nilable(
@@ -689,6 +808,8 @@ module EInvoiceAPI
689
808
  EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Item::ItemAttribute
690
809
  ]
691
810
  ),
811
+ name: T.nilable(String),
812
+ price_base_quantity: String,
692
813
  product_code: T.nilable(String),
693
814
  quantity: T.nilable(String),
694
815
  tax: T.nilable(String),
@@ -0,0 +1,38 @@
1
+ # typed: strong
2
+
3
+ module EInvoiceAPI
4
+ module Models
5
+ class DocumentLifecycleParams < 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::DocumentLifecycleParams,
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