e-invoice-api 0.11.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/README.md +2 -2
  4. data/lib/e_invoice_api/models/allowance.rb +42 -14
  5. data/lib/e_invoice_api/models/charge.rb +193 -4
  6. data/lib/e_invoice_api/models/document_create.rb +721 -120
  7. data/lib/e_invoice_api/models/document_create_from_pdf_response.rb +123 -58
  8. data/lib/e_invoice_api/models/document_response.rb +373 -80
  9. data/lib/e_invoice_api/models/me_retrieve_response.rb +21 -7
  10. data/lib/e_invoice_api/models/payment_detail_create.rb +15 -4
  11. data/lib/e_invoice_api/resources/documents.rb +42 -38
  12. data/lib/e_invoice_api/resources/validate.rb +42 -38
  13. data/lib/e_invoice_api/version.rb +1 -1
  14. data/rbi/e_invoice_api/models/allowance.rbi +81 -21
  15. data/rbi/e_invoice_api/models/charge.rbi +202 -5
  16. data/rbi/e_invoice_api/models/document_create.rbi +3085 -702
  17. data/rbi/e_invoice_api/models/document_create_from_pdf_response.rbi +136 -30
  18. data/rbi/e_invoice_api/models/document_response.rbi +1232 -58
  19. data/rbi/e_invoice_api/models/me_retrieve_response.rbi +20 -6
  20. data/rbi/e_invoice_api/models/payment_detail_create.rbi +10 -0
  21. data/rbi/e_invoice_api/resources/documents.rbi +51 -10
  22. data/rbi/e_invoice_api/resources/validate.rbi +51 -10
  23. data/sig/e_invoice_api/models/allowance.rbs +59 -8
  24. data/sig/e_invoice_api/models/charge.rbs +369 -4
  25. data/sig/e_invoice_api/models/document_create.rbs +939 -44
  26. data/sig/e_invoice_api/models/document_create_from_pdf_response.rbs +15 -0
  27. data/sig/e_invoice_api/models/document_response.rbs +443 -12
  28. data/sig/e_invoice_api/models/me_retrieve_response.rbs +5 -0
  29. data/sig/e_invoice_api/resources/documents.rbs +2 -0
  30. data/sig/e_invoice_api/resources/validate.rbs +2 -0
  31. metadata +2 -2
@@ -10,8 +10,7 @@ module EInvoiceAPI
10
10
  optional :allowances, -> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::Allowance] }, nil?: true
11
11
 
12
12
  # @!attribute amount_due
13
- # The amount due of the invoice. Must be positive and rounded to maximum 2
14
- # decimals
13
+ # The amount due for payment. Must be positive and rounded to maximum 2 decimals
15
14
  #
16
15
  # @return [String, nil]
17
16
  optional :amount_due, String, nil?: true
@@ -24,11 +23,13 @@ module EInvoiceAPI
24
23
  nil?: true
25
24
 
26
25
  # @!attribute billing_address
26
+ # The billing address (if different from customer address)
27
27
  #
28
28
  # @return [String, nil]
29
29
  optional :billing_address, String, nil?: true
30
30
 
31
31
  # @!attribute billing_address_recipient
32
+ # The recipient name at the billing address
32
33
  #
33
34
  # @return [String, nil]
34
35
  optional :billing_address_recipient, String, nil?: true
@@ -39,69 +40,88 @@ module EInvoiceAPI
39
40
  optional :charges, -> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::Charge] }, nil?: true
40
41
 
41
42
  # @!attribute currency
42
- # Currency of the invoice
43
+ # Currency of the invoice (ISO 4217 currency code)
43
44
  #
44
45
  # @return [Symbol, EInvoiceAPI::Models::CurrencyCode, nil]
45
46
  optional :currency, enum: -> { EInvoiceAPI::CurrencyCode }
46
47
 
47
48
  # @!attribute customer_address
49
+ # The address of the customer/buyer
48
50
  #
49
51
  # @return [String, nil]
50
52
  optional :customer_address, String, nil?: true
51
53
 
52
54
  # @!attribute customer_address_recipient
55
+ # The recipient name at the customer address
53
56
  #
54
57
  # @return [String, nil]
55
58
  optional :customer_address_recipient, String, nil?: true
56
59
 
