e-invoice-api 0.10.1 → 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 +17 -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 +728 -125
  7. data/lib/e_invoice_api/models/document_create_from_pdf_response.rb +127 -61
  8. data/lib/e_invoice_api/models/document_response.rb +377 -83
  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 +43 -39
  12. data/lib/e_invoice_api/resources/validate.rb +43 -39
  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 +3094 -708
  17. data/rbi/e_invoice_api/models/document_create_from_pdf_response.rbi +142 -34
  18. data/rbi/e_invoice_api/models/document_response.rbi +1238 -62
  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 +54 -12
  22. data/rbi/e_invoice_api/resources/validate.rbi +54 -12
  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 }
@@ -215,14 +248,16 @@ module EInvoiceAPI
215
248
  nil?: true
216
249
 
217
250
  # @!attribute total_discount
218
- # The total financial discount of the invoice (so discounts not subject to VAT).
219
- # Must be positive and rounded to maximum 2 decimals
251
+ # The net financial discount/charge of the invoice (non-VAT charges minus non-VAT
252
+ # allowances). Can be positive (net charge), negative (net discount), or zero.
253
+ # Must be rounded to maximum 2 decimals
220
254
  #
221
255
  # @return [String, nil]
222
256
  optional :total_discount, String, nil?: true
223
257
 
224
258
  # @!attribute total_tax
225
- # 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
226
261
  #
227
262
  # @return [String, nil]
228
263
  optional :total_tax, String, nil?: true
@@ -242,135 +277,152 @@ module EInvoiceAPI
242
277
  optional :vatex, enum: -> { EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex }, nil?: true
243
278
 
244
279
  # @!attribute vatex_note
245
- # VAT exemption note of the invoice
280
+ # Textual explanation for VAT exemption
246
281
  #
247
282
  # @return [String, nil]
248
283
  optional :vatex_note, String, nil?: true
249
284
 
250
285
  # @!attribute vendor_address
286
+ # The address of the vendor/seller
251
287
  #
252
288
  # @return [String, nil]
253
289
  optional :vendor_address, String, nil?: true
254
290
 
255
291
  # @!attribute vendor_address_recipient
292
+ # The recipient name at the vendor address
256
293
  #
257
294
  # @return [String, nil]
258
295
  optional :vendor_address_recipient, String, nil?: true
259
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
+
260
304
  # @!attribute vendor_email
305
+ # The email address of the vendor
261
306
  #
262
307
  # @return [String, nil]
263
308
  optional :vendor_email, String, nil?: true
264
309
 
265
310
  # @!attribute vendor_name
311
+ # The name of the vendor/seller/supplier
266
312
  #
267
313
  # @return [String, nil]
268
314
  optional :vendor_name, String, nil?: true
269
315
 
270
316
  # @!attribute vendor_tax_id
317
+ # Vendor tax ID. For Belgium this is the VAT number. Must include the country
318
+ # prefix
271
319
  #
272
320
  # @return [String, nil]
273
321
  optional :vendor_tax_id, String, nil?: true
274
322
 
275
- # @!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)
276
324
  # Some parameter documentations has been truncated, see
277
325
  # {EInvoiceAPI::Models::DocumentCreateFromPdfResponse} for more details.
278
326
  #
279
327
  # @param allowances [Array<EInvoiceAPI::Models::Allowance>, nil]
280
328
  #
281
- # @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
282
330
  #
283
331
  # @param attachments [Array<EInvoiceAPI::Models::DocumentAttachmentCreate>, nil]
284
332
  #
285
- # @param billing_address [String, nil]
333
+ # @param billing_address [String, nil] The billing address (if different from customer address)
286
334
  #
287
- # @param billing_address_recipient [String, nil]
335
+ # @param billing_address_recipient [String, nil] The recipient name at the billing address
288
336
  #
289
337
  # @param charges [Array<EInvoiceAPI::Models::Charge>, nil]
290
338
  #
291
- # @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)
292
340
  #
293
- # @param customer_address [String, nil]
341
+ # @param customer_address [String, nil] The address of the customer/buyer
294
342
  #
