e-invoice-api 0.7.0 → 0.8.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 (49) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +5 -5
  4. data/lib/e_invoice_api/client.rb +4 -0
  5. data/lib/e_invoice_api/internal/type/base_model.rb +5 -5
  6. data/lib/e_invoice_api/models/allowance.rb +96 -0
  7. data/lib/e_invoice_api/models/charge.rb +96 -0
  8. data/lib/e_invoice_api/models/document_create_from_pdf_params.rb +32 -0
  9. data/lib/e_invoice_api/models/document_create_from_pdf_response.rb +584 -0
  10. data/lib/e_invoice_api/models/document_response.rb +6 -192
  11. data/lib/e_invoice_api/models/document_validate_params.rb +14 -0
  12. data/lib/e_invoice_api/models/documents/ubl_create_from_ubl_params.rb +22 -0
  13. data/lib/e_invoice_api/models/me_retrieve_params.rb +14 -0
  14. data/lib/e_invoice_api/models/me_retrieve_response.rb +149 -0
  15. data/lib/e_invoice_api/models.rb +10 -0
  16. data/lib/e_invoice_api/resources/documents/ubl.rb +22 -0
  17. data/lib/e_invoice_api/resources/documents.rb +52 -0
  18. data/lib/e_invoice_api/resources/me.rb +32 -0
  19. data/lib/e_invoice_api/version.rb +1 -1
  20. data/lib/e_invoice_api.rb +9 -0
  21. data/rbi/e_invoice_api/client.rbi +3 -0
  22. data/rbi/e_invoice_api/models/allowance.rbi +124 -0
  23. data/rbi/e_invoice_api/models/charge.rbi +122 -0
  24. data/rbi/e_invoice_api/models/document_create_from_pdf_params.rbi +56 -0
  25. data/rbi/e_invoice_api/models/document_create_from_pdf_response.rbi +1014 -0
  26. data/rbi/e_invoice_api/models/document_response.rbi +6 -388
  27. data/rbi/e_invoice_api/models/document_validate_params.rbi +30 -0
  28. data/rbi/e_invoice_api/models/documents/ubl_create_from_ubl_params.rbi +43 -0
  29. data/rbi/e_invoice_api/models/me_retrieve_params.rbi +27 -0
  30. data/rbi/e_invoice_api/models/me_retrieve_response.rbi +195 -0
  31. data/rbi/e_invoice_api/models.rbi +10 -0
  32. data/rbi/e_invoice_api/resources/documents/ubl.rbi +10 -0
  33. data/rbi/e_invoice_api/resources/documents.rbi +34 -0
  34. data/rbi/e_invoice_api/resources/me.rbi +21 -0
  35. data/sig/e_invoice_api/client.rbs +2 -0
  36. data/sig/e_invoice_api/models/allowance.rbs +69 -0
  37. data/sig/e_invoice_api/models/charge.rbs +69 -0
  38. data/sig/e_invoice_api/models/document_create_from_pdf_params.rbs +36 -0
  39. data/sig/e_invoice_api/models/document_create_from_pdf_response.rbs +512 -0
  40. data/sig/e_invoice_api/models/document_response.rbs +8 -140
  41. data/sig/e_invoice_api/models/document_validate_params.rbs +15 -0
  42. data/sig/e_invoice_api/models/documents/ubl_create_from_ubl_params.rbs +26 -0
  43. data/sig/e_invoice_api/models/me_retrieve_params.rbs +15 -0
  44. data/sig/e_invoice_api/models/me_retrieve_response.rbs +107 -0
  45. data/sig/e_invoice_api/models.rbs +10 -0
  46. data/sig/e_invoice_api/resources/documents/ubl.rbs +5 -0
  47. data/sig/e_invoice_api/resources/documents.rbs +12 -0
  48. data/sig/e_invoice_api/resources/me.rbs +11 -0
  49. metadata +28 -1