60
+ # @!attribute customer_company_id
61
+ # Customer company ID. For Belgium this is the CBE number or their EUID (European
62
+ # Unique Identifier) number. In the Netherlands this is the KVK number.
63
+ #
64
+ # @return [String, nil]
65
+ optional :customer_company_id, String, nil?: true
66
+
57
67
  # @!attribute customer_email
68
+ # The email address of the customer
58
69
  #
59
70
  # @return [String, nil]
60
71
  optional :customer_email, String, nil?: true
61
72
 
62
73
  # @!attribute customer_id
74
+ # The unique identifier for the customer in your system
63
75
  #
64
76
  # @return [String, nil]
65
77
  optional :customer_id, String, nil?: true
66
78
 
67
79
  # @!attribute customer_name
80
+ # The company name of the customer/buyer
68
81
  #
69
82
  # @return [String, nil]
70
83
  optional :customer_name, String, nil?: true
71
84
 
72
85
  # @!attribute customer_tax_id
86
+ # Customer tax ID. For Belgium this is the VAT number. Must include the country
87
+ # prefix
73
88
  #
74
89
  # @return [String, nil]
75
90
  optional :customer_tax_id, String, nil?: true
76
91
 
77
92
  # @!attribute direction
93
+ # The direction of the document: INBOUND (purchases) or OUTBOUND (sales)
78
94
  #
79
95
  # @return [Symbol, EInvoiceAPI::Models::DocumentDirection, nil]
80
96
  optional :direction, enum: -> { EInvoiceAPI::DocumentDirection }
81
97
 
82
98
  # @!attribute document_type
99
+ # The type of document: INVOICE, CREDIT_NOTE, or DEBIT_NOTE
83
100
  #
84
101
  # @return [Symbol, EInvoiceAPI::Models::DocumentType, nil]
85
102
  optional :document_type, enum: -> { EInvoiceAPI::DocumentType }
86
103
 
87
104
  # @!attribute due_date
105
+ # The date when payment is due
88
106
  #
89
107
  # @return [Date, nil]
90
108
  optional :due_date, Date, nil?: true
91
109
 
92
110
  # @!attribute invoice_date
111
+ # The date when the invoice was issued
93
112
  #
94
113
  # @return [Date, nil]
95
114
  optional :invoice_date, Date, nil?: true
96
115
 
97
116
  # @!attribute invoice_id
117
+ # The unique invoice identifier/number
98
118
  #
99
119
  # @return [String, nil]
100
120
  optional :invoice_id, String, nil?: true
101
121
 
102
122
  # @!attribute invoice_total
103
- # The total amount of the invoice (so invoice_total = subtotal + total_tax +
104
- # total_discount). Must be positive and rounded to maximum 2 decimals
123
+ # The total amount of the invoice including tax (invoice_total = subtotal +
124
+ # total_tax + total_discount). Must be positive and rounded to maximum 2 decimals
105
125
  #
106
126
  # @return [String, nil]
107
127
  optional :invoice_total, String, nil?: true
@@ -114,6 +134,7 @@ module EInvoiceAPI
114
134
  -> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Item] }
115
135
 
116
136
  # @!attribute note
137
+ # Additional notes or comments for the invoice
117
138
  #
118
139
  # @return [String, nil]
119
140
  optional :note, String, nil?: true
@@ -126,63 +147,74 @@ module EInvoiceAPI
126
147
  nil?: true
127
148
 
128
149
  # @!attribute payment_term
150
+ # The payment terms (e.g., 'Net 30', 'Due on receipt', '2/10 Net 30')
129
151
  #
130
152
  # @return [String, nil]
131
153
  optional :payment_term, String, nil?: true
132
154
 
133
155
  # @!attribute previous_unpaid_balance
134
- # The previous unpaid balance of the invoice, if any. Must be positive and rounded
135
- # to maximum 2 decimals
156
+ # The previous unpaid balance from prior invoices, if any. Must be positive and
157
+ # rounded to maximum 2 decimals
136
158
  #
137
159
  # @return [String, nil]
138
160
  optional :previous_unpaid_balance, String, nil?: true
139
161
 
140
162
  # @!attribute purchase_order
163
+ # The purchase order reference number
141
164
  #
142
165
  # @return [String, nil]