295
- # @param customer_address_recipient [String, nil]
343
+ # @param customer_address_recipient [String, nil] The recipient name at the customer address
296
344
  #
297
- # @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
298
346
  #
299
- # @param customer_id [String, nil]
347
+ # @param customer_email [String, nil] The email address of the customer
300
348
  #
301
- # @param customer_name [String, nil]
349
+ # @param customer_id [String, nil] The unique identifier for the customer in your system
302
350
  #
303
- # @param customer_tax_id [String, nil]
351
+ # @param customer_name [String, nil] The company name of the customer/buyer
304
352
  #
305
- # @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
306
354
  #
307
- # @param document_type [Symbol, EInvoiceAPI::Models::DocumentType]
355
+ # @param direction [Symbol, EInvoiceAPI::Models::DocumentDirection] The direction of the document: INBOUND (purchases) or OUTBOUND (sales)
308
356
  #
309
- # @param due_date [Date, nil]
357
+ # @param document_type [Symbol, EInvoiceAPI::Models::DocumentType] The type of document: INVOICE, CREDIT_NOTE, or DEBIT_NOTE
310
358
  #
311
- # @param invoice_date [Date, nil]
359
+ # @param due_date [Date, nil] The date when payment is due
312
360
  #
313
- # @param invoice_id [String, nil]
361
+ # @param invoice_date [Date, nil] The date when the invoice was issued
314
362
  #
315
- # @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*
316
366
  #
317
367
  # @param items [Array<EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Item>] At least one line item is required
318
368
  #
319
- # @param note [String, nil]
369
+ # @param note [String, nil] Additional notes or comments for the invoice
320
370
  #
321
371
  # @param payment_details [Array<EInvoiceAPI::Models::PaymentDetailCreate>, nil]
322
372
  #
323
- # @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')
324
374
  #
325
- # @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
326
376
  #
327
- # @param purchase_order [String, nil]
377
+ # @param purchase_order [String, nil] The purchase order reference number
328
378
  #
329
- # @param remittance_address [String, nil]
379
+ # @param remittance_address [String, nil] The address where payment should be sent or remitted to
330
380
  #
331
- # @param remittance_address_recipient [String, nil]
381
+ # @param remittance_address_recipient [String, nil] The recipient name at the remittance address
332
382
  #
333
- # @param service_address [String, nil]
383
+ # @param service_address [String, nil] The address where services were performed or goods were delivered
334
384
  #
335
- # @param service_address_recipient [String, nil]
385
+ # @param service_address_recipient [String, nil] The recipient name at the service address
336
386
  #
337
- # @param service_end_date [Date, nil]
387
+ # @param service_end_date [Date, nil] The end date of the service period or delivery period
338
388
  #
339
- # @param service_start_date [Date, nil]
389
+ # @param service_start_date [Date, nil] The start date of the service period or delivery period
340
390
  #
341
- # @param shipping_address [String, nil]
391
+ # @param shipping_address [String, nil] The shipping/delivery address
342
392
  #
343
- # @param shipping_address_recipient [String, nil]
393
+ # @param shipping_address_recipient [String, nil] The recipient name at the shipping address
344
394
  #
345
- # @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
346
396
  #
347
397
  # @param subtotal [String, nil] The taxable base of the invoice. Should be the sum of all line items - allowance
348
398
  #
349
399
  # @param success [Boolean] Whether the PDF was successfully converted into a compliant e-invoice
350
400
  #
351
- # @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
352
402
  #
353
403
  # @param tax_details [Array<EInvoiceAPI::Models::DocumentCreateFromPdfResponse::TaxDetail>, nil]
354
404
  #
355
- # @param total_discount [String, nil] The total financial discount of the invoice (so discounts not subject to VAT). M
405
+ # @param total_discount [String, nil] The net financial discount/charge of the invoice (non-VAT charges minus non-VAT
356
406
  #
357
- # @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
358
408
  #
359
409
  # @param ubl_document [String, nil] The UBL document as an XML string
360
410
  #
361
411
  # @param vatex [Symbol, EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Vatex, nil] VATEX code list for VAT exemption reasons
