e-invoice-api 0.6.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 (55) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -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.rb +666 -19
  9. data/lib/e_invoice_api/models/document_create_from_pdf_params.rb +32 -0
  10. data/lib/e_invoice_api/models/document_create_from_pdf_response.rb +584 -0
  11. data/lib/e_invoice_api/models/document_response.rb +265 -23
  12. data/lib/e_invoice_api/models/document_validate_params.rb +14 -0
  13. data/lib/e_invoice_api/models/documents/ubl_create_from_ubl_params.rb +22 -0
  14. data/lib/e_invoice_api/models/me_retrieve_params.rb +14 -0
  15. data/lib/e_invoice_api/models/me_retrieve_response.rb +149 -0
  16. data/lib/e_invoice_api/models.rb +10 -0
  17. data/lib/e_invoice_api/resources/documents/ubl.rb +22 -0
  18. data/lib/e_invoice_api/resources/documents.rb +64 -8
  19. data/lib/e_invoice_api/resources/me.rb +32 -0
  20. data/lib/e_invoice_api/resources/validate.rb +12 -8
  21. data/lib/e_invoice_api/version.rb +1 -1
  22. data/lib/e_invoice_api.rb +9 -0
  23. data/rbi/e_invoice_api/client.rbi +3 -0
  24. data/rbi/e_invoice_api/models/allowance.rbi +124 -0
  25. data/rbi/e_invoice_api/models/charge.rbi +122 -0
  26. data/rbi/e_invoice_api/models/document_create.rbi +1180 -3
  27. data/rbi/e_invoice_api/models/document_create_from_pdf_params.rbi +56 -0
  28. data/rbi/e_invoice_api/models/document_create_from_pdf_response.rbi +1014 -0
  29. data/rbi/e_invoice_api/models/document_response.rbi +456 -43
  30. data/rbi/e_invoice_api/models/document_validate_params.rbi +30 -0
  31. data/rbi/e_invoice_api/models/documents/ubl_create_from_ubl_params.rbi +43 -0
  32. data/rbi/e_invoice_api/models/me_retrieve_params.rbi +27 -0
  33. data/rbi/e_invoice_api/models/me_retrieve_response.rbi +195 -0
  34. data/rbi/e_invoice_api/models.rbi +10 -0
  35. data/rbi/e_invoice_api/resources/documents/ubl.rbi +10 -0
  36. data/rbi/e_invoice_api/resources/documents.rbi +54 -1
  37. data/rbi/e_invoice_api/resources/me.rbi +21 -0
  38. data/rbi/e_invoice_api/resources/validate.rbi +20 -1
  39. data/sig/e_invoice_api/client.rbs +2 -0
  40. data/sig/e_invoice_api/models/allowance.rbs +69 -0
  41. data/sig/e_invoice_api/models/charge.rbs +69 -0
  42. data/sig/e_invoice_api/models/document_create.rbs +388 -4
  43. data/sig/e_invoice_api/models/document_create_from_pdf_params.rbs +36 -0
  44. data/sig/e_invoice_api/models/document_create_from_pdf_response.rbs +512 -0
  45. data/sig/e_invoice_api/models/document_response.rbs +168 -32
  46. data/sig/e_invoice_api/models/document_validate_params.rbs +15 -0
  47. data/sig/e_invoice_api/models/documents/ubl_create_from_ubl_params.rbs +26 -0
  48. data/sig/e_invoice_api/models/me_retrieve_params.rbs +15 -0
  49. data/sig/e_invoice_api/models/me_retrieve_response.rbs +107 -0
  50. data/sig/e_invoice_api/models.rbs +10 -0
  51. data/sig/e_invoice_api/resources/documents/ubl.rbs +5 -0
  52. data/sig/e_invoice_api/resources/documents.rbs +15 -1
  53. data/sig/e_invoice_api/resources/me.rbs +11 -0
  54. data/sig/e_invoice_api/resources/validate.rbs +3 -1
  55. metadata +28 -1