143
166
  optional :purchase_order, String, nil?: true
144
167
 
145
168
  # @!attribute remittance_address
169
+ # The address where payment should be sent or remitted to
146
170
  #
147
171
  # @return [String, nil]
148
172
  optional :remittance_address, String, nil?: true
149
173
 
150
174
  # @!attribute remittance_address_recipient
175
+ # The recipient name at the remittance address
151
176
  #
152
177
  # @return [String, nil]
153
178
  optional :remittance_address_recipient, String, nil?: true
154
179
 
155
180
  # @!attribute service_address
181
+ # The address where services were performed or goods were delivered
156
182
  #
157
183
  # @return [String, nil]
158
184
  optional :service_address, String, nil?: true
159
185
 
160
186
  # @!attribute service_address_recipient
187
+ # The recipient name at the service address
161
188
  #
162
189
  # @return [String, nil]
163
190
  optional :service_address_recipient, String, nil?: true
164
191
 
165
192
  # @!attribute service_end_date
193
+ # The end date of the service period or delivery period
166
194
  #
167
195
  # @return [Date, nil]
168
196
  optional :service_end_date, Date, nil?: true
169
197
 
170
198
  # @!attribute service_start_date
199
+ # The start date of the service period or delivery period
171
200
  #
172
201
  # @return [Date, nil]
173
202
  optional :service_start_date, Date, nil?: true
174
203
 
175
204
  # @!attribute shipping_address
205
+ # The shipping/delivery address
176
206
  #
177
207
  # @return [String, nil]
178
208
  optional :shipping_address, String, nil?: true
179
209
 
180
210
  # @!attribute shipping_address_recipient
211
+ # The recipient name at the shipping address
181
212
  #
182
213
  # @return [String, nil]
183
214
  optional :shipping_address_recipient, String, nil?: true
184
215
 
185
216
  # @!attribute state
217
+ # The current state of the document: DRAFT, TRANSIT, FAILED, SENT, or RECEIVED
186
218
  #
187
219
  # @return [Symbol, EInvoiceAPI::Models::DocumentState, nil]
188
220
  optional :state, enum: -> { EInvoiceAPI::DocumentState }
@@ -202,7 +234,8 @@ module EInvoiceAPI
202
234
  optional :success, EInvoiceAPI::Internal::Type::Boolean
203
235
 
204
236
  # @!attribute tax_code
205
- # Tax category code of the invoice
237
+ # Tax category code of the invoice (e.g., S for standard rate, Z for zero rate, E
238
+ # for exempt)
206
239
  #
207
240
  # @return [Symbol, EInvoiceAPI::Models::DocumentCreateFromPdfResponse::TaxCode, nil]
208
241
  optional :tax_code, enum: -> { EInvoiceAPI::Models::DocumentCreateFromPdfResponse::TaxCode }
@@ -223,7 +256,8 @@ module EInvoiceAPI
223
256
  optional :total_discount, String, nil?: true
224
257
 
225
258
  # @!attribute total_tax
226
- # The total tax of the invoice. Must be positive and rounded to maximum 2 decimals
259
+ # The total tax amount of the invoice. Must be positive and rounded to maximum 2
260
+ # decimals
227
261
  #
228
262
  # @return [String, nil]
229
263
  optional :total_tax, String, nil?: true
@@ -243,135 +277,152 @@ module EInvoiceAPI
243
277
  optional :vatex, enum: -> { EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex }, nil?: true
244
278
 
245
279
  # @!attribute vatex_note
246
- # VAT exemption note of the invoice
280
+ # Textual explanation for VAT exemption
247
281
  #
248
282
  # @return [String, nil]
249
283
  optional :vatex_note, String, nil?: true
250
284
 
251
285
  # @!attribute vendor_address
286
+ # The address of the vendor/seller
252
287
  #
253
288
  # @return [String, nil]
254
289
  optional :vendor_address, String, nil?: true
255
290
 
256
291
  # @!attribute vendor_address_recipient
292
+ # The recipient name at the vendor address
257
293
  #
258
294
  # @return [String, nil]
259
295
  optional :vendor_address_recipient, String, nil?: true
260
296
 
