e-invoice-api 0.11.0 → 0.13.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 +17 -0
- data/README.md +2 -2
- data/lib/e_invoice_api/models/document_create.rb +115 -58
- data/lib/e_invoice_api/models/document_create_from_pdf_response.rb +106 -51
- data/lib/e_invoice_api/models/document_response.rb +121 -55
- data/lib/e_invoice_api/models/me_retrieve_response.rb +21 -7
- data/lib/e_invoice_api/models/payment_detail_create.rb +15 -4
- data/lib/e_invoice_api/resources/documents.rb +42 -38
- data/lib/e_invoice_api/resources/validate.rb +42 -38
- data/lib/e_invoice_api/version.rb +1 -1
- data/rbi/e_invoice_api/models/document_create.rbi +124 -29
- data/rbi/e_invoice_api/models/document_create_from_pdf_response.rbi +116 -22
- data/rbi/e_invoice_api/models/document_response.rbi +126 -22
- data/rbi/e_invoice_api/models/me_retrieve_response.rbi +20 -6
- data/rbi/e_invoice_api/models/payment_detail_create.rbi +10 -0
- data/rbi/e_invoice_api/resources/documents.rbi +51 -10
- data/rbi/e_invoice_api/resources/validate.rbi +51 -10
- data/sig/e_invoice_api/models/document_create.rbs +10 -0
- data/sig/e_invoice_api/models/document_create_from_pdf_response.rbs +10 -0
- data/sig/e_invoice_api/models/document_response.rbs +10 -0
- data/sig/e_invoice_api/models/me_retrieve_response.rbs +5 -0
- data/sig/e_invoice_api/resources/documents.rbs +2 -0
- data/sig/e_invoice_api/resources/validate.rbs +2 -0
- metadata +2 -2
|
@@ -16,8 +16,7 @@ module EInvoiceAPI
|
|
|
16
16
|
end
|
|
17
17
|
attr_accessor :allowances
|
|
18
18
|
|
|
19
|
-
# The amount due
|
|
20
|
-
# decimals
|
|
19
|
+
# The amount due for payment. Must be positive and rounded to maximum 2 decimals
|
|
21
20
|
sig { returns(T.nilable(String)) }
|
|
22
21
|
attr_accessor :amount_due
|
|
23
22
|
|
|
@@ -26,9 +25,11 @@ module EInvoiceAPI
|
|
|
26
25
|
end
|
|
27
26
|
attr_accessor :attachments
|
|
28
27
|
|
|
28
|
+
# The billing address (if different from customer address)
|
|
29
29
|
sig { returns(T.nilable(String)) }
|
|
30
30
|
attr_accessor :billing_address
|
|
31
31
|
|
|
32
|
+
# The recipient name at the billing address
|
|
32
33
|
sig { returns(T.nilable(String)) }
|
|
33
34
|
attr_accessor :billing_address_recipient
|
|
34
35
|
|
|
@@ -37,60 +38,78 @@ module EInvoiceAPI
|
|
|
37
38
|
end
|
|
38
39
|
attr_accessor :charges
|
|
39
40
|
|
|
40
|
-
# Currency of the invoice
|
|
41
|
+
# Currency of the invoice (ISO 4217 currency code)
|
|
41
42
|
sig { returns(T.nilable(EInvoiceAPI::CurrencyCode::TaggedSymbol)) }
|
|
42
43
|
attr_reader :currency
|
|
43
44
|
|
|
44
45
|
sig { params(currency: EInvoiceAPI::CurrencyCode::OrSymbol).void }
|
|
45
46
|
attr_writer :currency
|
|
46
47
|
|
|
48
|
+
# The address of the customer/buyer
|
|
47
49
|
sig { returns(T.nilable(String)) }
|
|
48
50
|
attr_accessor :customer_address
|
|
49
51
|
|
|
52
|
+
# The recipient name at the customer address
|
|
50
53
|
sig { returns(T.nilable(String)) }
|
|
51
54
|
attr_accessor :customer_address_recipient
|
|
52
55
|
|
|
56
|
+
# Customer company ID. For Belgium this is the CBE number or their EUID (European
|
|
57
|
+
# Unique Identifier) number. In the Netherlands this is the KVK number.
|
|
58
|
+
sig { returns(T.nilable(String)) }
|
|
59
|
+
attr_accessor :customer_company_id
|
|
60
|
+
|
|
61
|
+
# The email address of the customer
|
|
53
62
|
sig { returns(T.nilable(String)) }
|
|
54
63
|
attr_accessor :customer_email
|
|
55
64
|
|
|
65
|
+
# The unique identifier for the customer in your system
|
|
56
66
|
sig { returns(T.nilable(String)) }
|
|
57
67
|
attr_accessor :customer_id
|
|
58
68
|
|
|
69
|
+
# The company name of the customer/buyer
|
|
59
70
|
sig { returns(T.nilable(String)) }
|
|
60
71
|
attr_accessor :customer_name
|
|
61
72
|
|
|
73
|
+
# Customer tax ID. For Belgium this is the VAT number. Must include the country
|
|
74
|
+
# prefix
|
|
62
75
|
sig { returns(T.nilable(String)) }
|
|
63
76
|
attr_accessor :customer_tax_id
|
|
64
77
|
|
|
78
|
+
# The direction of the document: INBOUND (purchases) or OUTBOUND (sales)
|
|
65
79
|
sig { returns(T.nilable(EInvoiceAPI::DocumentDirection::TaggedSymbol)) }
|
|
66
80
|
attr_reader :direction
|
|
67
81
|
|
|
68
82
|
sig { params(direction: EInvoiceAPI::DocumentDirection::OrSymbol).void }
|
|
69
83
|
attr_writer :direction
|
|
70
84
|
|
|
85
|
+
# The type of document: INVOICE, CREDIT_NOTE, or DEBIT_NOTE
|
|
71
86
|
sig { returns(T.nilable(EInvoiceAPI::DocumentType::TaggedSymbol)) }
|
|
72
87
|
attr_reader :document_type
|
|
73
88
|
|
|
74
89
|
sig { params(document_type: EInvoiceAPI::DocumentType::OrSymbol).void }
|
|
75
90
|
attr_writer :document_type
|
|
76
91
|
|
|
92
|
+
# The date when payment is due
|
|
77
93
|
sig { returns(T.nilable(Date)) }
|
|
78
94
|
attr_accessor :due_date
|
|
79
95
|
|
|
96
|
+
# The date when the invoice was issued
|
|
80
97
|
sig { returns(T.nilable(Date)) }
|
|
81
98
|
attr_accessor :invoice_date
|
|
82
99
|
|
|
100
|
+
# The unique invoice identifier/number
|
|
83
101
|
sig { returns(T.nilable(String)) }
|
|
84
102
|
attr_accessor :invoice_id
|
|
85
103
|
|
|
86
|
-
# The total amount of the invoice (
|
|
87
|
-
# total_discount). Must be positive and rounded to maximum 2 decimals
|
|
104
|
+
# The total amount of the invoice including tax (invoice_total = subtotal +
|
|
105
|
+
# total_tax + total_discount). Must be positive and rounded to maximum 2 decimals
|
|
88
106
|
sig { returns(T.nilable(String)) }
|
|
89
107
|
attr_accessor :invoice_total
|
|
90
108
|
|
|
91
109
|
sig { returns(T.nilable(T::Array[EInvoiceAPI::DocumentResponse::Item])) }
|
|
92
110
|
attr_accessor :items
|
|
93
111
|
|
|
112
|
+
# Additional notes or comments for the invoice
|
|
94
113
|
sig { returns(T.nilable(String)) }
|
|
95
114
|
attr_accessor :note
|
|
96
115
|
|
|
@@ -101,41 +120,52 @@ module EInvoiceAPI
|
|
|
101
120
|
end
|
|
102
121
|
attr_accessor :payment_details
|
|
103
122
|
|
|
123
|
+
# The payment terms (e.g., 'Net 30', 'Due on receipt', '2/10 Net 30')
|
|
104
124
|
sig { returns(T.nilable(String)) }
|
|
105
125
|
attr_accessor :payment_term
|
|
106
126
|
|
|
107
|
-
# The previous unpaid balance
|
|
108
|
-
# to maximum 2 decimals
|
|
127
|
+
# The previous unpaid balance from prior invoices, if any. Must be positive and
|
|
128
|
+
# rounded to maximum 2 decimals
|
|
109
129
|
sig { returns(T.nilable(String)) }
|
|
110
130
|
attr_accessor :previous_unpaid_balance
|
|
111
131
|
|
|
132
|
+
# The purchase order reference number
|
|
112
133
|
sig { returns(T.nilable(String)) }
|
|
113
134
|
attr_accessor :purchase_order
|
|
114
135
|
|
|
136
|
+
# The address where payment should be sent or remitted to
|
|
115
137
|
sig { returns(T.nilable(String)) }
|
|
116
138
|
attr_accessor :remittance_address
|
|
117
139
|
|
|
140
|
+
# The recipient name at the remittance address
|
|
118
141
|
sig { returns(T.nilable(String)) }
|
|
119
142
|
attr_accessor :remittance_address_recipient
|
|
120
143
|
|
|
144
|
+
# The address where services were performed or goods were delivered
|
|
121
145
|
sig { returns(T.nilable(String)) }
|
|
122
146
|
attr_accessor :service_address
|
|
123
147
|
|
|
148
|
+
# The recipient name at the service address
|
|
124
149
|
sig { returns(T.nilable(String)) }
|
|
125
150
|
attr_accessor :service_address_recipient
|
|
126
151
|
|
|
152
|
+
# The end date of the service period or delivery period
|
|
127
153
|
sig { returns(T.nilable(Date)) }
|
|
128
154
|
attr_accessor :service_end_date
|
|
129
155
|
|
|
156
|
+
# The start date of the service period or delivery period
|
|
130
157
|
sig { returns(T.nilable(Date)) }
|
|
131
158
|
attr_accessor :service_start_date
|
|
132
159
|
|
|
160
|
+
# The shipping/delivery address
|
|
133
161
|
sig { returns(T.nilable(String)) }
|
|
134
162
|
attr_accessor :shipping_address
|
|
135
163
|
|
|
164
|
+
# The recipient name at the shipping address
|
|
136
165
|
sig { returns(T.nilable(String)) }
|
|
137
166
|
attr_accessor :shipping_address_recipient
|
|
138
167
|
|
|
168
|
+
# The current state of the document: DRAFT, TRANSIT, FAILED, SENT, or RECEIVED
|
|
139
169
|
sig { returns(T.nilable(EInvoiceAPI::DocumentState::TaggedSymbol)) }
|
|
140
170
|
attr_reader :state
|
|
141
171
|
|
|
@@ -148,7 +178,8 @@ module EInvoiceAPI
|
|
|
148
178
|
sig { returns(T.nilable(String)) }
|
|
149
179
|
attr_accessor :subtotal
|
|
150
180
|
|
|
151
|
-
# Tax category code of the invoice
|
|
181
|
+
# Tax category code of the invoice (e.g., S for standard rate, Z for zero rate, E
|
|
182
|
+
# for exempt)
|
|
152
183
|
sig do
|
|
153
184
|
returns(T.nilable(EInvoiceAPI::DocumentResponse::TaxCode::TaggedSymbol))
|
|
154
185
|
end
|
|
@@ -170,7 +201,8 @@ module EInvoiceAPI
|
|
|
170
201
|
sig { returns(T.nilable(String)) }
|
|
171
202
|
attr_accessor :total_discount
|
|
172
203
|
|
|
173
|
-
# The total tax of the invoice. Must be positive and rounded to maximum 2
|
|
204
|
+
# The total tax amount of the invoice. Must be positive and rounded to maximum 2
|
|
205
|
+
# decimals
|
|
174
206
|
sig { returns(T.nilable(String)) }
|
|
175
207
|
attr_accessor :total_tax
|
|
176
208
|
|
|
@@ -182,22 +214,33 @@ module EInvoiceAPI
|
|
|
182
214
|
end
|
|
183
215
|
attr_accessor :vatex
|
|
184
216
|
|
|
185
|
-
#
|
|
217
|
+
# Textual explanation for VAT exemption
|
|
186
218
|
sig { returns(T.nilable(String)) }
|
|
187
219
|
attr_accessor :vatex_note
|
|
188
220
|
|
|
221
|
+
# The address of the vendor/seller
|
|
189
222
|
sig { returns(T.nilable(String)) }
|
|
190
223
|
attr_accessor :vendor_address
|
|
191
224
|
|
|
225
|
+
# The recipient name at the vendor address
|
|
192
226
|
sig { returns(T.nilable(String)) }
|
|
193
227
|
attr_accessor :vendor_address_recipient
|
|
194
228
|
|
|
229
|
+
# Vendor company ID. For Belgium this is the CBE number or their EUID (European
|
|
230
|
+
# Unique Identifier) number. In the Netherlands this is the KVK number.
|
|
231
|
+
sig { returns(T.nilable(String)) }
|
|
232
|
+
attr_accessor :vendor_company_id
|
|
233
|
+
|
|
234
|
+
# The email address of the vendor
|
|
195
235
|
sig { returns(T.nilable(String)) }
|
|
196
236
|
attr_accessor :vendor_email
|
|
197
237
|
|
|
238
|
+
# The name of the vendor/seller/supplier
|
|
198
239
|
sig { returns(T.nilable(String)) }
|
|
199
240
|
attr_accessor :vendor_name
|
|
200
241
|
|
|
242
|
+
# Vendor tax ID. For Belgium this is the VAT number. Must include the country
|
|
243
|
+
# prefix
|
|
201
244
|
sig { returns(T.nilable(String)) }
|
|
202
245
|
attr_accessor :vendor_tax_id
|
|
203
246
|
|
|
@@ -220,6 +263,7 @@ module EInvoiceAPI
|
|
|
220
263
|
currency: EInvoiceAPI::CurrencyCode::OrSymbol,
|
|
221
264
|
customer_address: T.nilable(String),
|
|
222
265
|
customer_address_recipient: T.nilable(String),
|
|
266
|
+
customer_company_id: T.nilable(String),
|
|
223
267
|
customer_email: T.nilable(String),
|
|
224
268
|
customer_id: T.nilable(String),
|
|
225
269
|
customer_name: T.nilable(String),
|
|
@@ -261,6 +305,7 @@ module EInvoiceAPI
|
|
|
261
305
|
vatex_note: T.nilable(String),
|
|
262
306
|
vendor_address: T.nilable(String),
|
|
263
307
|
vendor_address_recipient: T.nilable(String),
|
|
308
|
+
vendor_company_id: T.nilable(String),
|
|
264
309
|
vendor_email: T.nilable(String),
|
|
265
310
|
vendor_name: T.nilable(String),
|
|
266
311
|
vendor_tax_id: T.nilable(String)
|
|
@@ -269,69 +314,108 @@ module EInvoiceAPI
|
|
|
269
314
|
def self.new(
|
|
270
315
|
id:,
|
|
271
316
|
allowances: nil,
|
|
272
|
-
# The amount due
|
|
273
|
-
# decimals
|
|
317
|
+
# The amount due for payment. Must be positive and rounded to maximum 2 decimals
|
|
274
318
|
amount_due: nil,
|
|
275
319
|
attachments: nil,
|
|
320
|
+
# The billing address (if different from customer address)
|
|
276
321
|
billing_address: nil,
|
|
322
|
+
# The recipient name at the billing address
|
|
277
323
|
billing_address_recipient: nil,
|
|
278
324
|
charges: nil,
|
|
279
|
-
# Currency of the invoice
|
|
325
|
+
# Currency of the invoice (ISO 4217 currency code)
|
|
280
326
|
currency: nil,
|
|
327
|
+
# The address of the customer/buyer
|
|
281
328
|
customer_address: nil,
|
|
329
|
+
# The recipient name at the customer address
|
|
282
330
|
customer_address_recipient: nil,
|
|
331
|
+
# Customer company ID. For Belgium this is the CBE number or their EUID (European
|
|
332
|
+
# Unique Identifier) number. In the Netherlands this is the KVK number.
|
|
333
|
+
customer_company_id: nil,
|
|
334
|
+
# The email address of the customer
|
|
283
335
|
customer_email: nil,
|
|
336
|
+
# The unique identifier for the customer in your system
|
|
284
337
|
customer_id: nil,
|
|
338
|
+
# The company name of the customer/buyer
|
|
285
339
|
customer_name: nil,
|
|
340
|
+
# Customer tax ID. For Belgium this is the VAT number. Must include the country
|
|
341
|
+
# prefix
|
|
286
342
|
customer_tax_id: nil,
|
|
343
|
+
# The direction of the document: INBOUND (purchases) or OUTBOUND (sales)
|
|
287
344
|
direction: nil,
|
|
345
|
+
# The type of document: INVOICE, CREDIT_NOTE, or DEBIT_NOTE
|
|
288
346
|
document_type: nil,
|
|
347
|
+
# The date when payment is due
|
|
289
348
|
due_date: nil,
|
|
349
|
+
# The date when the invoice was issued
|
|
290
350
|
invoice_date: nil,
|
|
351
|
+
# The unique invoice identifier/number
|
|
291
352
|
invoice_id: nil,
|
|
292
|
-
# The total amount of the invoice (
|
|
293
|
-
# total_discount). Must be positive and rounded to maximum 2 decimals
|
|
353
|
+
# The total amount of the invoice including tax (invoice_total = subtotal +
|
|
354
|
+
# total_tax + total_discount). Must be positive and rounded to maximum 2 decimals
|
|
294
355
|
invoice_total: nil,
|
|
295
356
|
items: nil,
|
|
357
|
+
# Additional notes or comments for the invoice
|
|
296
358
|
note: nil,
|
|
297
359
|
payment_details: nil,
|
|
360
|
+
# The payment terms (e.g., 'Net 30', 'Due on receipt', '2/10 Net 30')
|
|
298
361
|
payment_term: nil,
|
|
299
|
-
# The previous unpaid balance
|
|
300
|
-
# to maximum 2 decimals
|
|
362
|
+
# The previous unpaid balance from prior invoices, if any. Must be positive and
|
|
363
|
+
# rounded to maximum 2 decimals
|
|
301
364
|
previous_unpaid_balance: nil,
|
|
365
|
+
# The purchase order reference number
|
|
302
366
|
purchase_order: nil,
|
|
367
|
+
# The address where payment should be sent or remitted to
|
|
303
368
|
remittance_address: nil,
|
|
369
|
+
# The recipient name at the remittance address
|
|
304
370
|
remittance_address_recipient: nil,
|
|
371
|
+
# The address where services were performed or goods were delivered
|
|
305
372
|
service_address: nil,
|
|
373
|
+
# The recipient name at the service address
|
|
306
374
|
service_address_recipient: nil,
|
|
375
|
+
# The end date of the service period or delivery period
|
|
307
376
|
service_end_date: nil,
|
|
377
|
+
# The start date of the service period or delivery period
|
|
308
378
|
service_start_date: nil,
|
|
379
|
+
# The shipping/delivery address
|
|
309
380
|
shipping_address: nil,
|
|
381
|
+
# The recipient name at the shipping address
|
|
310
382
|
shipping_address_recipient: nil,
|
|
383
|
+
# The current state of the document: DRAFT, TRANSIT, FAILED, SENT, or RECEIVED
|
|
311
384
|
state: nil,
|
|
312
385
|
# The taxable base of the invoice. Should be the sum of all line items -
|
|
313
386
|
# allowances (for example commercial discounts) + charges with impact on VAT. Must
|
|
314
387
|
# be positive and rounded to maximum 2 decimals
|
|
315
388
|
subtotal: nil,
|
|
316
|
-
# Tax category code of the invoice
|
|
389
|
+
# Tax category code of the invoice (e.g., S for standard rate, Z for zero rate, E
|
|
390
|
+
# for exempt)
|
|
317
391
|
tax_code: nil,
|
|
318
392
|
tax_details: nil,
|
|
319
393
|
# The net financial discount/charge of the invoice (non-VAT charges minus non-VAT
|
|
320
394
|
# allowances). Can be positive (net charge), negative (net discount), or zero.
|
|
321
395
|
# Must be rounded to maximum 2 decimals
|
|
322
396
|
total_discount: nil,
|
|
323
|
-
# The total tax of the invoice. Must be positive and rounded to maximum 2
|
|
397
|
+
# The total tax amount of the invoice. Must be positive and rounded to maximum 2
|
|
398
|
+
# decimals
|
|
324
399
|
total_tax: nil,
|
|
325
400
|
# VATEX code list for VAT exemption reasons
|
|
326
401
|
#
|
|
327
402
|
# Agency: CEF Identifier: vatex
|
|
328
403
|
vatex: nil,
|
|
329
|
-
#
|
|
404
|
+
# Textual explanation for VAT exemption
|
|
330
405
|
vatex_note: nil,
|
|
406
|
+
# The address of the vendor/seller
|
|
331
407
|
vendor_address: nil,
|
|
408
|
+
# The recipient name at the vendor address
|
|
332
409
|
vendor_address_recipient: nil,
|
|
410
|
+
# Vendor company ID. For Belgium this is the CBE number or their EUID (European
|
|
411
|
+
# Unique Identifier) number. In the Netherlands this is the KVK number.
|
|
412
|
+
vendor_company_id: nil,
|
|
413
|
+
# The email address of the vendor
|
|
333
414
|
vendor_email: nil,
|
|
415
|
+
# The name of the vendor/seller/supplier
|
|
334
416
|
vendor_name: nil,
|
|
417
|
+
# Vendor tax ID. For Belgium this is the VAT number. Must include the country
|
|
418
|
+
# prefix
|
|
335
419
|
vendor_tax_id: nil
|
|
336
420
|
)
|
|
337
421
|
end
|
|
@@ -351,6 +435,7 @@ module EInvoiceAPI
|
|
|
351
435
|
currency: EInvoiceAPI::CurrencyCode::TaggedSymbol,
|
|
352
436
|
customer_address: T.nilable(String),
|
|
353
437
|
customer_address_recipient: T.nilable(String),
|
|
438
|
+
customer_company_id: T.nilable(String),
|
|
354
439
|
customer_email: T.nilable(String),
|
|
355
440
|
customer_id: T.nilable(String),
|
|
356
441
|
customer_name: T.nilable(String),
|
|
@@ -388,6 +473,7 @@ module EInvoiceAPI
|
|
|
388
473
|
vatex_note: T.nilable(String),
|
|
389
474
|
vendor_address: T.nilable(String),
|
|
390
475
|
vendor_address_recipient: T.nilable(String),
|
|
476
|
+
vendor_company_id: T.nilable(String),
|
|
391
477
|
vendor_email: T.nilable(String),
|
|
392
478
|
vendor_name: T.nilable(String),
|
|
393
479
|
vendor_tax_id: T.nilable(String)
|
|
@@ -879,15 +965,20 @@ module EInvoiceAPI
|
|
|
879
965
|
)
|
|
880
966
|
end
|
|
881
967
|
|
|
968
|
+
# Bank account number (for non-IBAN accounts)
|
|
882
969
|
sig { returns(T.nilable(String)) }
|
|
883
970
|
attr_accessor :bank_account_number
|
|
884
971
|
|
|
972
|
+
# International Bank Account Number for payment transfers
|
|
885
973
|
sig { returns(T.nilable(String)) }
|
|
886
974
|
attr_accessor :iban
|
|
887
975
|
|
|
976
|
+
# Structured payment reference or communication (e.g., structured communication
|
|
977
|
+
# for Belgian bank transfers)
|
|
888
978
|
sig { returns(T.nilable(String)) }
|
|
889
979
|
attr_accessor :payment_reference
|
|
890
980
|
|
|
981
|
+
# SWIFT/BIC code of the bank
|
|
891
982
|
sig { returns(T.nilable(String)) }
|
|
892
983
|
attr_accessor :swift
|
|
893
984
|
|
|
@@ -900,9 +991,14 @@ module EInvoiceAPI
|
|
|
900
991
|
).returns(T.attached_class)
|
|
901
992
|
end
|
|
902
993
|
def self.new(
|
|
994
|
+
# Bank account number (for non-IBAN accounts)
|
|
903
995
|
bank_account_number: nil,
|
|
996
|
+
# International Bank Account Number for payment transfers
|
|
904
997
|
iban: nil,
|
|
998
|
+
# Structured payment reference or communication (e.g., structured communication
|
|
999
|
+
# for Belgian bank transfers)
|
|
905
1000
|
payment_reference: nil,
|
|
1001
|
+
# SWIFT/BIC code of the bank
|
|
906
1002
|
swift: nil
|
|
907
1003
|
)
|
|
908
1004
|
end
|
|
@@ -921,7 +1017,8 @@ module EInvoiceAPI
|
|
|
921
1017
|
end
|
|
922
1018
|
end
|
|
923
1019
|
|
|
924
|
-
# Tax category code of the invoice
|
|
1020
|
+
# Tax category code of the invoice (e.g., S for standard rate, Z for zero rate, E
|
|
1021
|
+
# for exempt)
|
|
925
1022
|
module TaxCode
|
|
926
1023
|
extend EInvoiceAPI::Internal::Type::Enum
|
|
927
1024
|
|
|
@@ -958,9 +1055,11 @@ module EInvoiceAPI
|
|
|
958
1055
|
)
|
|
959
1056
|
end
|
|
960
1057
|
|
|
1058
|
+
# The tax amount for this tax category. Must be rounded to maximum 2 decimals
|
|
961
1059
|
sig { returns(T.nilable(String)) }
|
|
962
1060
|
attr_accessor :amount
|
|
963
1061
|
|
|
1062
|
+
# The tax rate as a percentage (e.g., '21.00', '6.00', '0.00')
|
|
964
1063
|
sig { returns(T.nilable(String)) }
|
|
965
1064
|
attr_accessor :rate
|
|
966
1065
|
|
|
@@ -969,7 +1068,12 @@ module EInvoiceAPI
|
|
|
969
1068
|
T.attached_class
|
|
970
1069
|
)
|
|
971
1070
|
end
|
|
972
|
-
def self.new(
|
|
1071
|
+
def self.new(
|
|
1072
|
+
# The tax amount for this tax category. Must be rounded to maximum 2 decimals
|
|
1073
|
+
amount: nil,
|
|
1074
|
+
# The tax rate as a percentage (e.g., '21.00', '6.00', '0.00')
|
|
1075
|
+
rate: nil
|
|
1076
|
+
)
|
|
973
1077
|
end
|
|
974
1078
|
|
|
975
1079
|
sig do
|
|
@@ -28,7 +28,7 @@ module EInvoiceAPI
|
|
|
28
28
|
sig { returns(T.nilable(String)) }
|
|
29
29
|
attr_accessor :bcc_recipient_email
|
|
30
30
|
|
|
31
|
-
# Address of the company
|
|
31
|
+
# Address of the company. Must be in the form of `Street Name Street Number`
|
|
32
32
|
sig { returns(T.nilable(String)) }
|
|
33
33
|
attr_accessor :company_address
|
|
34
34
|
|
|
@@ -44,14 +44,21 @@ module EInvoiceAPI
|
|
|
44
44
|
sig { returns(T.nilable(String)) }
|
|
45
45
|
attr_accessor :company_email
|
|
46
46
|
|
|
47
|
-
# Name of the company
|
|
47
|
+
# Name of the company. Must include the company type. For example: `BV`, `NV`,
|
|
48
|
+
# `CVBA`, `VOF`
|
|
48
49
|
sig { returns(T.nilable(String)) }
|
|
49
50
|
attr_accessor :company_name
|
|
50
51
|
|
|
51
|
-
# Company number
|
|
52
|
+
# Company number. For Belgium this is the CBE number or their EUID (European
|
|
53
|
+
# Unique Identifier) number
|
|
52
54
|
sig { returns(T.nilable(String)) }
|
|
53
55
|
attr_accessor :company_number
|
|
54
56
|
|
|
57
|
+
# Company tax ID. For Belgium this is the VAT number. Must include the country
|
|
58
|
+
# prefix
|
|
59
|
+
sig { returns(T.nilable(String)) }
|
|
60
|
+
attr_accessor :company_tax_id
|
|
61
|
+
|
|
55
62
|
# Zip code of the company
|
|
56
63
|
sig { returns(T.nilable(String)) }
|
|
57
64
|
attr_accessor :company_zip
|
|
@@ -87,6 +94,7 @@ module EInvoiceAPI
|
|
|
87
94
|
company_email: T.nilable(String),
|
|
88
95
|
company_name: T.nilable(String),
|
|
89
96
|
company_number: T.nilable(String),
|
|
97
|
+
company_tax_id: T.nilable(String),
|
|
90
98
|
company_zip: T.nilable(String),
|
|
91
99
|
description: T.nilable(String),
|
|
92
100
|
ibans: T.nilable(T::Array[String]),
|
|
@@ -103,7 +111,7 @@ module EInvoiceAPI
|
|
|
103
111
|
plan:,
|
|
104
112
|
# BCC recipient email to deliver documents
|
|
105
113
|
bcc_recipient_email: nil,
|
|
106
|
-
# Address of the company
|
|
114
|
+
# Address of the company. Must be in the form of `Street Name Street Number`
|
|
107
115
|
company_address: nil,
|
|
108
116
|
# City of the company
|
|
109
117
|
company_city: nil,
|
|
@@ -111,10 +119,15 @@ module EInvoiceAPI
|
|
|
111
119
|
company_country: nil,
|
|
112
120
|
# Email of the company
|
|
113
121
|
company_email: nil,
|
|
114
|
-
# Name of the company
|
|
122
|
+
# Name of the company. Must include the company type. For example: `BV`, `NV`,
|
|
123
|
+
# `CVBA`, `VOF`
|
|
115
124
|
company_name: nil,
|
|
116
|
-
# Company number
|
|
125
|
+
# Company number. For Belgium this is the CBE number or their EUID (European
|
|
126
|
+
# Unique Identifier) number
|
|
117
127
|
company_number: nil,
|
|
128
|
+
# Company tax ID. For Belgium this is the VAT number. Must include the country
|
|
129
|
+
# prefix
|
|
130
|
+
company_tax_id: nil,
|
|
118
131
|
# Zip code of the company
|
|
119
132
|
company_zip: nil,
|
|
120
133
|
description: nil,
|
|
@@ -142,6 +155,7 @@ module EInvoiceAPI
|
|
|
142
155
|
company_email: T.nilable(String),
|
|
143
156
|
company_name: T.nilable(String),
|
|
144
157
|
company_number: T.nilable(String),
|
|
158
|
+
company_tax_id: T.nilable(String),
|
|
145
159
|
company_zip: T.nilable(String),
|
|
146
160
|
description: T.nilable(String),
|
|
147
161
|
ibans: T.nilable(T::Array[String]),
|
|
@@ -11,15 +11,20 @@ module EInvoiceAPI
|
|
|
11
11
|
)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
# Bank account number (for non-IBAN accounts)
|
|
14
15
|
sig { returns(T.nilable(String)) }
|
|
15
16
|
attr_accessor :bank_account_number
|
|
16
17
|
|
|
18
|
+
# International Bank Account Number for payment transfers
|
|
17
19
|
sig { returns(T.nilable(String)) }
|
|
18
20
|
attr_accessor :iban
|
|
19
21
|
|
|
22
|
+
# Structured payment reference or communication (e.g., structured communication
|
|
23
|
+
# for Belgian bank transfers)
|
|
20
24
|
sig { returns(T.nilable(String)) }
|
|
21
25
|
attr_accessor :payment_reference
|
|
22
26
|
|
|
27
|
+
# SWIFT/BIC code of the bank
|
|
23
28
|
sig { returns(T.nilable(String)) }
|
|
24
29
|
attr_accessor :swift
|
|
25
30
|
|
|
@@ -32,9 +37,14 @@ module EInvoiceAPI
|
|
|
32
37
|
).returns(T.attached_class)
|
|
33
38
|
end
|
|
34
39
|
def self.new(
|
|
40
|
+
# Bank account number (for non-IBAN accounts)
|
|
35
41
|
bank_account_number: nil,
|
|
42
|
+
# International Bank Account Number for payment transfers
|
|
36
43
|
iban: nil,
|
|
44
|
+
# Structured payment reference or communication (e.g., structured communication
|
|
45
|
+
# for Belgian bank transfers)
|
|
37
46
|
payment_reference: nil,
|
|
47
|
+
# SWIFT/BIC code of the bank
|
|
38
48
|
swift: nil
|
|
39
49
|
)
|
|
40
50
|
end
|
|
@@ -25,6 +25,7 @@ module EInvoiceAPI
|
|
|
25
25
|
currency: EInvoiceAPI::CurrencyCode::OrSymbol,
|
|
26
26
|
customer_address: T.nilable(String),
|
|
27
27
|
customer_address_recipient: T.nilable(String),
|
|
28
|
+
customer_company_id: T.nilable(String),
|
|
28
29
|
customer_email: T.nilable(String),
|
|
29
30
|
customer_id: T.nilable(String),
|
|
30
31
|
customer_name: T.nilable(String),
|
|
@@ -66,6 +67,7 @@ module EInvoiceAPI
|
|
|
66
67
|
vatex_note: T.nilable(String),
|
|
67
68
|
vendor_address: T.nilable(String),
|
|
68
69
|
vendor_address_recipient: T.nilable(String),
|
|
70
|
+
vendor_company_id: T.nilable(String),
|
|
69
71
|
vendor_email: T.nilable(String),
|
|
70
72
|
vendor_name: T.nilable(String),
|
|
71
73
|
vendor_tax_id: T.nilable(String),
|
|
@@ -74,70 +76,109 @@ module EInvoiceAPI
|
|
|
74
76
|
end
|
|
75
77
|
def create(
|
|
76
78
|
allowances: nil,
|
|
77
|
-
# The amount due
|
|
78
|
-
# decimals
|
|
79
|
+
# The amount due for payment. Must be positive and rounded to maximum 2 decimals
|
|
79
80
|
amount_due: nil,
|
|
80
81
|
attachments: nil,
|
|
82
|
+
# The billing address (if different from customer address)
|
|
81
83
|
billing_address: nil,
|
|
84
|
+
# The recipient name at the billing address
|
|
82
85
|
billing_address_recipient: nil,
|
|
83
86
|
charges: nil,
|
|
84
|
-
# Currency of the invoice
|
|
87
|
+
# Currency of the invoice (ISO 4217 currency code)
|
|
85
88
|
currency: nil,
|
|
89
|
+
# The address of the customer/buyer
|
|
86
90
|
customer_address: nil,
|
|
91
|
+
# The recipient name at the customer address
|
|
87
92
|
customer_address_recipient: nil,
|
|
93
|
+
# Customer company ID. For Belgium this is the CBE number or their EUID (European
|
|
94
|
+
# Unique Identifier) number. In the Netherlands this is the KVK number.
|
|
95
|
+
customer_company_id: nil,
|
|
96
|
+
# The email address of the customer
|
|
88
97
|
customer_email: nil,
|
|
98
|
+
# The unique identifier for the customer in your system
|
|
89
99
|
customer_id: nil,
|
|
100
|
+
# The company name of the customer/buyer
|
|
90
101
|
customer_name: nil,
|
|
102
|
+
# Customer tax ID. For Belgium this is the VAT number. Must include the country
|
|
103
|
+
# prefix
|
|
91
104
|
customer_tax_id: nil,
|
|
105
|
+
# The direction of the document: INBOUND (purchases) or OUTBOUND (sales)
|
|
92
106
|
direction: nil,
|
|
107
|
+
# The type of document: INVOICE, CREDIT_NOTE, or DEBIT_NOTE
|
|
93
108
|
document_type: nil,
|
|
109
|
+
# The date when payment is due
|
|
94
110
|
due_date: nil,
|
|
111
|
+
# The date when the invoice was issued
|
|
95
112
|
invoice_date: nil,
|
|
113
|
+
# The unique invoice identifier/number
|
|
96
114
|
invoice_id: nil,
|
|
97
|
-
# The total amount of the invoice (
|
|
98
|
-
# total_discount). Must be positive and rounded to maximum 2 decimals
|
|
115
|
+
# The total amount of the invoice including tax (invoice_total = subtotal +
|
|
116
|
+
# total_tax + total_discount). Must be positive and rounded to maximum 2 decimals
|
|
99
117
|
invoice_total: nil,
|
|
100
118
|
# At least one line item is required
|
|
101
119
|
items: nil,
|
|
120
|
+
# Additional notes or comments for the invoice
|
|
102
121
|
note: nil,
|
|
103
122
|
payment_details: nil,
|
|
123
|
+
# The payment terms (e.g., 'Net 30', 'Due on receipt', '2/10 Net 30')
|
|
104
124
|
payment_term: nil,
|
|
105
|
-
# The previous unpaid balance
|
|
106
|
-
# to maximum 2 decimals
|
|
125
|
+
# The previous unpaid balance from prior invoices, if any. Must be positive and
|
|
126
|
+
# rounded to maximum 2 decimals
|
|
107
127
|
previous_unpaid_balance: nil,
|
|
128
|
+
# The purchase order reference number
|
|
108
129
|
purchase_order: nil,
|
|
130
|
+
# The address where payment should be sent or remitted to
|
|
109
131
|
remittance_address: nil,
|
|
132
|
+
# The recipient name at the remittance address
|
|
110
133
|
remittance_address_recipient: nil,
|
|
134
|
+
# The address where services were performed or goods were delivered
|
|
111
135
|
service_address: nil,
|
|
136
|
+
# The recipient name at the service address
|
|
112
137
|
service_address_recipient: nil,
|
|
138
|
+
# The end date of the service period or delivery period
|
|
113
139
|
service_end_date: nil,
|
|
140
|
+
# The start date of the service period or delivery period
|
|
114
141
|
service_start_date: nil,
|
|
142
|
+
# The shipping/delivery address
|
|
115
143
|
shipping_address: nil,
|
|
144
|
+
# The recipient name at the shipping address
|
|
116
145
|
shipping_address_recipient: nil,
|
|
146
|
+
# The current state of the document: DRAFT, TRANSIT, FAILED, SENT, or RECEIVED
|
|
117
147
|
state: nil,
|
|
118
148
|
# The taxable base of the invoice. Should be the sum of all line items -
|
|
119
149
|
# allowances (for example commercial discounts) + charges with impact on VAT. Must
|
|
120
150
|
# be positive and rounded to maximum 2 decimals
|
|
121
151
|
subtotal: nil,
|
|
122
|
-
# Tax category code of the invoice
|
|
152
|
+
# Tax category code of the invoice (e.g., S for standard rate, Z for zero rate, E
|
|
153
|
+
# for exempt)
|
|
123
154
|
tax_code: nil,
|
|
124
155
|
tax_details: nil,
|
|
125
156
|
# The net financial discount/charge of the invoice (non-VAT charges minus non-VAT
|
|
126
157
|
# allowances). Can be positive (net charge), negative (net discount), or zero.
|
|
127
158
|
# Must be rounded to maximum 2 decimals
|
|
128
159
|
total_discount: nil,
|
|
129
|
-
# The total tax of the invoice. Must be positive and rounded to maximum 2
|
|
160
|
+
# The total tax amount of the invoice. Must be positive and rounded to maximum 2
|
|
161
|
+
# decimals
|
|
130
162
|
total_tax: nil,
|
|
131
163
|
# VATEX code list for VAT exemption reasons
|
|
132
164
|
#
|
|
133
165
|
# Agency: CEF Identifier: vatex
|
|
134
166
|
vatex: nil,
|
|
135
|
-
#
|
|
167
|
+
# Textual explanation for VAT exemption
|
|
136
168
|
vatex_note: nil,
|
|
169
|
+
# The address of the vendor/seller
|
|
137
170
|
vendor_address: nil,
|
|
171
|
+
# The recipient name at the vendor address
|
|
138
172
|
vendor_address_recipient: nil,
|
|
173
|
+
# Vendor company ID. For Belgium this is the CBE number or their EUID (European
|
|
174
|
+
# Unique Identifier) number. In the Netherlands this is the KVK number.
|
|
175
|
+
vendor_company_id: nil,
|
|
176
|
+
# The email address of the vendor
|
|
139
177
|
vendor_email: nil,
|
|
178
|
+
# The name of the vendor/seller/supplier
|
|
140
179
|
vendor_name: nil,
|
|
180
|
+
# Vendor tax ID. For Belgium this is the VAT number. Must include the country
|
|
181
|
+
# prefix
|
|
141
182
|
vendor_tax_id: nil,
|
|
142
183
|
request_options: {}
|
|
143
184
|
)
|