@@ -0,0 +1,69 @@
1
+ module EInvoiceAPI
2
+ module Models
3
+ type charge =
4
+ {
5
+ amount: String?,
6
+ base_amount: String?,
7
+ multiplier_factor: String?,
8
+ reason: String?,
9
+ reason_code: String?,
10
+ tax_code: EInvoiceAPI::Models::Charge::tax_code?,
11
+ tax_rate: String?
12
+ }
13
+
14
+ class Charge < EInvoiceAPI::Internal::Type::BaseModel
15
+ attr_accessor amount: String?
16
+
17
+ attr_accessor base_amount: String?
18
+
19
+ attr_accessor multiplier_factor: String?
20
+
21
+ attr_accessor reason: String?
22
+
23
+ attr_accessor reason_code: String?
24
+
25
+ attr_accessor tax_code: EInvoiceAPI::Models::Charge::tax_code?
26
+
27
+ attr_accessor tax_rate: String?
28
+
29
+ def initialize: (
30
+ ?amount: String?,
31
+ ?base_amount: String?,
32
+ ?multiplier_factor: String?,
33
+ ?reason: String?,
34
+ ?reason_code: String?,
35
+ ?tax_code: EInvoiceAPI::Models::Charge::tax_code?,
36
+ ?tax_rate: String?
37
+ ) -> void
38
+
39
+ def to_hash: -> {
40
+ amount: String?,
41
+ base_amount: String?,
42
+ multiplier_factor: String?,
43
+ reason: String?,
44
+ reason_code: String?,
45
+ tax_code: EInvoiceAPI::Models::Charge::tax_code?,
46
+ tax_rate: String?
47
+ }
48
+
49
+ type tax_code = :AE | :E | :S | :Z | :G | :O | :K | :L | :M | :B
50
+
51
+ module TaxCode
52
+ extend EInvoiceAPI::Internal::Type::Enum
53
+
54
+ AE: :AE
55
+ E: :E
56
+ S: :S
57
+ Z: :Z
58
+ G: :G
59
+ O: :O
60
+ K: :K
61
+ L: :L
62
+ M: :M
63
+ B: :B
64
+
65
+ def self?.values: -> ::Array[EInvoiceAPI::Models::Charge::tax_code]
66
+ end
67
+ end
68
+ end
69
+ end
@@ -2,10 +2,12 @@ module EInvoiceAPI
2
2
  module Models
3
3
  type document_create =
4
4
  {
5
+ allowances: ::Array[EInvoiceAPI::DocumentCreate::Allowance]?,
5
6
  amount_due: EInvoiceAPI::Models::DocumentCreate::amount_due?,
6
7
  attachments: ::Array[EInvoiceAPI::DocumentAttachmentCreate]?,
7
8
  billing_address: String?,
8
9
  billing_address_recipient: String?,
10
+ charges: ::Array[EInvoiceAPI::DocumentCreate::Charge]?,
9
11
  currency: EInvoiceAPI::Models::currency_code,
10
12
  customer_address: String?,
11
13
  customer_address_recipient: String?,
@@ -19,7 +21,7 @@ module EInvoiceAPI
19
21
  invoice_date: Date?,
20
22
  invoice_id: String?,
21
23
  invoice_total: EInvoiceAPI::Models::DocumentCreate::invoice_total?,
22
- items: ::Array[EInvoiceAPI::DocumentCreate::Item]?,
24
+ items: ::Array[EInvoiceAPI::DocumentCreate::Item],
23
25
  note: String?,
24
26
  payment_details: ::Array[EInvoiceAPI::PaymentDetailCreate]?,
25
27
  payment_term: String?,
@@ -49,6 +51,8 @@ module EInvoiceAPI
49
51
  }
50
52
 
51
53
  class DocumentCreate < EInvoiceAPI::Internal::Type::BaseModel
54
+ attr_accessor allowances: ::Array[EInvoiceAPI::DocumentCreate::Allowance]?
55
+
52
56
  attr_accessor amount_due: EInvoiceAPI::Models::DocumentCreate::amount_due?
53
57
 
54
58
  attr_accessor attachments: ::Array[EInvoiceAPI::DocumentAttachmentCreate]?
@@ -57,6 +61,8 @@ module EInvoiceAPI
57
61
 
58
62
  attr_accessor billing_address_recipient: String?
59
63
 