297
+ # @!attribute vendor_company_id
298
+ # Vendor company ID. For Belgium this is the CBE number or their EUID (European
299
+ # Unique Identifier) number. In the Netherlands this is the KVK number.
300
+ #
301
+ # @return [String, nil]
302
+ optional :vendor_company_id, String, nil?: true
303
+
261
304
  # @!attribute vendor_email
305
+ # The email address of the vendor
262
306
  #
263
307
  # @return [String, nil]
264
308
  optional :vendor_email, String, nil?: true
265
309
 
266
310
  # @!attribute vendor_name
311
+ # The name of the vendor/seller/supplier
267
312
  #
268
313
  # @return [String, nil]
269
314
  optional :vendor_name, String, nil?: true
270
315
 
271
316
  # @!attribute vendor_tax_id
317
+ # Vendor tax ID. For Belgium this is the VAT number. Must include the country
318
+ # prefix
272
319
  #
273
320
  # @return [String, nil]
274
321
  optional :vendor_tax_id, String, nil?: true
275
322
 
276
- # @!method initialize(allowances: nil, amount_due: nil, attachments: nil, billing_address: nil, billing_address_recipient: nil, charges: nil, currency: nil, customer_address: nil, customer_address_recipient: nil, customer_email: nil, customer_id: nil, customer_name: nil, customer_tax_id: nil, direction: nil, document_type: nil, due_date: nil, invoice_date: nil, invoice_id: nil, invoice_total: nil, items: nil, note: nil, payment_details: nil, payment_term: nil, previous_unpaid_balance: nil, purchase_order: nil, remittance_address: nil, remittance_address_recipient: nil, service_address: nil, service_address_recipient: nil, service_end_date: nil, service_start_date: nil, shipping_address: nil, shipping_address_recipient: nil, state: nil, subtotal: nil, success: nil, tax_code: nil, tax_details: nil, total_discount: nil, total_tax: nil, ubl_document: nil, vatex: nil, vatex_note: nil, vendor_address: nil, vendor_address_recipient: nil, vendor_email: nil, vendor_name: nil, vendor_tax_id: nil)
323
+ # @!method initialize(allowances: nil, amount_due: nil, attachments: nil, billing_address: nil, billing_address_recipient: nil, charges: nil, currency: nil, customer_address: nil, customer_address_recipient: nil, customer_company_id: nil, customer_email: nil, customer_id: nil, customer_name: nil, customer_tax_id: nil, direction: nil, document_type: nil, due_date: nil, invoice_date: nil, invoice_id: nil, invoice_total: nil, items: nil, note: nil, payment_details: nil, payment_term: nil, previous_unpaid_balance: nil, purchase_order: nil, remittance_address: nil, remittance_address_recipient: nil, service_address: nil, service_address_recipient: nil, service_end_date: nil, service_start_date: nil, shipping_address: nil, shipping_address_recipient: nil, state: nil, subtotal: nil, success: nil, tax_code: nil, tax_details: nil, total_discount: nil, total_tax: nil, ubl_document: nil, vatex: nil, vatex_note: nil, vendor_address: nil, vendor_address_recipient: nil, vendor_company_id: nil, vendor_email: nil, vendor_name: nil, vendor_tax_id: nil)
277
324
  # Some parameter documentations has been truncated, see
278
325
  # {EInvoiceAPI::Models::DocumentCreateFromPdfResponse} for more details.
279
326
  #
280
327
  # @param allowances [Array<EInvoiceAPI::Models::Allowance>, nil]
281
328
  #
282
- # @param amount_due [String, nil] The amount due of the invoice. Must be positive and rounded to maximum 2 decimal
329
+ # @param amount_due [String, nil] The amount due for payment. Must be positive and rounded to maximum 2 decimals
283
330
  #
284
331
  # @param attachments [Array<EInvoiceAPI::Models::DocumentAttachmentCreate>, nil]
285
332
  #
286
- # @param billing_address [String, nil]
333
+ # @param billing_address [String, nil] The billing address (if different from customer address)
287
334
  #
288
- # @param billing_address_recipient [String, nil]
335
+ # @param billing_address_recipient [String, nil] The recipient name at the billing address
289
336
  #
290
337
  # @param charges [Array<EInvoiceAPI::Models::Charge>, nil]
291
338
  #
