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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +2 -2
- data/lib/e_invoice_api/models/allowance.rb +42 -14
- data/lib/e_invoice_api/models/charge.rb +193 -4
- data/lib/e_invoice_api/models/document_create.rb +721 -120
- data/lib/e_invoice_api/models/document_create_from_pdf_response.rb +123 -58
- data/lib/e_invoice_api/models/document_response.rb +373 -80
- 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/allowance.rbi +81 -21
- data/rbi/e_invoice_api/models/charge.rbi +202 -5
- data/rbi/e_invoice_api/models/document_create.rbi +3085 -702
- data/rbi/e_invoice_api/models/document_create_from_pdf_response.rbi +136 -30
- data/rbi/e_invoice_api/models/document_response.rbi +1232 -58
- 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/allowance.rbs +59 -8
- data/sig/e_invoice_api/models/charge.rbs +369 -4
- data/sig/e_invoice_api/models/document_create.rbs +939 -44
- data/sig/e_invoice_api/models/document_create_from_pdf_response.rbs +15 -0
- data/sig/e_invoice_api/models/document_response.rbs +443 -12
- 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
|
@@ -11,8 +11,7 @@ module EInvoiceAPI
|
|
|
11
11
|
nil?: true
|
|
12
12
|
|
|
13
13
|
# @!attribute amount_due
|
|
14
|
-
# The amount due
|
|
15
|
-
# decimals
|
|
14
|
+
# The amount due for payment. Must be positive and rounded to maximum 2 decimals
|
|
16
15
|
#
|
|
17
16
|
# @return [Float, String, nil]
|
|
18
17
|
optional :amount_due, union: -> { EInvoiceAPI::DocumentCreate::AmountDue }, nil?: true
|
|
@@ -25,11 +24,13 @@ module EInvoiceAPI
|
|
|
25
24
|
nil?: true
|
|
26
25
|
|
|
27
26
|
# @!attribute billing_address
|
|
27
|
+
# The billing address (if different from customer address)
|
|
28
28
|
#
|
|
29
29
|
# @return [String, nil]
|
|
30
30
|
optional :billing_address, String, nil?: true
|
|
31
31
|
|
|
32
32
|
# @!attribute billing_address_recipient
|
|
33
|
+
# The recipient name at the billing address
|
|
33
34
|
#
|
|
34
35
|
# @return [String, nil]
|
|
35
36
|
optional :billing_address_recipient, String, nil?: true
|
|
@@ -42,69 +43,88 @@ module EInvoiceAPI
|
|
|
42
43
|
nil?: true
|
|
43
44
|
|
|
44
45
|
# @!attribute currency
|
|
45
|
-
# Currency of the invoice
|
|
46
|
+
# Currency of the invoice (ISO 4217 currency code)
|
|
46
47
|
#
|
|
47
48
|
# @return [Symbol, EInvoiceAPI::Models::CurrencyCode, nil]
|
|
48
49
|
optional :currency, enum: -> { EInvoiceAPI::CurrencyCode }
|
|
49
50
|
|
|
50
51
|
# @!attribute customer_address
|
|
52
|
+
# The address of the customer/buyer
|
|
51
53
|
#
|
|
52
54
|
# @return [String, nil]
|
|
53
55
|
optional :customer_address, String, nil?: true
|
|
54
56
|
|
|
55
57
|
# @!attribute customer_address_recipient
|
|
58
|
+
# The recipient name at the customer address
|
|
56
59
|
#
|
|
57
60
|
# @return [String, nil]
|
|
58
61
|
optional :customer_address_recipient, String, nil?: true
|
|
59
62
|
|
|
63
|
+
# @!attribute customer_company_id
|
|
64
|
+
# Customer company ID. For Belgium this is the CBE number or their EUID (European
|
|
65
|
+
# Unique Identifier) number. In the Netherlands this is the KVK number.
|
|
66
|
+
#
|
|
67
|
+
# @return [String, nil]
|
|
68
|
+
optional :customer_company_id, String, nil?: true
|
|
69
|
+
|
|
60
70
|
# @!attribute customer_email
|
|
71
|
+
# The email address of the customer
|
|
61
72
|
#
|
|
62
73
|
# @return [String, nil]
|
|
63
74
|
optional :customer_email, String, nil?: true
|
|
64
75
|
|
|
65
76
|
# @!attribute customer_id
|
|
77
|
+
# The unique identifier for the customer in your system
|
|
66
78
|
#
|
|
67
79
|
# @return [String, nil]
|
|
68
80
|
optional :customer_id, String, nil?: true
|
|
69
81
|
|
|
70
82
|
# @!attribute customer_name
|
|
83
|
+
# The company name of the customer/buyer
|
|
71
84
|
#
|
|
72
85
|
# @return [String, nil]
|
|
73
86
|
optional :customer_name, String, nil?: true
|
|
74
87
|
|
|
75
88
|
# @!attribute customer_tax_id
|
|
89
|
+
# Customer tax ID. For Belgium this is the VAT number. Must include the country
|
|
90
|
+
# prefix
|
|
76
91
|
#
|
|
77
92
|
# @return [String, nil]
|
|
78
93
|
optional :customer_tax_id, String, nil?: true
|
|
79
94
|
|
|
80
95
|
# @!attribute direction
|
|
96
|
+
# The direction of the document: INBOUND (purchases) or OUTBOUND (sales)
|
|
81
97
|
#
|
|
82
98
|
# @return [Symbol, EInvoiceAPI::Models::DocumentDirection, nil]
|
|
83
99
|
optional :direction, enum: -> { EInvoiceAPI::DocumentDirection }
|
|
84
100
|
|
|
85
101
|
# @!attribute document_type
|
|
102
|
+
# The type of document: INVOICE, CREDIT_NOTE, or DEBIT_NOTE
|
|
86
103
|
#
|
|
87
104
|
# @return [Symbol, EInvoiceAPI::Models::DocumentType, nil]
|
|
88
105
|
optional :document_type, enum: -> { EInvoiceAPI::DocumentType }
|
|
89
106
|
|
|
90
107
|
# @!attribute due_date
|
|
108
|
+
# The date when payment is due
|
|
91
109
|
#
|
|
92
110
|
# @return [Date, nil]
|
|
93
111
|
optional :due_date, Date, nil?: true
|
|
94
112
|
|
|
95
113
|
# @!attribute invoice_date
|
|
114
|
+
# The date when the invoice was issued
|
|
96
115
|
#
|
|
97
116
|
# @return [Date, nil]
|
|
98
117
|
optional :invoice_date, Date, nil?: true
|
|
99
118
|
|
|
100
119
|
# @!attribute invoice_id
|
|
120
|
+
# The unique invoice identifier/number
|
|
101
121
|
#
|
|
102
122
|
# @return [String, nil]
|
|
103
123
|
optional :invoice_id, String, nil?: true
|
|
104
124
|
|
|
105
125
|
# @!attribute invoice_total
|
|
106
|
-
# The total amount of the invoice (
|
|
107
|
-
# total_discount). Must be positive and rounded to maximum 2 decimals
|
|
126
|
+
# The total amount of the invoice including tax (invoice_total = subtotal +
|
|
127
|
+
# total_tax + total_discount). Must be positive and rounded to maximum 2 decimals
|
|
108
128
|
#
|
|
109
129
|
# @return [Float, String, nil]
|
|
110
130
|
optional :invoice_total, union: -> { EInvoiceAPI::DocumentCreate::InvoiceTotal }, nil?: true
|
|
@@ -116,6 +136,7 @@ module EInvoiceAPI
|
|
|
116
136
|
optional :items, -> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::DocumentCreate::Item] }
|
|
117
137
|
|
|
118
138
|
# @!attribute note
|
|
139
|
+
# Additional notes or comments for the invoice
|
|
119
140
|
#
|
|
120
141
|
# @return [String, nil]
|
|
121
142
|
optional :note, String, nil?: true
|
|
@@ -128,13 +149,14 @@ module EInvoiceAPI
|
|
|
128
149
|
nil?: true
|
|
129
150
|
|
|
130
151
|
# @!attribute payment_term
|
|
152
|
+
# The payment terms (e.g., 'Net 30', 'Due on receipt', '2/10 Net 30')
|
|
131
153
|
#
|
|
132
154
|
# @return [String, nil]
|
|
133
155
|
optional :payment_term, String, nil?: true
|
|
134
156
|
|
|
135
157
|
# @!attribute previous_unpaid_balance
|
|
136
|
-
# The previous unpaid balance
|
|
137
|
-
# to maximum 2 decimals
|
|
158
|
+
# The previous unpaid balance from prior invoices, if any. Must be positive and
|
|
159
|
+
# rounded to maximum 2 decimals
|
|
138
160
|
#
|
|
139
161
|
# @return [Float, String, nil]
|
|
140
162
|
optional :previous_unpaid_balance,
|
|
@@ -142,51 +164,61 @@ module EInvoiceAPI
|
|
|
142
164
|
nil?: true
|
|
143
165
|
|
|
144
166
|
# @!attribute purchase_order
|
|
167
|
+
# The purchase order reference number
|
|
145
168
|
#
|
|
146
169
|
# @return [String, nil]
|
|
147
170
|
optional :purchase_order, String, nil?: true
|
|
148
171
|
|
|
149
172
|
# @!attribute remittance_address
|
|
173
|
+
# The address where payment should be sent or remitted to
|
|
150
174
|
#
|
|
151
175
|
# @return [String, nil]
|
|
152
176
|
optional :remittance_address, String, nil?: true
|
|
153
177
|
|
|
154
178
|
# @!attribute remittance_address_recipient
|
|
179
|
+
# The recipient name at the remittance address
|
|
155
180
|
#
|
|
156
181
|
# @return [String, nil]
|
|
157
182
|
optional :remittance_address_recipient, String, nil?: true
|
|
158
183
|
|
|
159
184
|
# @!attribute service_address
|
|
185
|
+
# The address where services were performed or goods were delivered
|
|
160
186
|
#
|
|
161
187
|
# @return [String, nil]
|
|
162
188
|
optional :service_address, String, nil?: true
|
|
163
189
|
|
|
164
190
|
# @!attribute service_address_recipient
|
|
191
|
+
# The recipient name at the service address
|
|
165
192
|
#
|
|
166
193
|
# @return [String, nil]
|
|
167
194
|
optional :service_address_recipient, String, nil?: true
|
|
168
195
|
|
|
169
196
|
# @!attribute service_end_date
|
|
197
|
+
# The end date of the service period or delivery period
|
|
170
198
|
#
|
|
171
199
|
# @return [Date, nil]
|
|
172
200
|
optional :service_end_date, Date, nil?: true
|
|
173
201
|
|
|
174
202
|
# @!attribute service_start_date
|
|
203
|
+
# The start date of the service period or delivery period
|
|
175
204
|
#
|
|
176
205
|
# @return [Date, nil]
|
|
177
206
|
optional :service_start_date, Date, nil?: true
|
|
178
207
|
|
|
179
208
|
# @!attribute shipping_address
|
|
209
|
+
# The shipping/delivery address
|
|
180
210
|
#
|
|
181
211
|
# @return [String, nil]
|
|
182
212
|
optional :shipping_address, String, nil?: true
|
|
183
213
|
|
|
184
214
|
# @!attribute shipping_address_recipient
|
|
215
|
+
# The recipient name at the shipping address
|
|
185
216
|
#
|
|
186
217
|
# @return [String, nil]
|
|
187
218
|
optional :shipping_address_recipient, String, nil?: true
|
|
188
219
|
|
|
189
220
|
# @!attribute state
|
|
221
|
+
# The current state of the document: DRAFT, TRANSIT, FAILED, SENT, or RECEIVED
|
|
190
222
|
#
|
|
191
223
|
# @return [Symbol, EInvoiceAPI::Models::DocumentState, nil]
|
|
192
224
|
optional :state, enum: -> { EInvoiceAPI::DocumentState }
|
|
@@ -200,7 +232,8 @@ module EInvoiceAPI
|
|
|
200
232
|
optional :subtotal, union: -> { EInvoiceAPI::DocumentCreate::Subtotal }, nil?: true
|
|
201
233
|
|
|
202
234
|
# @!attribute tax_code
|
|
203
|
-
# Tax category code of the invoice
|
|
235
|
+
# Tax category code of the invoice (e.g., S for standard rate, Z for zero rate, E
|
|
236
|
+
# for exempt)
|
|
204
237
|
#
|
|
205
238
|
# @return [Symbol, EInvoiceAPI::Models::DocumentCreate::TaxCode, nil]
|
|
206
239
|
optional :tax_code, enum: -> { EInvoiceAPI::DocumentCreate::TaxCode }
|
|
@@ -221,7 +254,8 @@ module EInvoiceAPI
|
|
|
221
254
|
optional :total_discount, union: -> { EInvoiceAPI::DocumentCreate::TotalDiscount }, nil?: true
|
|
222
255
|
|
|
223
256
|
# @!attribute total_tax
|
|
224
|
-
# The total tax of the invoice. Must be positive and rounded to maximum 2
|
|
257
|
+
# The total tax amount of the invoice. Must be positive and rounded to maximum 2
|
|
258
|
+
# decimals
|
|
225
259
|
#
|
|
226
260
|
# @return [Float, String, nil]
|
|
227
261
|
optional :total_tax, union: -> { EInvoiceAPI::DocumentCreate::TotalTax }, nil?: true
|
|
@@ -235,131 +269,148 @@ module EInvoiceAPI
|
|
|
235
269
|
optional :vatex, enum: -> { EInvoiceAPI::DocumentCreate::Vatex }, nil?: true
|
|
236
270
|
|
|
237
271
|
# @!attribute vatex_note
|
|
238
|
-
#
|
|
272
|
+
# Textual explanation for VAT exemption
|
|
239
273
|
#
|
|
240
274
|
# @return [String, nil]
|
|
241
275
|
optional :vatex_note, String, nil?: true
|
|
242
276
|
|
|
243
277
|
# @!attribute vendor_address
|
|
278
|
+
# The address of the vendor/seller
|
|
244
279
|
#
|
|
245
280
|
# @return [String, nil]
|
|
246
281
|
optional :vendor_address, String, nil?: true
|
|
247
282
|
|
|
248
283
|
# @!attribute vendor_address_recipient
|
|
284
|
+
# The recipient name at the vendor address
|
|
249
285
|
#
|
|
250
286
|
# @return [String, nil]
|
|
251
287
|
optional :vendor_address_recipient, String, nil?: true
|
|
252
288
|
|
|
289
|
+
# @!attribute vendor_company_id
|
|
290
|
+
# Vendor company ID. For Belgium this is the CBE number or their EUID (European
|
|
291
|
+
# Unique Identifier) number. In the Netherlands this is the KVK number.
|
|
292
|
+
#
|
|
293
|
+
# @return [String, nil]
|
|
294
|
+
optional :vendor_company_id, String, nil?: true
|
|
295
|
+
|
|
253
296
|
# @!attribute vendor_email
|
|
297
|
+
# The email address of the vendor
|
|
254
298
|
#
|
|
255
299
|
# @return [String, nil]
|
|
256
300
|
optional :vendor_email, String, nil?: true
|
|
257
301
|
|
|
258
302
|
# @!attribute vendor_name
|
|
303
|
+
# The name of the vendor/seller/supplier
|
|
259
304
|
#
|
|
260
305
|
# @return [String, nil]
|
|
261
306
|
optional :vendor_name, String, nil?: true
|
|
262
307
|
|
|
263
308
|
# @!attribute vendor_tax_id
|
|
309
|
+
# Vendor tax ID. For Belgium this is the VAT number. Must include the country
|
|
310
|
+
# prefix
|
|
264
311
|
#
|
|
265
312
|
# @return [String, nil]
|
|
266
313
|
optional :vendor_tax_id, String, nil?: true
|
|
267
314
|
|
|
268
|
-
# @!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, tax_code: nil, tax_details: nil, total_discount: nil, total_tax: nil, vatex: nil, vatex_note: nil, vendor_address: nil, vendor_address_recipient: nil, vendor_email: nil, vendor_name: nil, vendor_tax_id: nil)
|
|
315
|
+
# @!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, tax_code: nil, tax_details: nil, total_discount: nil, total_tax: 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)
|
|
269
316
|
# Some parameter documentations has been truncated, see
|
|
270
317
|
# {EInvoiceAPI::Models::DocumentCreate} for more details.
|
|
271
318
|
#
|
|
272
319
|
# @param allowances [Array<EInvoiceAPI::Models::DocumentCreate::Allowance>, nil]
|
|
273
320
|
#
|
|
274
|
-
# @param amount_due [Float, String, nil] The amount due
|
|
321
|
+
# @param amount_due [Float, String, nil] The amount due for payment. Must be positive and rounded to maximum 2 decimals
|
|
275
322
|
#
|
|
276
323
|
# @param attachments [Array<EInvoiceAPI::Models::DocumentAttachmentCreate>, nil]
|
|
277
324
|
#
|
|
278
|
-
# @param billing_address [String, nil]
|
|
325
|
+
# @param billing_address [String, nil] The billing address (if different from customer address)
|
|
279
326
|
#
|
|
280
|
-
# @param billing_address_recipient [String, nil]
|
|
327
|
+
# @param billing_address_recipient [String, nil] The recipient name at the billing address
|
|
281
328
|
#
|
|
282
329
|
# @param charges [Array<EInvoiceAPI::Models::DocumentCreate::Charge>, nil]
|
|
283
330
|
#
|
|
284
|
-
# @param currency [Symbol, EInvoiceAPI::Models::CurrencyCode] Currency of the invoice
|
|
331
|
+
# @param currency [Symbol, EInvoiceAPI::Models::CurrencyCode] Currency of the invoice (ISO 4217 currency code)
|
|
332
|
+
#
|
|
333
|
+
# @param customer_address [String, nil] The address of the customer/buyer
|
|
285
334
|
#
|
|
286
|
-
# @param
|
|
335
|
+
# @param customer_address_recipient [String, nil] The recipient name at the customer address
|
|
287
336
|
#
|
|
288
|
-
# @param
|
|
337
|
+
# @param customer_company_id [String, nil] Customer company ID. For Belgium this is the CBE number or their EUID (European
|
|
289
338
|
#
|
|
290
|
-
# @param customer_email [String, nil]
|
|
339
|
+
# @param customer_email [String, nil] The email address of the customer
|
|
291
340
|
#
|
|
292
|
-
# @param customer_id [String, nil]
|
|
341
|
+
# @param customer_id [String, nil] The unique identifier for the customer in your system
|
|
293
342
|
#
|
|
294
|
-
# @param customer_name [String, nil]
|
|
343
|
+
# @param customer_name [String, nil] The company name of the customer/buyer
|
|
295
344
|
#
|
|
296
|
-
# @param customer_tax_id [String, nil]
|
|
345
|
+
# @param customer_tax_id [String, nil] Customer tax ID. For Belgium this is the VAT number. Must include the country pr
|
|
297
346
|
#
|
|
298
|
-
# @param direction [Symbol, EInvoiceAPI::Models::DocumentDirection]
|
|
347
|
+
# @param direction [Symbol, EInvoiceAPI::Models::DocumentDirection] The direction of the document: INBOUND (purchases) or OUTBOUND (sales)
|
|
299
348
|
#
|
|
300
|
-
# @param document_type [Symbol, EInvoiceAPI::Models::DocumentType]
|
|
349
|
+
# @param document_type [Symbol, EInvoiceAPI::Models::DocumentType] The type of document: INVOICE, CREDIT_NOTE, or DEBIT_NOTE
|
|
301
350
|
#
|
|
302
|
-
# @param due_date [Date, nil]
|
|
351
|
+
# @param due_date [Date, nil] The date when payment is due
|
|
303
352
|
#
|
|
304
|
-
# @param invoice_date [Date, nil]
|
|
353
|
+
# @param invoice_date [Date, nil] The date when the invoice was issued
|
|
305
354
|
#
|
|
306
|
-
# @param invoice_id [String, nil]
|
|
355
|
+
# @param invoice_id [String, nil] The unique invoice identifier/number
|
|
307
356
|
#
|
|
308
|
-
# @param invoice_total [Float, String, nil] The total amount of the invoice (
|
|
357
|
+
# @param invoice_total [Float, String, nil] The total amount of the invoice including tax (invoice*total = subtotal + total*
|
|
309
358
|
#
|
|
310
359
|
# @param items [Array<EInvoiceAPI::Models::DocumentCreate::Item>] At least one line item is required
|
|
311
360
|
#
|
|
312
|
-
# @param note [String, nil]
|
|
361
|
+
# @param note [String, nil] Additional notes or comments for the invoice
|
|
313
362
|
#
|
|
314
363
|
# @param payment_details [Array<EInvoiceAPI::Models::PaymentDetailCreate>, nil]
|
|
315
364
|
#
|
|
316
|
-
# @param payment_term [String, nil]
|
|
365
|
+
# @param payment_term [String, nil] The payment terms (e.g., 'Net 30', 'Due on receipt', '2/10 Net 30')
|
|
317
366
|
#
|
|
318
|
-
# @param previous_unpaid_balance [Float, String, nil] The previous unpaid balance
|
|
367
|
+
# @param previous_unpaid_balance [Float, String, nil] The previous unpaid balance from prior invoices, if any. Must be positive and ro
|
|
319
368
|
#
|
|
320
|
-
# @param purchase_order [String, nil]
|
|
369
|
+
# @param purchase_order [String, nil] The purchase order reference number
|
|
321
370
|
#
|
|
322
|
-
# @param remittance_address [String, nil]
|
|
371
|
+
# @param remittance_address [String, nil] The address where payment should be sent or remitted to
|
|
323
372
|
#
|
|
324
|
-
# @param remittance_address_recipient [String, nil]
|
|
373
|
+
# @param remittance_address_recipient [String, nil] The recipient name at the remittance address
|
|
325
374
|
#
|
|
326
|
-
# @param service_address [String, nil]
|
|
375
|
+
# @param service_address [String, nil] The address where services were performed or goods were delivered
|
|
327
376
|
#
|
|
328
|
-
# @param service_address_recipient [String, nil]
|
|
377
|
+
# @param service_address_recipient [String, nil] The recipient name at the service address
|
|
329
378
|
#
|
|
330
|
-
# @param service_end_date [Date, nil]
|
|
379
|
+
# @param service_end_date [Date, nil] The end date of the service period or delivery period
|
|
331
380
|
#
|
|
332
|
-
# @param service_start_date [Date, nil]
|
|
381
|
+
# @param service_start_date [Date, nil] The start date of the service period or delivery period
|
|
333
382
|
#
|
|
334
|
-
# @param shipping_address [String, nil]
|
|
383
|
+
# @param shipping_address [String, nil] The shipping/delivery address
|
|
335
384
|
#
|
|
336
|
-
# @param shipping_address_recipient [String, nil]
|
|
385
|
+
# @param shipping_address_recipient [String, nil] The recipient name at the shipping address
|
|
337
386
|
#
|
|
338
|
-
# @param state [Symbol, EInvoiceAPI::Models::DocumentState]
|
|
387
|
+
# @param state [Symbol, EInvoiceAPI::Models::DocumentState] The current state of the document: DRAFT, TRANSIT, FAILED, SENT, or RECEIVED
|
|
339
388
|
#
|
|
340
389
|
# @param subtotal [Float, String, nil] The taxable base of the invoice. Should be the sum of all line items - allowance
|
|
341
390
|
#
|
|
342
|
-
# @param tax_code [Symbol, EInvoiceAPI::Models::DocumentCreate::TaxCode] Tax category code of the invoice
|
|
391
|
+
# @param tax_code [Symbol, EInvoiceAPI::Models::DocumentCreate::TaxCode] Tax category code of the invoice (e.g., S for standard rate, Z for zero rate, E
|
|
343
392
|
#
|
|
344
393
|
# @param tax_details [Array<EInvoiceAPI::Models::DocumentCreate::TaxDetail>, nil]
|
|
345
394
|
#
|
|
346
395
|
# @param total_discount [Float, String, nil] The net financial discount/charge of the invoice (non-VAT charges minus non-VAT
|
|
347
396
|
#
|
|
348
|
-
# @param total_tax [Float, String, nil] The total tax of the invoice. Must be positive and rounded to maximum 2
|
|
397
|
+
# @param total_tax [Float, String, nil] The total tax amount of the invoice. Must be positive and rounded to maximum 2 d
|
|
349
398
|
#
|
|
350
399
|
# @param vatex [Symbol, EInvoiceAPI::Models::DocumentCreate::Vatex, nil] VATEX code list for VAT exemption reasons
|
|
351
400
|
#
|
|
352
|
-
# @param vatex_note [String, nil]
|
|
401
|
+
# @param vatex_note [String, nil] Textual explanation for VAT exemption
|
|
353
402
|
#
|
|
354
|
-
# @param vendor_address [String, nil]
|
|
403
|
+
# @param vendor_address [String, nil] The address of the vendor/seller
|
|
355
404
|
#
|
|
356
|
-
# @param vendor_address_recipient [String, nil]
|
|
405
|
+
# @param vendor_address_recipient [String, nil] The recipient name at the vendor address
|
|
357
406
|
#
|
|
358
|
-
# @param
|
|
407
|
+
# @param vendor_company_id [String, nil] Vendor company ID. For Belgium this is the CBE number or their EUID (European Un
|
|
359
408
|
#
|
|
360
|
-
# @param
|
|
409
|
+
# @param vendor_email [String, nil] The email address of the vendor
|
|
361
410
|
#
|
|
362
|
-
# @param
|
|
411
|
+
# @param vendor_name [String, nil] The name of the vendor/seller/supplier
|
|
412
|
+
#
|
|
413
|
+
# @param vendor_tax_id [String, nil] Vendor tax ID. For Belgium this is the VAT number. Must include the country pref
|
|
363
414
|
|
|
364
415
|
class Allowance < EInvoiceAPI::Internal::Type::BaseModel
|
|
365
416
|
# @!attribute amount
|
|
@@ -377,7 +428,8 @@ module EInvoiceAPI
|
|
|
377
428
|
|
|
378
429
|
# @!attribute multiplier_factor
|
|
379
430
|
# The percentage that may be used, in conjunction with the allowance base amount,
|
|
380
|
-
# to calculate the allowance amount. To state 20%, use value 20
|
|
431
|
+
# to calculate the allowance amount. To state 20%, use value 20. Must be rounded
|
|
432
|
+
# to maximum 2 decimals
|
|
381
433
|
#
|
|
382
434
|
# @return [Float, String, nil]
|
|
383
435
|
optional :multiplier_factor,
|
|
@@ -391,24 +443,23 @@ module EInvoiceAPI
|
|
|
391
443
|
optional :reason, String, nil?: true
|
|
392
444
|
|
|
393
445
|
# @!attribute reason_code
|
|
394
|
-
#
|
|
446
|
+
# Allowance reason codes for invoice discounts and charges
|
|
395
447
|
#
|
|
396
|
-
# @return [
|
|
397
|
-
optional :reason_code,
|
|
448
|
+
# @return [Symbol, EInvoiceAPI::Models::DocumentCreate::Allowance::ReasonCode, nil]
|
|
449
|
+
optional :reason_code, enum: -> { EInvoiceAPI::DocumentCreate::Allowance::ReasonCode }, nil?: true
|
|
398
450
|
|
|
399
451
|
# @!attribute tax_code
|
|
400
|
-
#
|
|
401
|
-
#
|
|
402
|
-
# Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL
|
|
452
|
+
# The VAT category code that applies to the allowance
|
|
403
453
|
#
|
|
404
454
|
# @return [Symbol, EInvoiceAPI::Models::DocumentCreate::Allowance::TaxCode, nil]
|
|
405
|
-
optional :tax_code, enum: -> { EInvoiceAPI::DocumentCreate::Allowance::TaxCode }
|
|
455
|
+
optional :tax_code, enum: -> { EInvoiceAPI::DocumentCreate::Allowance::TaxCode }
|
|
406
456
|
|
|
407
457
|
# @!attribute tax_rate
|
|
408
|
-
# The VAT rate, represented as percentage that applies to the allowance
|
|
458
|
+
# The VAT rate, represented as percentage that applies to the allowance. Must be
|
|
459
|
+
# rounded to maximum 2 decimals
|
|
409
460
|
#
|
|
410
|
-
# @return [String, nil]
|
|
411
|
-
optional :tax_rate,
|
|
461
|
+
# @return [Float, String, nil]
|
|
462
|
+
optional :tax_rate, union: -> { EInvoiceAPI::DocumentCreate::Allowance::TaxRate }, nil?: true
|
|
412
463
|
|
|
413
464
|
# @!method initialize(amount: nil, base_amount: nil, multiplier_factor: nil, reason: nil, reason_code: nil, tax_code: nil, tax_rate: nil)
|
|
414
465
|
# Some parameter documentations has been truncated, see
|
|
@@ -424,11 +475,11 @@ module EInvoiceAPI
|
|
|
424
475
|
#
|
|
425
476
|
# @param reason [String, nil] The reason for the allowance
|
|
426
477
|
#
|
|
427
|
-
# @param reason_code [
|
|
478
|
+
# @param reason_code [Symbol, EInvoiceAPI::Models::DocumentCreate::Allowance::ReasonCode, nil] Allowance reason codes for invoice discounts and charges
|
|
428
479
|
#
|
|
429
|
-
# @param tax_code [Symbol, EInvoiceAPI::Models::DocumentCreate::Allowance::TaxCode
|
|
480
|
+
# @param tax_code [Symbol, EInvoiceAPI::Models::DocumentCreate::Allowance::TaxCode] The VAT category code that applies to the allowance
|
|
430
481
|
#
|
|
431
|
-
# @param tax_rate [String, nil] The VAT rate, represented as percentage that applies to the allowance
|
|
482
|
+
# @param tax_rate [Float, String, nil] The VAT rate, represented as percentage that applies to the allowance. Must be r
|
|
432
483
|
|
|
433
484
|
# The allowance amount, without VAT. Must be rounded to maximum 2 decimals
|
|
434
485
|
#
|
|
@@ -460,7 +511,8 @@ module EInvoiceAPI
|
|
|
460
511
|
end
|
|
461
512
|
|
|
462
513
|
# The percentage that may be used, in conjunction with the allowance base amount,
|
|
463
|
-
# to calculate the allowance amount. To state 20%, use value 20
|
|
514
|
+
# to calculate the allowance amount. To state 20%, use value 20. Must be rounded
|
|
515
|
+
# to maximum 2 decimals
|
|
464
516
|
#
|
|
465
517
|
# @see EInvoiceAPI::Models::DocumentCreate::Allowance#multiplier_factor
|
|
466
518
|
module MultiplierFactor
|
|
@@ -474,9 +526,37 @@ module EInvoiceAPI
|
|
|
474
526
|
# @return [Array(Float, String)]
|
|
475
527
|
end
|
|
476
528
|
|
|
477
|
-
#
|
|
529
|
+
# Allowance reason codes for invoice discounts and charges
|
|
478
530
|
#
|
|
479
|
-
#
|
|
531
|
+
# @see EInvoiceAPI::Models::DocumentCreate::Allowance#reason_code
|
|
532
|
+
module ReasonCode
|
|
533
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
534
|
+
|
|
535
|
+
REASON_CODE_41 = :"41"
|
|
536
|
+
REASON_CODE_42 = :"42"
|
|
537
|
+
REASON_CODE_60 = :"60"
|
|
538
|
+
REASON_CODE_62 = :"62"
|
|
539
|
+
REASON_CODE_63 = :"63"
|
|
540
|
+
REASON_CODE_64 = :"64"
|
|
541
|
+
REASON_CODE_65 = :"65"
|
|
542
|
+
REASON_CODE_66 = :"66"
|
|
543
|
+
REASON_CODE_67 = :"67"
|
|
544
|
+
REASON_CODE_68 = :"68"
|
|
545
|
+
REASON_CODE_70 = :"70"
|
|
546
|
+
REASON_CODE_71 = :"71"
|
|
547
|
+
REASON_CODE_88 = :"88"
|
|
548
|
+
REASON_CODE_95 = :"95"
|
|
549
|
+
REASON_CODE_100 = :"100"
|
|
550
|
+
REASON_CODE_102 = :"102"
|
|
551
|
+
REASON_CODE_103 = :"103"
|
|
552
|
+
REASON_CODE_104 = :"104"
|
|
553
|
+
REASON_CODE_105 = :"105"
|
|
554
|
+
|
|
555
|
+
# @!method self.values
|
|
556
|
+
# @return [Array<Symbol>]
|
|
557
|
+
end
|
|
558
|
+
|
|
559
|
+
# The VAT category code that applies to the allowance
|
|
480
560
|
#
|
|
481
561
|
# @see EInvoiceAPI::Models::DocumentCreate::Allowance#tax_code
|
|
482
562
|
module TaxCode
|
|
@@ -496,10 +576,24 @@ module EInvoiceAPI
|
|
|
496
576
|
# @!method self.values
|
|
497
577
|
# @return [Array<Symbol>]
|
|
498
578
|
end
|
|
579
|
+
|
|
580
|
+
# The VAT rate, represented as percentage that applies to the allowance. Must be
|
|
581
|
+
# rounded to maximum 2 decimals
|
|
582
|
+
#
|
|
583
|
+
# @see EInvoiceAPI::Models::DocumentCreate::Allowance#tax_rate
|
|
584
|
+
module TaxRate
|
|
585
|
+
extend EInvoiceAPI::Internal::Type::Union
|
|
586
|
+
|
|
587
|
+
variant Float
|
|
588
|
+
|
|
589
|
+
variant String
|
|
590
|
+
|
|
591
|
+
# @!method self.variants
|
|
592
|
+
# @return [Array(Float, String)]
|
|
593
|
+
end
|
|
499
594
|
end
|
|
500
595
|
|
|
501
|
-
# The amount due
|
|
502
|
-
# decimals
|
|
596
|
+
# The amount due for payment. Must be positive and rounded to maximum 2 decimals
|
|
503
597
|
#
|
|
504
598
|
# @see EInvoiceAPI::Models::DocumentCreate#amount_due
|
|
505
599
|
module AmountDue
|
|
@@ -543,10 +637,10 @@ module EInvoiceAPI
|
|
|
543
637
|
optional :reason, String, nil?: true
|
|
544
638
|
|
|
545
639
|
# @!attribute reason_code
|
|
546
|
-
#
|
|
640
|
+
# Charge reason codes for invoice charges and fees
|
|
547
641
|
#
|
|
548
|
-
# @return [
|
|
549
|
-
optional :reason_code,
|
|
642
|
+
# @return [Symbol, EInvoiceAPI::Models::DocumentCreate::Charge::ReasonCode, nil]
|
|
643
|
+
optional :reason_code, enum: -> { EInvoiceAPI::DocumentCreate::Charge::ReasonCode }, nil?: true
|
|
550
644
|
|
|
551
645
|
# @!attribute tax_code
|
|
552
646
|
# Duty or tax or fee category codes (Subset of UNCL5305)
|
|
@@ -559,8 +653,8 @@ module EInvoiceAPI
|
|
|
559
653
|
# @!attribute tax_rate
|
|
560
654
|
# The VAT rate, represented as percentage that applies to the charge
|
|
561
655
|
#
|
|
562
|
-
# @return [String, nil]
|
|
563
|
-
optional :tax_rate,
|
|
656
|
+
# @return [Float, String, nil]
|
|
657
|
+
optional :tax_rate, union: -> { EInvoiceAPI::DocumentCreate::Charge::TaxRate }, nil?: true
|
|
564
658
|
|
|
565
659
|
# @!method initialize(amount: nil, base_amount: nil, multiplier_factor: nil, reason: nil, reason_code: nil, tax_code: nil, tax_rate: nil)
|
|
566
660
|
# Some parameter documentations has been truncated, see
|
|
@@ -576,11 +670,11 @@ module EInvoiceAPI
|
|
|
576
670
|
#
|
|
577
671
|
# @param reason [String, nil] The reason for the charge
|
|
578
672
|
#
|
|
579
|
-
# @param reason_code [
|
|
673
|
+
# @param reason_code [Symbol, EInvoiceAPI::Models::DocumentCreate::Charge::ReasonCode, nil] Charge reason codes for invoice charges and fees
|
|
580
674
|
#
|
|
581
675
|
# @param tax_code [Symbol, EInvoiceAPI::Models::DocumentCreate::Charge::TaxCode, nil] Duty or tax or fee category codes (Subset of UNCL5305)
|
|
582
676
|
#
|
|
583
|
-
# @param tax_rate [String, nil] The VAT rate, represented as percentage that applies to the charge
|
|
677
|
+
# @param tax_rate [Float, String, nil] The VAT rate, represented as percentage that applies to the charge
|
|
584
678
|
|
|
585
679
|
# The charge amount, without VAT. Must be rounded to maximum 2 decimals
|
|
586
680
|
#
|
|
@@ -626,6 +720,195 @@ module EInvoiceAPI
|
|
|
626
720
|
# @return [Array(Float, String)]
|
|
627
721
|
end
|
|
628
722
|
|
|
723
|
+
# Charge reason codes for invoice charges and fees
|
|
724
|
+
#
|
|
725
|
+
# @see EInvoiceAPI::Models::DocumentCreate::Charge#reason_code
|
|
726
|
+
module ReasonCode
|
|
727
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
728
|
+
|
|
729
|
+
AA = :AA
|
|
730
|
+
AAA = :AAA
|
|
731
|
+
AAC = :AAC
|
|
732
|
+
AAD = :AAD
|
|
733
|
+
AAE = :AAE
|
|
734
|
+
AAF = :AAF
|
|
735
|
+
AAH = :AAH
|
|
736
|
+
AAI = :AAI
|
|
737
|
+
AAS = :AAS
|
|
738
|
+
AAT = :AAT
|
|
739
|
+
AAV = :AAV
|
|
740
|
+
AAY = :AAY
|
|
741
|
+
AAZ = :AAZ
|
|
742
|
+
ABA = :ABA
|
|
743
|
+
ABB = :ABB
|
|
744
|
+
ABC = :ABC
|
|
745
|
+
ABD = :ABD
|
|
746
|
+
ABF = :ABF
|
|
747
|
+
ABK = :ABK
|
|
748
|
+
ABL = :ABL
|
|
749
|
+
ABN = :ABN
|
|
750
|
+
ABR = :ABR
|
|
751
|
+
ABS = :ABS
|
|
752
|
+
ABT = :ABT
|
|
753
|
+
ABU = :ABU
|
|
754
|
+
ACF = :ACF
|
|
755
|
+
ACG = :ACG
|
|
756
|
+
ACH = :ACH
|
|
757
|
+
ACI = :ACI
|
|
758
|
+
ACJ = :ACJ
|
|
759
|
+
ACK = :ACK
|
|
760
|
+
ACL = :ACL
|
|
761
|
+
ACM = :ACM
|
|
762
|
+
ACS = :ACS
|
|
763
|
+
ADC = :ADC
|
|
764
|
+
ADE = :ADE
|
|
765
|
+
ADJ = :ADJ
|
|
766
|
+
ADK = :ADK
|
|
767
|
+
ADL = :ADL
|
|
768
|
+
ADM = :ADM
|
|
769
|
+
ADN = :ADN
|
|
770
|
+
ADO = :ADO
|
|
771
|
+
ADP = :ADP
|
|
772
|
+
ADQ = :ADQ
|
|
773
|
+
ADR = :ADR
|
|
774
|
+
ADT = :ADT
|
|
775
|
+
ADW = :ADW
|
|
776
|
+
ADY = :ADY
|
|
777
|
+
ADZ = :ADZ
|
|
778
|
+
AEA = :AEA
|
|
779
|
+
AEB = :AEB
|
|
780
|
+
AEC = :AEC
|
|
781
|
+
AED = :AED
|
|
782
|
+
AEF = :AEF
|
|
783
|
+
AEH = :AEH
|
|
784
|
+
AEI = :AEI
|
|
785
|
+
AEJ = :AEJ
|
|
786
|
+
AEK = :AEK
|
|
787
|
+
AEL = :AEL
|
|
788
|
+
AEM = :AEM
|
|
789
|
+
AEN = :AEN
|
|
790
|
+
AEO = :AEO
|
|
791
|
+
AEP = :AEP
|
|
792
|
+
AES = :AES
|
|
793
|
+
AET = :AET
|
|
794
|
+
AEU = :AEU
|
|
795
|
+
AEV = :AEV
|
|
796
|
+
AEW = :AEW
|
|
797
|
+
AEX = :AEX
|
|
798
|
+
AEY = :AEY
|
|
799
|
+
AEZ = :AEZ
|
|
800
|
+
AJ = :AJ
|
|
801
|
+
AU = :AU
|
|
802
|
+
CA = :CA
|
|
803
|
+
CAB = :CAB
|
|
804
|
+
CAD = :CAD
|
|
805
|
+
CAE = :CAE
|
|
806
|
+
CAF = :CAF
|
|
807
|
+
CAI = :CAI
|
|
808
|
+
CAJ = :CAJ
|
|
809
|
+
CAK = :CAK
|
|
810
|
+
CAL = :CAL
|
|
811
|
+
CAM = :CAM
|
|
812
|
+
CAN = :CAN
|
|
813
|
+
CAO = :CAO
|
|
814
|
+
CAP = :CAP
|
|
815
|
+
CAQ = :CAQ
|
|
816
|
+
CAR = :CAR
|
|
817
|
+
CAS = :CAS
|
|
818
|
+
CAT = :CAT
|
|
819
|
+
CAU = :CAU
|
|
820
|
+
CAV = :CAV
|
|
821
|
+
CAW = :CAW
|
|
822
|
+
CAX = :CAX
|
|
823
|
+
CAY = :CAY
|
|
824
|
+
CAZ = :CAZ
|
|
825
|
+
CD = :CD
|
|
826
|
+
CG = :CG
|
|
827
|
+
CS = :CS
|
|
828
|
+
CT = :CT
|
|
829
|
+
DAB = :DAB
|
|
830
|
+
DAC = :DAC
|
|
831
|
+
DAD = :DAD
|
|
832
|
+
DAF = :DAF
|
|
833
|
+
DAG = :DAG
|
|
834
|
+
DAH = :DAH
|
|
835
|
+
DAI = :DAI
|
|
836
|
+
DAJ = :DAJ
|
|
837
|
+
DAK = :DAK
|
|
838
|
+
DAL = :DAL
|
|
839
|
+
DAM = :DAM
|
|
840
|
+
DAN = :DAN
|
|
841
|
+
DAO = :DAO
|
|
842
|
+
DAP = :DAP
|
|
843
|
+
DAQ = :DAQ
|
|
844
|
+
DL = :DL
|
|
845
|
+
EG = :EG
|
|
846
|
+
EP = :EP
|
|
847
|
+
ER = :ER
|
|
848
|
+
FAA = :FAA
|
|
849
|
+
FAB = :FAB
|
|
850
|
+
FAC = :FAC
|
|
851
|
+
FC = :FC
|
|
852
|
+
FH = :FH
|
|
853
|
+
FI = :FI
|
|
854
|
+
GAA = :GAA
|
|
855
|
+
HAA = :HAA
|
|
856
|
+
HD = :HD
|
|
857
|
+
HH = :HH
|
|
858
|
+
IAA = :IAA
|
|
859
|
+
IAB = :IAB
|
|
860
|
+
ID = :ID
|
|
861
|
+
IF = :IF
|
|
862
|
+
IR = :IR
|
|
863
|
+
IS = :IS
|
|
864
|
+
KO = :KO
|
|
865
|
+
L1 = :L1
|
|
866
|
+
LA = :LA
|
|
867
|
+
LAA = :LAA
|
|
868
|
+
LAB = :LAB
|
|
869
|
+
LF = :LF
|
|
870
|
+
MAE = :MAE
|
|
871
|
+
MI = :MI
|
|
872
|
+
ML = :ML
|
|
873
|
+
NAA = :NAA
|
|
874
|
+
OA = :OA
|
|
875
|
+
PA = :PA
|
|
876
|
+
PAA = :PAA
|
|
877
|
+
PC = :PC
|
|
878
|
+
PL = :PL
|
|
879
|
+
PRV = :PRV
|
|
880
|
+
RAB = :RAB
|
|
881
|
+
RAC = :RAC
|
|
882
|
+
RAD = :RAD
|
|
883
|
+
RAF = :RAF
|
|
884
|
+
RE = :RE
|
|
885
|
+
RF = :RF
|
|
886
|
+
RH = :RH
|
|
887
|
+
RV = :RV
|
|
888
|
+
SA = :SA
|
|
889
|
+
SAA = :SAA
|
|
890
|
+
SAD = :SAD
|
|
891
|
+
SAE = :SAE
|
|
892
|
+
SAI = :SAI
|
|
893
|
+
SG = :SG
|
|
894
|
+
SH = :SH
|
|
895
|
+
SM = :SM
|
|
896
|
+
SU = :SU
|
|
897
|
+
TAB = :TAB
|
|
898
|
+
TAC = :TAC
|
|
899
|
+
TT = :TT
|
|
900
|
+
TV = :TV
|
|
901
|
+
V1 = :V1
|
|
902
|
+
V2 = :V2
|
|
903
|
+
WH = :WH
|
|
904
|
+
XAA = :XAA
|
|
905
|
+
YY = :YY
|
|
906
|
+
ZZZ = :ZZZ
|
|
907
|
+
|
|
908
|
+
# @!method self.values
|
|
909
|
+
# @return [Array<Symbol>]
|
|
910
|
+
end
|
|
911
|
+
|
|
629
912
|
# Duty or tax or fee category codes (Subset of UNCL5305)
|
|
630
913
|
#
|
|
631
914
|
# Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL
|
|
@@ -648,10 +931,24 @@ module EInvoiceAPI
|
|
|
648
931
|
# @!method self.values
|
|
649
932
|
# @return [Array<Symbol>]
|
|
650
933
|
end
|
|
934
|
+
|
|
935
|
+
# The VAT rate, represented as percentage that applies to the charge
|
|
936
|
+
#
|
|
937
|
+
# @see EInvoiceAPI::Models::DocumentCreate::Charge#tax_rate
|
|
938
|
+
module TaxRate
|
|
939
|
+
extend EInvoiceAPI::Internal::Type::Union
|
|
940
|
+
|
|
941
|
+
variant Float
|
|
942
|
+
|
|
943
|
+
variant String
|
|
944
|
+
|
|
945
|
+
# @!method self.variants
|
|
946
|
+
# @return [Array(Float, String)]
|
|
947
|
+
end
|
|
651
948
|
end
|
|
652
949
|
|
|
653
|
-
# The total amount of the invoice (
|
|
654
|
-
# total_discount). Must be positive and rounded to maximum 2 decimals
|
|
950
|
+
# The total amount of the invoice including tax (invoice_total = subtotal +
|
|
951
|
+
# total_tax + total_discount). Must be positive and rounded to maximum 2 decimals
|
|
655
952
|
#
|
|
656
953
|
# @see EInvoiceAPI::Models::DocumentCreate#invoice_total
|
|
657
954
|
module InvoiceTotal
|
|
@@ -675,9 +972,9 @@ module EInvoiceAPI
|
|
|
675
972
|
nil?: true
|
|
676
973
|
|
|
677
974
|
# @!attribute amount
|
|
678
|
-
# The
|
|
679
|
-
#
|
|
680
|
-
# decimals
|
|
975
|
+
# The invoice line net amount (BT-131), exclusive of VAT, inclusive of line level
|
|
976
|
+
# allowances and charges. Calculated as: ((unit_price / price_base_quantity) \*
|
|
977
|
+
# quantity) - allowances + charges. Must be rounded to maximum 2 decimals
|
|
681
978
|
#
|
|
682
979
|
# @return [Float, String, nil]
|
|
683
980
|
optional :amount, union: -> { EInvoiceAPI::DocumentCreate::Item::Amount }, nil?: true
|
|
@@ -701,6 +998,15 @@ module EInvoiceAPI
|
|
|
701
998
|
# @return [String, nil]
|
|
702
999
|
optional :description, String, nil?: true
|
|
703
1000
|
|
|
1001
|
+
# @!attribute price_base_quantity
|
|
1002
|
+
# The item price base quantity (BT-149). The number of item units to which the
|
|
1003
|
+
# price applies. Defaults to 1. Must be rounded to maximum 4 decimals
|
|
1004
|
+
#
|
|
1005
|
+
# @return [Float, String, nil]
|
|
1006
|
+
optional :price_base_quantity,
|
|
1007
|
+
union: -> { EInvoiceAPI::DocumentCreate::Item::PriceBaseQuantity },
|
|
1008
|
+
nil?: true
|
|
1009
|
+
|
|
704
1010
|
# @!attribute product_code
|
|
705
1011
|
# The product code of the line item.
|
|
706
1012
|
#
|
|
@@ -723,8 +1029,8 @@ module EInvoiceAPI
|
|
|
723
1029
|
# @!attribute tax_rate
|
|
724
1030
|
# The VAT rate of the line item expressed as percentage with 2 decimals
|
|
725
1031
|
#
|
|
726
|
-
# @return [String, nil]
|
|
727
|
-
optional :tax_rate,
|
|
1032
|
+
# @return [Float, String, nil]
|
|
1033
|
+
optional :tax_rate, union: -> { EInvoiceAPI::DocumentCreate::Item::TaxRate }, nil?: true
|
|
728
1034
|
|
|
729
1035
|
# @!attribute unit
|
|
730
1036
|
# Unit of Measure Codes from UNECERec20 used in Peppol BIS Billing 3.0.
|
|
@@ -733,18 +1039,19 @@ module EInvoiceAPI
|
|
|
733
1039
|
optional :unit, enum: -> { EInvoiceAPI::UnitOfMeasureCode }, nil?: true
|
|
734
1040
|
|
|
735
1041
|
# @!attribute unit_price
|
|
736
|
-
# The
|
|
1042
|
+
# The item net price (BT-146). The price of an item, exclusive of VAT, after
|
|
1043
|
+
# subtracting item price discount. Must be rounded to maximum 4 decimals
|
|
737
1044
|
#
|
|
738
1045
|
# @return [Float, String, nil]
|
|
739
1046
|
optional :unit_price, union: -> { EInvoiceAPI::DocumentCreate::Item::UnitPrice }, nil?: true
|
|
740
1047
|
|
|
741
|
-
# @!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)
|
|
1048
|
+
# @!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)
|
|
742
1049
|
# Some parameter documentations has been truncated, see
|
|
743
1050
|
# {EInvoiceAPI::Models::DocumentCreate::Item} for more details.
|
|
744
1051
|
#
|
|
745
1052
|
# @param allowances [Array<EInvoiceAPI::Models::DocumentCreate::Item::Allowance>, nil] The allowances of the line item.
|
|
746
1053
|
#
|
|
747
|
-
# @param amount [Float, String, nil] The
|
|
1054
|
+
# @param amount [Float, String, nil] The invoice line net amount (BT-131), exclusive of VAT, inclusive of line level
|
|
748
1055
|
#
|
|
749
1056
|
# @param charges [Array<EInvoiceAPI::Models::DocumentCreate::Item::Charge>, nil] The charges of the line item.
|
|
750
1057
|
#
|
|
@@ -752,17 +1059,19 @@ module EInvoiceAPI
|
|
|
752
1059
|
#
|
|
753
1060
|
# @param description [String, nil] The description of the line item.
|
|
754
1061
|
#
|
|
1062
|
+
# @param price_base_quantity [Float, String, nil] The item price base quantity (BT-149). The number of item units to which the pri
|
|
1063
|
+
#
|
|
755
1064
|
# @param product_code [String, nil] The product code of the line item.
|
|
756
1065
|
#
|
|
757
1066
|
# @param quantity [Float, String, nil] The quantity of items (goods or services) that is the subject of the line item.
|
|
758
1067
|
#
|
|
759
1068
|
# @param tax [Float, String, nil] The total VAT amount for the line item. Must be rounded to maximum 2 decimals
|
|
760
1069
|
#
|
|
761
|
-
# @param tax_rate [String, nil] The VAT rate of the line item expressed as percentage with 2 decimals
|
|
1070
|
+
# @param tax_rate [Float, String, nil] The VAT rate of the line item expressed as percentage with 2 decimals
|
|
762
1071
|
#
|
|
763
1072
|
# @param unit [Symbol, EInvoiceAPI::Models::UnitOfMeasureCode, nil] Unit of Measure Codes from UNECERec20 used in Peppol BIS Billing 3.0.
|
|
764
1073
|
#
|
|
765
|
-
# @param unit_price [Float, String, nil] The
|
|
1074
|
+
# @param unit_price [Float, String, nil] The item net price (BT-146). The price of an item, exclusive of VAT, after subtr
|
|
766
1075
|
|
|
767
1076
|
class Allowance < EInvoiceAPI::Internal::Type::BaseModel
|
|
768
1077
|
# @!attribute amount
|
|
@@ -784,7 +1093,8 @@ module EInvoiceAPI
|
|
|
784
1093
|
|
|
785
1094
|
# @!attribute multiplier_factor
|
|
786
1095
|
# The percentage that may be used, in conjunction with the allowance base amount,
|
|
787
|
-
# to calculate the allowance amount. To state 20%, use value 20
|
|
1096
|
+
# to calculate the allowance amount. To state 20%, use value 20. Must be rounded
|
|
1097
|
+
# to maximum 2 decimals
|
|
788
1098
|
#
|
|
789
1099
|
# @return [Float, String, nil]
|
|
790
1100
|
optional :multiplier_factor,
|
|
@@ -798,24 +1108,27 @@ module EInvoiceAPI
|
|
|
798
1108
|
optional :reason, String, nil?: true
|
|
799
1109
|
|
|
800
1110
|
# @!attribute reason_code
|
|
801
|
-
#
|
|
1111
|
+
# Allowance reason codes for invoice discounts and charges
|
|
802
1112
|
#
|
|
803
|
-
# @return [
|
|
804
|
-
optional :reason_code,
|
|
1113
|
+
# @return [Symbol, EInvoiceAPI::Models::DocumentCreate::Item::Allowance::ReasonCode, nil]
|
|
1114
|
+
optional :reason_code,
|
|
1115
|
+
enum: -> {
|
|
1116
|
+
EInvoiceAPI::DocumentCreate::Item::Allowance::ReasonCode
|
|
1117
|
+
},
|
|
1118
|
+
nil?: true
|
|
805
1119
|
|
|
806
1120
|
# @!attribute tax_code
|
|
807
|
-
#
|
|
808
|
-
#
|
|
809
|
-
# Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL
|
|
1121
|
+
# The VAT category code that applies to the allowance
|
|
810
1122
|
#
|
|
811
1123
|
# @return [Symbol, EInvoiceAPI::Models::DocumentCreate::Item::Allowance::TaxCode, nil]
|
|
812
|
-
optional :tax_code, enum: -> { EInvoiceAPI::DocumentCreate::Item::Allowance::TaxCode }
|
|
1124
|
+
optional :tax_code, enum: -> { EInvoiceAPI::DocumentCreate::Item::Allowance::TaxCode }
|
|
813
1125
|
|
|
814
1126
|
# @!attribute tax_rate
|
|
815
|
-
# The VAT rate, represented as percentage that applies to the allowance
|
|
1127
|
+
# The VAT rate, represented as percentage that applies to the allowance. Must be
|
|
1128
|
+
# rounded to maximum 2 decimals
|
|
816
1129
|
#
|
|
817
|
-
# @return [String, nil]
|
|
818
|
-
optional :tax_rate,
|
|
1130
|
+
# @return [Float, String, nil]
|
|
1131
|
+
optional :tax_rate, union: -> { EInvoiceAPI::DocumentCreate::Item::Allowance::TaxRate }, nil?: true
|
|
819
1132
|
|
|
820
1133
|
# @!method initialize(amount: nil, base_amount: nil, multiplier_factor: nil, reason: nil, reason_code: nil, tax_code: nil, tax_rate: nil)
|
|
821
1134
|
# Some parameter documentations has been truncated, see
|
|
@@ -831,11 +1144,11 @@ module EInvoiceAPI
|
|
|
831
1144
|
#
|
|
832
1145
|
# @param reason [String, nil] The reason for the allowance
|
|
833
1146
|
#
|
|
834
|
-
# @param reason_code [
|
|
1147
|
+
# @param reason_code [Symbol, EInvoiceAPI::Models::DocumentCreate::Item::Allowance::ReasonCode, nil] Allowance reason codes for invoice discounts and charges
|
|
835
1148
|
#
|
|
836
|
-
# @param tax_code [Symbol, EInvoiceAPI::Models::DocumentCreate::Item::Allowance::TaxCode
|
|
1149
|
+
# @param tax_code [Symbol, EInvoiceAPI::Models::DocumentCreate::Item::Allowance::TaxCode] The VAT category code that applies to the allowance
|
|
837
1150
|
#
|
|
838
|
-
# @param tax_rate [String, nil] The VAT rate, represented as percentage that applies to the allowance
|
|
1151
|
+
# @param tax_rate [Float, String, nil] The VAT rate, represented as percentage that applies to the allowance. Must be r
|
|
839
1152
|
|
|
840
1153
|
# The allowance amount, without VAT. Must be rounded to maximum 2 decimals
|
|
841
1154
|
#
|
|
@@ -867,7 +1180,8 @@ module EInvoiceAPI
|
|
|
867
1180
|
end
|
|
868
1181
|
|
|
869
1182
|
# The percentage that may be used, in conjunction with the allowance base amount,
|
|
870
|
-
# to calculate the allowance amount. To state 20%, use value 20
|
|
1183
|
+
# to calculate the allowance amount. To state 20%, use value 20. Must be rounded
|
|
1184
|
+
# to maximum 2 decimals
|
|
871
1185
|
#
|
|
872
1186
|
# @see EInvoiceAPI::Models::DocumentCreate::Item::Allowance#multiplier_factor
|
|
873
1187
|
module MultiplierFactor
|
|
@@ -881,9 +1195,37 @@ module EInvoiceAPI
|
|
|
881
1195
|
# @return [Array(Float, String)]
|
|
882
1196
|
end
|
|
883
1197
|
|
|
884
|
-
#
|
|
1198
|
+
# Allowance reason codes for invoice discounts and charges
|
|
885
1199
|
#
|
|
886
|
-
#
|
|
1200
|
+
# @see EInvoiceAPI::Models::DocumentCreate::Item::Allowance#reason_code
|
|
1201
|
+
module ReasonCode
|
|
1202
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
1203
|
+
|
|
1204
|
+
REASON_CODE_41 = :"41"
|
|
1205
|
+
REASON_CODE_42 = :"42"
|
|
1206
|
+
REASON_CODE_60 = :"60"
|
|
1207
|
+
REASON_CODE_62 = :"62"
|
|
1208
|
+
REASON_CODE_63 = :"63"
|
|
1209
|
+
REASON_CODE_64 = :"64"
|
|
1210
|
+
REASON_CODE_65 = :"65"
|
|
1211
|
+
REASON_CODE_66 = :"66"
|
|
1212
|
+
REASON_CODE_67 = :"67"
|
|
1213
|
+
REASON_CODE_68 = :"68"
|
|
1214
|
+
REASON_CODE_70 = :"70"
|
|
1215
|
+
REASON_CODE_71 = :"71"
|
|
1216
|
+
REASON_CODE_88 = :"88"
|
|
1217
|
+
REASON_CODE_95 = :"95"
|
|
1218
|
+
REASON_CODE_100 = :"100"
|
|
1219
|
+
REASON_CODE_102 = :"102"
|
|
1220
|
+
REASON_CODE_103 = :"103"
|
|
1221
|
+
REASON_CODE_104 = :"104"
|
|
1222
|
+
REASON_CODE_105 = :"105"
|
|
1223
|
+
|
|
1224
|
+
# @!method self.values
|
|
1225
|
+
# @return [Array<Symbol>]
|
|
1226
|
+
end
|
|
1227
|
+
|
|
1228
|
+
# The VAT category code that applies to the allowance
|
|
887
1229
|
#
|
|
888
1230
|
# @see EInvoiceAPI::Models::DocumentCreate::Item::Allowance#tax_code
|
|
889
1231
|
module TaxCode
|
|
@@ -903,11 +1245,26 @@ module EInvoiceAPI
|
|
|
903
1245
|
# @!method self.values
|
|
904
1246
|
# @return [Array<Symbol>]
|
|
905
1247
|
end
|
|
1248
|
+
|
|
1249
|
+
# The VAT rate, represented as percentage that applies to the allowance. Must be
|
|
1250
|
+
# rounded to maximum 2 decimals
|
|
1251
|
+
#
|
|
1252
|
+
# @see EInvoiceAPI::Models::DocumentCreate::Item::Allowance#tax_rate
|
|
1253
|
+
module TaxRate
|
|
1254
|
+
extend EInvoiceAPI::Internal::Type::Union
|
|
1255
|
+
|
|
1256
|
+
variant Float
|
|
1257
|
+
|
|
1258
|
+
variant String
|
|
1259
|
+
|
|
1260
|
+
# @!method self.variants
|
|
1261
|
+
# @return [Array(Float, String)]
|
|
1262
|
+
end
|
|
906
1263
|
end
|
|
907
1264
|
|
|
908
|
-
# The
|
|
909
|
-
#
|
|
910
|
-
# decimals
|
|
1265
|
+
# The invoice line net amount (BT-131), exclusive of VAT, inclusive of line level
|
|
1266
|
+
# allowances and charges. Calculated as: ((unit_price / price_base_quantity) \*
|
|
1267
|
+
# quantity) - allowances + charges. Must be rounded to maximum 2 decimals
|
|
911
1268
|
#
|
|
912
1269
|
# @see EInvoiceAPI::Models::DocumentCreate::Item#amount
|
|
913
1270
|
module Amount
|
|
@@ -955,10 +1312,14 @@ module EInvoiceAPI
|
|
|
955
1312
|
optional :reason, String, nil?: true
|
|
956
1313
|
|
|
957
1314
|
# @!attribute reason_code
|
|
958
|
-
#
|
|
1315
|
+
# Charge reason codes for invoice charges and fees
|
|
959
1316
|
#
|
|
960
|
-
# @return [
|
|
961
|
-
optional :reason_code,
|
|
1317
|
+
# @return [Symbol, EInvoiceAPI::Models::DocumentCreate::Item::Charge::ReasonCode, nil]
|
|
1318
|
+
optional :reason_code,
|
|
1319
|
+
enum: -> {
|
|
1320
|
+
EInvoiceAPI::DocumentCreate::Item::Charge::ReasonCode
|
|
1321
|
+
},
|
|
1322
|
+
nil?: true
|
|
962
1323
|
|
|
963
1324
|
# @!attribute tax_code
|
|
964
1325
|
# Duty or tax or fee category codes (Subset of UNCL5305)
|
|
@@ -971,8 +1332,8 @@ module EInvoiceAPI
|
|
|
971
1332
|
# @!attribute tax_rate
|
|
972
1333
|
# The VAT rate, represented as percentage that applies to the charge
|
|
973
1334
|
#
|
|
974
|
-
# @return [String, nil]
|
|
975
|
-
optional :tax_rate,
|
|
1335
|
+
# @return [Float, String, nil]
|
|
1336
|
+
optional :tax_rate, union: -> { EInvoiceAPI::DocumentCreate::Item::Charge::TaxRate }, nil?: true
|
|
976
1337
|
|
|
977
1338
|
# @!method initialize(amount: nil, base_amount: nil, multiplier_factor: nil, reason: nil, reason_code: nil, tax_code: nil, tax_rate: nil)
|
|
978
1339
|
# Some parameter documentations has been truncated, see
|
|
@@ -988,11 +1349,11 @@ module EInvoiceAPI
|
|
|
988
1349
|
#
|
|
989
1350
|
# @param reason [String, nil] The reason for the charge
|
|
990
1351
|
#
|
|
991
|
-
# @param reason_code [
|
|
1352
|
+
# @param reason_code [Symbol, EInvoiceAPI::Models::DocumentCreate::Item::Charge::ReasonCode, nil] Charge reason codes for invoice charges and fees
|
|
992
1353
|
#
|
|
993
1354
|
# @param tax_code [Symbol, EInvoiceAPI::Models::DocumentCreate::Item::Charge::TaxCode, nil] Duty or tax or fee category codes (Subset of UNCL5305)
|
|
994
1355
|
#
|
|
995
|
-
# @param tax_rate [String, nil] The VAT rate, represented as percentage that applies to the charge
|
|
1356
|
+
# @param tax_rate [Float, String, nil] The VAT rate, represented as percentage that applies to the charge
|
|
996
1357
|
|
|
997
1358
|
# The charge amount, without VAT. Must be rounded to maximum 2 decimals
|
|
998
1359
|
#
|
|
@@ -1038,6 +1399,195 @@ module EInvoiceAPI
|
|
|
1038
1399
|
# @return [Array(Float, String)]
|
|
1039
1400
|
end
|
|
1040
1401
|
|
|
1402
|
+
# Charge reason codes for invoice charges and fees
|
|
1403
|
+
#
|
|
1404
|
+
# @see EInvoiceAPI::Models::DocumentCreate::Item::Charge#reason_code
|
|
1405
|
+
module ReasonCode
|
|
1406
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
1407
|
+
|
|
1408
|
+
AA = :AA
|
|
1409
|
+
AAA = :AAA
|
|
1410
|
+
AAC = :AAC
|
|
1411
|
+
AAD = :AAD
|
|
1412
|
+
AAE = :AAE
|
|
1413
|
+
AAF = :AAF
|
|
1414
|
+
AAH = :AAH
|
|
1415
|
+
AAI = :AAI
|
|
1416
|
+
AAS = :AAS
|
|
1417
|
+
AAT = :AAT
|
|
1418
|
+
AAV = :AAV
|
|
1419
|
+
AAY = :AAY
|
|
1420
|
+
AAZ = :AAZ
|
|
1421
|
+
ABA = :ABA
|
|
1422
|
+
ABB = :ABB
|
|
1423
|
+
ABC = :ABC
|
|
1424
|
+
ABD = :ABD
|
|
1425
|
+
ABF = :ABF
|
|
1426
|
+
ABK = :ABK
|
|
1427
|
+
ABL = :ABL
|
|
1428
|
+
ABN = :ABN
|
|
1429
|
+
ABR = :ABR
|
|
1430
|
+
ABS = :ABS
|
|
1431
|
+
ABT = :ABT
|
|
1432
|
+
ABU = :ABU
|
|
1433
|
+
ACF = :ACF
|
|
1434
|
+
ACG = :ACG
|
|
1435
|
+
ACH = :ACH
|
|
1436
|
+
ACI = :ACI
|
|
1437
|
+
ACJ = :ACJ
|
|
1438
|
+
ACK = :ACK
|
|
1439
|
+
ACL = :ACL
|
|
1440
|
+
ACM = :ACM
|
|
1441
|
+
ACS = :ACS
|
|
1442
|
+
ADC = :ADC
|
|
1443
|
+
ADE = :ADE
|
|
1444
|
+
ADJ = :ADJ
|
|
1445
|
+
ADK = :ADK
|
|
1446
|
+
ADL = :ADL
|
|
1447
|
+
ADM = :ADM
|
|
1448
|
+
ADN = :ADN
|
|
1449
|
+
ADO = :ADO
|
|
1450
|
+
ADP = :ADP
|
|
1451
|
+
ADQ = :ADQ
|
|
1452
|
+
ADR = :ADR
|
|
1453
|
+
ADT = :ADT
|
|
1454
|
+
ADW = :ADW
|
|
1455
|
+
ADY = :ADY
|
|
1456
|
+
ADZ = :ADZ
|
|
1457
|
+
AEA = :AEA
|
|
1458
|
+
AEB = :AEB
|
|
1459
|
+
AEC = :AEC
|
|
1460
|
+
AED = :AED
|
|
1461
|
+
AEF = :AEF
|
|
1462
|
+
AEH = :AEH
|
|
1463
|
+
AEI = :AEI
|
|
1464
|
+
AEJ = :AEJ
|
|
1465
|
+
AEK = :AEK
|
|
1466
|
+
AEL = :AEL
|
|
1467
|
+
AEM = :AEM
|
|
1468
|
+
AEN = :AEN
|
|
1469
|
+
AEO = :AEO
|
|
1470
|
+
AEP = :AEP
|
|
1471
|
+
AES = :AES
|
|
1472
|
+
AET = :AET
|
|
1473
|
+
AEU = :AEU
|
|
1474
|
+
AEV = :AEV
|
|
1475
|
+
AEW = :AEW
|
|
1476
|
+
AEX = :AEX
|
|
1477
|
+
AEY = :AEY
|
|
1478
|
+
AEZ = :AEZ
|
|
1479
|
+
AJ = :AJ
|
|
1480
|
+
AU = :AU
|
|
1481
|
+
CA = :CA
|
|
1482
|
+
CAB = :CAB
|
|
1483
|
+
CAD = :CAD
|
|
1484
|
+
CAE = :CAE
|
|
1485
|
+
CAF = :CAF
|
|
1486
|
+
CAI = :CAI
|
|
1487
|
+
CAJ = :CAJ
|
|
1488
|
+
CAK = :CAK
|
|
1489
|
+
CAL = :CAL
|
|
1490
|
+
CAM = :CAM
|
|
1491
|
+
CAN = :CAN
|
|
1492
|
+
CAO = :CAO
|
|
1493
|
+
CAP = :CAP
|
|
1494
|
+
CAQ = :CAQ
|
|
1495
|
+
CAR = :CAR
|
|
1496
|
+
CAS = :CAS
|
|
1497
|
+
CAT = :CAT
|
|
1498
|
+
CAU = :CAU
|
|
1499
|
+
CAV = :CAV
|
|
1500
|
+
CAW = :CAW
|
|
1501
|
+
CAX = :CAX
|
|
1502
|
+
CAY = :CAY
|
|
1503
|
+
CAZ = :CAZ
|
|
1504
|
+
CD = :CD
|
|
1505
|
+
CG = :CG
|
|
1506
|
+
CS = :CS
|
|
1507
|
+
CT = :CT
|
|
1508
|
+
DAB = :DAB
|
|
1509
|
+
DAC = :DAC
|
|
1510
|
+
DAD = :DAD
|
|
1511
|
+
DAF = :DAF
|
|
1512
|
+
DAG = :DAG
|
|
1513
|
+
DAH = :DAH
|
|
1514
|
+
DAI = :DAI
|
|
1515
|
+
DAJ = :DAJ
|
|
1516
|
+
DAK = :DAK
|
|
1517
|
+
DAL = :DAL
|
|
1518
|
+
DAM = :DAM
|
|
1519
|
+
DAN = :DAN
|
|
1520
|
+
DAO = :DAO
|
|
1521
|
+
DAP = :DAP
|
|
1522
|
+
DAQ = :DAQ
|
|
1523
|
+
DL = :DL
|
|
1524
|
+
EG = :EG
|
|
1525
|
+
EP = :EP
|
|
1526
|
+
ER = :ER
|
|
1527
|
+
FAA = :FAA
|
|
1528
|
+
FAB = :FAB
|
|
1529
|
+
FAC = :FAC
|
|
1530
|
+
FC = :FC
|
|
1531
|
+
FH = :FH
|
|
1532
|
+
FI = :FI
|
|
1533
|
+
GAA = :GAA
|
|
1534
|
+
HAA = :HAA
|
|
1535
|
+
HD = :HD
|
|
1536
|
+
HH = :HH
|
|
1537
|
+
IAA = :IAA
|
|
1538
|
+
IAB = :IAB
|
|
1539
|
+
ID = :ID
|
|
1540
|
+
IF = :IF
|
|
1541
|
+
IR = :IR
|
|
1542
|
+
IS = :IS
|
|
1543
|
+
KO = :KO
|
|
1544
|
+
L1 = :L1
|
|
1545
|
+
LA = :LA
|
|
1546
|
+
LAA = :LAA
|
|
1547
|
+
LAB = :LAB
|
|
1548
|
+
LF = :LF
|
|
1549
|
+
MAE = :MAE
|
|
1550
|
+
MI = :MI
|
|
1551
|
+
ML = :ML
|
|
1552
|
+
NAA = :NAA
|
|
1553
|
+
OA = :OA
|
|
1554
|
+
PA = :PA
|
|
1555
|
+
PAA = :PAA
|
|
1556
|
+
PC = :PC
|
|
1557
|
+
PL = :PL
|
|
1558
|
+
PRV = :PRV
|
|
1559
|
+
RAB = :RAB
|
|
1560
|
+
RAC = :RAC
|
|
1561
|
+
RAD = :RAD
|
|
1562
|
+
RAF = :RAF
|
|
1563
|
+
RE = :RE
|
|
1564
|
+
RF = :RF
|
|
1565
|
+
RH = :RH
|
|
1566
|
+
RV = :RV
|
|
1567
|
+
SA = :SA
|
|
1568
|
+
SAA = :SAA
|
|
1569
|
+
SAD = :SAD
|
|
1570
|
+
SAE = :SAE
|
|
1571
|
+
SAI = :SAI
|
|
1572
|
+
SG = :SG
|
|
1573
|
+
SH = :SH
|
|
1574
|
+
SM = :SM
|
|
1575
|
+
SU = :SU
|
|
1576
|
+
TAB = :TAB
|
|
1577
|
+
TAC = :TAC
|
|
1578
|
+
TT = :TT
|
|
1579
|
+
TV = :TV
|
|
1580
|
+
V1 = :V1
|
|
1581
|
+
V2 = :V2
|
|
1582
|
+
WH = :WH
|
|
1583
|
+
XAA = :XAA
|
|
1584
|
+
YY = :YY
|
|
1585
|
+
ZZZ = :ZZZ
|
|
1586
|
+
|
|
1587
|
+
# @!method self.values
|
|
1588
|
+
# @return [Array<Symbol>]
|
|
1589
|
+
end
|
|
1590
|
+
|
|
1041
1591
|
# Duty or tax or fee category codes (Subset of UNCL5305)
|
|
1042
1592
|
#
|
|
1043
1593
|
# Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL
|
|
@@ -1060,6 +1610,35 @@ module EInvoiceAPI
|
|
|
1060
1610
|
# @!method self.values
|
|
1061
1611
|
# @return [Array<Symbol>]
|
|
1062
1612
|
end
|
|
1613
|
+
|
|
1614
|
+
# The VAT rate, represented as percentage that applies to the charge
|
|
1615
|
+
#
|
|
1616
|
+
# @see EInvoiceAPI::Models::DocumentCreate::Item::Charge#tax_rate
|
|
1617
|
+
module TaxRate
|
|
1618
|
+
extend EInvoiceAPI::Internal::Type::Union
|
|
1619
|
+
|
|
1620
|
+
variant Float
|
|
1621
|
+
|
|
1622
|
+
variant String
|
|
1623
|
+
|
|
1624
|
+
# @!method self.variants
|
|
1625
|
+
# @return [Array(Float, String)]
|
|
1626
|
+
end
|
|
1627
|
+
end
|
|
1628
|
+
|
|
1629
|
+
# The item price base quantity (BT-149). The number of item units to which the
|
|
1630
|
+
# price applies. Defaults to 1. Must be rounded to maximum 4 decimals
|
|
1631
|
+
#
|
|
1632
|
+
# @see EInvoiceAPI::Models::DocumentCreate::Item#price_base_quantity
|
|
1633
|
+
module PriceBaseQuantity
|
|
1634
|
+
extend EInvoiceAPI::Internal::Type::Union
|
|
1635
|
+
|
|
1636
|
+
variant Float
|
|
1637
|
+
|
|
1638
|
+
variant String
|
|
1639
|
+
|
|
1640
|
+
# @!method self.variants
|
|
1641
|
+
# @return [Array(Float, String)]
|
|
1063
1642
|
end
|
|
1064
1643
|
|
|
1065
1644
|
# The quantity of items (goods or services) that is the subject of the line item.
|
|
@@ -1091,7 +1670,22 @@ module EInvoiceAPI
|
|
|
1091
1670
|
# @return [Array(Float, String)]
|
|
1092
1671
|
end
|
|
1093
1672
|
|
|
1094
|
-
# The
|
|
1673
|
+
# The VAT rate of the line item expressed as percentage with 2 decimals
|
|
1674
|
+
#
|
|
1675
|
+
# @see EInvoiceAPI::Models::DocumentCreate::Item#tax_rate
|
|
1676
|
+
module TaxRate
|
|
1677
|
+
extend EInvoiceAPI::Internal::Type::Union
|
|
1678
|
+
|
|
1679
|
+
variant Float
|
|
1680
|
+
|
|
1681
|
+
variant String
|
|
1682
|
+
|
|
1683
|
+
# @!method self.variants
|
|
1684
|
+
# @return [Array(Float, String)]
|
|
1685
|
+
end
|
|
1686
|
+
|
|
1687
|
+
# The item net price (BT-146). The price of an item, exclusive of VAT, after
|
|
1688
|
+
# subtracting item price discount. Must be rounded to maximum 4 decimals
|
|
1095
1689
|
#
|
|
1096
1690
|
# @see EInvoiceAPI::Models::DocumentCreate::Item#unit_price
|
|
1097
1691
|
module UnitPrice
|
|
@@ -1106,8 +1700,8 @@ module EInvoiceAPI
|
|
|
1106
1700
|
end
|
|
1107
1701
|
end
|
|
1108
1702
|
|
|
1109
|
-
# The previous unpaid balance
|
|
1110
|
-
# to maximum 2 decimals
|
|
1703
|
+
# The previous unpaid balance from prior invoices, if any. Must be positive and
|
|
1704
|
+
# rounded to maximum 2 decimals
|
|
1111
1705
|
#
|
|
1112
1706
|
# @see EInvoiceAPI::Models::DocumentCreate#previous_unpaid_balance
|
|
1113
1707
|
module PreviousUnpaidBalance
|
|
@@ -1137,7 +1731,8 @@ module EInvoiceAPI
|
|
|
1137
1731
|
# @return [Array(Float, String)]
|
|
1138
1732
|
end
|
|
1139
1733
|
|
|
1140
|
-
# Tax category code of the invoice
|
|
1734
|
+
# Tax category code of the invoice (e.g., S for standard rate, Z for zero rate, E
|
|
1735
|
+
# for exempt)
|
|
1141
1736
|
#
|
|
1142
1737
|
# @see EInvoiceAPI::Models::DocumentCreate#tax_code
|
|
1143
1738
|
module TaxCode
|
|
@@ -1160,19 +1755,24 @@ module EInvoiceAPI
|
|
|
1160
1755
|
|
|
1161
1756
|
class TaxDetail < EInvoiceAPI::Internal::Type::BaseModel
|
|
1162
1757
|
# @!attribute amount
|
|
1758
|
+
# The tax amount for this tax category. Must be rounded to maximum 2 decimals
|
|
1163
1759
|
#
|
|
1164
1760
|
# @return [Float, String, nil]
|
|
1165
1761
|
optional :amount, union: -> { EInvoiceAPI::DocumentCreate::TaxDetail::Amount }, nil?: true
|
|
1166
1762
|
|
|
1167
1763
|
# @!attribute rate
|
|
1764
|
+
# The tax rate as a percentage (e.g., '21.00', '6.00', '0.00')
|
|
1168
1765
|
#
|
|
1169
1766
|
# @return [String, nil]
|
|
1170
1767
|
optional :rate, String, nil?: true
|
|
1171
1768
|
|
|
1172
1769
|
# @!method initialize(amount: nil, rate: nil)
|
|
1173
|
-
# @param amount [Float, String, nil]
|
|
1174
|
-
#
|
|
1770
|
+
# @param amount [Float, String, nil] The tax amount for this tax category. Must be rounded to maximum 2 decimals
|
|
1771
|
+
#
|
|
1772
|
+
# @param rate [String, nil] The tax rate as a percentage (e.g., '21.00', '6.00', '0.00')
|
|
1175
1773
|
|
|
1774
|
+
# The tax amount for this tax category. Must be rounded to maximum 2 decimals
|
|
1775
|
+
#
|
|
1176
1776
|
# @see EInvoiceAPI::Models::DocumentCreate::TaxDetail#amount
|
|
1177
1777
|
module Amount
|
|
1178
1778
|
extend EInvoiceAPI::Internal::Type::Union
|
|
@@ -1202,7 +1802,8 @@ module EInvoiceAPI
|
|
|
1202
1802
|
# @return [Array(Float, String)]
|
|
1203
1803
|
end
|
|
1204
1804
|
|
|
1205
|
-
# The total tax of the invoice. Must be positive and rounded to maximum 2
|
|
1805
|
+
# The total tax amount of the invoice. Must be positive and rounded to maximum 2
|
|
1806
|
+
# decimals
|
|
1206
1807
|
#
|
|
1207
1808
|
# @see EInvoiceAPI::Models::DocumentCreate#total_tax
|
|
1208
1809
|
module TotalTax
|