e-invoice-api 0.6.0 → 0.7.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.
@@ -3,10 +3,12 @@ module EInvoiceAPI
3
3
  type document_response =
4
4
  {
5
5
  id: String,
6
+ allowances: ::Array[EInvoiceAPI::DocumentResponse::Allowance]?,
6
7
  amount_due: String?,
7
- attachments: ::Array[EInvoiceAPI::Documents::DocumentAttachment],
8
+ attachments: ::Array[EInvoiceAPI::Documents::DocumentAttachment]?,
8
9
  billing_address: String?,
9
10
  billing_address_recipient: String?,
11
+ charges: ::Array[EInvoiceAPI::DocumentResponse::Charge]?,
10
12
  currency: EInvoiceAPI::Models::currency_code,
11
13
  customer_address: String?,
12
14
  customer_address_recipient: String?,
@@ -20,9 +22,9 @@ module EInvoiceAPI
20
22
  invoice_date: Date?,
21
23
  invoice_id: String?,
22
24
  invoice_total: String?,
23
- items: ::Array[EInvoiceAPI::DocumentResponse::Item],
25
+ items: ::Array[EInvoiceAPI::DocumentResponse::Item]?,
24
26
  note: String?,
25
- payment_details: ::Array[EInvoiceAPI::DocumentResponse::PaymentDetail],
27
+ payment_details: ::Array[EInvoiceAPI::DocumentResponse::PaymentDetail]?,
26
28
  payment_term: String?,
27
29
  previous_unpaid_balance: String?,
28
30
  purchase_order: String?,
@@ -37,7 +39,7 @@ module EInvoiceAPI
37
39
  state: EInvoiceAPI::Models::document_state,
38
40
  subtotal: String?,
39
41
  tax_code: EInvoiceAPI::Models::DocumentResponse::tax_code,
40
- tax_details: ::Array[EInvoiceAPI::DocumentResponse::TaxDetail],
42
+ tax_details: ::Array[EInvoiceAPI::DocumentResponse::TaxDetail]?,
41
43
  total_discount: String?,
42
44
  total_tax: String?,
43
45
  vatex: EInvoiceAPI::Models::DocumentResponse::vatex?,
@@ -52,18 +54,18 @@ module EInvoiceAPI
52
54
  class DocumentResponse < EInvoiceAPI::Internal::Type::BaseModel
53
55
  attr_accessor id: String
54
56
 
55
- attr_accessor amount_due: String?
57
+ attr_accessor allowances: ::Array[EInvoiceAPI::DocumentResponse::Allowance]?
56
58
 
57
- attr_reader attachments: ::Array[EInvoiceAPI::Documents::DocumentAttachment]?
59
+ attr_accessor amount_due: String?
58
60
 
59
- def attachments=: (
60
- ::Array[EInvoiceAPI::Documents::DocumentAttachment]
61
- ) -> ::Array[EInvoiceAPI::Documents::DocumentAttachment]
61
+ attr_accessor attachments: ::Array[EInvoiceAPI::Documents::DocumentAttachment]?
62
62
 
63
63
  attr_accessor billing_address: String?
64
64
 
65
65
  attr_accessor billing_address_recipient: String?
66
66
 
67
+ attr_accessor charges: ::Array[EInvoiceAPI::DocumentResponse::Charge]?
68
+
67
69
  attr_reader currency: EInvoiceAPI::Models::currency_code?
68
70
 
69
71
  def currency=: (
@@ -102,19 +104,11 @@ module EInvoiceAPI
102
104
 
103
105
  attr_accessor invoice_total: String?
104
106
 
105
- attr_reader items: ::Array[EInvoiceAPI::DocumentResponse::Item]?
106
-
107
- def items=: (
108
- ::Array[EInvoiceAPI::DocumentResponse::Item]
109
- ) -> ::Array[EInvoiceAPI::DocumentResponse::Item]
107
+ attr_accessor items: ::Array[EInvoiceAPI::DocumentResponse::Item]?
110
108
 
111
109
  attr_accessor note: String?
112
110
 
113
- attr_reader payment_details: ::Array[EInvoiceAPI::DocumentResponse::PaymentDetail]?
114
-
115
- def payment_details=: (
116
- ::Array[EInvoiceAPI::DocumentResponse::PaymentDetail]
117
- ) -> ::Array[EInvoiceAPI::DocumentResponse::PaymentDetail]
111
+ attr_accessor payment_details: ::Array[EInvoiceAPI::DocumentResponse::PaymentDetail]?
118
112
 
119
113
  attr_accessor payment_term: String?
120
114
 
@@ -152,11 +146,7 @@ module EInvoiceAPI
152
146
  EInvoiceAPI::Models::DocumentResponse::tax_code
153
147
  ) -> EInvoiceAPI::Models::DocumentResponse::tax_code
154
148
 
155
- attr_reader tax_details: ::Array[EInvoiceAPI::DocumentResponse::TaxDetail]?
156
-
157
- def tax_details=: (
158
- ::Array[EInvoiceAPI::DocumentResponse::TaxDetail]
159
- ) -> ::Array[EInvoiceAPI::DocumentResponse::TaxDetail]
149
+ attr_accessor tax_details: ::Array[EInvoiceAPI::DocumentResponse::TaxDetail]?
160
150
 
161
151
  attr_accessor total_discount: String?
162
152
 
@@ -178,10 +168,12 @@ module EInvoiceAPI
178
168
 
179
169
  def initialize: (
180
170
  id: String,
171
+ ?allowances: ::Array[EInvoiceAPI::DocumentResponse::Allowance]?,
181
172
  ?amount_due: String?,
182
- ?attachments: ::Array[EInvoiceAPI::Documents::DocumentAttachment],
173
+ ?attachments: ::Array[EInvoiceAPI::Documents::DocumentAttachment]?,
183
174
  ?billing_address: String?,
184
175
  ?billing_address_recipient: String?,
176
+ ?charges: ::Array[EInvoiceAPI::DocumentResponse::Charge]?,
185
177
  ?currency: EInvoiceAPI::Models::currency_code,
186
178
  ?customer_address: String?,
187
179
  ?customer_address_recipient: String?,
@@ -195,9 +187,9 @@ module EInvoiceAPI
195
187
  ?invoice_date: Date?,
196
188
  ?invoice_id: String?,
197
189
  ?invoice_total: String?,
198
- ?items: ::Array[EInvoiceAPI::DocumentResponse::Item],
190
+ ?items: ::Array[EInvoiceAPI::DocumentResponse::Item]?,
199
191
  ?note: String?,
200
- ?payment_details: ::Array[EInvoiceAPI::DocumentResponse::PaymentDetail],
192
+ ?payment_details: ::Array[EInvoiceAPI::DocumentResponse::PaymentDetail]?,
201
193
  ?payment_term: String?,
202
194
  ?previous_unpaid_balance: String?,
203
195
  ?purchase_order: String?,
@@ -212,7 +204,7 @@ module EInvoiceAPI
212
204
  ?state: EInvoiceAPI::Models::document_state,
213
205
  ?subtotal: String?,
214
206
  ?tax_code: EInvoiceAPI::Models::DocumentResponse::tax_code,
215
- ?tax_details: ::Array[EInvoiceAPI::DocumentResponse::TaxDetail],
207
+ ?tax_details: ::Array[EInvoiceAPI::DocumentResponse::TaxDetail]?,
216
208
  ?total_discount: String?,
217
209
  ?total_tax: String?,
218
210
  ?vatex: EInvoiceAPI::Models::DocumentResponse::vatex?,
@@ -226,10 +218,12 @@ module EInvoiceAPI
226
218
 
227
219
  def to_hash: -> {
228
220
  id: String,
221
+ allowances: ::Array[EInvoiceAPI::DocumentResponse::Allowance]?,
229
222
  amount_due: String?,
230
- attachments: ::Array[EInvoiceAPI::Documents::DocumentAttachment],
223
+ attachments: ::Array[EInvoiceAPI::Documents::DocumentAttachment]?,
231
224
  billing_address: String?,
232
225
  billing_address_recipient: String?,
226
+ charges: ::Array[EInvoiceAPI::DocumentResponse::Charge]?,
233
227
  currency: EInvoiceAPI::Models::currency_code,
234
228
  customer_address: String?,
235
229
  customer_address_recipient: String?,
@@ -243,9 +237,9 @@ module EInvoiceAPI
243
237
  invoice_date: Date?,
244
238
  invoice_id: String?,
245
239
  invoice_total: String?,
246
- items: ::Array[EInvoiceAPI::DocumentResponse::Item],
240
+ items: ::Array[EInvoiceAPI::DocumentResponse::Item]?,
247
241
  note: String?,
248
- payment_details: ::Array[EInvoiceAPI::DocumentResponse::PaymentDetail],
242
+ payment_details: ::Array[EInvoiceAPI::DocumentResponse::PaymentDetail]?,
249
243
  payment_term: String?,
250
244
  previous_unpaid_balance: String?,
251
245
  purchase_order: String?,
@@ -260,7 +254,7 @@ module EInvoiceAPI
260
254
  state: EInvoiceAPI::Models::document_state,
261
255
  subtotal: String?,
262
256
  tax_code: EInvoiceAPI::Models::DocumentResponse::tax_code,
263
- tax_details: ::Array[EInvoiceAPI::DocumentResponse::TaxDetail],
257
+ tax_details: ::Array[EInvoiceAPI::DocumentResponse::TaxDetail]?,
264
258
  total_discount: String?,
265
259
  total_tax: String?,
266
260
  vatex: EInvoiceAPI::Models::DocumentResponse::vatex?,
@@ -272,9 +266,143 @@ module EInvoiceAPI
272
266
  vendor_tax_id: String?
273
267
  }
274
268
 
269
+ type allowance =
270
+ {
271
+ amount: String?,
272
+ base_amount: String?,
273
+ multiplier_factor: String?,
274
+ reason: String?,
275
+ reason_code: String?,
276
+ tax_code: EInvoiceAPI::Models::DocumentResponse::Allowance::tax_code?,
277
+ tax_rate: String?
278
+ }
279
+
280
+ class Allowance < EInvoiceAPI::Internal::Type::BaseModel
281
+ attr_accessor amount: String?
282
+
283
+ attr_accessor base_amount: String?
284
+
285
+ attr_accessor multiplier_factor: String?
286
+
287
+ attr_accessor reason: String?
288
+
289
+ attr_accessor reason_code: String?
290
+
291
+ attr_accessor tax_code: EInvoiceAPI::Models::DocumentResponse::Allowance::tax_code?
292
+
293
+ attr_accessor tax_rate: String?
294
+
295
+ def initialize: (
296
+ ?amount: String?,
297
+ ?base_amount: String?,
298
+ ?multiplier_factor: String?,
299
+ ?reason: String?,
300
+ ?reason_code: String?,
301
+ ?tax_code: EInvoiceAPI::Models::DocumentResponse::Allowance::tax_code?,
302
+ ?tax_rate: String?
303
+ ) -> void
304
+
305
+ def to_hash: -> {
306
+ amount: String?,
307
+ base_amount: String?,
308
+ multiplier_factor: String?,
309
+ reason: String?,
310
+ reason_code: String?,
311
+ tax_code: EInvoiceAPI::Models::DocumentResponse::Allowance::tax_code?,
312
+ tax_rate: String?
313
+ }
314
+
315
+ type tax_code = :AE | :E | :S | :Z | :G | :O | :K | :L | :M | :B
316
+
317
+ module TaxCode
318
+ extend EInvoiceAPI::Internal::Type::Enum
319
+
320
+ AE: :AE
321
+ E: :E
322
+ S: :S
323
+ Z: :Z
324
+ G: :G
325
+ O: :O
326
+ K: :K
327
+ L: :L
328
+ M: :M
329
+ B: :B
330
+
331
+ def self?.values: -> ::Array[EInvoiceAPI::Models::DocumentResponse::Allowance::tax_code]
332
+ end
333
+ end
334
+
335
+ type charge =
336
+ {
337
+ amount: String?,
338
+ base_amount: String?,
339
+ multiplier_factor: String?,
340
+ reason: String?,
341
+ reason_code: String?,
342
+ tax_code: EInvoiceAPI::Models::DocumentResponse::Charge::tax_code?,
343
+ tax_rate: String?
344
+ }
345
+
346
+ class Charge < EInvoiceAPI::Internal::Type::BaseModel
347
+ attr_accessor amount: String?
348
+
349
+ attr_accessor base_amount: String?
350
+
351
+ attr_accessor multiplier_factor: String?
352
+
353
+ attr_accessor reason: String?
354
+
355
+ attr_accessor reason_code: String?
356
+
357
+ attr_accessor tax_code: EInvoiceAPI::Models::DocumentResponse::Charge::tax_code?
358
+
359
+ attr_accessor tax_rate: String?
360
+
361
+ def initialize: (
362
+ ?amount: String?,
363
+ ?base_amount: String?,
364
+ ?multiplier_factor: String?,
365
+ ?reason: String?,
366
+ ?reason_code: String?,
367
+ ?tax_code: EInvoiceAPI::Models::DocumentResponse::Charge::tax_code?,
368
+ ?tax_rate: String?
369
+ ) -> void
370
+
371
+ def to_hash: -> {
372
+ amount: String?,
373
+ base_amount: String?,
374
+ multiplier_factor: String?,
375
+ reason: String?,
376
+ reason_code: String?,
377
+ tax_code: EInvoiceAPI::Models::DocumentResponse::Charge::tax_code?,
378
+ tax_rate: String?
379
+ }
380
+
381
+ type tax_code = :AE | :E | :S | :Z | :G | :O | :K | :L | :M | :B
382
+
383
+ module TaxCode
384
+ extend EInvoiceAPI::Internal::Type::Enum
385
+
386
+ AE: :AE
387
+ E: :E
388
+ S: :S
389
+ Z: :Z
390
+ G: :G
391
+ O: :O
392
+ K: :K
393
+ L: :L
394
+ M: :M
395
+ B: :B
396
+
397
+ def self?.values: -> ::Array[EInvoiceAPI::Models::DocumentResponse::Charge::tax_code]
398
+ end
399
+ end
400
+
275
401
  type item =
276
402
  {
403
+ allowances: ::Array[EInvoiceAPI::DocumentResponse::Item::Allowance]?,
277
404
  amount: String?,
405
+ charges: ::Array[EInvoiceAPI::DocumentResponse::Item::Charge]?,
278
406
  date: nil,
279
407
  description: String?,
280
408
  product_code: String?,
@@ -286,8 +414,12 @@ module EInvoiceAPI
286
414
  }
287
415
 
288
416
  class Item < EInvoiceAPI::Internal::Type::BaseModel
417
+ attr_accessor allowances: ::Array[EInvoiceAPI::DocumentResponse::Item::Allowance]?
418
+
289
419
  attr_accessor amount: String?
290
420
 
421
+ attr_accessor charges: ::Array[EInvoiceAPI::DocumentResponse::Item::Charge]?
422
+
291
423
  attr_accessor date: nil
292
424
 
293
425
  attr_accessor description: String?
@@ -305,7 +437,9 @@ module EInvoiceAPI
305
437
  attr_accessor unit_price: String?
306
438
 
307
439
  def initialize: (
440
+ ?allowances: ::Array[EInvoiceAPI::DocumentResponse::Item::Allowance]?,
308
441
  ?amount: String?,
442
+ ?charges: ::Array[EInvoiceAPI::DocumentResponse::Item::Charge]?,
309
443
  ?date: nil,
310
444
  ?description: String?,
311
445
  ?product_code: String?,
@@ -317,7 +451,9 @@ module EInvoiceAPI
317
451
  ) -> void
318
452
 
319
453
  def to_hash: -> {
454
+ allowances: ::Array[EInvoiceAPI::DocumentResponse::Item::Allowance]?,
320
455
  amount: String?,
456
+ charges: ::Array[EInvoiceAPI::DocumentResponse::Item::Charge]?,
321
457
  date: nil,
322
458
  description: String?,
323
459
  product_code: String?,
@@ -327,6 +463,138 @@ module EInvoiceAPI
327
463
  unit: EInvoiceAPI::Models::unit_of_measure_code?,
328
464
  unit_price: String?
329
465
  }
466
+
467
+ type allowance =
468
+ {
469
+ amount: String?,
470
+ base_amount: String?,
471
+ multiplier_factor: String?,
472
+ reason: String?,
473
+ reason_code: String?,
474
+ tax_code: EInvoiceAPI::Models::DocumentResponse::Item::Allowance::tax_code?,
475
+ tax_rate: String?
476
+ }
477
+
478
+ class Allowance < EInvoiceAPI::Internal::Type::BaseModel
479
+ attr_accessor amount: String?
480
+
481
+ attr_accessor base_amount: String?
482
+
483
+ attr_accessor multiplier_factor: String?
484
+
485
+ attr_accessor reason: String?
486
+
487
+ attr_accessor reason_code: String?
488
+
489
+ attr_accessor tax_code: EInvoiceAPI::Models::DocumentResponse::Item::Allowance::tax_code?
490
+
491
+ attr_accessor tax_rate: String?
492
+
493
+ def initialize: (
494
+ ?amount: String?,
495
+ ?base_amount: String?,
496
+ ?multiplier_factor: String?,
497
+ ?reason: String?,
498
+ ?reason_code: String?,
499
+ ?tax_code: EInvoiceAPI::Models::DocumentResponse::Item::Allowance::tax_code?,
500
+ ?tax_rate: String?
501
+ ) -> void
502
+
503
+ def to_hash: -> {
504
+ amount: String?,
505
+ base_amount: String?,
506
+ multiplier_factor: String?,
507
+ reason: String?,
508
+ reason_code: String?,
509
+ tax_code: EInvoiceAPI::Models::DocumentResponse::Item::Allowance::tax_code?,
510
+ tax_rate: String?
511
+ }
512
+
513
+ type tax_code = :AE | :E | :S | :Z | :G | :O | :K | :L | :M | :B
514
+
515
+ module TaxCode
516
+ extend EInvoiceAPI::Internal::Type::Enum
517
+
518
+ AE: :AE
519
+ E: :E
520
+ S: :S
521
+ Z: :Z
522
+ G: :G
523
+ O: :O
524
+ K: :K
525
+ L: :L
526
+ M: :M
527
+ B: :B
528
+
529
+ def self?.values: -> ::Array[EInvoiceAPI::Models::DocumentResponse::Item::Allowance::tax_code]
530
+ end
531
+ end
532
+
533
+ type charge =
534
+ {
535
+ amount: String?,
536
+ base_amount: String?,
537
+ multiplier_factor: String?,
538
+ reason: String?,
539
+ reason_code: String?,
540
+ tax_code: EInvoiceAPI::Models::DocumentResponse::Item::Charge::tax_code?,
541
+ tax_rate: String?
542
+ }
543
+
544
+ class Charge < EInvoiceAPI::Internal::Type::BaseModel
545
+ attr_accessor amount: String?
546
+
547
+ attr_accessor base_amount: String?
548
+
549
+ attr_accessor multiplier_factor: String?
550
+
551
+ attr_accessor reason: String?
552
+
553
+ attr_accessor reason_code: String?
554
+
555
+ attr_accessor tax_code: EInvoiceAPI::Models::DocumentResponse::Item::Charge::tax_code?
556
+
557
+ attr_accessor tax_rate: String?
558
+
559
+ def initialize: (
560
+ ?amount: String?,
561
+ ?base_amount: String?,
562
+ ?multiplier_factor: String?,
563
+ ?reason: String?,
564
+ ?reason_code: String?,
565
+ ?tax_code: EInvoiceAPI::Models::DocumentResponse::Item::Charge::tax_code?,
566
+ ?tax_rate: String?
567
+ ) -> void
568
+
569
+ def to_hash: -> {
570
+ amount: String?,
571
+ base_amount: String?,
572
+ multiplier_factor: String?,
573
+ reason: String?,
574
+ reason_code: String?,
575
+ tax_code: EInvoiceAPI::Models::DocumentResponse::Item::Charge::tax_code?,
576
+ tax_rate: String?
577
+ }
578
+
579
+ type tax_code = :AE | :E | :S | :Z | :G | :O | :K | :L | :M | :B
580
+
581
+ module TaxCode
582
+ extend EInvoiceAPI::Internal::Type::Enum
583
+
584
+ AE: :AE
585
+ E: :E
586
+ S: :S
587
+ Z: :Z
588
+ G: :G
589
+ O: :O
590
+ K: :K
591
+ L: :L
592
+ M: :M
593
+ B: :B
594
+
595
+ def self?.values: -> ::Array[EInvoiceAPI::Models::DocumentResponse::Item::Charge::tax_code]
596
+ end
597
+ end
330
598
  end
331
599
 
332
600
  type payment_detail =
@@ -6,10 +6,12 @@ module EInvoiceAPI
6
6
  attr_reader ubl: EInvoiceAPI::Resources::Documents::Ubl
7
7
 
8
8
  def create: (
9
+ ?allowances: ::Array[EInvoiceAPI::DocumentCreate::Allowance]?,
9
10
  ?amount_due: EInvoiceAPI::Models::DocumentCreate::amount_due?,
10
11
  ?attachments: ::Array[EInvoiceAPI::DocumentAttachmentCreate]?,
11
12
  ?billing_address: String?,
12
13
  ?billing_address_recipient: String?,
14
+ ?charges: ::Array[EInvoiceAPI::DocumentCreate::Charge]?,
13
15
  ?currency: EInvoiceAPI::Models::currency_code,
14
16
  ?customer_address: String?,
15
17
  ?customer_address_recipient: String?,
@@ -23,7 +25,7 @@ module EInvoiceAPI
23
25
  ?invoice_date: Date?,
24
26
  ?invoice_id: String?,
25
27
  ?invoice_total: EInvoiceAPI::Models::DocumentCreate::invoice_total?,
26
- ?items: ::Array[EInvoiceAPI::DocumentCreate::Item]?,
28
+ ?items: ::Array[EInvoiceAPI::DocumentCreate::Item],
27
29
  ?note: String?,
28
30
  ?payment_details: ::Array[EInvoiceAPI::PaymentDetailCreate]?,
29
31
  ?payment_term: String?,
@@ -2,10 +2,12 @@ module EInvoiceAPI
2
2
  module Resources
3
3
  class Validate
4
4
  def validate_json: (
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?,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: e-invoice-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - e-invoice