292
- # @param currency [Symbol, EInvoiceAPI::Models::CurrencyCode] Currency of the invoice
339
+ # @param currency [Symbol, EInvoiceAPI::Models::CurrencyCode] Currency of the invoice (ISO 4217 currency code)
293
340
  #
294
- # @param customer_address [String, nil]
341
+ # @param customer_address [String, nil] The address of the customer/buyer
295
342
  #
296
- # @param customer_address_recipient [String, nil]
343
+ # @param customer_address_recipient [String, nil] The recipient name at the customer address
297
344
  #
298
- # @param customer_email [String, nil]
345
+ # @param customer_company_id [String, nil] Customer company ID. For Belgium this is the CBE number or their EUID (European
299
346
  #
300
- # @param customer_id [String, nil]
347
+ # @param customer_email [String, nil] The email address of the customer
301
348
  #
302
- # @param customer_name [String, nil]
349
+ # @param customer_id [String, nil] The unique identifier for the customer in your system
303
350
  #
304
- # @param customer_tax_id [String, nil]
351
+ # @param customer_name [String, nil] The company name of the customer/buyer
305
352
  #
306
- # @param direction [Symbol, EInvoiceAPI::Models::DocumentDirection]
353
+ # @param customer_tax_id [String, nil] Customer tax ID. For Belgium this is the VAT number. Must include the country pr
307
354
  #
308
- # @param document_type [Symbol, EInvoiceAPI::Models::DocumentType]
355
+ # @param direction [Symbol, EInvoiceAPI::Models::DocumentDirection] The direction of the document: INBOUND (purchases) or OUTBOUND (sales)
309
356
  #
310
- # @param due_date [Date, nil]
357
+ # @param document_type [Symbol, EInvoiceAPI::Models::DocumentType] The type of document: INVOICE, CREDIT_NOTE, or DEBIT_NOTE
311
358
  #
312
- # @param invoice_date [Date, nil]
359
+ # @param due_date [Date, nil] The date when payment is due
313
360
  #
314
- # @param invoice_id [String, nil]
361
+ # @param invoice_date [Date, nil] The date when the invoice was issued
315
362
  #
316
- # @param invoice_total [String, nil] The total amount of the invoice (so invoice_total = subtotal + total_tax + total
363
+ # @param invoice_id [String, nil] The unique invoice identifier/number
364
+ #
365
+ # @param invoice_total [String, nil] The total amount of the invoice including tax (invoice*total = subtotal + total*
317
366
  #
318
367
  # @param items [Array<EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Item>] At least one line item is required
319
368
  #
320
- # @param note [String, nil]
369
+ # @param note [String, nil] Additional notes or comments for the invoice
321
370
  #
322
371
  # @param payment_details [Array<EInvoiceAPI::Models::PaymentDetailCreate>, nil]
323
372
  #
324
- # @param payment_term [String, nil]
373
+ # @param payment_term [String, nil] The payment terms (e.g., 'Net 30', 'Due on receipt', '2/10 Net 30')
325
374
  #
326
- # @param previous_unpaid_balance [String, nil] The previous unpaid balance of the invoice, if any. Must be positive and rounded
375
+ # @param previous_unpaid_balance [String, nil] The previous unpaid balance from prior invoices, if any. Must be positive and ro
327
376
  #
328
- # @param purchase_order [String, nil]
377
+ # @param purchase_order [String, nil] The purchase order reference number
329
378
  #
330
- # @param remittance_address [String, nil]
379
+ # @param remittance_address [String, nil] The address where payment should be sent or remitted to
331
380
  #
332
- # @param remittance_address_recipient [String, nil]
381
+ # @param remittance_address_recipient [String, nil] The recipient name at the remittance address
333
382
  #
334
- # @param service_address [String, nil]
383
+ # @param service_address [String, nil] The address where services were performed or goods were delivered
335
384
  #
336
- # @param service_address_recipient [String, nil]
385
+ # @param service_address_recipient [String, nil] The recipient name at the service address
337
386
  #
338
- # @param service_end_date [Date, nil]
387
+ # @param service_end_date [Date, nil] The end date of the service period or delivery period
339
388
  #
340
- # @param service_start_date [Date, nil]
389
+ # @param service_start_date [Date, nil] The start date of the service period or delivery period
341
390
  #
342
- # @param shipping_address [String, nil]
391
+ # @param shipping_address [String, nil] The shipping/delivery address
343
392
  #