64
+ attr_accessor charges: ::Array[EInvoiceAPI::DocumentCreate::Charge]?
65
+
60
66
  attr_reader currency: EInvoiceAPI::Models::currency_code?
61
67
 
62
68
  def currency=: (
@@ -95,7 +101,11 @@ module EInvoiceAPI
95
101
 
96
102
  attr_accessor invoice_total: EInvoiceAPI::Models::DocumentCreate::invoice_total?
97
103
 
98
- attr_accessor items: ::Array[EInvoiceAPI::DocumentCreate::Item]?
104
+ attr_reader items: ::Array[EInvoiceAPI::DocumentCreate::Item]?
105
+
106
+ def items=: (
107
+ ::Array[EInvoiceAPI::DocumentCreate::Item]
108
+ ) -> ::Array[EInvoiceAPI::DocumentCreate::Item]
99
109
 
100
110
  attr_accessor note: String?
101
111
 
@@ -158,10 +168,12 @@ module EInvoiceAPI
158
168
  attr_accessor vendor_tax_id: String?
159
169
 
160
170
  def initialize: (
171
+ ?allowances: ::Array[EInvoiceAPI::DocumentCreate::Allowance]?,
161
172
  ?amount_due: EInvoiceAPI::Models::DocumentCreate::amount_due?,
162
173
  ?attachments: ::Array[EInvoiceAPI::DocumentAttachmentCreate]?,
163
174
  ?billing_address: String?,
164
175
  ?billing_address_recipient: String?,
176
+ ?charges: ::Array[EInvoiceAPI::DocumentCreate::Charge]?,
165
177
  ?currency: EInvoiceAPI::Models::currency_code,
166
178
  ?customer_address: String?,
167
179
  ?customer_address_recipient: String?,
@@ -175,7 +187,7 @@ module EInvoiceAPI
175
187
  ?invoice_date: Date?,
176
188
  ?invoice_id: String?,
177
189
  ?invoice_total: EInvoiceAPI::Models::DocumentCreate::invoice_total?,
178
- ?items: ::Array[EInvoiceAPI::DocumentCreate::Item]?,
190
+ ?items: ::Array[EInvoiceAPI::DocumentCreate::Item],
179
191
  ?note: String?,
180
192
  ?payment_details: ::Array[EInvoiceAPI::PaymentDetailCreate]?,
181
193
  ?payment_term: String?,
@@ -205,10 +217,12 @@ module EInvoiceAPI
205
217
  ) -> void
206
218
 
207
219
  def to_hash: -> {
220
+ allowances: ::Array[EInvoiceAPI::DocumentCreate::Allowance]?,
208
221
  amount_due: EInvoiceAPI::Models::DocumentCreate::amount_due?,
209
222
  attachments: ::Array[EInvoiceAPI::DocumentAttachmentCreate]?,
210
223
  billing_address: String?,
211
224
  billing_address_recipient: String?,
225
+ charges: ::Array[EInvoiceAPI::DocumentCreate::Charge]?,
212
226
  currency: EInvoiceAPI::Models::currency_code,
213
227
  customer_address: String?,
214
228
  customer_address_recipient: String?,
@@ -222,7 +236,7 @@ module EInvoiceAPI
222
236
  invoice_date: Date?,
223
237
  invoice_id: String?,
224
238
  invoice_total: EInvoiceAPI::Models::DocumentCreate::invoice_total?,
225
- items: ::Array[EInvoiceAPI::DocumentCreate::Item]?,
239
+ items: ::Array[EInvoiceAPI::DocumentCreate::Item],
226
240
  note: String?,
227
241
  payment_details: ::Array[EInvoiceAPI::PaymentDetailCreate]?,
228
242
  payment_term: String?,
@@ -251,6 +265,96 @@ module EInvoiceAPI
251
265
  vendor_tax_id: String?
252
266
  }
253
267
 
268
+ type allowance =
269
+ {
270
+ amount: EInvoiceAPI::Models::DocumentCreate::Allowance::amount?,
271
+ base_amount: EInvoiceAPI::Models::DocumentCreate::Allowance::base_amount?,
272
+ multiplier_factor: EInvoiceAPI::Models::DocumentCreate::Allowance::multiplier_factor?,
273
+ reason: String?,
274
+ reason_code: String?,
275
+ tax_code: EInvoiceAPI::Models::DocumentCreate::Allowance::tax_code?,
276
+ tax_rate: String?
277
+ }
278
+
279
+ class Allowance < EInvoiceAPI::Internal::Type::BaseModel
280
+ attr_accessor amount: EInvoiceAPI::Models::DocumentCreate::Allowance::amount?
281
+
282
+ attr_accessor base_amount: EInvoiceAPI::Models::DocumentCreate::Allowance::base_amount?
283
+
284
+ attr_accessor multiplier_factor: EInvoiceAPI::Models::DocumentCreate::Allowance::multiplier_factor?
285
+
286
+ attr_accessor reason: String?
287
+
288
+ attr_accessor reason_code: String?
289
+
290
+ attr_accessor tax_code: EInvoiceAPI::Models::DocumentCreate::Allowance::tax_code?
291
+
292
+ attr_accessor tax_rate: String?
293
+
294
+ def initialize: (
295
+ ?amount: EInvoiceAPI::Models::DocumentCreate::Allowance::amount?,
296
+ ?base_amount: EInvoiceAPI::Models::DocumentCreate::Allowance::base_amount?,
297
+ ?multiplier_factor: EInvoiceAPI::Models::DocumentCreate::Allowance::multiplier_factor?,
298
+ ?reason: String?,
299
+ ?reason_code: String?,
300
+ ?tax_code: EInvoiceAPI::Models::DocumentCreate::Allowance::tax_code?,
301
+ ?tax_rate: String?
302
+ ) -> void
303
+
304
+ def to_hash: -> {
305
+ amount: EInvoiceAPI::Models::DocumentCreate::Allowance::amount?,
306
+ base_amount: EInvoiceAPI::Models::DocumentCreate::Allowance::base_amount?,
307
+ multiplier_factor: EInvoiceAPI::Models::DocumentCreate::Allowance::multiplier_factor?,
308
+ reason: String?,
309
+ reason_code: String?,
310
+ tax_code: EInvoiceAPI::Models::DocumentCreate::Allowance::tax_code?,
311
+ tax_rate: String?
312
+ }
313
+
314
+ type amount = Float | String
315
+
316
+ module Amount
317
+ extend EInvoiceAPI::Internal::Type::Union
318
+
319
+ def self?.variants: -> ::Array[EInvoiceAPI::Models::DocumentCreate::Allowance::amount]
320
+ end
321
+
322
+ type base_amount = Float | String
323
+
324
+ module BaseAmount
325
+ extend EInvoiceAPI::Internal::Type::Union
326
+
327
+ def self?.variants: -> ::Array[EInvoiceAPI::Models::DocumentCreate::Allowance::base_amount]
328
+ end
329
+
330
+ type multiplier_factor = Float | String
331
+
332
+ module MultiplierFactor
333
+ extend EInvoiceAPI::Internal::Type::Union
334
+
335
+ def self?.variants: -> ::Array[EInvoiceAPI::Models::DocumentCreate::Allowance::multiplier_factor]
336
+ end
337
+
338
+ type tax_code = :AE | :E | :S | :Z | :G | :O | :K | :L | :M | :B
339
+
340
+ module TaxCode
341
+ extend EInvoiceAPI::Internal::Type::Enum
342
+
343
+ AE: :AE
344
+ E: :E
345
+ S: :S
346
+ Z: :Z
347
+ G: :G
348
+ O: :O
349
+ K: :K
350
+ L: :L
351
+ M: :M
352
+ B: :B
353
+
354
+ def self?.values: -> ::Array[EInvoiceAPI::Models::DocumentCreate::Allowance::tax_code]
355
+ end
356
+ end
357
+
254
358
  type amount_due = Float | String
255
359
 
256
360
  module AmountDue
@@ -259,6 +363,96 @@ module EInvoiceAPI
259
363
  def self?.variants: -> ::Array[EInvoiceAPI::Models::DocumentCreate::amount_due]
260
364
  end
261
365
 
366
+ type charge =
367
+ {
368
+ amount: EInvoiceAPI::Models::DocumentCreate::Charge::amount?,
369
+ base_amount: EInvoiceAPI::Models::DocumentCreate::Charge::base_amount?,
370
+ multiplier_factor: EInvoiceAPI::Models::DocumentCreate::Charge::multiplier_factor?,
371
+ reason: String?,
372
+ reason_code: String?,
373
+ tax_code: EInvoiceAPI::Models::DocumentCreate::Charge::tax_code?,
374
+ tax_rate: String?
375
+ }
376
+
377
+ class Charge < EInvoiceAPI::Internal::Type::BaseModel
378
+ attr_accessor amount: EInvoiceAPI::Models::DocumentCreate::Charge::amount?
379
+
380
+ attr_accessor base_amount: EInvoiceAPI::Models::DocumentCreate::Charge::base_amount?
381
+
382
+ attr_accessor multiplier_factor: EInvoiceAPI::Models::DocumentCreate::Charge::multiplier_factor?
383
+
384
+ attr_accessor reason: String?
385
+
386
+ attr_accessor reason_code: String?
387
+
388
+ attr_accessor tax_code: EInvoiceAPI::Models::DocumentCreate::Charge::tax_code?
389
+
390
+ attr_accessor tax_rate: String?
391
+
392
+ def initialize: (
393
+ ?amount: EInvoiceAPI::Models::DocumentCreate::Charge::amount?,
394
+ ?base_amount: EInvoiceAPI::Models::DocumentCreate::Charge::base_amount?,
395
+ ?multiplier_factor: EInvoiceAPI::Models::DocumentCreate::Charge::multiplier_factor?,
396
+ ?reason: String?,
397
+ ?reason_code: String?,
398
+ ?tax_code: EInvoiceAPI::Models::DocumentCreate::Charge::tax_code?,
399
+ ?tax_rate: String?
400
+ ) -> void
401
+
402
+ def to_hash: -> {
403
+ amount: EInvoiceAPI::Models::DocumentCreate::Charge::amount?,
404
+ base_amount: EInvoiceAPI::Models::DocumentCreate::Charge::base_amount?,
405
+ multiplier_factor: EInvoiceAPI::Models::DocumentCreate::Charge::multiplier_factor?,
406
+ reason: String?,
407
+ reason_code: String?,
408
+ tax_code: EInvoiceAPI::Models::DocumentCreate::Charge::tax_code?,
409
+ tax_rate: String?
410
+ }
411
+
412
+ type amount = Float | String
413
+
414
+ module Amount
415
+ extend EInvoiceAPI::Internal::Type::Union
416
+
417
+ def self?.variants: -> ::Array[EInvoiceAPI::Models::DocumentCreate::Charge::amount]
418
+ end
419
+
420
+ type base_amount = Float | String
421
+
422
+ module BaseAmount
423
+ extend EInvoiceAPI::Internal::Type::Union
424
+
425
+ def self?.variants: -> ::Array[EInvoiceAPI::Models::DocumentCreate::Charge::base_amount]
426
+ end
427
+
428
+ type multiplier_factor = Float | String
429
+
430
+ module MultiplierFactor
431
+ extend EInvoiceAPI::Internal::Type::Union
432
+
433
+ def self?.variants: -> ::Array[EInvoiceAPI::Models::DocumentCreate::Charge::multiplier_factor]
434
+ end
435
+
436
+ type tax_code = :AE | :E | :S | :Z | :G | :O | :K | :L | :M | :B
437
+
438
+ module TaxCode
439
+ extend EInvoiceAPI::Internal::Type::Enum
440
+
441
+ AE: :AE
442
+ E: :E
443
+ S: :S
444
+ Z: :Z
445
+ G: :G
446
+ O: :O
447
+ K: :K
448
+ L: :L
449
+ M: :M
450
+ B: :B
451
+
452
+ def self?.values: -> ::Array[EInvoiceAPI::Models::DocumentCreate::Charge::tax_code]
453
+ end
454
+ end
455
+
262
456
  type invoice_total = Float | String
263
457
 
264
458
  module InvoiceTotal
@@ -269,7 +463,9 @@ module EInvoiceAPI
269
463
 
270
464
  type item =
271
465
  {
466
+ allowances: ::Array[EInvoiceAPI::DocumentCreate::Item::Allowance]?,
272
467
  amount: EInvoiceAPI::Models::DocumentCreate::Item::amount?,
468
+ charges: ::Array[EInvoiceAPI::DocumentCreate::Item::Charge]?,
273
469
  date: nil,
274
470
  description: String?,
275
471
  product_code: String?,
@@ -281,8 +477,12 @@ module EInvoiceAPI
281
477
  }
282
478
 
283
479
  class Item < EInvoiceAPI::Internal::Type::BaseModel
480
+ attr_accessor allowances: ::Array[EInvoiceAPI::DocumentCreate::Item::Allowance]?
481
+
284
482
  attr_accessor amount: EInvoiceAPI::Models::DocumentCreate::Item::amount?
285
483
 
484
+ attr_accessor charges: ::Array[EInvoiceAPI::DocumentCreate::Item::Charge]?
485
+
286
486
  attr_accessor date: nil
287
487
 
288
488
  attr_accessor description: String?
@@ -300,7 +500,9 @@ module EInvoiceAPI
300
500
  attr_accessor unit_price: EInvoiceAPI::Models::DocumentCreate::Item::unit_price?
301
501
 
302
502
  def initialize: (
503
+ ?allowances: ::Array[EInvoiceAPI::DocumentCreate::Item::Allowance]?,
303
504
  ?amount: EInvoiceAPI::Models::DocumentCreate::Item::amount?,
505
+ ?charges: ::Array[EInvoiceAPI::DocumentCreate::Item::Charge]?,
304
506
  ?date: nil,
305
507
  ?description: String?,
306
508
  ?product_code: String?,
@@ -312,7 +514,9 @@ module EInvoiceAPI
312
514
  ) -> void
313
515
 
314
516
  def to_hash: -> {
517
+ allowances: ::Array[EInvoiceAPI::DocumentCreate::Item::Allowance]?,
315
518
  amount: EInvoiceAPI::Models::DocumentCreate::Item::amount?,
519
+ charges: ::Array[EInvoiceAPI::DocumentCreate::Item::Charge]?,
316
520
  date: nil,
317
521
  description: String?,
318
522
  product_code: String?,
@@ -323,6 +527,96 @@ module EInvoiceAPI
323
527
  unit_price: EInvoiceAPI::Models::DocumentCreate::Item::unit_price?
324
528
  }
325
529
 
530
+ type allowance =
531
+ {
532
+ amount: EInvoiceAPI::Models::DocumentCreate::Item::Allowance::amount?,
533
+ base_amount: EInvoiceAPI::Models::DocumentCreate::Item::Allowance::base_amount?,
534
+ multiplier_factor: EInvoiceAPI::Models::DocumentCreate::Item::Allowance::multiplier_factor?,
535
+ reason: String?,
536
+ reason_code: String?,
537
+ tax_code: EInvoiceAPI::Models::DocumentCreate::Item::Allowance::tax_code?,
538
+ tax_rate: String?
539
+ }
540
+
541
+ class Allowance < EInvoiceAPI::Internal::Type::BaseModel
542
+ attr_accessor amount: EInvoiceAPI::Models::DocumentCreate::Item::Allowance::amount?
543
+
544
+ attr_accessor base_amount: EInvoiceAPI::Models::DocumentCreate::Item::Allowance::base_amount?
545
+
546
+ attr_accessor multiplier_factor: EInvoiceAPI::Models::DocumentCreate::Item::Allowance::multiplier_factor?
547
+
548
+ attr_accessor reason: String?
549
+
550
+ attr_accessor reason_code: String?
551
+
552
+ attr_accessor tax_code: EInvoiceAPI::Models::DocumentCreate::Item::Allowance::tax_code?
553
+
554
+ attr_accessor tax_rate: String?
555
+
556
+ def initialize: (
557
+ ?amount: EInvoiceAPI::Models::DocumentCreate::Item::Allowance::amount?,
558
+ ?base_amount: EInvoiceAPI::Models::DocumentCreate::Item::Allowance::base_amount?,
559
+ ?multiplier_factor: EInvoiceAPI::Models::DocumentCreate::Item::Allowance::multiplier_factor?,
560
+ ?reason: String?,
561
+ ?reason_code: String?,
562
+ ?tax_code: EInvoiceAPI::Models::DocumentCreate::Item::Allowance::tax_code?,
563
+ ?tax_rate: String?
564
+ ) -> void
565
+
566
+ def to_hash: -> {
567
+ amount: EInvoiceAPI::Models::DocumentCreate::Item::Allowance::amount?,
568
+ base_amount: EInvoiceAPI::Models::DocumentCreate::Item::Allowance::base_amount?,
569
+ multiplier_factor: EInvoiceAPI::Models::DocumentCreate::Item::Allowance::multiplier_factor?,
570
+ reason: String?,
571
+ reason_code: String?,
572
+ tax_code: EInvoiceAPI::Models::DocumentCreate::Item::Allowance::tax_code?,
573
+ tax_rate: String?
574
+ }
575
+
576
+ type amount = Float | String
577
+
578
+ module Amount
579
+ extend EInvoiceAPI::Internal::Type::Union
580
+
581
+ def self?.variants: -> ::Array[EInvoiceAPI::Models::DocumentCreate::Item::Allowance::amount]
582
+ end
583
+
584
+ type base_amount = Float | String
585
+
586
+ module BaseAmount
587
+ extend EInvoiceAPI::Internal::Type::Union
588
+
589
+ def self?.variants: -> ::Array[EInvoiceAPI::Models::DocumentCreate::Item::Allowance::base_amount]
590
+ end
591
+
592
+ type multiplier_factor = Float | String
593
+
594
+ module MultiplierFactor
595
+ extend EInvoiceAPI::Internal::Type::Union
596
+
597
+ def self?.variants: -> ::Array[EInvoiceAPI::Models::DocumentCreate::Item::Allowance::multiplier_factor]
598
+ end
599
+
600
+ type tax_code = :AE | :E | :S | :Z | :G | :O | :K | :L | :M | :B
601
+
602
+ module TaxCode
603
+ extend EInvoiceAPI::Internal::Type::Enum
604
+
605
+ AE: :AE
606
+ E: :E
607
+ S: :S
608
+ Z: :Z
609
+ G: :G
610
+ O: :O
611
+ K: :K
612
+ L: :L
613
+ M: :M
614
+ B: :B
615
+
616
+ def self?.values: -> ::Array[EInvoiceAPI::Models::DocumentCreate::Item::Allowance::tax_code]
617
+ end
618
+ end
619
+
326
620
  type amount = Float | String
327
621
 
328
622
  module Amount
@@ -331,6 +625,96 @@ module EInvoiceAPI
331
625
  def self?.variants: -> ::Array[EInvoiceAPI::Models::DocumentCreate::Item::amount]
332
626
  end
333
627
 
628
+ type charge =
629
+ {
630
+ amount: EInvoiceAPI::Models::DocumentCreate::Item::Charge::amount?,
631
+ base_amount: EInvoiceAPI::Models::DocumentCreate::Item::Charge::base_amount?,
632
+ multiplier_factor: EInvoiceAPI::Models::DocumentCreate::Item::Charge::multiplier_factor?,
633
+ reason: String?,
634
+ reason_code: String?,
635
+ tax_code: EInvoiceAPI::Models::DocumentCreate::Item::Charge::tax_code?,
636
+ tax_rate: String?
637
+ }
638
+
639
+ class Charge < EInvoiceAPI::Internal::Type::BaseModel
640
+ attr_accessor amount: EInvoiceAPI::Models::DocumentCreate::Item::Charge::amount?
641
+
642
+ attr_accessor base_amount: EInvoiceAPI::Models::DocumentCreate::Item::Charge::base_amount?
643
+
644
+ attr_accessor multiplier_factor: EInvoiceAPI::Models::DocumentCreate::Item::Charge::multiplier_factor?
645
+
646
+ attr_accessor reason: String?
647
+
648
+ attr_accessor reason_code: String?
649
+
650
+ attr_accessor tax_code: EInvoiceAPI::Models::DocumentCreate::Item::Charge::tax_code?
651
+
652
+ attr_accessor tax_rate: String?
653
+
654
+ def initialize: (
655
+ ?amount: EInvoiceAPI::Models::DocumentCreate::Item::Charge::amount?,
656
+ ?base_amount: EInvoiceAPI::Models::DocumentCreate::Item::Charge::base_amount?,
657
+ ?multiplier_factor: EInvoiceAPI::Models::DocumentCreate::Item::Charge::multiplier_factor?,
658
+ ?reason: String?,
659
+ ?reason_code: String?,
660
+ ?tax_code: EInvoiceAPI::Models::DocumentCreate::Item::Charge::tax_code?,
661
+ ?tax_rate: String?
662
+ ) -> void
663
+
664
+ def to_hash: -> {
665
+ amount: EInvoiceAPI::Models::DocumentCreate::Item::Charge::amount?,
666
+ base_amount: EInvoiceAPI::Models::DocumentCreate::Item::Charge::base_amount?,
667
+ multiplier_factor: EInvoiceAPI::Models::DocumentCreate::Item::Charge::multiplier_factor?,
668
+ reason: String?,
669
+ reason_code: String?,
670
+ tax_code: EInvoiceAPI::Models::DocumentCreate::Item::Charge::tax_code?,
671
+ tax_rate: String?
672
+ }
673
+
674
+ type amount = Float | String
675
+
676
+ module Amount
677
+ extend EInvoiceAPI::Internal::Type::Union
678
+
679
+ def self?.variants: -> ::Array[EInvoiceAPI::Models::DocumentCreate::Item::Charge::amount]
680
+ end
681
+
682
+ type base_amount = Float | String
683
+
684
+ module BaseAmount
685
+ extend EInvoiceAPI::Internal::Type::Union
686
+
687
+ def self?.variants: -> ::Array[EInvoiceAPI::Models::DocumentCreate::Item::Charge::base_amount]
688
+ end
689
+
690
+ type multiplier_factor = Float | String
691
+
692
+ module MultiplierFactor
693
+ extend EInvoiceAPI::Internal::Type::Union
694
+
695
+ def self?.variants: -> ::Array[EInvoiceAPI::Models::DocumentCreate::Item::Charge::multiplier_factor]
696
+ end
697
+
698
+ type tax_code = :AE | :E | :S | :Z | :G | :O | :K | :L | :M | :B
699
+
700
+ module TaxCode
701
+ extend EInvoiceAPI::Internal::Type::Enum
702
+
703
+ AE: :AE
704
+ E: :E
705
+ S: :S
706
+ Z: :Z
707
+ G: :G
708
+ O: :O
709
+ K: :K
710
+ L: :L
711
+ M: :M
712
+ B: :B
713
+
714
+ def self?.values: -> ::Array[EInvoiceAPI::Models::DocumentCreate::Item::Charge::tax_code]
715
+ end
716
+ end
717
+
334
718
  type quantity = Float | String
335
719
 
336
720
  module Quantity
@@ -0,0 +1,36 @@
1
+ module EInvoiceAPI
2
+ module Models
3
+ type document_create_from_pdf_params =
4
+ {
5
+ file: EInvoiceAPI::Internal::file_input,
6
+ customer_tax_id: String?,
7
+ vendor_tax_id: String?
8
+ }
9
+ & EInvoiceAPI::Internal::Type::request_parameters
10
+
11
+ class DocumentCreateFromPdfParams < EInvoiceAPI::Internal::Type::BaseModel
12
+ extend EInvoiceAPI::Internal::Type::RequestParameters::Converter
13
+ include EInvoiceAPI::Internal::Type::RequestParameters
14
+
15
+ attr_accessor file: EInvoiceAPI::Internal::file_input
16
+
17
+ attr_accessor customer_tax_id: String?
18
+
19
+ attr_accessor vendor_tax_id: String?
20
+
21
+ def initialize: (
22
+ file: EInvoiceAPI::Internal::file_input,
23
+ ?customer_tax_id: String?,
24
+ ?vendor_tax_id: String?,
25
+ ?request_options: EInvoiceAPI::request_opts
26
+ ) -> void
27
+
28
+ def to_hash: -> {
29
+ file: EInvoiceAPI::Internal::file_input,
30
+ customer_tax_id: String?,
31
+ vendor_tax_id: String?,
32
+ request_options: EInvoiceAPI::RequestOptions
33
+ }
34
+ end
35
+ end
36
+ end