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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +5 -5
- data/lib/e_invoice_api/client.rb +4 -0
- data/lib/e_invoice_api/internal/type/base_model.rb +5 -5
- data/lib/e_invoice_api/models/allowance.rb +96 -0
- data/lib/e_invoice_api/models/charge.rb +96 -0
- data/lib/e_invoice_api/models/document_create.rb +666 -19
- data/lib/e_invoice_api/models/document_create_from_pdf_params.rb +32 -0
- data/lib/e_invoice_api/models/document_create_from_pdf_response.rb +584 -0
- data/lib/e_invoice_api/models/document_response.rb +265 -23
- data/lib/e_invoice_api/models/document_validate_params.rb +14 -0
- data/lib/e_invoice_api/models/documents/ubl_create_from_ubl_params.rb +22 -0
- data/lib/e_invoice_api/models/me_retrieve_params.rb +14 -0
- data/lib/e_invoice_api/models/me_retrieve_response.rb +149 -0
- data/lib/e_invoice_api/models.rb +10 -0
- data/lib/e_invoice_api/resources/documents/ubl.rb +22 -0
- data/lib/e_invoice_api/resources/documents.rb +64 -8
- data/lib/e_invoice_api/resources/me.rb +32 -0
- data/lib/e_invoice_api/resources/validate.rb +12 -8
- data/lib/e_invoice_api/version.rb +1 -1
- data/lib/e_invoice_api.rb +9 -0
- data/rbi/e_invoice_api/client.rbi +3 -0
- data/rbi/e_invoice_api/models/allowance.rbi +124 -0
- data/rbi/e_invoice_api/models/charge.rbi +122 -0
- data/rbi/e_invoice_api/models/document_create.rbi +1180 -3
- data/rbi/e_invoice_api/models/document_create_from_pdf_params.rbi +56 -0
- data/rbi/e_invoice_api/models/document_create_from_pdf_response.rbi +1014 -0
- data/rbi/e_invoice_api/models/document_response.rbi +456 -43
- data/rbi/e_invoice_api/models/document_validate_params.rbi +30 -0
- data/rbi/e_invoice_api/models/documents/ubl_create_from_ubl_params.rbi +43 -0
- data/rbi/e_invoice_api/models/me_retrieve_params.rbi +27 -0
- data/rbi/e_invoice_api/models/me_retrieve_response.rbi +195 -0
- data/rbi/e_invoice_api/models.rbi +10 -0
- data/rbi/e_invoice_api/resources/documents/ubl.rbi +10 -0
- data/rbi/e_invoice_api/resources/documents.rbi +54 -1
- data/rbi/e_invoice_api/resources/me.rbi +21 -0
- data/rbi/e_invoice_api/resources/validate.rbi +20 -1
- data/sig/e_invoice_api/client.rbs +2 -0
- data/sig/e_invoice_api/models/allowance.rbs +69 -0
- data/sig/e_invoice_api/models/charge.rbs +69 -0
- data/sig/e_invoice_api/models/document_create.rbs +388 -4
- data/sig/e_invoice_api/models/document_create_from_pdf_params.rbs +36 -0
- data/sig/e_invoice_api/models/document_create_from_pdf_response.rbs +512 -0
- data/sig/e_invoice_api/models/document_response.rbs +168 -32
- data/sig/e_invoice_api/models/document_validate_params.rbs +15 -0
- data/sig/e_invoice_api/models/documents/ubl_create_from_ubl_params.rbs +26 -0
- data/sig/e_invoice_api/models/me_retrieve_params.rbs +15 -0
- data/sig/e_invoice_api/models/me_retrieve_response.rbs +107 -0
- data/sig/e_invoice_api/models.rbs +10 -0
- data/sig/e_invoice_api/resources/documents/ubl.rbs +5 -0
- data/sig/e_invoice_api/resources/documents.rbs +15 -1
- data/sig/e_invoice_api/resources/me.rbs +11 -0
- data/sig/e_invoice_api/resources/validate.rbs +3 -1
- metadata +28 -1
|
@@ -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
|
|
57
|
+
attr_accessor allowances: ::Array[EInvoiceAPI::DocumentResponse::Allowance]?
|
|
56
58
|
|
|
57
|
-
|
|
59
|
+
attr_accessor amount_due: String?
|
|
58
60
|
|
|
59
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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::Allowance]?,
|
|
277
404
|
amount: String?,
|
|
405
|
+
charges: ::Array[EInvoiceAPI::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::Allowance]?
|
|
418
|
+
|
|
289
419
|
attr_accessor amount: String?
|
|
290
420
|
|
|
421
|
+
attr_accessor charges: ::Array[EInvoiceAPI::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::Allowance]?,
|
|
308
441
|
?amount: String?,
|
|
442
|
+
?charges: ::Array[EInvoiceAPI::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::Allowance]?,
|
|
320
455
|
amount: String?,
|
|
456
|
+
charges: ::Array[EInvoiceAPI::Charge]?,
|
|
321
457
|
date: nil,
|
|
322
458
|
description: String?,
|
|
323
459
|
product_code: String?,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module EInvoiceAPI
|
|
2
|
+
module Models
|
|
3
|
+
type document_validate_params =
|
|
4
|
+
{ } & EInvoiceAPI::Internal::Type::request_parameters
|
|
5
|
+
|
|
6
|
+
class DocumentValidateParams < EInvoiceAPI::Internal::Type::BaseModel
|
|
7
|
+
extend EInvoiceAPI::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include EInvoiceAPI::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
def initialize: (?request_options: EInvoiceAPI::request_opts) -> void
|
|
11
|
+
|
|
12
|
+
def to_hash: -> { request_options: EInvoiceAPI::RequestOptions }
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
module EInvoiceAPI
|
|
2
|
+
module Models
|
|
3
|
+
module Documents
|
|
4
|
+
type ubl_create_from_ubl_params =
|
|
5
|
+
{ file: EInvoiceAPI::Internal::file_input }
|
|
6
|
+
& EInvoiceAPI::Internal::Type::request_parameters
|
|
7
|
+
|
|
8
|
+
class UblCreateFromUblParams < EInvoiceAPI::Internal::Type::BaseModel
|
|
9
|
+
extend EInvoiceAPI::Internal::Type::RequestParameters::Converter
|
|
10
|
+
include EInvoiceAPI::Internal::Type::RequestParameters
|
|
11
|
+
|
|
12
|
+
attr_accessor file: EInvoiceAPI::Internal::file_input
|
|
13
|
+
|
|
14
|
+
def initialize: (
|
|
15
|
+
file: EInvoiceAPI::Internal::file_input,
|
|
16
|
+
?request_options: EInvoiceAPI::request_opts
|
|
17
|
+
) -> void
|
|
18
|
+
|
|
19
|
+
def to_hash: -> {
|
|
20
|
+
file: EInvoiceAPI::Internal::file_input,
|
|
21
|
+
request_options: EInvoiceAPI::RequestOptions
|
|
22
|
+
}
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module EInvoiceAPI
|
|
2
|
+
module Models
|
|
3
|
+
type me_retrieve_params =
|
|
4
|
+
{ } & EInvoiceAPI::Internal::Type::request_parameters
|
|
5
|
+
|
|
6
|
+
class MeRetrieveParams < EInvoiceAPI::Internal::Type::BaseModel
|
|
7
|
+
extend EInvoiceAPI::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include EInvoiceAPI::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
def initialize: (?request_options: EInvoiceAPI::request_opts) -> void
|
|
11
|
+
|
|
12
|
+
def to_hash: -> { request_options: EInvoiceAPI::RequestOptions }
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
module EInvoiceAPI
|
|
2
|
+
module Models
|
|
3
|
+
type me_retrieve_response =
|
|
4
|
+
{
|
|
5
|
+
credit_balance: Integer,
|
|
6
|
+
name: String,
|
|
7
|
+
plan: EInvoiceAPI::Models::MeRetrieveResponse::plan,
|
|
8
|
+
bcc_recipient_email: String?,
|
|
9
|
+
company_address: String?,
|
|
10
|
+
company_city: String?,
|
|
11
|
+
company_country: String?,
|
|
12
|
+
company_email: String?,
|
|
13
|
+
company_name: String?,
|
|
14
|
+
company_number: String?,
|
|
15
|
+
company_zip: String?,
|
|
16
|
+
description: String?,
|
|
17
|
+
ibans: ::Array[String]?,
|
|
18
|
+
peppol_ids: ::Array[String]?,
|
|
19
|
+
smp_registration: bool?,
|
|
20
|
+
smp_registration_date: Time?
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
class MeRetrieveResponse < EInvoiceAPI::Internal::Type::BaseModel
|
|
24
|
+
attr_accessor credit_balance: Integer
|
|
25
|
+
|
|
26
|
+
attr_accessor name: String
|
|
27
|
+
|
|
28
|
+
attr_accessor plan: EInvoiceAPI::Models::MeRetrieveResponse::plan
|
|
29
|
+
|
|
30
|
+
attr_accessor bcc_recipient_email: String?
|
|
31
|
+
|
|
32
|
+
attr_accessor company_address: String?
|
|
33
|
+
|
|
34
|
+
attr_accessor company_city: String?
|
|
35
|
+
|
|
36
|
+
attr_accessor company_country: String?
|
|
37
|
+
|
|
38
|
+
attr_accessor company_email: String?
|
|
39
|
+
|
|
40
|
+
attr_accessor company_name: String?
|
|
41
|
+
|
|
42
|
+
attr_accessor company_number: String?
|
|
43
|
+
|
|
44
|
+
attr_accessor company_zip: String?
|
|
45
|
+
|
|
46
|
+
attr_accessor description: String?
|
|
47
|
+
|
|
48
|
+
attr_accessor ibans: ::Array[String]?
|
|
49
|
+
|
|
50
|
+
attr_accessor peppol_ids: ::Array[String]?
|
|
51
|
+
|
|
52
|
+
attr_accessor smp_registration: bool?
|
|
53
|
+
|
|
54
|
+
attr_accessor smp_registration_date: Time?
|
|
55
|
+
|
|
56
|
+
def initialize: (
|
|
57
|
+
credit_balance: Integer,
|
|
58
|
+
name: String,
|
|
59
|
+
plan: EInvoiceAPI::Models::MeRetrieveResponse::plan,
|
|
60
|
+
?bcc_recipient_email: String?,
|
|
61
|
+
?company_address: String?,
|
|
62
|
+
?company_city: String?,
|
|
63
|
+
?company_country: String?,
|
|
64
|
+
?company_email: String?,
|
|
65
|
+
?company_name: String?,
|
|
66
|
+
?company_number: String?,
|
|
67
|
+
?company_zip: String?,
|
|
68
|
+
?description: String?,
|
|
69
|
+
?ibans: ::Array[String]?,
|
|
70
|
+
?peppol_ids: ::Array[String]?,
|
|
71
|
+
?smp_registration: bool?,
|
|
72
|
+
?smp_registration_date: Time?
|
|
73
|
+
) -> void
|
|
74
|
+
|
|
75
|
+
def to_hash: -> {
|
|
76
|
+
credit_balance: Integer,
|
|
77
|
+
name: String,
|
|
78
|
+
plan: EInvoiceAPI::Models::MeRetrieveResponse::plan,
|
|
79
|
+
bcc_recipient_email: String?,
|
|
80
|
+
company_address: String?,
|
|
81
|
+
company_city: String?,
|
|
82
|
+
company_country: String?,
|
|
83
|
+
company_email: String?,
|
|
84
|
+
company_name: String?,
|
|
85
|
+
company_number: String?,
|
|
86
|
+
company_zip: String?,
|
|
87
|
+
description: String?,
|
|
88
|
+
ibans: ::Array[String]?,
|
|
89
|
+
peppol_ids: ::Array[String]?,
|
|
90
|
+
smp_registration: bool?,
|
|
91
|
+
smp_registration_date: Time?
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
type plan = :starter | :pro | :enterprise
|
|
95
|
+
|
|
96
|
+
module Plan
|
|
97
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
98
|
+
|
|
99
|
+
STARTER: :starter
|
|
100
|
+
PRO: :pro
|
|
101
|
+
ENTERPRISE: :enterprise
|
|
102
|
+
|
|
103
|
+
def self?.values: -> ::Array[EInvoiceAPI::Models::MeRetrieveResponse::plan]
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
end
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
module EInvoiceAPI
|
|
2
|
+
class Allowance = EInvoiceAPI::Models::Allowance
|
|
3
|
+
|
|
2
4
|
class Certificate = EInvoiceAPI::Models::Certificate
|
|
3
5
|
|
|
6
|
+
class Charge = EInvoiceAPI::Models::Charge
|
|
7
|
+
|
|
4
8
|
module CurrencyCode = EInvoiceAPI::Models::CurrencyCode
|
|
5
9
|
|
|
6
10
|
class DocumentAttachmentCreate = EInvoiceAPI::Models::DocumentAttachmentCreate
|
|
7
11
|
|
|
8
12
|
class DocumentCreate = EInvoiceAPI::Models::DocumentCreate
|
|
9
13
|
|
|
14
|
+
class DocumentCreateFromPdfParams = EInvoiceAPI::Models::DocumentCreateFromPdfParams
|
|
15
|
+
|
|
10
16
|
class DocumentCreateParams = EInvoiceAPI::Models::DocumentCreateParams
|
|
11
17
|
|
|
12
18
|
class DocumentDeleteParams = EInvoiceAPI::Models::DocumentDeleteParams
|
|
@@ -25,6 +31,8 @@ module EInvoiceAPI
|
|
|
25
31
|
|
|
26
32
|
module DocumentType = EInvoiceAPI::Models::DocumentType
|
|
27
33
|
|
|
34
|
+
class DocumentValidateParams = EInvoiceAPI::Models::DocumentValidateParams
|
|
35
|
+
|
|
28
36
|
class InboxListCreditNotesParams = EInvoiceAPI::Models::InboxListCreditNotesParams
|
|
29
37
|
|
|
30
38
|
class InboxListInvoicesParams = EInvoiceAPI::Models::InboxListInvoicesParams
|
|
@@ -35,6 +43,8 @@ module EInvoiceAPI
|
|
|
35
43
|
|
|
36
44
|
class LookupRetrieveParticipantsParams = EInvoiceAPI::Models::LookupRetrieveParticipantsParams
|
|
37
45
|
|
|
46
|
+
class MeRetrieveParams = EInvoiceAPI::Models::MeRetrieveParams
|
|
47
|
+
|
|
38
48
|
class OutboxListDraftDocumentsParams = EInvoiceAPI::Models::OutboxListDraftDocumentsParams
|
|
39
49
|
|
|
40
50
|
class OutboxListReceivedDocumentsParams = EInvoiceAPI::Models::OutboxListReceivedDocumentsParams
|
|
@@ -2,6 +2,11 @@ module EInvoiceAPI
|
|
|
2
2
|
module Resources
|
|
3
3
|
class Documents
|
|
4
4
|
class Ubl
|
|
5
|
+
def create_from_ubl: (
|
|
6
|
+
file: EInvoiceAPI::Internal::file_input,
|
|
7
|
+
?request_options: EInvoiceAPI::request_opts
|
|
8
|
+
) -> EInvoiceAPI::DocumentResponse
|
|
9
|
+
|
|
5
10
|
def get: (
|
|
6
11
|
String document_id,
|
|
7
12
|
?request_options: EInvoiceAPI::request_opts
|
|
@@ -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?,
|
|
@@ -63,6 +65,13 @@ module EInvoiceAPI
|
|
|
63
65
|
?request_options: EInvoiceAPI::request_opts
|
|
64
66
|
) -> EInvoiceAPI::Models::DocumentDeleteResponse
|
|
65
67
|
|
|
68
|
+
def create_from_pdf: (
|
|
69
|
+
file: EInvoiceAPI::Internal::file_input,
|
|
70
|
+
?customer_tax_id: String?,
|
|
71
|
+
?vendor_tax_id: String?,
|
|
72
|
+
?request_options: EInvoiceAPI::request_opts
|
|
73
|
+
) -> EInvoiceAPI::Models::DocumentCreateFromPdfResponse
|
|
74
|
+
|
|
66
75
|
def send_: (
|
|
67
76
|
String document_id,
|
|
68
77
|
?email: String?,
|
|
@@ -73,6 +82,11 @@ module EInvoiceAPI
|
|
|
73
82
|
?request_options: EInvoiceAPI::request_opts
|
|
74
83
|
) -> EInvoiceAPI::DocumentResponse
|
|
75
84
|
|
|
85
|
+
def validate: (
|
|
86
|
+
String document_id,
|
|
87
|
+
?request_options: EInvoiceAPI::request_opts
|
|
88
|
+
) -> EInvoiceAPI::UblDocumentValidation
|
|
89
|
+
|
|
76
90
|
def initialize: (client: EInvoiceAPI::Client) -> void
|
|
77
91
|
end
|
|
78
92
|
end
|
|
@@ -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?,
|