344
- # @param shipping_address_recipient [String, nil]
393
+ # @param shipping_address_recipient [String, nil] The recipient name at the shipping address
345
394
  #
346
- # @param state [Symbol, EInvoiceAPI::Models::DocumentState]
395
+ # @param state [Symbol, EInvoiceAPI::Models::DocumentState] The current state of the document: DRAFT, TRANSIT, FAILED, SENT, or RECEIVED
347
396
  #
348
397
  # @param subtotal [String, nil] The taxable base of the invoice. Should be the sum of all line items - allowance
349
398
  #
350
399
  # @param success [Boolean] Whether the PDF was successfully converted into a compliant e-invoice
351
400
  #
352
- # @param tax_code [Symbol, EInvoiceAPI::Models::DocumentCreateFromPdfResponse::TaxCode] Tax category code of the invoice
401
+ # @param tax_code [Symbol, EInvoiceAPI::Models::DocumentCreateFromPdfResponse::TaxCode] Tax category code of the invoice (e.g., S for standard rate, Z for zero rate, E
353
402
  #
354
403
  # @param tax_details [Array<EInvoiceAPI::Models::DocumentCreateFromPdfResponse::TaxDetail>, nil]
355
404
  #
356
405
  # @param total_discount [String, nil] The net financial discount/charge of the invoice (non-VAT charges minus non-VAT
357
406
  #
358
- # @param total_tax [String, nil] The total tax of the invoice. Must be positive and rounded to maximum 2 decimals
407
+ # @param total_tax [String, nil] The total tax amount of the invoice. Must be positive and rounded to maximum 2 d
359
408
  #
360
409
  # @param ubl_document [String, nil] The UBL document as an XML string
361
410
  #
362
411
  # @param vatex [Symbol, EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex, nil] VATEX code list for VAT exemption reasons
363
412
  #
364
- # @param vatex_note [String, nil] VAT exemption note of the invoice
413
+ # @param vatex_note [String, nil] Textual explanation for VAT exemption
414
+ #
415
+ # @param vendor_address [String, nil] The address of the vendor/seller
365
416
  #
366
- # @param vendor_address [String, nil]
417
+ # @param vendor_address_recipient [String, nil] The recipient name at the vendor address
367
418
  #
368
- # @param vendor_address_recipient [String, nil]
419
+ # @param vendor_company_id [String, nil] Vendor company ID. For Belgium this is the CBE number or their EUID (European Un
369
420
  #
370
- # @param vendor_email [String, nil]
421
+ # @param vendor_email [String, nil] The email address of the vendor
371
422
  #
372
- # @param vendor_name [String, nil]
423
+ # @param vendor_name [String, nil] The name of the vendor/seller/supplier
373
424
  #
374
- # @param vendor_tax_id [String, nil]
425
+ # @param vendor_tax_id [String, nil] Vendor tax ID. For Belgium this is the VAT number. Must include the country pref
375
426
 
376
427
  class Item < EInvoiceAPI::Internal::Type::BaseModel
377
428
  # @!attribute allowances
@@ -381,9 +432,9 @@ module EInvoiceAPI
381
432
  optional :allowances, -> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::Allowance] }, nil?: true
382
433
 
383
434
  # @!attribute amount
384
- # The total amount of the line item, exclusive of VAT, after subtracting line
385
- # level allowances and adding line level charges. Must be rounded to maximum 2
386
- # decimals
435
+ # The invoice line net amount (BT-131), exclusive of VAT, inclusive of line level
436
+ # allowances and charges. Calculated as: ((unit_price / price_base_quantity) \*
437
+ # quantity) - allowances + charges. Must be rounded to maximum 2 decimals
387
438
  #
388
439
  # @return [String, nil]
389
440
  optional :amount, String, nil?: true
@@ -405,6 +456,13 @@ module EInvoiceAPI
405
456
  # @return [String, nil]
406
457
  optional :description, String, nil?: true
407
458
 
459
+ # @!attribute price_base_quantity
460
+ # The item price base quantity (BT-149). The number of item units to which the
461
+ # price applies. Defaults to 1. Must be rounded to maximum 4 decimals
462
+ #
463
+ # @return [String, nil]
464
+ optional :price_base_quantity, String, nil?: true
465
+
408
466
  # @!attribute product_code
