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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +1 -1
- data/lib/e_invoice_api/models/document_create.rb +666 -19
- data/lib/e_invoice_api/models/document_response.rb +451 -23
- data/lib/e_invoice_api/resources/documents.rb +12 -8
- data/lib/e_invoice_api/resources/validate.rb +12 -8
- data/lib/e_invoice_api/version.rb +1 -1
- data/rbi/e_invoice_api/models/document_create.rbi +1180 -3
- data/rbi/e_invoice_api/models/document_response.rbi +838 -43
- data/rbi/e_invoice_api/resources/documents.rbi +20 -1
- data/rbi/e_invoice_api/resources/validate.rbi +20 -1
- data/sig/e_invoice_api/models/document_create.rbs +388 -4
- data/sig/e_invoice_api/models/document_response.rbs +300 -32
- data/sig/e_invoice_api/resources/documents.rbs +3 -1
- data/sig/e_invoice_api/resources/validate.rbs +3 -1
- metadata +1 -1
@@ -12,12 +12,16 @@ module EInvoiceAPI
|
|
12
12
|
# Create a new invoice or credit note
|
13
13
|
sig do
|
14
14
|
params(
|
15
|
+
allowances:
|
16
|
+
T.nilable(T::Array[EInvoiceAPI::DocumentCreate::Allowance::OrHash]),
|
15
17
|
amount_due:
|
16
18
|
T.nilable(EInvoiceAPI::DocumentCreate::AmountDue::Variants),
|
17
19
|
attachments:
|
18
20
|
T.nilable(T::Array[EInvoiceAPI::DocumentAttachmentCreate::OrHash]),
|
19
21
|
billing_address: T.nilable(String),
|
20
22
|
billing_address_recipient: T.nilable(String),
|
23
|
+
charges:
|
24
|
+
T.nilable(T::Array[EInvoiceAPI::DocumentCreate::Charge::OrHash]),
|
21
25
|
currency: EInvoiceAPI::CurrencyCode::OrSymbol,
|
22
26
|
customer_address: T.nilable(String),
|
23
27
|
customer_address_recipient: T.nilable(String),
|
@@ -32,7 +36,7 @@ module EInvoiceAPI
|
|
32
36
|
invoice_id: T.nilable(String),
|
33
37
|
invoice_total:
|
34
38
|
T.nilable(EInvoiceAPI::DocumentCreate::InvoiceTotal::Variants),
|
35
|
-
items: T
|
39
|
+
items: T::Array[EInvoiceAPI::DocumentCreate::Item::OrHash],
|
36
40
|
note: T.nilable(String),
|
37
41
|
payment_details:
|
38
42
|
T.nilable(T::Array[EInvoiceAPI::PaymentDetailCreate::OrHash]),
|
@@ -69,10 +73,14 @@ module EInvoiceAPI
|
|
69
73
|
).returns(EInvoiceAPI::DocumentResponse)
|
70
74
|
end
|
71
75
|
def create(
|
76
|
+
allowances: nil,
|
77
|
+
# The amount due of the invoice. Must be positive and rounded to maximum 2
|
78
|
+
# decimals
|
72
79
|
amount_due: nil,
|
73
80
|
attachments: nil,
|
74
81
|
billing_address: nil,
|
75
82
|
billing_address_recipient: nil,
|
83
|
+
charges: nil,
|
76
84
|
# Currency of the invoice
|
77
85
|
currency: nil,
|
78
86
|
customer_address: nil,
|
@@ -86,11 +94,16 @@ module EInvoiceAPI
|
|
86
94
|
due_date: nil,
|
87
95
|
invoice_date: nil,
|
88
96
|
invoice_id: nil,
|
97
|
+
# The total amount of the invoice (so invoice_total = subtotal + total_tax +
|
98
|
+
# total_discount). Must be positive and rounded to maximum 2 decimals
|
89
99
|
invoice_total: nil,
|
100
|
+
# At least one line item is required
|
90
101
|
items: nil,
|
91
102
|
note: nil,
|
92
103
|
payment_details: nil,
|
93
104
|
payment_term: nil,
|
105
|
+
# The previous unpaid balance of the invoice, if any. Must be positive and rounded
|
106
|
+
# to maximum 2 decimals
|
94
107
|
previous_unpaid_balance: nil,
|
95
108
|
purchase_order: nil,
|
96
109
|
remittance_address: nil,
|
@@ -102,11 +115,17 @@ module EInvoiceAPI
|
|
102
115
|
shipping_address: nil,
|
103
116
|
shipping_address_recipient: nil,
|
104
117
|
state: nil,
|
118
|
+
# The taxable base of the invoice. Should be the sum of all line items -
|
119
|
+
# allowances (for example commercial discounts) + charges with impact on VAT. Must
|
120
|
+
# be positive and rounded to maximum 2 decimals
|
105
121
|
subtotal: nil,
|
106
122
|
# Tax category code of the invoice
|
107
123
|
tax_code: nil,
|
108
124
|
tax_details: nil,
|
125
|
+
# The total financial discount of the invoice (so discounts not subject to VAT).
|
126
|
+
# Must be positive and rounded to maximum 2 decimals
|
109
127
|
total_discount: nil,
|
128
|
+
# The total tax of the invoice. Must be positive and rounded to maximum 2 decimals
|
110
129
|
total_tax: nil,
|
111
130
|
# VATEX code list for VAT exemption reasons
|
112
131
|
#
|
@@ -6,12 +6,16 @@ module EInvoiceAPI
|
|
6
6
|
# Validate if the JSON document can be converted to a valid UBL document
|
7
7
|
sig do
|
8
8
|
params(
|
9
|
+
allowances:
|
10
|
+
T.nilable(T::Array[EInvoiceAPI::DocumentCreate::Allowance::OrHash]),
|
9
11
|
amount_due:
|
10
12
|
T.nilable(EInvoiceAPI::DocumentCreate::AmountDue::Variants),
|
11
13
|
attachments:
|
12
14
|
T.nilable(T::Array[EInvoiceAPI::DocumentAttachmentCreate::OrHash]),
|
13
15
|
billing_address: T.nilable(String),
|
14
16
|
billing_address_recipient: T.nilable(String),
|
17
|
+
charges:
|
18
|
+
T.nilable(T::Array[EInvoiceAPI::DocumentCreate::Charge::OrHash]),
|
15
19
|
currency: EInvoiceAPI::CurrencyCode::OrSymbol,
|
16
20
|
customer_address: T.nilable(String),
|
17
21
|
customer_address_recipient: T.nilable(String),
|
@@ -26,7 +30,7 @@ module EInvoiceAPI
|
|
26
30
|
invoice_id: T.nilable(String),
|
27
31
|
invoice_total:
|
28
32
|
T.nilable(EInvoiceAPI::DocumentCreate::InvoiceTotal::Variants),
|
29
|
-
items: T
|
33
|
+
items: T::Array[EInvoiceAPI::DocumentCreate::Item::OrHash],
|
30
34
|
note: T.nilable(String),
|
31
35
|
payment_details:
|
32
36
|
T.nilable(T::Array[EInvoiceAPI::PaymentDetailCreate::OrHash]),
|
@@ -63,10 +67,14 @@ module EInvoiceAPI
|
|
63
67
|
).returns(EInvoiceAPI::UblDocumentValidation)
|
64
68
|
end
|
65
69
|
def validate_json(
|
70
|
+
allowances: nil,
|
71
|
+
# The amount due of the invoice. Must be positive and rounded to maximum 2
|
72
|
+
# decimals
|
66
73
|
amount_due: nil,
|
67
74
|
attachments: nil,
|
68
75
|
billing_address: nil,
|
69
76
|
billing_address_recipient: nil,
|
77
|
+
charges: nil,
|
70
78
|
# Currency of the invoice
|
71
79
|
currency: nil,
|
72
80
|
customer_address: nil,
|
@@ -80,11 +88,16 @@ module EInvoiceAPI
|
|
80
88
|
due_date: nil,
|
81
89
|
invoice_date: nil,
|
82
90
|
invoice_id: nil,
|
91
|
+
# The total amount of the invoice (so invoice_total = subtotal + total_tax +
|
92
|
+
# total_discount). Must be positive and rounded to maximum 2 decimals
|
83
93
|
invoice_total: nil,
|
94
|
+
# At least one line item is required
|
84
95
|
items: nil,
|
85
96
|
note: nil,
|
86
97
|
payment_details: nil,
|
87
98
|
payment_term: nil,
|
99
|
+
# The previous unpaid balance of the invoice, if any. Must be positive and rounded
|
100
|
+
# to maximum 2 decimals
|
88
101
|
previous_unpaid_balance: nil,
|
89
102
|
purchase_order: nil,
|
90
103
|
remittance_address: nil,
|
@@ -96,11 +109,17 @@ module EInvoiceAPI
|
|
96
109
|
shipping_address: nil,
|
97
110
|
shipping_address_recipient: nil,
|
98
111
|
state: nil,
|
112
|
+
# The taxable base of the invoice. Should be the sum of all line items -
|
113
|
+
# allowances (for example commercial discounts) + charges with impact on VAT. Must
|
114
|
+
# be positive and rounded to maximum 2 decimals
|
99
115
|
subtotal: nil,
|
100
116
|
# Tax category code of the invoice
|
101
117
|
tax_code: nil,
|
102
118
|
tax_details: nil,
|
119
|
+
# The total financial discount of the invoice (so discounts not subject to VAT).
|
120
|
+
# Must be positive and rounded to maximum 2 decimals
|
103
121
|
total_discount: nil,
|
122
|
+
# The total tax of the invoice. Must be positive and rounded to maximum 2 decimals
|
104
123
|
total_tax: nil,
|
105
124
|
# VATEX code list for VAT exemption reasons
|
106
125
|
#
|
@@ -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
|
-
|
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
|