362
412
  #
363
- # @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
364
416
  #
365
- # @param vendor_address [String, nil]
417
+ # @param vendor_address_recipient [String, nil] The recipient name at the vendor address
366
418
  #
367
- # @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
368
420
  #
369
- # @param vendor_email [String, nil]
421
+ # @param vendor_email [String, nil] The email address of the vendor
370
422
  #
371
- # @param vendor_name [String, nil]
423
+ # @param vendor_name [String, nil] The name of the vendor/seller/supplier
372
424
  #
373
- # @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
374
426
 
375
427
  class Item < EInvoiceAPI::Internal::Type::BaseModel
376
428
  # @!attribute allowances
@@ -380,9 +432,9 @@ module EInvoiceAPI
380
432
  optional :allowances, -> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::Allowance] }, nil?: true
381
433
 
382
434
  # @!attribute amount
383
- # The total amount of the line item, exclusive of VAT, after subtracting line
384
- # level allowances and adding line level charges. Must be rounded to maximum 2
385
- # 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
386
438
  #
387
439
  # @return [String, nil]
388
440
  optional :amount, String, nil?: true
@@ -404,6 +456,13 @@ module EInvoiceAPI
404
456
  # @return [String, nil]
405
457
  optional :description, String, nil?: true
406
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
+
407
466
  # @!attribute product_code
408
467
  # The product code of the line item.
409
468
  #
@@ -436,18 +495,19 @@ module EInvoiceAPI
436
495
  optional :unit, enum: -> { EInvoiceAPI::UnitOfMeasureCode }, nil?: true
437
496
 
438
497
  # @!attribute unit_price
439
- # 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
440
500
  #
441
501
  # @return [String, nil]
442
502
  optional :unit_price, String, nil?: true
443
503
 
444
- # @!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)
445
505
  # Some parameter documentations has been truncated, see
446
506
  # {EInvoiceAPI::Models::DocumentCreateFromPdfResponse::Item} for more details.
447
507
  #
448
508
  # @param allowances [Array<EInvoiceAPI::Models::Allowance>, nil] The allowances of the line item.
449
509
  #
450
- # @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
451
511
  #
452
512
  # @param charges [Array<EInvoiceAPI::Models::Charge>, nil] The charges of the line item.
453
513
  #
@@ -455,6 +515,8 @@ module EInvoiceAPI
455
515
  #
456
516
  # @param description [String, nil] The description of the line item.
457
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
+ #
458
520
  # @param product_code [String, nil] The product code of the line item.
459
521
  #
460
522
  # @param quantity [String, nil] The quantity of items (goods or services) that is the subject of the line item.
@@ -465,10 +527,11 @@ module EInvoiceAPI
465
527
  #
466
528
  # @param unit [Symbol, EInvoiceAPI::Models::UnitOfMeasureCode, nil] Unit of Measure Codes from UNECERec20 used in Peppol BIS Billing 3.0.
467
529
  #
468
- # @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
469
531
  end
470
532
 
471
- # 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)
472
535
  #
473
536
  # @see EInvoiceAPI::Models::DocumentCreateFromPdfResponse#tax_code
474
537
  module TaxCode
@@ -491,18 +554,21 @@ module EInvoiceAPI
491
554
 
492
555
  class TaxDetail < EInvoiceAPI::Internal::Type::BaseModel
493
556
  # @!attribute amount
557
+ # The tax amount for this tax category. Must be rounded to maximum 2 decimals
494
558
  #
495
559
  # @return [String, nil]
496
560
  optional :amount, String, nil?: true
497
561
 
498
562
  # @!attribute rate
563
+ # The tax rate as a percentage (e.g., '21.00', '6.00', '0.00')
499
564
  #
500
565
  # @return [String, nil]
501
566
  optional :rate, String, nil?: true
502
567
 
503
568
  # @!method initialize(amount: nil, rate: nil)
504
- # @param amount [String, nil]
505
- # @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')
506
572
  end
507
573
 
508
574
  # VATEX code list for VAT exemption reasons