409
467
  # The product code of the line item.
410
468
  #
@@ -437,18 +495,19 @@ module EInvoiceAPI
437
495
  optional :unit, enum: -> { EInvoiceAPI::UnitOfMeasureCode }, nil?: true
438
496
 
439
497
  # @!attribute unit_price
440
- # The unit price of the line item. Must be rounded to maximum 2 decimals
498
+ # The item net price (BT-146). The price of an item, exclusive of VAT, after
499
+ # subtracting item price discount. Must be rounded to maximum 4 decimals
441
500
  #
442
501
  # @return [String, nil]
443
502
  optional :unit_price, String, nil?: true
444
503
 
445
- # @!method initialize(allowances: nil, amount: nil, charges: nil, date: nil, description: nil, product_code: nil, quantity: nil, tax: nil, tax_rate: nil, unit: nil, unit_price: nil)
504
+ # @!method initialize(allowances: nil, amount: nil, charges: nil, date: nil, description: nil, price_base_quantity: nil, product_code: nil, quantity: nil, tax: nil, tax_rate: nil, unit: nil, unit_price: nil)
446
505
  # Some parameter documentations has been truncated, see
447
506
  # {EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Item} for more details.
448
507
  #
449
508
  # @param allowances [Array<EInvoiceAPI::Models::Allowance>, nil] The allowances of the line item.
450
509
  #
451
- # @param amount [String, nil] The total amount of the line item, exclusive of VAT, after subtracting line leve
510
+ # @param amount [String, nil] The invoice line net amount (BT-131), exclusive of VAT, inclusive of line level
452
511
  #
453
512
  # @param charges [Array<EInvoiceAPI::Models::Charge>, nil] The charges of the line item.
454
513
  #
@@ -456,6 +515,8 @@ module EInvoiceAPI
456
515
  #
457
516
  # @param description [String, nil] The description of the line item.
458
517
  #
518
+ # @param price_base_quantity [String, nil] The item price base quantity (BT-149). The number of item units to which the pri
519
+ #
459
520
  # @param product_code [String, nil] The product code of the line item.
460
521
  #
461
522
  # @param quantity [String, nil] The quantity of items (goods or services) that is the subject of the line item.
@@ -466,10 +527,11 @@ module EInvoiceAPI
466
527
  #
467
528
  # @param unit [Symbol, EInvoiceAPI::Models::UnitOfMeasureCode, nil] Unit of Measure Codes from UNECERec20 used in Peppol BIS Billing 3.0.
468
529
  #
469
- # @param unit_price [String, nil] The unit price of the line item. Must be rounded to maximum 2 decimals
530
+ # @param unit_price [String, nil] The item net price (BT-146). The price of an item, exclusive of VAT, after subtr
470
531
  end
471
532
 
472
- # Tax category code of the invoice
533
+ # Tax category code of the invoice (e.g., S for standard rate, Z for zero rate, E
534
+ # for exempt)
473
535
  #
474
536
  # @see EInvoiceAPI::Models::DocumentCreateFromPdfResponse#tax_code
475
537
  module TaxCode
@@ -492,18 +554,21 @@ module EInvoiceAPI
492
554
 
493
555
  class TaxDetail < EInvoiceAPI::Internal::Type::BaseModel
494
556
  # @!attribute amount
557
+ # The tax amount for this tax category. Must be rounded to maximum 2 decimals
495
558
  #
496
559
  # @return [String, nil]
497
560
  optional :amount, String, nil?: true
498
561
 
499
562
  # @!attribute rate
563
+ # The tax rate as a percentage (e.g., '21.00', '6.00', '0.00')
500
564
  #
501
565
  # @return [String, nil]
502
566
  optional :rate, String, nil?: true
503
567
 
504
568
  # @!method initialize(amount: nil, rate: nil)
505
- # @param amount [String, nil]
506
- # @param rate [String, nil]
569
+ # @param amount [String, nil] The tax amount for this tax category. Must be rounded to maximum 2 decimals
570
+ #
571
+ # @param rate [String, nil] The tax rate as a percentage (e.g., '21.00', '6.00', '0.00')
507
572
  end
508
573
 
509
574
  # VATEX code list for VAT exemption reasons