@@ -0,0 +1,1014 @@
1
+ # typed: strong
2
+
3
+ module EInvoiceAPI
4
+ module Models
5
+ class DocumentCreateFromPdfResponse < EInvoiceAPI::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse,
10
+ EInvoiceAPI::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ sig { returns(T.nilable(T::Array[EInvoiceAPI::Allowance])) }
15
+ attr_accessor :allowances
16
+
17
+ # The amount due of the invoice. Must be positive and rounded to maximum 2
18
+ # decimals
19
+ sig { returns(T.nilable(String)) }
20
+ attr_accessor :amount_due
21
+
22
+ sig do
23
+ returns(T.nilable(T::Array[EInvoiceAPI::DocumentAttachmentCreate]))
24
+ end
25
+ attr_accessor :attachments
26
+
27
+ sig { returns(T.nilable(String)) }
28
+ attr_accessor :billing_address
29
+
30
+ sig { returns(T.nilable(String)) }
31
+ attr_accessor :billing_address_recipient
32
+
33
+ sig { returns(T.nilable(T::Array[EInvoiceAPI::Charge])) }
34
+ attr_accessor :charges
35
+
36
+ # Currency of the invoice
37
+ sig { returns(T.nilable(EInvoiceAPI::CurrencyCode::TaggedSymbol)) }
38
+ attr_reader :currency
39
+
40
+ sig { params(currency: EInvoiceAPI::CurrencyCode::OrSymbol).void }
41
+ attr_writer :currency
42
+
43
+ sig { returns(T.nilable(String)) }
44
+ attr_accessor :customer_address
45
+
46
+ sig { returns(T.nilable(String)) }
47
+ attr_accessor :customer_address_recipient
48
+
49
+ sig { returns(T.nilable(String)) }
50
+ attr_accessor :customer_email
51
+
52
+ sig { returns(T.nilable(String)) }
53
+ attr_accessor :customer_id
54
+
55
+ sig { returns(T.nilable(String)) }
56
+ attr_accessor :customer_name
57
+
58
+ sig { returns(T.nilable(String)) }
59
+ attr_accessor :customer_tax_id
60
+
61
+ sig { returns(T.nilable(EInvoiceAPI::DocumentDirection::TaggedSymbol)) }
62
+ attr_reader :direction
63
+
64
+ sig { params(direction: EInvoiceAPI::DocumentDirection::OrSymbol).void }
65
+ attr_writer :direction
66
+
67
+ sig { returns(T.nilable(EInvoiceAPI::DocumentType::TaggedSymbol)) }
68
+ attr_reader :document_type
69
+
70
+ sig { params(document_type: EInvoiceAPI::DocumentType::OrSymbol).void }
71
+ attr_writer :document_type
72
+
73
+ sig { returns(T.nilable(Date)) }
74
+ attr_accessor :due_date
75
+
76
+ sig { returns(T.nilable(Date)) }
77
+ attr_accessor :invoice_date
78
+
79
+ sig { returns(T.nilable(String)) }
80
+ attr_accessor :invoice_id
81
+
82
+ # The total amount of the invoice (so invoice_total = subtotal + total_tax +
83
+ # total_discount). Must be positive and rounded to maximum 2 decimals
84
+ sig { returns(T.nilable(String)) }
85
+ attr_accessor :invoice_total
86
+
87
+ # At least one line item is required
88
+ sig do
89
+ returns(
90
+ T.nilable(
91
+ T::Array[EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Item]
92
+ )
93
+ )
94
+ end
95
+ attr_reader :items
96
+
97
+ sig do
98
+ params(
99
+ items:
100
+ T::Array[
101
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Item::OrHash
102
+ ]
103
+ ).void
104
+ end
105
+ attr_writer :items
106
+
107
+ sig { returns(T.nilable(String)) }
108
+ attr_accessor :note
109
+
110
+ sig { returns(T.nilable(T::Array[EInvoiceAPI::PaymentDetailCreate])) }
111
+ attr_accessor :payment_details
112
+
113
+ sig { returns(T.nilable(String)) }
114
+ attr_accessor :payment_term
115
+
116
+ # The previous unpaid balance of the invoice, if any. Must be positive and rounded
117
+ # to maximum 2 decimals
118
+ sig { returns(T.nilable(String)) }
119
+ attr_accessor :previous_unpaid_balance
120
+
121
+ sig { returns(T.nilable(String)) }
122
+ attr_accessor :purchase_order
123
+
124
+ sig { returns(T.nilable(String)) }
125
+ attr_accessor :remittance_address
126
+
127
+ sig { returns(T.nilable(String)) }
128
+ attr_accessor :remittance_address_recipient
129
+
130
+ sig { returns(T.nilable(String)) }
131
+ attr_accessor :service_address
132
+
133
+ sig { returns(T.nilable(String)) }
134
+ attr_accessor :service_address_recipient
135
+
136
+ sig { returns(T.nilable(Date)) }
137
+ attr_accessor :service_end_date
138
+
139
+ sig { returns(T.nilable(Date)) }
140
+ attr_accessor :service_start_date
141
+
142
+ sig { returns(T.nilable(String)) }
143
+ attr_accessor :shipping_address
144
+
145
+ sig { returns(T.nilable(String)) }
146
+ attr_accessor :shipping_address_recipient
147
+
148
+ sig { returns(T.nilable(EInvoiceAPI::DocumentState::TaggedSymbol)) }
149
+ attr_reader :state
150
+
151
+ sig { params(state: EInvoiceAPI::DocumentState::OrSymbol).void }
152
+ attr_writer :state
153
+
154
+ # The taxable base of the invoice. Should be the sum of all line items -
155
+ # allowances (for example commercial discounts) + charges with impact on VAT. Must
156
+ # be positive and rounded to maximum 2 decimals
157
+ sig { returns(T.nilable(String)) }
158
+ attr_accessor :subtotal
159
+
160
+ # Whether the PDF was successfully converted into a compliant e-invoice
161
+ sig { returns(T.nilable(T::Boolean)) }
162
+ attr_reader :success
163
+
164
+ sig { params(success: T::Boolean).void }
165
+ attr_writer :success
166
+
167
+ # Tax category code of the invoice
168
+ sig do
169
+ returns(
170
+ T.nilable(
171
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::TaxCode::TaggedSymbol
172
+ )
173
+ )
174
+ end
175
+ attr_reader :tax_code
176
+
177
+ sig do
178
+ params(
179
+ tax_code:
180
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::TaxCode::OrSymbol
181
+ ).void
182
+ end
183
+ attr_writer :tax_code
184
+
185
+ sig do
186
+ returns(
187
+ T.nilable(
188
+ T::Array[
189
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::TaxDetail
190
+ ]
191
+ )
192
+ )
193
+ end
194
+ attr_accessor :tax_details
195
+
196
+ # The total financial discount of the invoice (so discounts not subject to VAT).
197
+ # Must be positive and rounded to maximum 2 decimals
198
+ sig { returns(T.nilable(String)) }
199
+ attr_accessor :total_discount
200
+
201
+ # The total tax of the invoice. Must be positive and rounded to maximum 2 decimals
202
+ sig { returns(T.nilable(String)) }
203
+ attr_accessor :total_tax
204
+
205
+ # The UBL document as an XML string
206
+ sig { returns(T.nilable(String)) }
207
+ attr_accessor :ubl_document
208
+
209
+ # VATEX code list for VAT exemption reasons
210
+ #
211
+ # Agency: CEF Identifier: vatex
212
+ sig do
213
+ returns(
214
+ T.nilable(
215
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
216
+ )
217
+ )
218
+ end
219
+ attr_accessor :vatex
220
+
221
+ # VAT exemption note of the invoice
222
+ sig { returns(T.nilable(String)) }
223
+ attr_accessor :vatex_note
224
+
225
+ sig { returns(T.nilable(String)) }
226
+ attr_accessor :vendor_address
227
+
228
+ sig { returns(T.nilable(String)) }
229
+ attr_accessor :vendor_address_recipient
230
+
231
+ sig { returns(T.nilable(String)) }
232
+ attr_accessor :vendor_email
233
+
234
+ sig { returns(T.nilable(String)) }
235
+ attr_accessor :vendor_name
236
+
237
+ sig { returns(T.nilable(String)) }
238
+ attr_accessor :vendor_tax_id
239
+
240
+ sig do
241
+ params(
242
+ allowances: T.nilable(T::Array[EInvoiceAPI::Allowance::OrHash]),
243
+ amount_due: T.nilable(String),
244
+ attachments:
245
+ T.nilable(T::Array[EInvoiceAPI::DocumentAttachmentCreate::OrHash]),
246
+ billing_address: T.nilable(String),
247
+ billing_address_recipient: T.nilable(String),
248
+ charges: T.nilable(T::Array[EInvoiceAPI::Charge::OrHash]),
249
+ currency: EInvoiceAPI::CurrencyCode::OrSymbol,
250
+ customer_address: T.nilable(String),
251
+ customer_address_recipient: T.nilable(String),
252
+ customer_email: T.nilable(String),
253
+ customer_id: T.nilable(String),
254
+ customer_name: T.nilable(String),
255
+ customer_tax_id: T.nilable(String),
256
+ direction: EInvoiceAPI::DocumentDirection::OrSymbol,
257
+ document_type: EInvoiceAPI::DocumentType::OrSymbol,
258
+ due_date: T.nilable(Date),
259
+ invoice_date: T.nilable(Date),
260
+ invoice_id: T.nilable(String),
261
+ invoice_total: T.nilable(String),
262
+ items:
263
+ T::Array[
264
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Item::OrHash
265
+ ],
266
+ note: T.nilable(String),
267
+ payment_details:
268
+ T.nilable(T::Array[EInvoiceAPI::PaymentDetailCreate::OrHash]),
269
+ payment_term: T.nilable(String),
270
+ previous_unpaid_balance: T.nilable(String),
271
+ purchase_order: T.nilable(String),
272
+ remittance_address: T.nilable(String),
273
+ remittance_address_recipient: T.nilable(String),
274
+ service_address: T.nilable(String),
275
+ service_address_recipient: T.nilable(String),
276
+ service_end_date: T.nilable(Date),
277
+ service_start_date: T.nilable(Date),
278
+ shipping_address: T.nilable(String),
279
+ shipping_address_recipient: T.nilable(String),
280
+ state: EInvoiceAPI::DocumentState::OrSymbol,
281
+ subtotal: T.nilable(String),
282
+ success: T::Boolean,
283
+ tax_code:
284
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::TaxCode::OrSymbol,
285
+ tax_details:
286
+ T.nilable(
287
+ T::Array[
288
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::TaxDetail::OrHash
289
+ ]
290
+ ),
291
+ total_discount: T.nilable(String),
292
+ total_tax: T.nilable(String),
293
+ ubl_document: T.nilable(String),
294
+ vatex:
295
+ T.nilable(
296
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::OrSymbol
297
+ ),
298
+ vatex_note: T.nilable(String),
299
+ vendor_address: T.nilable(String),
300
+ vendor_address_recipient: T.nilable(String),
301
+ vendor_email: T.nilable(String),
302
+ vendor_name: T.nilable(String),
303
+ vendor_tax_id: T.nilable(String)
304
+ ).returns(T.attached_class)
305
+ end
306
+ def self.new(
307
+ allowances: nil,
308
+ # The amount due of the invoice. Must be positive and rounded to maximum 2
309
+ # decimals
310
+ amount_due: nil,
311
+ attachments: nil,
312
+ billing_address: nil,
313
+ billing_address_recipient: nil,
314
+ charges: nil,
315
+ # Currency of the invoice
316
+ currency: nil,
317
+ customer_address: nil,
318
+ customer_address_recipient: nil,
319
+ customer_email: nil,
320
+ customer_id: nil,
321
+ customer_name: nil,
322
+ customer_tax_id: nil,
323
+ direction: nil,
324
+ document_type: nil,
325
+ due_date: nil,
326
+ invoice_date: nil,
327
+ invoice_id: nil,
328
+ # The total amount of the invoice (so invoice_total = subtotal + total_tax +
329
+ # total_discount). Must be positive and rounded to maximum 2 decimals
330
+ invoice_total: nil,
331
+ # At least one line item is required
332
+ items: nil,
333
+ note: nil,
334
+ payment_details: nil,
335
+ payment_term: nil,
336
+ # The previous unpaid balance of the invoice, if any. Must be positive and rounded
337
+ # to maximum 2 decimals
338
+ previous_unpaid_balance: nil,
339
+ purchase_order: nil,
340
+ remittance_address: nil,
341
+ remittance_address_recipient: nil,
342
+ service_address: nil,
343
+ service_address_recipient: nil,
344
+ service_end_date: nil,
345
+ service_start_date: nil,
346
+ shipping_address: nil,
347
+ shipping_address_recipient: nil,
348
+ state: nil,
349
+ # The taxable base of the invoice. Should be the sum of all line items -
350
+ # allowances (for example commercial discounts) + charges with impact on VAT. Must
351
+ # be positive and rounded to maximum 2 decimals
352
+ subtotal: nil,
353
+ # Whether the PDF was successfully converted into a compliant e-invoice
354
+ success: nil,
355
+ # Tax category code of the invoice
356
+ tax_code: nil,
357
+ tax_details: nil,
358
+ # The total financial discount of the invoice (so discounts not subject to VAT).
359
+ # Must be positive and rounded to maximum 2 decimals
360
+ total_discount: nil,
361
+ # The total tax of the invoice. Must be positive and rounded to maximum 2 decimals
362
+ total_tax: nil,
363
+ # The UBL document as an XML string
364
+ ubl_document: nil,
365
+ # VATEX code list for VAT exemption reasons
366
+ #
367
+ # Agency: CEF Identifier: vatex
368
+ vatex: nil,
369
+ # VAT exemption note of the invoice
370
+ vatex_note: nil,
371
+ vendor_address: nil,
372
+ vendor_address_recipient: nil,
373
+ vendor_email: nil,
374
+ vendor_name: nil,
375
+ vendor_tax_id: nil
376
+ )
377
+ end
378
+
379
+ sig do
380
+ override.returns(
381
+ {
382
+ allowances: T.nilable(T::Array[EInvoiceAPI::Allowance]),
383
+ amount_due: T.nilable(String),
384
+ attachments:
385
+ T.nilable(T::Array[EInvoiceAPI::DocumentAttachmentCreate]),
386
+ billing_address: T.nilable(String),
387
+ billing_address_recipient: T.nilable(String),
388
+ charges: T.nilable(T::Array[EInvoiceAPI::Charge]),
389
+ currency: EInvoiceAPI::CurrencyCode::TaggedSymbol,
390
+ customer_address: T.nilable(String),
391
+ customer_address_recipient: T.nilable(String),
392
+ customer_email: T.nilable(String),
393
+ customer_id: T.nilable(String),
394
+ customer_name: T.nilable(String),
395
+ customer_tax_id: T.nilable(String),
396
+ direction: EInvoiceAPI::DocumentDirection::TaggedSymbol,
397
+ document_type: EInvoiceAPI::DocumentType::TaggedSymbol,
398
+ due_date: T.nilable(Date),
399
+ invoice_date: T.nilable(Date),
400
+ invoice_id: T.nilable(String),
401
+ invoice_total: T.nilable(String),
402
+ items:
403
+ T::Array[
404
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Item
405
+ ],
406
+ note: T.nilable(String),
407
+ payment_details:
408
+ T.nilable(T::Array[EInvoiceAPI::PaymentDetailCreate]),
409
+ payment_term: T.nilable(String),
410
+ previous_unpaid_balance: T.nilable(String),
411
+ purchase_order: T.nilable(String),
412
+ remittance_address: T.nilable(String),
413
+ remittance_address_recipient: T.nilable(String),
414
+ service_address: T.nilable(String),
415
+ service_address_recipient: T.nilable(String),
416
+ service_end_date: T.nilable(Date),
417
+ service_start_date: T.nilable(Date),
418
+ shipping_address: T.nilable(String),
419
+ shipping_address_recipient: T.nilable(String),
420
+ state: EInvoiceAPI::DocumentState::TaggedSymbol,
421
+ subtotal: T.nilable(String),
422
+ success: T::Boolean,
423
+ tax_code:
424
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::TaxCode::TaggedSymbol,
425
+ tax_details:
426
+ T.nilable(
427
+ T::Array[
428
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::TaxDetail
429
+ ]
430
+ ),
431
+ total_discount: T.nilable(String),
432
+ total_tax: T.nilable(String),
433
+ ubl_document: T.nilable(String),
434
+ vatex:
435
+ T.nilable(
436
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
437
+ ),
438
+ vatex_note: T.nilable(String),
439
+ vendor_address: T.nilable(String),
440
+ vendor_address_recipient: T.nilable(String),
441
+ vendor_email: T.nilable(String),
442
+ vendor_name: T.nilable(String),
443
+ vendor_tax_id: T.nilable(String)
444
+ }
445
+ )
446
+ end
447
+ def to_hash
448
+ end
449
+
450
+ class Item < EInvoiceAPI::Internal::Type::BaseModel
451
+ OrHash =
452
+ T.type_alias do
453
+ T.any(
454
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Item,
455
+ EInvoiceAPI::Internal::AnyHash
456
+ )
457
+ end
458
+
459
+ # The allowances of the line item.
460
+ sig { returns(T.nilable(T::Array[EInvoiceAPI::Allowance])) }
461
+ attr_accessor :allowances
462
+
463
+ # The total amount of the line item, exclusive of VAT, after subtracting line
464
+ # level allowances and adding line level charges. Must be rounded to maximum 2
465
+ # decimals
466
+ sig { returns(T.nilable(String)) }
467
+ attr_accessor :amount
468
+
469
+ # The charges of the line item.
470
+ sig { returns(T.nilable(T::Array[EInvoiceAPI::Charge])) }
471
+ attr_accessor :charges
472
+
473
+ sig { returns(NilClass) }
474
+ attr_accessor :date
475
+
476
+ # The description of the line item.
477
+ sig { returns(T.nilable(String)) }
478
+ attr_accessor :description
479
+
480
+ # The product code of the line item.
481
+ sig { returns(T.nilable(String)) }
482
+ attr_accessor :product_code
483
+
484
+ # The quantity of items (goods or services) that is the subject of the line item.
485
+ # Must be rounded to maximum 4 decimals
486
+ sig { returns(T.nilable(String)) }
487
+ attr_accessor :quantity
488
+
489
+ # The total VAT amount for the line item. Must be rounded to maximum 2 decimals
490
+ sig { returns(T.nilable(String)) }
491
+ attr_accessor :tax
492
+
493
+ # The VAT rate of the line item expressed as percentage with 2 decimals
494
+ sig { returns(T.nilable(String)) }
495
+ attr_accessor :tax_rate
496
+
497
+ # Unit of Measure Codes from UNECERec20 used in Peppol BIS Billing 3.0.
498
+ sig { returns(T.nilable(EInvoiceAPI::UnitOfMeasureCode::TaggedSymbol)) }
499
+ attr_accessor :unit
500
+
501
+ # The unit price of the line item. Must be rounded to maximum 2 decimals
502
+ sig { returns(T.nilable(String)) }
503
+ attr_accessor :unit_price
504
+
505
+ sig do
506
+ params(
507
+ allowances: T.nilable(T::Array[EInvoiceAPI::Allowance::OrHash]),
508
+ amount: T.nilable(String),
509
+ charges: T.nilable(T::Array[EInvoiceAPI::Charge::OrHash]),
510
+ date: NilClass,
511
+ description: T.nilable(String),
512
+ product_code: T.nilable(String),
513
+ quantity: T.nilable(String),
514
+ tax: T.nilable(String),
515
+ tax_rate: T.nilable(String),
516
+ unit: T.nilable(EInvoiceAPI::UnitOfMeasureCode::OrSymbol),
517
+ unit_price: T.nilable(String)
518
+ ).returns(T.attached_class)
519
+ end
520
+ def self.new(
521
+ # The allowances of the line item.
522
+ allowances: nil,
523
+ # The total amount of the line item, exclusive of VAT, after subtracting line
524
+ # level allowances and adding line level charges. Must be rounded to maximum 2
525
+ # decimals
526
+ amount: nil,
527
+ # The charges of the line item.
528
+ charges: nil,
529
+ date: nil,
530
+ # The description of the line item.
531
+ description: nil,
532
+ # The product code of the line item.
533
+ product_code: nil,
534
+ # The quantity of items (goods or services) that is the subject of the line item.
535
+ # Must be rounded to maximum 4 decimals
536
+ quantity: nil,
537
+ # The total VAT amount for the line item. Must be rounded to maximum 2 decimals
538
+ tax: nil,
539
+ # The VAT rate of the line item expressed as percentage with 2 decimals
540
+ tax_rate: nil,
541
+ # Unit of Measure Codes from UNECERec20 used in Peppol BIS Billing 3.0.
542
+ unit: nil,
543
+ # The unit price of the line item. Must be rounded to maximum 2 decimals
544
+ unit_price: nil
545
+ )
546
+ end
547
+
548
+ sig do
549
+ override.returns(
550
+ {
551
+ allowances: T.nilable(T::Array[EInvoiceAPI::Allowance]),
552
+ amount: T.nilable(String),
553
+ charges: T.nilable(T::Array[EInvoiceAPI::Charge]),
554
+ date: NilClass,
555
+ description: T.nilable(String),
556
+ product_code: T.nilable(String),
557
+ quantity: T.nilable(String),
558
+ tax: T.nilable(String),
559
+ tax_rate: T.nilable(String),
560
+ unit: T.nilable(EInvoiceAPI::UnitOfMeasureCode::TaggedSymbol),
561
+ unit_price: T.nilable(String)
562
+ }
563
+ )
564
+ end
565
+ def to_hash
566
+ end
567
+ end
568
+
569
+ # Tax category code of the invoice
570
+ module TaxCode
571
+ extend EInvoiceAPI::Internal::Type::Enum
572
+
573
+ TaggedSymbol =
574
+ T.type_alias do
575
+ T.all(
576
+ Symbol,
577
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::TaxCode
578
+ )
579
+ end
580
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
581
+
582
+ AE =
583
+ T.let(
584
+ :AE,
585
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::TaxCode::TaggedSymbol
586
+ )
587
+ E =
588
+ T.let(
589
+ :E,
590
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::TaxCode::TaggedSymbol
591
+ )
592
+ S =
593
+ T.let(
594
+ :S,
595
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::TaxCode::TaggedSymbol
596
+ )
597
+ Z =
598
+ T.let(
599
+ :Z,
600
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::TaxCode::TaggedSymbol
601
+ )
602
+ G =
603
+ T.let(
604
+ :G,
605
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::TaxCode::TaggedSymbol
606
+ )
607
+ O =
608
+ T.let(
609
+ :O,
610
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::TaxCode::TaggedSymbol
611
+ )
612
+ K =
613
+ T.let(
614
+ :K,
615
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::TaxCode::TaggedSymbol
616
+ )
617
+ L =
618
+ T.let(
619
+ :L,
620
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::TaxCode::TaggedSymbol
621
+ )
622
+ M =
623
+ T.let(
624
+ :M,
625
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::TaxCode::TaggedSymbol
626
+ )
627
+ B =
628
+ T.let(
629
+ :B,
630
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::TaxCode::TaggedSymbol
631
+ )
632
+
633
+ sig do
634
+ override.returns(
635
+ T::Array[
636
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::TaxCode::TaggedSymbol
637
+ ]
638
+ )
639
+ end
640
+ def self.values
641
+ end
642
+ end
643
+
644
+ class TaxDetail < EInvoiceAPI::Internal::Type::BaseModel
645
+ OrHash =
646
+ T.type_alias do
647
+ T.any(
648
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::TaxDetail,
649
+ EInvoiceAPI::Internal::AnyHash
650
+ )
651
+ end
652
+
653
+ sig { returns(T.nilable(String)) }
654
+ attr_accessor :amount
655
+
656
+ sig { returns(T.nilable(String)) }
657
+ attr_accessor :rate
658
+
659
+ sig do
660
+ params(amount: T.nilable(String), rate: T.nilable(String)).returns(
661
+ T.attached_class
662
+ )
663
+ end
664
+ def self.new(amount: nil, rate: nil)
665
+ end
666
+
667
+ sig do
668
+ override.returns(
669
+ { amount: T.nilable(String), rate: T.nilable(String) }
670
+ )
671
+ end
672
+ def to_hash
673
+ end
674
+ end
675
+
676
+ # VATEX code list for VAT exemption reasons
677
+ #
678
+ # Agency: CEF Identifier: vatex
679
+ module Vatex
680
+ extend EInvoiceAPI::Internal::Type::Enum
681
+
682
+ TaggedSymbol =
683
+ T.type_alias do
684
+ T.all(
685
+ Symbol,
686
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex
687
+ )
688
+ end
689
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
690
+
691
+ VATEX_EU_79_C =
692
+ T.let(
693
+ :"VATEX-EU-79-C",
694
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
695
+ )
696
+ VATEX_EU_132 =
697
+ T.let(
698
+ :"VATEX-EU-132",
699
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
700
+ )
701
+ VATEX_EU_132_1_A =
702
+ T.let(
703
+ :"VATEX-EU-132-1A",
704
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
705
+ )
706
+ VATEX_EU_132_1_B =
707
+ T.let(
708
+ :"VATEX-EU-132-1B",
709
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
710
+ )
711
+ VATEX_EU_132_1_C =
712
+ T.let(
713
+ :"VATEX-EU-132-1C",
714
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
715
+ )
716
+ VATEX_EU_132_1_D =
717
+ T.let(
718
+ :"VATEX-EU-132-1D",
719
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
720
+ )
721
+ VATEX_EU_132_1_E =
722
+ T.let(
723
+ :"VATEX-EU-132-1E",
724
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
725
+ )
726
+ VATEX_EU_132_1_F =
727
+ T.let(
728
+ :"VATEX-EU-132-1F",
729
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
730
+ )
731
+ VATEX_EU_132_1_G =
732
+ T.let(
733
+ :"VATEX-EU-132-1G",
734
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
735
+ )
736
+ VATEX_EU_132_1_H =
737
+ T.let(
738
+ :"VATEX-EU-132-1H",
739
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
740
+ )
741
+ VATEX_EU_132_1_I =
742
+ T.let(
743
+ :"VATEX-EU-132-1I",
744
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
745
+ )
746
+ VATEX_EU_132_1_J =
747
+ T.let(
748
+ :"VATEX-EU-132-1J",
749
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
750
+ )
751
+ VATEX_EU_132_1_K =
752
+ T.let(
753
+ :"VATEX-EU-132-1K",
754
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
755
+ )
756
+ VATEX_EU_132_1_L =
757
+ T.let(
758
+ :"VATEX-EU-132-1L",
759
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
760
+ )
761
+ VATEX_EU_132_1_M =
762
+ T.let(
763
+ :"VATEX-EU-132-1M",
764
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
765
+ )
766
+ VATEX_EU_132_1_N =
767
+ T.let(
768
+ :"VATEX-EU-132-1N",
769
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
770
+ )
771
+ VATEX_EU_132_1_O =
772
+ T.let(
773
+ :"VATEX-EU-132-1O",
774
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
775
+ )
776
+ VATEX_EU_132_1_P =
777
+ T.let(
778
+ :"VATEX-EU-132-1P",
779
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
780
+ )
781
+ VATEX_EU_132_1_Q =
782
+ T.let(
783
+ :"VATEX-EU-132-1Q",
784
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
785
+ )
786
+ VATEX_EU_143 =
787
+ T.let(
788
+ :"VATEX-EU-143",
789
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
790
+ )
791
+ VATEX_EU_143_1_A =
792
+ T.let(
793
+ :"VATEX-EU-143-1A",
794
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
795
+ )
796
+ VATEX_EU_143_1_B =
797
+ T.let(
798
+ :"VATEX-EU-143-1B",
799
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
800
+ )
801
+ VATEX_EU_143_1_C =
802
+ T.let(
803
+ :"VATEX-EU-143-1C",
804
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
805
+ )
806
+ VATEX_EU_143_1_D =
807
+ T.let(
808
+ :"VATEX-EU-143-1D",
809
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
810
+ )
811
+ VATEX_EU_143_1_E =
812
+ T.let(
813
+ :"VATEX-EU-143-1E",
814
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
815
+ )
816
+ VATEX_EU_143_1_F =
817
+ T.let(
818
+ :"VATEX-EU-143-1F",
819
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
820
+ )
821
+ VATEX_EU_143_1_FA =
822
+ T.let(
823
+ :"VATEX-EU-143-1FA",
824
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
825
+ )
826
+ VATEX_EU_143_1_G =
827
+ T.let(
828
+ :"VATEX-EU-143-1G",
829
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
830
+ )
831
+ VATEX_EU_143_1_H =
832
+ T.let(
833
+ :"VATEX-EU-143-1H",
834
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
835
+ )
836
+ VATEX_EU_143_1_I =
837
+ T.let(
838
+ :"VATEX-EU-143-1I",
839
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
840
+ )
841
+ VATEX_EU_143_1_J =
842
+ T.let(
843
+ :"VATEX-EU-143-1J",
844
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
845
+ )
846
+ VATEX_EU_143_1_K =
847
+ T.let(
848
+ :"VATEX-EU-143-1K",
849
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
850
+ )
851
+ VATEX_EU_143_1_L =
852
+ T.let(
853
+ :"VATEX-EU-143-1L",
854
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
855
+ )
856
+ VATEX_EU_144 =
857
+ T.let(
858
+ :"VATEX-EU-144",
859
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
860
+ )
861
+ VATEX_EU_146_1_E =
862
+ T.let(
863
+ :"VATEX-EU-146-1E",
864
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
865
+ )
866
+ VATEX_EU_148 =
867
+ T.let(
868
+ :"VATEX-EU-148",
869
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
870
+ )
871
+ VATEX_EU_148_A =
872
+ T.let(
873
+ :"VATEX-EU-148-A",
874
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
875
+ )
876
+ VATEX_EU_148_B =
877
+ T.let(
878
+ :"VATEX-EU-148-B",
879
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
880
+ )
881
+ VATEX_EU_148_C =
882
+ T.let(
883
+ :"VATEX-EU-148-C",
884
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
885
+ )
886
+ VATEX_EU_148_D =
887
+ T.let(
888
+ :"VATEX-EU-148-D",
889
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
890
+ )
891
+ VATEX_EU_148_E =
892
+ T.let(
893
+ :"VATEX-EU-148-E",
894
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
895
+ )
896
+ VATEX_EU_148_F =
897
+ T.let(
898
+ :"VATEX-EU-148-F",
899
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
900
+ )
901
+ VATEX_EU_148_G =
902
+ T.let(
903
+ :"VATEX-EU-148-G",
904
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
905
+ )
906
+ VATEX_EU_151 =
907
+ T.let(
908
+ :"VATEX-EU-151",
909
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
910
+ )
911
+ VATEX_EU_151_1_A =
912
+ T.let(
913
+ :"VATEX-EU-151-1A",
914
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
915
+ )
916
+ VATEX_EU_151_1_AA =
917
+ T.let(
918
+ :"VATEX-EU-151-1AA",
919
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
920
+ )
921
+ VATEX_EU_151_1_B =
922
+ T.let(
923
+ :"VATEX-EU-151-1B",
924
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
925
+ )
926
+ VATEX_EU_151_1_C =
927
+ T.let(
928
+ :"VATEX-EU-151-1C",
929
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
930
+ )
931
+ VATEX_EU_151_1_D =
932
+ T.let(
933
+ :"VATEX-EU-151-1D",
934
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
935
+ )
936
+ VATEX_EU_151_1_E =
937
+ T.let(
938
+ :"VATEX-EU-151-1E",
939
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
940
+ )
941
+ VATEX_EU_159 =
942
+ T.let(
943
+ :"VATEX-EU-159",
944
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
945
+ )
946
+ VATEX_EU_309 =
947
+ T.let(
948
+ :"VATEX-EU-309",
949
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
950
+ )
951
+ VATEX_EU_AE =
952
+ T.let(
953
+ :"VATEX-EU-AE",
954
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
955
+ )
956
+ VATEX_EU_D =
957
+ T.let(
958
+ :"VATEX-EU-D",
959
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
960
+ )
961
+ VATEX_EU_F =
962
+ T.let(
963
+ :"VATEX-EU-F",
964
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
965
+ )
966
+ VATEX_EU_G =
967
+ T.let(
968
+ :"VATEX-EU-G",
969
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
970
+ )
971
+ VATEX_EU_I =
972
+ T.let(
973
+ :"VATEX-EU-I",
974
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
975
+ )
976
+ VATEX_EU_IC =
977
+ T.let(
978
+ :"VATEX-EU-IC",
979
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
980
+ )
981
+ VATEX_EU_O =
982
+ T.let(
983
+ :"VATEX-EU-O",
984
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
985
+ )
986
+ VATEX_EU_J =
987
+ T.let(
988
+ :"VATEX-EU-J",
989
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
990
+ )
991
+ VATEX_FR_FRANCHISE =
992
+ T.let(
993
+ :"VATEX-FR-FRANCHISE",
994
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
995
+ )
996
+ VATEX_FR_CNWVAT =
997
+ T.let(
998
+ :"VATEX-FR-CNWVAT",
999
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
1000
+ )
1001
+
1002
+ sig do
1003
+ override.returns(
1004
+ T::Array[
1005
+ EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex::TaggedSymbol
1006
+ ]
1007
+ )
1008
+ end
1009
+ def self.values
1010
+ end
1011
+ end
1012
+ end
1013
+ end
1014
+ end