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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -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 +728 -125
- data/lib/e_invoice_api/models/document_create_from_pdf_response.rb +127 -61
- data/lib/e_invoice_api/models/document_response.rb +377 -83
- 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 +43 -39
- data/lib/e_invoice_api/resources/validate.rb +43 -39
- 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 +3094 -708
- data/rbi/e_invoice_api/models/document_create_from_pdf_response.rbi +142 -34
- data/rbi/e_invoice_api/models/document_response.rbi +1238 -62
- 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 +54 -12
- data/rbi/e_invoice_api/resources/validate.rbi +54 -12
- 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 }
|
|
@@ -213,14 +246,16 @@ module EInvoiceAPI
|
|
|
213
246
|
nil?: true
|
|
214
247
|
|
|
215
248
|
# @!attribute total_discount
|
|
216
|
-
# The
|
|
217
|
-
#
|
|
249
|
+
# The net financial discount/charge of the invoice (non-VAT charges minus non-VAT
|
|
250
|
+
# allowances). Can be positive (net charge), negative (net discount), or zero.
|
|
251
|
+
# Must be rounded to maximum 2 decimals
|
|
218
252
|
#
|
|
219
253
|
# @return [Float, String, nil]
|
|
220
254
|
optional :total_discount, union: -> { EInvoiceAPI::DocumentCreate::TotalDiscount }, nil?: true
|
|
221
255
|
|
|
222
256
|
# @!attribute total_tax
|
|
223
|
-
# 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
|
|
224
259
|
#
|
|
225
260
|
# @return [Float, String, nil]
|
|
226
261
|
optional :total_tax, union: -> { EInvoiceAPI::DocumentCreate::TotalTax }, nil?: true
|
|
@@ -234,131 +269,148 @@ module EInvoiceAPI
|
|
|
234
269
|
optional :vatex, enum: -> { EInvoiceAPI::DocumentCreate::Vatex }, nil?: true
|
|
235
270
|
|
|
236
271
|
# @!attribute vatex_note
|
|
237
|
-
#
|
|
272
|
+
# Textual explanation for VAT exemption
|
|
238
273
|
#
|
|
239
274
|
# @return [String, nil]
|
|
240
275
|
optional :vatex_note, String, nil?: true
|
|
241
276
|
|
|
242
277
|
# @!attribute vendor_address
|
|
278
|
+
# The address of the vendor/seller
|
|
243
279
|
#
|
|
244
280
|
# @return [String, nil]
|
|
245
281
|
optional :vendor_address, String, nil?: true
|
|
246
282
|
|
|
247
283
|
# @!attribute vendor_address_recipient
|
|
284
|
+
# The recipient name at the vendor address
|
|
248
285
|
#
|
|
249
286
|
# @return [String, nil]
|
|
250
287
|
optional :vendor_address_recipient, String, nil?: true
|
|
251
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
|
+
|
|
252
296
|
# @!attribute vendor_email
|
|
297
|
+
# The email address of the vendor
|
|
253
298
|
#
|
|
254
299
|
# @return [String, nil]
|
|
255
300
|
optional :vendor_email, String, nil?: true
|
|
256
301
|
|
|
257
302
|
# @!attribute vendor_name
|
|
303
|
+
# The name of the vendor/seller/supplier
|
|
258
304
|
#
|
|
259
305
|
# @return [String, nil]
|
|
260
306
|
optional :vendor_name, String, nil?: true
|
|
261
307
|
|
|
262
308
|
# @!attribute vendor_tax_id
|
|
309
|
+
# Vendor tax ID. For Belgium this is the VAT number. Must include the country
|
|
310
|
+
# prefix
|
|
263
311
|
#
|
|
264
312
|
# @return [String, nil]
|
|
265
313
|
optional :vendor_tax_id, String, nil?: true
|
|
266
314
|
|
|
267
|
-
# @!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)
|
|
268
316
|
# Some parameter documentations has been truncated, see
|
|
269
317
|
# {EInvoiceAPI::Models::DocumentCreate} for more details.
|
|
270
318
|
#
|
|
271
319
|
# @param allowances [Array<EInvoiceAPI::Models::DocumentCreate::Allowance>, nil]
|
|
272
320
|
#
|
|
273
|
-
# @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
|
|
274
322
|
#
|
|
275
323
|
# @param attachments [Array<EInvoiceAPI::Models::DocumentAttachmentCreate>, nil]
|
|
276
324
|
#
|
|
277
|
-
# @param billing_address [String, nil]
|
|
325
|
+
# @param billing_address [String, nil] The billing address (if different from customer address)
|
|
278
326
|
#
|
|
279
|
-
# @param billing_address_recipient [String, nil]
|
|
327
|
+
# @param billing_address_recipient [String, nil] The recipient name at the billing address
|
|
280
328
|
#
|
|
281
329
|
# @param charges [Array<EInvoiceAPI::Models::DocumentCreate::Charge>, nil]
|
|
282
330
|
#
|
|
283
|
-
# @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
|
|
284
334
|
#
|
|
285
|
-
# @param
|
|
335
|
+
# @param customer_address_recipient [String, nil] The recipient name at the customer address
|
|
286
336
|
#
|
|
287
|
-
# @param
|
|
337
|
+
# @param customer_company_id [String, nil] Customer company ID. For Belgium this is the CBE number or their EUID (European
|
|
288
338
|
#
|
|
289
|
-
# @param customer_email [String, nil]
|
|
339
|
+
# @param customer_email [String, nil] The email address of the customer
|
|
290
340
|
#
|
|
291
|
-
# @param customer_id [String, nil]
|
|
341
|
+
# @param customer_id [String, nil] The unique identifier for the customer in your system
|
|
292
342
|
#
|
|
293
|
-
# @param customer_name [String, nil]
|
|
343
|
+
# @param customer_name [String, nil] The company name of the customer/buyer
|
|
294
344
|
#
|
|
295
|
-
# @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
|
|
296
346
|
#
|
|
297
|
-
# @param direction [Symbol, EInvoiceAPI::Models::DocumentDirection]
|
|
347
|
+
# @param direction [Symbol, EInvoiceAPI::Models::DocumentDirection] The direction of the document: INBOUND (purchases) or OUTBOUND (sales)
|
|
298
348
|
#
|
|
299
|
-
# @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
|
|
300
350
|
#
|
|
301
|
-
# @param due_date [Date, nil]
|
|
351
|
+
# @param due_date [Date, nil] The date when payment is due
|
|
302
352
|
#
|
|
303
|
-
# @param invoice_date [Date, nil]
|
|
353
|
+
# @param invoice_date [Date, nil] The date when the invoice was issued
|
|
304
354
|
#
|
|
305
|
-
# @param invoice_id [String, nil]
|
|
355
|
+
# @param invoice_id [String, nil] The unique invoice identifier/number
|
|
306
356
|
#
|
|
307
|
-
# @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*
|
|
308
358
|
#
|
|
309
359
|
# @param items [Array<EInvoiceAPI::Models::DocumentCreate::Item>] At least one line item is required
|
|
310
360
|
#
|
|
311
|
-
# @param note [String, nil]
|
|
361
|
+
# @param note [String, nil] Additional notes or comments for the invoice
|
|
312
362
|
#
|
|
313
363
|
# @param payment_details [Array<EInvoiceAPI::Models::PaymentDetailCreate>, nil]
|
|
314
364
|
#
|
|
315
|
-
# @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')
|
|
316
366
|
#
|
|
317
|
-
# @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
|
|
318
368
|
#
|
|
319
|
-
# @param purchase_order [String, nil]
|
|
369
|
+
# @param purchase_order [String, nil] The purchase order reference number
|
|
320
370
|
#
|
|
321
|
-
# @param remittance_address [String, nil]
|
|
371
|
+
# @param remittance_address [String, nil] The address where payment should be sent or remitted to
|
|
322
372
|
#
|
|
323
|
-
# @param remittance_address_recipient [String, nil]
|
|
373
|
+
# @param remittance_address_recipient [String, nil] The recipient name at the remittance address
|
|
324
374
|
#
|
|
325
|
-
# @param service_address [String, nil]
|
|
375
|
+
# @param service_address [String, nil] The address where services were performed or goods were delivered
|
|
326
376
|
#
|
|
327
|
-
# @param service_address_recipient [String, nil]
|
|
377
|
+
# @param service_address_recipient [String, nil] The recipient name at the service address
|
|
328
378
|
#
|
|
329
|
-
# @param service_end_date [Date, nil]
|
|
379
|
+
# @param service_end_date [Date, nil] The end date of the service period or delivery period
|
|
330
380
|
#
|
|
331
|
-
# @param service_start_date [Date, nil]
|
|
381
|
+
# @param service_start_date [Date, nil] The start date of the service period or delivery period
|
|
332
382
|
#
|
|
333
|
-
# @param shipping_address [String, nil]
|
|
383
|
+
# @param shipping_address [String, nil] The shipping/delivery address
|
|
334
384
|
#
|
|
335
|
-
# @param shipping_address_recipient [String, nil]
|
|
385
|
+
# @param shipping_address_recipient [String, nil] The recipient name at the shipping address
|
|
336
386
|
#
|
|
337
|
-
# @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
|
|
338
388
|
#
|
|
339
389
|
# @param subtotal [Float, String, nil] The taxable base of the invoice. Should be the sum of all line items - allowance
|
|
340
390
|
#
|
|
341
|
-
# @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
|
|
342
392
|
#
|
|
343
393
|
# @param tax_details [Array<EInvoiceAPI::Models::DocumentCreate::TaxDetail>, nil]
|
|
344
394
|
#
|
|
345
|
-
# @param total_discount [Float, String, nil] The
|
|
395
|
+
# @param total_discount [Float, String, nil] The net financial discount/charge of the invoice (non-VAT charges minus non-VAT
|
|
346
396
|
#
|
|
347
|
-
# @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
|
|
348
398
|
#
|
|
349
399
|
# @param vatex [Symbol, EInvoiceAPI::Models::DocumentCreate::Vatex, nil] VATEX code list for VAT exemption reasons
|
|
350
400
|
#
|
|
351
|
-
# @param vatex_note [String, nil]
|
|
401
|
+
# @param vatex_note [String, nil] Textual explanation for VAT exemption
|
|
352
402
|
#
|
|
353
|
-
# @param vendor_address [String, nil]
|
|
403
|
+
# @param vendor_address [String, nil] The address of the vendor/seller
|
|
354
404
|
#
|
|
355
|
-
# @param vendor_address_recipient [String, nil]
|
|
405
|
+
# @param vendor_address_recipient [String, nil] The recipient name at the vendor address
|
|
356
406
|
#
|
|
357
|
-
# @param
|
|
407
|
+
# @param vendor_company_id [String, nil] Vendor company ID. For Belgium this is the CBE number or their EUID (European Un
|
|
358
408
|
#
|
|
359
|
-
# @param
|
|
409
|
+
# @param vendor_email [String, nil] The email address of the vendor
|
|
360
410
|
#
|
|
361
|
-
# @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
|
|
362
414
|
|
|
363
415
|
class Allowance < EInvoiceAPI::Internal::Type::BaseModel
|
|
364
416
|
# @!attribute amount
|
|
@@ -376,7 +428,8 @@ module EInvoiceAPI
|
|
|
376
428
|
|
|
377
429
|
# @!attribute multiplier_factor
|
|
378
430
|
# The percentage that may be used, in conjunction with the allowance base amount,
|
|
379
|
-
# 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
|
|
380
433
|
#
|
|
381
434
|
# @return [Float, String, nil]
|
|
382
435
|
optional :multiplier_factor,
|
|
@@ -390,24 +443,23 @@ module EInvoiceAPI
|
|
|
390
443
|
optional :reason, String, nil?: true
|
|
391
444
|
|
|
392
445
|
# @!attribute reason_code
|
|
393
|
-
#
|
|
446
|
+
# Allowance reason codes for invoice discounts and charges
|
|
394
447
|
#
|
|
395
|
-
# @return [
|
|
396
|
-
optional :reason_code,
|
|
448
|
+
# @return [Symbol, EInvoiceAPI::Models::DocumentCreate::Allowance::ReasonCode, nil]
|
|
449
|
+
optional :reason_code, enum: -> { EInvoiceAPI::DocumentCreate::Allowance::ReasonCode }, nil?: true
|
|
397
450
|
|
|
398
451
|
# @!attribute tax_code
|
|
399
|
-
#
|
|
400
|
-
#
|
|
401
|
-
# Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL
|
|
452
|
+
# The VAT category code that applies to the allowance
|
|
402
453
|
#
|
|
403
454
|
# @return [Symbol, EInvoiceAPI::Models::DocumentCreate::Allowance::TaxCode, nil]
|
|
404
|
-
optional :tax_code, enum: -> { EInvoiceAPI::DocumentCreate::Allowance::TaxCode }
|
|
455
|
+
optional :tax_code, enum: -> { EInvoiceAPI::DocumentCreate::Allowance::TaxCode }
|
|
405
456
|
|
|
406
457
|
# @!attribute tax_rate
|
|
407
|
-
# 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
|
|
408
460
|
#
|
|
409
|
-
# @return [String, nil]
|
|
410
|
-
optional :tax_rate,
|
|
461
|
+
# @return [Float, String, nil]
|
|
462
|
+
optional :tax_rate, union: -> { EInvoiceAPI::DocumentCreate::Allowance::TaxRate }, nil?: true
|
|
411
463
|
|
|
412
464
|
# @!method initialize(amount: nil, base_amount: nil, multiplier_factor: nil, reason: nil, reason_code: nil, tax_code: nil, tax_rate: nil)
|
|
413
465
|
# Some parameter documentations has been truncated, see
|
|
@@ -423,11 +475,11 @@ module EInvoiceAPI
|
|
|
423
475
|
#
|
|
424
476
|
# @param reason [String, nil] The reason for the allowance
|
|
425
477
|
#
|
|
426
|
-
# @param reason_code [
|
|
478
|
+
# @param reason_code [Symbol, EInvoiceAPI::Models::DocumentCreate::Allowance::ReasonCode, nil] Allowance reason codes for invoice discounts and charges
|
|
427
479
|
#
|
|
428
|
-
# @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
|
|
429
481
|
#
|
|
430
|
-
# @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
|
|
431
483
|
|
|
432
484
|
# The allowance amount, without VAT. Must be rounded to maximum 2 decimals
|
|
433
485
|
#
|
|
@@ -459,7 +511,8 @@ module EInvoiceAPI
|
|
|
459
511
|
end
|
|
460
512
|
|
|
461
513
|
# The percentage that may be used, in conjunction with the allowance base amount,
|
|
462
|
-
# 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
|
|
463
516
|
#
|
|
464
517
|
# @see EInvoiceAPI::Models::DocumentCreate::Allowance#multiplier_factor
|
|
465
518
|
module MultiplierFactor
|
|
@@ -473,9 +526,37 @@ module EInvoiceAPI
|
|
|
473
526
|
# @return [Array(Float, String)]
|
|
474
527
|
end
|
|
475
528
|
|
|
476
|
-
#
|
|
529
|
+
# Allowance reason codes for invoice discounts and charges
|
|
477
530
|
#
|
|
478
|
-
#
|
|
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
|
|
479
560
|
#
|
|
480
561
|
# @see EInvoiceAPI::Models::DocumentCreate::Allowance#tax_code
|
|
481
562
|
module TaxCode
|
|
@@ -495,10 +576,24 @@ module EInvoiceAPI
|
|
|
495
576
|
# @!method self.values
|
|
496
577
|
# @return [Array<Symbol>]
|
|
497
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
|
|
498
594
|
end
|
|
499
595
|
|
|
500
|
-
# The amount due
|
|
501
|
-
# decimals
|
|
596
|
+
# The amount due for payment. Must be positive and rounded to maximum 2 decimals
|
|
502
597
|
#
|
|
503
598
|
# @see EInvoiceAPI::Models::DocumentCreate#amount_due
|
|
504
599
|
module AmountDue
|
|
@@ -542,10 +637,10 @@ module EInvoiceAPI
|
|
|
542
637
|
optional :reason, String, nil?: true
|
|
543
638
|
|
|
544
639
|
# @!attribute reason_code
|
|
545
|
-
#
|
|
640
|
+
# Charge reason codes for invoice charges and fees
|
|
546
641
|
#
|
|
547
|
-
# @return [
|
|
548
|
-
optional :reason_code,
|
|
642
|
+
# @return [Symbol, EInvoiceAPI::Models::DocumentCreate::Charge::ReasonCode, nil]
|
|
643
|
+
optional :reason_code, enum: -> { EInvoiceAPI::DocumentCreate::Charge::ReasonCode }, nil?: true
|
|
549
644
|
|
|
550
645
|
# @!attribute tax_code
|
|
551
646
|
# Duty or tax or fee category codes (Subset of UNCL5305)
|
|
@@ -558,8 +653,8 @@ module EInvoiceAPI
|
|
|
558
653
|
# @!attribute tax_rate
|
|
559
654
|
# The VAT rate, represented as percentage that applies to the charge
|
|
560
655
|
#
|
|
561
|
-
# @return [String, nil]
|
|
562
|
-
optional :tax_rate,
|
|
656
|
+
# @return [Float, String, nil]
|
|
657
|
+
optional :tax_rate, union: -> { EInvoiceAPI::DocumentCreate::Charge::TaxRate }, nil?: true
|
|
563
658
|
|
|
564
659
|
# @!method initialize(amount: nil, base_amount: nil, multiplier_factor: nil, reason: nil, reason_code: nil, tax_code: nil, tax_rate: nil)
|
|
565
660
|
# Some parameter documentations has been truncated, see
|
|
@@ -575,11 +670,11 @@ module EInvoiceAPI
|
|
|
575
670
|
#
|
|
576
671
|
# @param reason [String, nil] The reason for the charge
|
|
577
672
|
#
|
|
578
|
-
# @param reason_code [
|
|
673
|
+
# @param reason_code [Symbol, EInvoiceAPI::Models::DocumentCreate::Charge::ReasonCode, nil] Charge reason codes for invoice charges and fees
|
|
579
674
|
#
|
|
580
675
|
# @param tax_code [Symbol, EInvoiceAPI::Models::DocumentCreate::Charge::TaxCode, nil] Duty or tax or fee category codes (Subset of UNCL5305)
|
|
581
676
|
#
|
|
582
|
-
# @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
|
|
583
678
|
|
|
584
679
|
# The charge amount, without VAT. Must be rounded to maximum 2 decimals
|
|
585
680
|
#
|
|
@@ -625,6 +720,195 @@ module EInvoiceAPI
|
|
|
625
720
|
# @return [Array(Float, String)]
|
|
626
721
|
end
|
|
627
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
|
+
|
|
628
912
|
# Duty or tax or fee category codes (Subset of UNCL5305)
|
|
629
913
|
#
|
|
630
914
|
# Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL
|
|
@@ -647,10 +931,24 @@ module EInvoiceAPI
|
|
|
647
931
|
# @!method self.values
|
|
648
932
|
# @return [Array<Symbol>]
|
|
649
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
|
|
650
948
|
end
|
|
651
949
|
|
|
652
|
-
# The total amount of the invoice (
|
|
653
|
-
# 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
|
|
654
952
|
#
|
|
655
953
|
# @see EInvoiceAPI::Models::DocumentCreate#invoice_total
|
|
656
954
|
module InvoiceTotal
|
|
@@ -674,9 +972,9 @@ module EInvoiceAPI
|
|
|
674
972
|
nil?: true
|
|
675
973
|
|
|
676
974
|
# @!attribute amount
|
|
677
|
-
# The
|
|
678
|
-
#
|
|
679
|
-
# 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
|
|
680
978
|
#
|
|
681
979
|
# @return [Float, String, nil]
|
|
682
980
|
optional :amount, union: -> { EInvoiceAPI::DocumentCreate::Item::Amount }, nil?: true
|
|
@@ -700,6 +998,15 @@ module EInvoiceAPI
|
|
|
700
998
|
# @return [String, nil]
|
|
701
999
|
optional :description, String, nil?: true
|
|
702
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
|
+
|
|
703
1010
|
# @!attribute product_code
|
|
704
1011
|
# The product code of the line item.
|
|
705
1012
|
#
|
|
@@ -722,8 +1029,8 @@ module EInvoiceAPI
|
|
|
722
1029
|
# @!attribute tax_rate
|
|
723
1030
|
# The VAT rate of the line item expressed as percentage with 2 decimals
|
|
724
1031
|
#
|
|
725
|
-
# @return [String, nil]
|
|
726
|
-
optional :tax_rate,
|
|
1032
|
+
# @return [Float, String, nil]
|
|
1033
|
+
optional :tax_rate, union: -> { EInvoiceAPI::DocumentCreate::Item::TaxRate }, nil?: true
|
|
727
1034
|
|
|
728
1035
|
# @!attribute unit
|
|
729
1036
|
# Unit of Measure Codes from UNECERec20 used in Peppol BIS Billing 3.0.
|
|
@@ -732,18 +1039,19 @@ module EInvoiceAPI
|
|
|
732
1039
|
optional :unit, enum: -> { EInvoiceAPI::UnitOfMeasureCode }, nil?: true
|
|
733
1040
|
|
|
734
1041
|
# @!attribute unit_price
|
|
735
|
-
# 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
|
|
736
1044
|
#
|
|
737
1045
|
# @return [Float, String, nil]
|
|
738
1046
|
optional :unit_price, union: -> { EInvoiceAPI::DocumentCreate::Item::UnitPrice }, nil?: true
|
|
739
1047
|
|
|
740
|
-
# @!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)
|
|
741
1049
|
# Some parameter documentations has been truncated, see
|
|
742
1050
|
# {EInvoiceAPI::Models::DocumentCreate::Item} for more details.
|
|
743
1051
|
#
|
|
744
1052
|
# @param allowances [Array<EInvoiceAPI::Models::DocumentCreate::Item::Allowance>, nil] The allowances of the line item.
|
|
745
1053
|
#
|
|
746
|
-
# @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
|
|
747
1055
|
#
|
|
748
1056
|
# @param charges [Array<EInvoiceAPI::Models::DocumentCreate::Item::Charge>, nil] The charges of the line item.
|
|
749
1057
|
#
|
|
@@ -751,17 +1059,19 @@ module EInvoiceAPI
|
|
|
751
1059
|
#
|
|
752
1060
|
# @param description [String, nil] The description of the line item.
|
|
753
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
|
+
#
|
|
754
1064
|
# @param product_code [String, nil] The product code of the line item.
|
|
755
1065
|
#
|
|
756
1066
|
# @param quantity [Float, String, nil] The quantity of items (goods or services) that is the subject of the line item.
|
|
757
1067
|
#
|
|
758
1068
|
# @param tax [Float, String, nil] The total VAT amount for the line item. Must be rounded to maximum 2 decimals
|
|
759
1069
|
#
|
|
760
|
-
# @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
|
|
761
1071
|
#
|
|
762
1072
|
# @param unit [Symbol, EInvoiceAPI::Models::UnitOfMeasureCode, nil] Unit of Measure Codes from UNECERec20 used in Peppol BIS Billing 3.0.
|
|
763
1073
|
#
|
|
764
|
-
# @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
|
|
765
1075
|
|
|
766
1076
|
class Allowance < EInvoiceAPI::Internal::Type::BaseModel
|
|
767
1077
|
# @!attribute amount
|
|
@@ -783,7 +1093,8 @@ module EInvoiceAPI
|
|
|
783
1093
|
|
|
784
1094
|
# @!attribute multiplier_factor
|
|
785
1095
|
# The percentage that may be used, in conjunction with the allowance base amount,
|
|
786
|
-
# 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
|
|
787
1098
|
#
|
|
788
1099
|
# @return [Float, String, nil]
|
|
789
1100
|
optional :multiplier_factor,
|
|
@@ -797,24 +1108,27 @@ module EInvoiceAPI
|
|
|
797
1108
|
optional :reason, String, nil?: true
|
|
798
1109
|
|
|
799
1110
|
# @!attribute reason_code
|
|
800
|
-
#
|
|
1111
|
+
# Allowance reason codes for invoice discounts and charges
|
|
801
1112
|
#
|
|
802
|
-
# @return [
|
|
803
|
-
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
|
|
804
1119
|
|
|
805
1120
|
# @!attribute tax_code
|
|
806
|
-
#
|
|
807
|
-
#
|
|
808
|
-
# Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL
|
|
1121
|
+
# The VAT category code that applies to the allowance
|
|
809
1122
|
#
|
|
810
1123
|
# @return [Symbol, EInvoiceAPI::Models::DocumentCreate::Item::Allowance::TaxCode, nil]
|
|
811
|
-
optional :tax_code, enum: -> { EInvoiceAPI::DocumentCreate::Item::Allowance::TaxCode }
|
|
1124
|
+
optional :tax_code, enum: -> { EInvoiceAPI::DocumentCreate::Item::Allowance::TaxCode }
|
|
812
1125
|
|
|
813
1126
|
# @!attribute tax_rate
|
|
814
|
-
# 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
|
|
815
1129
|
#
|
|
816
|
-
# @return [String, nil]
|
|
817
|
-
optional :tax_rate,
|
|
1130
|
+
# @return [Float, String, nil]
|
|
1131
|
+
optional :tax_rate, union: -> { EInvoiceAPI::DocumentCreate::Item::Allowance::TaxRate }, nil?: true
|
|
818
1132
|
|
|
819
1133
|
# @!method initialize(amount: nil, base_amount: nil, multiplier_factor: nil, reason: nil, reason_code: nil, tax_code: nil, tax_rate: nil)
|
|
820
1134
|
# Some parameter documentations has been truncated, see
|
|
@@ -830,11 +1144,11 @@ module EInvoiceAPI
|
|
|
830
1144
|
#
|
|
831
1145
|
# @param reason [String, nil] The reason for the allowance
|
|
832
1146
|
#
|
|
833
|
-
# @param reason_code [
|
|
1147
|
+
# @param reason_code [Symbol, EInvoiceAPI::Models::DocumentCreate::Item::Allowance::ReasonCode, nil] Allowance reason codes for invoice discounts and charges
|
|
834
1148
|
#
|
|
835
|
-
# @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
|
|
836
1150
|
#
|
|
837
|
-
# @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
|
|
838
1152
|
|
|
839
1153
|
# The allowance amount, without VAT. Must be rounded to maximum 2 decimals
|
|
840
1154
|
#
|
|
@@ -866,7 +1180,8 @@ module EInvoiceAPI
|
|
|
866
1180
|
end
|
|
867
1181
|
|
|
868
1182
|
# The percentage that may be used, in conjunction with the allowance base amount,
|
|
869
|
-
# 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
|
|
870
1185
|
#
|
|
871
1186
|
# @see EInvoiceAPI::Models::DocumentCreate::Item::Allowance#multiplier_factor
|
|
872
1187
|
module MultiplierFactor
|
|
@@ -880,9 +1195,37 @@ module EInvoiceAPI
|
|
|
880
1195
|
# @return [Array(Float, String)]
|
|
881
1196
|
end
|
|
882
1197
|
|
|
883
|
-
#
|
|
1198
|
+
# Allowance reason codes for invoice discounts and charges
|
|
884
1199
|
#
|
|
885
|
-
#
|
|
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
|
|
886
1229
|
#
|
|
887
1230
|
# @see EInvoiceAPI::Models::DocumentCreate::Item::Allowance#tax_code
|
|
888
1231
|
module TaxCode
|
|
@@ -902,11 +1245,26 @@ module EInvoiceAPI
|
|
|
902
1245
|
# @!method self.values
|
|
903
1246
|
# @return [Array<Symbol>]
|
|
904
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
|
|
905
1263
|
end
|
|
906
1264
|
|
|
907
|
-
# The
|
|
908
|
-
#
|
|
909
|
-
# 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
|
|
910
1268
|
#
|
|
911
1269
|
# @see EInvoiceAPI::Models::DocumentCreate::Item#amount
|
|
912
1270
|
module Amount
|
|
@@ -954,10 +1312,14 @@ module EInvoiceAPI
|
|
|
954
1312
|
optional :reason, String, nil?: true
|
|
955
1313
|
|
|
956
1314
|
# @!attribute reason_code
|
|
957
|
-
#
|
|
1315
|
+
# Charge reason codes for invoice charges and fees
|
|
958
1316
|
#
|
|
959
|
-
# @return [
|
|
960
|
-
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
|
|
961
1323
|
|
|
962
1324
|
# @!attribute tax_code
|
|
963
1325
|
# Duty or tax or fee category codes (Subset of UNCL5305)
|
|
@@ -970,8 +1332,8 @@ module EInvoiceAPI
|
|
|
970
1332
|
# @!attribute tax_rate
|
|
971
1333
|
# The VAT rate, represented as percentage that applies to the charge
|
|
972
1334
|
#
|
|
973
|
-
# @return [String, nil]
|
|
974
|
-
optional :tax_rate,
|
|
1335
|
+
# @return [Float, String, nil]
|
|
1336
|
+
optional :tax_rate, union: -> { EInvoiceAPI::DocumentCreate::Item::Charge::TaxRate }, nil?: true
|
|
975
1337
|
|
|
976
1338
|
# @!method initialize(amount: nil, base_amount: nil, multiplier_factor: nil, reason: nil, reason_code: nil, tax_code: nil, tax_rate: nil)
|
|
977
1339
|
# Some parameter documentations has been truncated, see
|
|
@@ -987,11 +1349,11 @@ module EInvoiceAPI
|
|
|
987
1349
|
#
|
|
988
1350
|
# @param reason [String, nil] The reason for the charge
|
|
989
1351
|
#
|
|
990
|
-
# @param reason_code [
|
|
1352
|
+
# @param reason_code [Symbol, EInvoiceAPI::Models::DocumentCreate::Item::Charge::ReasonCode, nil] Charge reason codes for invoice charges and fees
|
|
991
1353
|
#
|
|
992
1354
|
# @param tax_code [Symbol, EInvoiceAPI::Models::DocumentCreate::Item::Charge::TaxCode, nil] Duty or tax or fee category codes (Subset of UNCL5305)
|
|
993
1355
|
#
|
|
994
|
-
# @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
|
|
995
1357
|
|
|
996
1358
|
# The charge amount, without VAT. Must be rounded to maximum 2 decimals
|
|
997
1359
|
#
|
|
@@ -1037,6 +1399,195 @@ module EInvoiceAPI
|
|
|
1037
1399
|
# @return [Array(Float, String)]
|
|
1038
1400
|
end
|
|
1039
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
|
+
|
|
1040
1591
|
# Duty or tax or fee category codes (Subset of UNCL5305)
|
|
1041
1592
|
#
|
|
1042
1593
|
# Agency: UN/CEFACT Version: D.16B Subset: OpenPEPPOL
|
|
@@ -1059,6 +1610,35 @@ module EInvoiceAPI
|
|
|
1059
1610
|
# @!method self.values
|
|
1060
1611
|
# @return [Array<Symbol>]
|
|
1061
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)]
|
|
1062
1642
|
end
|
|
1063
1643
|
|
|
1064
1644
|
# The quantity of items (goods or services) that is the subject of the line item.
|
|
@@ -1090,7 +1670,22 @@ module EInvoiceAPI
|
|
|
1090
1670
|
# @return [Array(Float, String)]
|
|
1091
1671
|
end
|
|
1092
1672
|
|
|
1093
|
-
# 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
|
|
1094
1689
|
#
|
|
1095
1690
|
# @see EInvoiceAPI::Models::DocumentCreate::Item#unit_price
|
|
1096
1691
|
module UnitPrice
|
|
@@ -1105,8 +1700,8 @@ module EInvoiceAPI
|
|
|
1105
1700
|
end
|
|
1106
1701
|
end
|
|
1107
1702
|
|
|
1108
|
-
# The previous unpaid balance
|
|
1109
|
-
# to maximum 2 decimals
|
|
1703
|
+
# The previous unpaid balance from prior invoices, if any. Must be positive and
|
|
1704
|
+
# rounded to maximum 2 decimals
|
|
1110
1705
|
#
|
|
1111
1706
|
# @see EInvoiceAPI::Models::DocumentCreate#previous_unpaid_balance
|
|
1112
1707
|
module PreviousUnpaidBalance
|
|
@@ -1136,7 +1731,8 @@ module EInvoiceAPI
|
|
|
1136
1731
|
# @return [Array(Float, String)]
|
|
1137
1732
|
end
|
|
1138
1733
|
|
|
1139
|
-
# 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)
|
|
1140
1736
|
#
|
|
1141
1737
|
# @see EInvoiceAPI::Models::DocumentCreate#tax_code
|
|
1142
1738
|
module TaxCode
|
|
@@ -1159,19 +1755,24 @@ module EInvoiceAPI
|
|
|
1159
1755
|
|
|
1160
1756
|
class TaxDetail < EInvoiceAPI::Internal::Type::BaseModel
|
|
1161
1757
|
# @!attribute amount
|
|
1758
|
+
# The tax amount for this tax category. Must be rounded to maximum 2 decimals
|
|
1162
1759
|
#
|
|
1163
1760
|
# @return [Float, String, nil]
|
|
1164
1761
|
optional :amount, union: -> { EInvoiceAPI::DocumentCreate::TaxDetail::Amount }, nil?: true
|
|
1165
1762
|
|
|
1166
1763
|
# @!attribute rate
|
|
1764
|
+
# The tax rate as a percentage (e.g., '21.00', '6.00', '0.00')
|
|
1167
1765
|
#
|
|
1168
1766
|
# @return [String, nil]
|
|
1169
1767
|
optional :rate, String, nil?: true
|
|
1170
1768
|
|
|
1171
1769
|
# @!method initialize(amount: nil, rate: nil)
|
|
1172
|
-
# @param amount [Float, String, nil]
|
|
1173
|
-
#
|
|
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')
|
|
1174
1773
|
|
|
1774
|
+
# The tax amount for this tax category. Must be rounded to maximum 2 decimals
|
|
1775
|
+
#
|
|
1175
1776
|
# @see EInvoiceAPI::Models::DocumentCreate::TaxDetail#amount
|
|
1176
1777
|
module Amount
|
|
1177
1778
|
extend EInvoiceAPI::Internal::Type::Union
|
|
@@ -1185,8 +1786,9 @@ module EInvoiceAPI
|
|
|
1185
1786
|
end
|
|
1186
1787
|
end
|
|
1187
1788
|
|
|
1188
|
-
# The
|
|
1189
|
-
#
|
|
1789
|
+
# The net financial discount/charge of the invoice (non-VAT charges minus non-VAT
|
|
1790
|
+
# allowances). Can be positive (net charge), negative (net discount), or zero.
|
|
1791
|
+
# Must be rounded to maximum 2 decimals
|
|
1190
1792
|
#
|
|
1191
1793
|
# @see EInvoiceAPI::Models::DocumentCreate#total_discount
|
|
1192
1794
|
module TotalDiscount
|
|
@@ -1200,7 +1802,8 @@ module EInvoiceAPI
|
|
|
1200
1802
|
# @return [Array(Float, String)]
|
|
1201
1803
|
end
|
|
1202
1804
|
|
|
1203
|
-
# 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
|
|
1204
1807
|
#
|
|
1205
1808
|
# @see EInvoiceAPI::Models::DocumentCreate#total_tax
|
|
1206
1809
|
module TotalTax
|