e-invoice-api 0.25.0 → 0.26.1
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 +23 -0
- data/README.md +1 -1
- data/lib/e_invoice_api/internal/util.rb +1 -2
- data/lib/e_invoice_api/models/document_create.rb +9 -1
- data/lib/e_invoice_api/models/document_create_from_pdf_response.rb +9 -1
- data/lib/e_invoice_api/models/document_create_params.rb +13 -1
- data/lib/e_invoice_api/models/document_response.rb +16 -1
- data/lib/e_invoice_api/models/document_type.rb +2 -0
- data/lib/e_invoice_api/models/inbox_list_credit_notes_params.rb +44 -1
- data/lib/e_invoice_api/models/inbox_list_invoices_params.rb +44 -1
- data/lib/e_invoice_api/models/inbox_list_params.rb +45 -10
- data/lib/e_invoice_api/models/lookup_retrieve_response.rb +17 -1
- data/lib/e_invoice_api/models/me_retrieve_response.rb +17 -17
- data/lib/e_invoice_api/models/outbox_list_draft_documents_params.rb +68 -1
- data/lib/e_invoice_api/models/outbox_list_received_documents_params.rb +57 -10
- data/lib/e_invoice_api/models/paginated_document_response.rb +7 -1
- data/lib/e_invoice_api/resources/documents/attachments.rb +4 -2
- data/lib/e_invoice_api/resources/documents.rb +63 -51
- data/lib/e_invoice_api/resources/inbox.rb +16 -6
- data/lib/e_invoice_api/resources/outbox.rb +26 -6
- data/lib/e_invoice_api/resources/validate.rb +3 -1
- data/lib/e_invoice_api/version.rb +1 -1
- data/rbi/e_invoice_api/models/document_create.rbi +8 -0
- data/rbi/e_invoice_api/models/document_create_from_pdf_response.rbi +8 -0
- data/rbi/e_invoice_api/models/document_create_params.rbi +26 -5
- data/rbi/e_invoice_api/models/document_response.rbi +14 -0
- data/rbi/e_invoice_api/models/document_type.rbi +4 -0
- data/rbi/e_invoice_api/models/inbox_list_credit_notes_params.rbi +132 -0
- data/rbi/e_invoice_api/models/inbox_list_invoices_params.rbi +126 -0
- data/rbi/e_invoice_api/models/inbox_list_params.rbi +100 -11
- data/rbi/e_invoice_api/models/lookup_retrieve_response.rbi +19 -3
- data/rbi/e_invoice_api/models/me_retrieve_response.rbi +30 -18
- data/rbi/e_invoice_api/models/outbox_list_draft_documents_params.rbi +163 -0
- data/rbi/e_invoice_api/models/outbox_list_received_documents_params.rbi +156 -11
- data/rbi/e_invoice_api/models/paginated_document_response.rbi +6 -1
- data/rbi/e_invoice_api/resources/documents/attachments.rbi +4 -2
- data/rbi/e_invoice_api/resources/documents.rbi +78 -56
- data/rbi/e_invoice_api/resources/inbox.rbi +21 -5
- data/rbi/e_invoice_api/resources/outbox.rbi +33 -6
- data/rbi/e_invoice_api/resources/validate.rbi +3 -0
- data/sig/e_invoice_api/models/document_create.rbs +5 -0
- data/sig/e_invoice_api/models/document_create_from_pdf_response.rbs +5 -0
- data/sig/e_invoice_api/models/document_create_params.rbs +13 -3
- data/sig/e_invoice_api/models/document_response.rbs +10 -0
- data/sig/e_invoice_api/models/document_type.rbs +8 -1
- data/sig/e_invoice_api/models/inbox_list_credit_notes_params.rbs +56 -1
- data/sig/e_invoice_api/models/inbox_list_invoices_params.rbs +56 -1
- data/sig/e_invoice_api/models/inbox_list_params.rbs +51 -4
- data/sig/e_invoice_api/models/lookup_retrieve_response.rbs +13 -3
- data/sig/e_invoice_api/models/me_retrieve_response.rbs +16 -10
- data/sig/e_invoice_api/models/outbox_list_draft_documents_params.rbs +71 -1
- data/sig/e_invoice_api/models/outbox_list_received_documents_params.rbs +56 -4
- data/sig/e_invoice_api/models/paginated_document_response.rbs +5 -0
- data/sig/e_invoice_api/resources/documents.rbs +2 -0
- data/sig/e_invoice_api/resources/inbox.rbs +6 -1
- data/sig/e_invoice_api/resources/outbox.rbs +8 -1
- data/sig/e_invoice_api/resources/validate.rbs +1 -0
- metadata +2 -2
|
@@ -12,6 +12,7 @@ module EInvoiceAPI
|
|
|
12
12
|
# Create a new invoice or credit note
|
|
13
13
|
sig do
|
|
14
14
|
params(
|
|
15
|
+
construct_pdf: T::Boolean,
|
|
15
16
|
allowances:
|
|
16
17
|
T.nilable(T::Array[EInvoiceAPI::DocumentCreate::Allowance::OrHash]),
|
|
17
18
|
amount_due:
|
|
@@ -29,6 +30,7 @@ module EInvoiceAPI
|
|
|
29
30
|
customer_email: T.nilable(String),
|
|
30
31
|
customer_id: T.nilable(String),
|
|
31
32
|
customer_name: T.nilable(String),
|
|
33
|
+
customer_peppol_id: T.nilable(String),
|
|
32
34
|
customer_tax_id: T.nilable(String),
|
|
33
35
|
direction: EInvoiceAPI::DocumentDirection::OrSymbol,
|
|
34
36
|
document_type: EInvoiceAPI::DocumentType::OrSymbol,
|
|
@@ -75,110 +77,125 @@ module EInvoiceAPI
|
|
|
75
77
|
).returns(EInvoiceAPI::DocumentResponse)
|
|
76
78
|
end
|
|
77
79
|
def create(
|
|
80
|
+
# Query param: If true, generate a constructed PDF from the document and include
|
|
81
|
+
# it both as document attachment and embedded in the UBL.
|
|
82
|
+
construct_pdf: nil,
|
|
83
|
+
# Body param
|
|
78
84
|
allowances: nil,
|
|
79
|
-
# The amount due for payment. Must be positive and rounded to maximum
|
|
85
|
+
# Body param: The amount due for payment. Must be positive and rounded to maximum
|
|
86
|
+
# 2 decimals
|
|
80
87
|
amount_due: nil,
|
|
88
|
+
# Body param
|
|
81
89
|
attachments: nil,
|
|
82
|
-
# The billing address (if different from customer address)
|
|
90
|
+
# Body param: The billing address (if different from customer address)
|
|
83
91
|
billing_address: nil,
|
|
84
|
-
# The recipient name at the billing address
|
|
92
|
+
# Body param: The recipient name at the billing address
|
|
85
93
|
billing_address_recipient: nil,
|
|
94
|
+
# Body param
|
|
86
95
|
charges: nil,
|
|
87
|
-
# Currency of the invoice (ISO 4217 currency code)
|
|
96
|
+
# Body param: Currency of the invoice (ISO 4217 currency code)
|
|
88
97
|
currency: nil,
|
|
89
|
-
# The address of the customer/buyer
|
|
98
|
+
# Body param: The address of the customer/buyer
|
|
90
99
|
customer_address: nil,
|
|
91
|
-
# The recipient name at the customer address
|
|
100
|
+
# Body param: The recipient name at the customer address
|
|
92
101
|
customer_address_recipient: nil,
|
|
93
|
-
# Customer company ID. For Belgium this is the CBE number or their
|
|
94
|
-
# Unique Identifier) number. In the Netherlands this is the KVK
|
|
102
|
+
# Body param: Customer company ID. For Belgium this is the CBE number or their
|
|
103
|
+
# EUID (European Unique Identifier) number. In the Netherlands this is the KVK
|
|
104
|
+
# number.
|
|
95
105
|
customer_company_id: nil,
|
|
96
|
-
# The email address of the customer
|
|
106
|
+
# Body param: The email address of the customer
|
|
97
107
|
customer_email: nil,
|
|
98
|
-
# The unique identifier for the customer in your system
|
|
108
|
+
# Body param: The unique identifier for the customer in your system
|
|
99
109
|
customer_id: nil,
|
|
100
|
-
# The company name of the customer/buyer
|
|
110
|
+
# Body param: The company name of the customer/buyer
|
|
101
111
|
customer_name: nil,
|
|
102
|
-
# Customer
|
|
103
|
-
|
|
112
|
+
# Body param: Customer Peppol ID
|
|
113
|
+
customer_peppol_id: nil,
|
|
114
|
+
# Body param: Customer tax ID. For Belgium this is the VAT number. Must include
|
|
115
|
+
# the country prefix
|
|
104
116
|
customer_tax_id: nil,
|
|
105
|
-
# The direction of the document: INBOUND (purchases) or OUTBOUND
|
|
117
|
+
# Body param: The direction of the document: INBOUND (purchases) or OUTBOUND
|
|
118
|
+
# (sales)
|
|
106
119
|
direction: nil,
|
|
107
|
-
# The type of document: INVOICE, CREDIT_NOTE, or DEBIT_NOTE
|
|
120
|
+
# Body param: The type of document: INVOICE, CREDIT_NOTE, or DEBIT_NOTE
|
|
108
121
|
document_type: nil,
|
|
109
|
-
# The date when payment is due
|
|
122
|
+
# Body param: The date when payment is due
|
|
110
123
|
due_date: nil,
|
|
111
|
-
# The date when the invoice was issued
|
|
124
|
+
# Body param: The date when the invoice was issued
|
|
112
125
|
invoice_date: nil,
|
|
113
|
-
# The unique invoice identifier/number
|
|
126
|
+
# Body param: The unique invoice identifier/number
|
|
114
127
|
invoice_id: nil,
|
|
115
|
-
# The total amount of the invoice including tax (invoice_total =
|
|
116
|
-
# total_tax + total_discount). Must be positive and rounded to maximum
|
|
128
|
+
# Body param: The total amount of the invoice including tax (invoice_total =
|
|
129
|
+
# subtotal + total_tax + total_discount). Must be positive and rounded to maximum
|
|
130
|
+
# 2 decimals
|
|
117
131
|
invoice_total: nil,
|
|
118
|
-
# At least one line item is required
|
|
132
|
+
# Body param: At least one line item is required
|
|
119
133
|
items: nil,
|
|
120
|
-
# Additional notes or comments for the invoice
|
|
134
|
+
# Body param: Additional notes or comments for the invoice
|
|
121
135
|
note: nil,
|
|
136
|
+
# Body param
|
|
122
137
|
payment_details: nil,
|
|
123
|
-
# The payment terms (e.g., 'Net 30', 'Due on receipt', '2/10 Net 30')
|
|
138
|
+
# Body param: The payment terms (e.g., 'Net 30', 'Due on receipt', '2/10 Net 30')
|
|
124
139
|
payment_term: nil,
|
|
125
|
-
# The previous unpaid balance from prior invoices, if any. Must be
|
|
126
|
-
# rounded to maximum 2 decimals
|
|
140
|
+
# Body param: The previous unpaid balance from prior invoices, if any. Must be
|
|
141
|
+
# positive and rounded to maximum 2 decimals
|
|
127
142
|
previous_unpaid_balance: nil,
|
|
128
|
-
# The purchase order reference number
|
|
143
|
+
# Body param: The purchase order reference number
|
|
129
144
|
purchase_order: nil,
|
|
130
|
-
# The address where payment should be sent or remitted to
|
|
145
|
+
# Body param: The address where payment should be sent or remitted to
|
|
131
146
|
remittance_address: nil,
|
|
132
|
-
# The recipient name at the remittance address
|
|
147
|
+
# Body param: The recipient name at the remittance address
|
|
133
148
|
remittance_address_recipient: nil,
|
|
134
|
-
# The address where services were performed or goods were delivered
|
|
149
|
+
# Body param: The address where services were performed or goods were delivered
|
|
135
150
|
service_address: nil,
|
|
136
|
-
# The recipient name at the service address
|
|
151
|
+
# Body param: The recipient name at the service address
|
|
137
152
|
service_address_recipient: nil,
|
|
138
|
-
# The end date of the service period or delivery period
|
|
153
|
+
# Body param: The end date of the service period or delivery period
|
|
139
154
|
service_end_date: nil,
|
|
140
|
-
# The start date of the service period or delivery period
|
|
155
|
+
# Body param: The start date of the service period or delivery period
|
|
141
156
|
service_start_date: nil,
|
|
142
|
-
# The shipping/delivery address
|
|
157
|
+
# Body param: The shipping/delivery address
|
|
143
158
|
shipping_address: nil,
|
|
144
|
-
# The recipient name at the shipping address
|
|
159
|
+
# Body param: The recipient name at the shipping address
|
|
145
160
|
shipping_address_recipient: nil,
|
|
146
|
-
# The current state of the document: DRAFT, TRANSIT, FAILED, SENT, or
|
|
161
|
+
# Body param: The current state of the document: DRAFT, TRANSIT, FAILED, SENT, or
|
|
162
|
+
# RECEIVED
|
|
147
163
|
state: nil,
|
|
148
|
-
# The taxable base of the invoice. Should be the sum of all line
|
|
149
|
-
# allowances (for example commercial discounts) + charges with impact on
|
|
150
|
-
# be positive and rounded to maximum 2 decimals
|
|
164
|
+
# Body param: The taxable base of the invoice. Should be the sum of all line
|
|
165
|
+
# items - allowances (for example commercial discounts) + charges with impact on
|
|
166
|
+
# VAT. Must be positive and rounded to maximum 2 decimals
|
|
151
167
|
subtotal: nil,
|
|
152
|
-
# Tax category code of the invoice (e.g., S for standard rate, Z for
|
|
153
|
-
# for exempt)
|
|
168
|
+
# Body param: Tax category code of the invoice (e.g., S for standard rate, Z for
|
|
169
|
+
# zero rate, E for exempt)
|
|
154
170
|
tax_code: nil,
|
|
171
|
+
# Body param
|
|
155
172
|
tax_details: nil,
|
|
156
|
-
# The net financial discount/charge of the invoice (non-VAT charges
|
|
157
|
-
# allowances). Can be positive (net charge), negative (net
|
|
158
|
-
# Must be rounded to maximum 2 decimals
|
|
173
|
+
# Body param: The net financial discount/charge of the invoice (non-VAT charges
|
|
174
|
+
# minus non-VAT allowances). Can be positive (net charge), negative (net
|
|
175
|
+
# discount), or zero. Must be rounded to maximum 2 decimals
|
|
159
176
|
total_discount: nil,
|
|
160
|
-
# The total tax amount of the invoice. Must be positive and rounded to
|
|
161
|
-
# decimals
|
|
177
|
+
# Body param: The total tax amount of the invoice. Must be positive and rounded to
|
|
178
|
+
# maximum 2 decimals
|
|
162
179
|
total_tax: nil,
|
|
163
|
-
# VATEX code list for VAT exemption reasons
|
|
180
|
+
# Body param: VATEX code list for VAT exemption reasons
|
|
164
181
|
#
|
|
165
182
|
# Agency: CEF Identifier: vatex
|
|
166
183
|
vatex: nil,
|
|
167
|
-
# Textual explanation for VAT exemption
|
|
184
|
+
# Body param: Textual explanation for VAT exemption
|
|
168
185
|
vatex_note: nil,
|
|
169
|
-
# The address of the vendor/seller
|
|
186
|
+
# Body param: The address of the vendor/seller
|
|
170
187
|
vendor_address: nil,
|
|
171
|
-
# The recipient name at the vendor address
|
|
188
|
+
# Body param: The recipient name at the vendor address
|
|
172
189
|
vendor_address_recipient: nil,
|
|
173
|
-
# Vendor company ID. For Belgium this is the CBE number or their EUID
|
|
174
|
-
# Unique Identifier) number. In the Netherlands this is the KVK number.
|
|
190
|
+
# Body param: Vendor company ID. For Belgium this is the CBE number or their EUID
|
|
191
|
+
# (European Unique Identifier) number. In the Netherlands this is the KVK number.
|
|
175
192
|
vendor_company_id: nil,
|
|
176
|
-
# The email address of the vendor
|
|
193
|
+
# Body param: The email address of the vendor
|
|
177
194
|
vendor_email: nil,
|
|
178
|
-
# The name of the vendor/seller/supplier
|
|
195
|
+
# Body param: The name of the vendor/seller/supplier
|
|
179
196
|
vendor_name: nil,
|
|
180
|
-
# Vendor tax ID. For Belgium this is the VAT number. Must include the
|
|
181
|
-
# prefix
|
|
197
|
+
# Body param: Vendor tax ID. For Belgium this is the VAT number. Must include the
|
|
198
|
+
# country prefix
|
|
182
199
|
vendor_tax_id: nil,
|
|
183
200
|
request_options: {}
|
|
184
201
|
)
|
|
@@ -228,7 +245,12 @@ module EInvoiceAPI
|
|
|
228
245
|
)
|
|
229
246
|
end
|
|
230
247
|
|
|
231
|
-
# Send an invoice or credit note via Peppol
|
|
248
|
+
# Send an invoice or credit note via Peppol. By default, the sender and receiver
|
|
249
|
+
# Peppol IDs are derived from the company (tax) IDs in the document, regardless of
|
|
250
|
+
# whether the document was created from a UBL with a different endpoint ID. To
|
|
251
|
+
# explicitly set the sender or receiver Peppol ID, provide them via the query
|
|
252
|
+
# parameters (sender_peppol_scheme, sender_peppol_id, receiver_peppol_scheme,
|
|
253
|
+
# receiver_peppol_id).
|
|
232
254
|
sig do
|
|
233
255
|
params(
|
|
234
256
|
document_id: String,
|
|
@@ -13,7 +13,8 @@ module EInvoiceAPI
|
|
|
13
13
|
page_size: Integer,
|
|
14
14
|
search: T.nilable(String),
|
|
15
15
|
sender: T.nilable(String),
|
|
16
|
-
|
|
16
|
+
sort_by: EInvoiceAPI::InboxListParams::SortBy::OrSymbol,
|
|
17
|
+
sort_order: EInvoiceAPI::InboxListParams::SortOrder::OrSymbol,
|
|
17
18
|
type: T.nilable(EInvoiceAPI::DocumentType::OrSymbol),
|
|
18
19
|
request_options: EInvoiceAPI::RequestOptions::OrHash
|
|
19
20
|
).returns(
|
|
@@ -33,11 +34,13 @@ module EInvoiceAPI
|
|
|
33
34
|
page_size: nil,
|
|
34
35
|
# Search in invoice number, seller/buyer names
|
|
35
36
|
search: nil,
|
|
36
|
-
# Filter by sender
|
|
37
|
+
# Filter by sender (vendor_name, vendor_email, vendor_tax_id, vendor_company_id)
|
|
37
38
|
sender: nil,
|
|
38
|
-
#
|
|
39
|
-
|
|
40
|
-
#
|
|
39
|
+
# Field to sort by
|
|
40
|
+
sort_by: nil,
|
|
41
|
+
# Sort direction (asc/desc)
|
|
42
|
+
sort_order: nil,
|
|
43
|
+
# Filter by document type. If not provided, returns all types.
|
|
41
44
|
type: nil,
|
|
42
45
|
request_options: {}
|
|
43
46
|
)
|
|
@@ -48,6 +51,9 @@ module EInvoiceAPI
|
|
|
48
51
|
params(
|
|
49
52
|
page: Integer,
|
|
50
53
|
page_size: Integer,
|
|
54
|
+
sort_by: EInvoiceAPI::InboxListCreditNotesParams::SortBy::OrSymbol,
|
|
55
|
+
sort_order:
|
|
56
|
+
EInvoiceAPI::InboxListCreditNotesParams::SortOrder::OrSymbol,
|
|
51
57
|
request_options: EInvoiceAPI::RequestOptions::OrHash
|
|
52
58
|
).returns(
|
|
53
59
|
EInvoiceAPI::Internal::DocumentsNumberPage[
|
|
@@ -60,6 +66,10 @@ module EInvoiceAPI
|
|
|
60
66
|
page: nil,
|
|
61
67
|
# Number of items per page
|
|
62
68
|
page_size: nil,
|
|
69
|
+
# Field to sort by
|
|
70
|
+
sort_by: nil,
|
|
71
|
+
# Sort direction (asc/desc)
|
|
72
|
+
sort_order: nil,
|
|
63
73
|
request_options: {}
|
|
64
74
|
)
|
|
65
75
|
end
|
|
@@ -69,6 +79,8 @@ module EInvoiceAPI
|
|
|
69
79
|
params(
|
|
70
80
|
page: Integer,
|
|
71
81
|
page_size: Integer,
|
|
82
|
+
sort_by: EInvoiceAPI::InboxListInvoicesParams::SortBy::OrSymbol,
|
|
83
|
+
sort_order: EInvoiceAPI::InboxListInvoicesParams::SortOrder::OrSymbol,
|
|
72
84
|
request_options: EInvoiceAPI::RequestOptions::OrHash
|
|
73
85
|
).returns(
|
|
74
86
|
EInvoiceAPI::Internal::DocumentsNumberPage[
|
|
@@ -81,6 +93,10 @@ module EInvoiceAPI
|
|
|
81
93
|
page: nil,
|
|
82
94
|
# Number of items per page
|
|
83
95
|
page_size: nil,
|
|
96
|
+
# Field to sort by
|
|
97
|
+
sort_by: nil,
|
|
98
|
+
# Sort direction (asc/desc)
|
|
99
|
+
sort_order: nil,
|
|
84
100
|
request_options: {}
|
|
85
101
|
)
|
|
86
102
|
end
|
|
@@ -3,11 +3,19 @@
|
|
|
3
3
|
module EInvoiceAPI
|
|
4
4
|
module Resources
|
|
5
5
|
class Outbox
|
|
6
|
-
# Retrieve a paginated list of draft documents with filtering options
|
|
6
|
+
# Retrieve a paginated list of draft documents with filtering options including
|
|
7
|
+
# state and text search.
|
|
7
8
|
sig do
|
|
8
9
|
params(
|
|
9
10
|
page: Integer,
|
|
10
11
|
page_size: Integer,
|
|
12
|
+
search: T.nilable(String),
|
|
13
|
+
sort_by:
|
|
14
|
+
EInvoiceAPI::OutboxListDraftDocumentsParams::SortBy::OrSymbol,
|
|
15
|
+
sort_order:
|
|
16
|
+
EInvoiceAPI::OutboxListDraftDocumentsParams::SortOrder::OrSymbol,
|
|
17
|
+
state: T.nilable(EInvoiceAPI::DocumentState::OrSymbol),
|
|
18
|
+
type: T.nilable(EInvoiceAPI::DocumentType::OrSymbol),
|
|
11
19
|
request_options: EInvoiceAPI::RequestOptions::OrHash
|
|
12
20
|
).returns(
|
|
13
21
|
EInvoiceAPI::Internal::DocumentsNumberPage[
|
|
@@ -20,6 +28,16 @@ module EInvoiceAPI
|
|
|
20
28
|
page: nil,
|
|
21
29
|
# Number of items per page
|
|
22
30
|
page_size: nil,
|
|
31
|
+
# Search in invoice number, seller/buyer names
|
|
32
|
+
search: nil,
|
|
33
|
+
# Field to sort by
|
|
34
|
+
sort_by: nil,
|
|
35
|
+
# Sort direction (asc/desc)
|
|
36
|
+
sort_order: nil,
|
|
37
|
+
# Filter by document state
|
|
38
|
+
state: nil,
|
|
39
|
+
# Filter by document type
|
|
40
|
+
type: nil,
|
|
23
41
|
request_options: {}
|
|
24
42
|
)
|
|
25
43
|
end
|
|
@@ -32,9 +50,13 @@ module EInvoiceAPI
|
|
|
32
50
|
date_to: T.nilable(Time),
|
|
33
51
|
page: Integer,
|
|
34
52
|
page_size: Integer,
|
|
53
|
+
receiver: T.nilable(String),
|
|
35
54
|
search: T.nilable(String),
|
|
36
55
|
sender: T.nilable(String),
|
|
37
|
-
|
|
56
|
+
sort_by:
|
|
57
|
+
EInvoiceAPI::OutboxListReceivedDocumentsParams::SortBy::OrSymbol,
|
|
58
|
+
sort_order:
|
|
59
|
+
EInvoiceAPI::OutboxListReceivedDocumentsParams::SortOrder::OrSymbol,
|
|
38
60
|
type: T.nilable(EInvoiceAPI::DocumentType::OrSymbol),
|
|
39
61
|
request_options: EInvoiceAPI::RequestOptions::OrHash
|
|
40
62
|
).returns(
|
|
@@ -52,13 +74,18 @@ module EInvoiceAPI
|
|
|
52
74
|
page: nil,
|
|
53
75
|
# Number of items per page
|
|
54
76
|
page_size: nil,
|
|
77
|
+
# Filter by receiver (customer_name, customer_email, customer_tax_id,
|
|
78
|
+
# customer_company_id, customer_id)
|
|
79
|
+
receiver: nil,
|
|
55
80
|
# Search in invoice number, seller/buyer names
|
|
56
81
|
search: nil,
|
|
57
|
-
# Filter by sender ID
|
|
82
|
+
# (Deprecated) Filter by sender ID
|
|
58
83
|
sender: nil,
|
|
59
|
-
#
|
|
60
|
-
|
|
61
|
-
#
|
|
84
|
+
# Field to sort by
|
|
85
|
+
sort_by: nil,
|
|
86
|
+
# Sort direction (asc/desc)
|
|
87
|
+
sort_order: nil,
|
|
88
|
+
# Filter by document type. If not provided, returns all types.
|
|
62
89
|
type: nil,
|
|
63
90
|
request_options: {}
|
|
64
91
|
)
|
|
@@ -23,6 +23,7 @@ module EInvoiceAPI
|
|
|
23
23
|
customer_email: T.nilable(String),
|
|
24
24
|
customer_id: T.nilable(String),
|
|
25
25
|
customer_name: T.nilable(String),
|
|
26
|
+
customer_peppol_id: T.nilable(String),
|
|
26
27
|
customer_tax_id: T.nilable(String),
|
|
27
28
|
direction: EInvoiceAPI::DocumentDirection::OrSymbol,
|
|
28
29
|
document_type: EInvoiceAPI::DocumentType::OrSymbol,
|
|
@@ -93,6 +94,8 @@ module EInvoiceAPI
|
|
|
93
94
|
customer_id: nil,
|
|
94
95
|
# The company name of the customer/buyer
|
|
95
96
|
customer_name: nil,
|
|
97
|
+
# Customer Peppol ID
|
|
98
|
+
customer_peppol_id: nil,
|
|
96
99
|
# Customer tax ID. For Belgium this is the VAT number. Must include the country
|
|
97
100
|
# prefix
|
|
98
101
|
customer_tax_id: nil,
|
|
@@ -15,6 +15,7 @@ module EInvoiceAPI
|
|
|
15
15
|
customer_email: String?,
|
|
16
16
|
customer_id: String?,
|
|
17
17
|
customer_name: String?,
|
|
18
|
+
customer_peppol_id: String?,
|
|
18
19
|
customer_tax_id: String?,
|
|
19
20
|
direction: EInvoiceAPI::Models::document_direction,
|
|
20
21
|
document_type: EInvoiceAPI::Models::document_type,
|
|
@@ -83,6 +84,8 @@ module EInvoiceAPI
|
|
|
83
84
|
|
|
84
85
|
attr_accessor customer_name: String?
|
|
85
86
|
|
|
87
|
+
attr_accessor customer_peppol_id: String?
|
|
88
|
+
|
|
86
89
|
attr_accessor customer_tax_id: String?
|
|
87
90
|
|
|
88
91
|
attr_reader direction: EInvoiceAPI::Models::document_direction?
|
|
@@ -187,6 +190,7 @@ module EInvoiceAPI
|
|
|
187
190
|
?customer_email: String?,
|
|
188
191
|
?customer_id: String?,
|
|
189
192
|
?customer_name: String?,
|
|
193
|
+
?customer_peppol_id: String?,
|
|
190
194
|
?customer_tax_id: String?,
|
|
191
195
|
?direction: EInvoiceAPI::Models::document_direction,
|
|
192
196
|
?document_type: EInvoiceAPI::Models::document_type,
|
|
@@ -238,6 +242,7 @@ module EInvoiceAPI
|
|
|
238
242
|
customer_email: String?,
|
|
239
243
|
customer_id: String?,
|
|
240
244
|
customer_name: String?,
|
|
245
|
+
customer_peppol_id: String?,
|
|
241
246
|
customer_tax_id: String?,
|
|
242
247
|
direction: EInvoiceAPI::Models::document_direction,
|
|
243
248
|
document_type: EInvoiceAPI::Models::document_type,
|
|
@@ -15,6 +15,7 @@ module EInvoiceAPI
|
|
|
15
15
|
customer_email: String?,
|
|
16
16
|
customer_id: String?,
|
|
17
17
|
customer_name: String?,
|
|
18
|
+
customer_peppol_id: String?,
|
|
18
19
|
customer_tax_id: String?,
|
|
19
20
|
direction: EInvoiceAPI::Models::document_direction,
|
|
20
21
|
document_type: EInvoiceAPI::Models::document_type,
|
|
@@ -84,6 +85,8 @@ module EInvoiceAPI
|
|
|
84
85
|
|
|
85
86
|
attr_accessor customer_name: String?
|
|
86
87
|
|
|
88
|
+
attr_accessor customer_peppol_id: String?
|
|
89
|
+
|
|
87
90
|
attr_accessor customer_tax_id: String?
|
|
88
91
|
|
|
89
92
|
attr_reader direction: EInvoiceAPI::Models::document_direction?
|
|
@@ -192,6 +195,7 @@ module EInvoiceAPI
|
|
|
192
195
|
?customer_email: String?,
|
|
193
196
|
?customer_id: String?,
|
|
194
197
|
?customer_name: String?,
|
|
198
|
+
?customer_peppol_id: String?,
|
|
195
199
|
?customer_tax_id: String?,
|
|
196
200
|
?direction: EInvoiceAPI::Models::document_direction,
|
|
197
201
|
?document_type: EInvoiceAPI::Models::document_type,
|
|
@@ -244,6 +248,7 @@ module EInvoiceAPI
|
|
|
244
248
|
customer_email: String?,
|
|
245
249
|
customer_id: String?,
|
|
246
250
|
customer_name: String?,
|
|
251
|
+
customer_peppol_id: String?,
|
|
247
252
|
customer_tax_id: String?,
|
|
248
253
|
direction: EInvoiceAPI::Models::document_direction,
|
|
249
254
|
document_type: EInvoiceAPI::Models::document_type,
|
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
module EInvoiceAPI
|
|
2
2
|
module Models
|
|
3
3
|
type document_create_params =
|
|
4
|
-
{
|
|
4
|
+
{ construct_pdf: bool } & EInvoiceAPI::Internal::Type::request_parameters
|
|
5
5
|
|
|
6
6
|
class DocumentCreateParams < EInvoiceAPI::Models::DocumentCreate
|
|
7
7
|
extend EInvoiceAPI::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include EInvoiceAPI::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
-
def
|
|
10
|
+
def construct_pdf: -> bool?
|
|
11
11
|
|
|
12
|
-
def
|
|
12
|
+
def construct_pdf=: (bool _) -> bool
|
|
13
|
+
|
|
14
|
+
def initialize: (
|
|
15
|
+
?construct_pdf: bool,
|
|
16
|
+
?request_options: EInvoiceAPI::request_opts
|
|
17
|
+
) -> void
|
|
18
|
+
|
|
19
|
+
def to_hash: -> {
|
|
20
|
+
construct_pdf: bool,
|
|
21
|
+
request_options: EInvoiceAPI::RequestOptions
|
|
22
|
+
}
|
|
13
23
|
end
|
|
14
24
|
end
|
|
15
25
|
end
|
|
@@ -3,6 +3,7 @@ module EInvoiceAPI
|
|
|
3
3
|
type document_response =
|
|
4
4
|
{
|
|
5
5
|
id: String,
|
|
6
|
+
created_at: Time,
|
|
6
7
|
allowances: ::Array[EInvoiceAPI::DocumentResponse::Allowance]?,
|
|
7
8
|
amount_due: String?,
|
|
8
9
|
attachments: ::Array[EInvoiceAPI::Documents::DocumentAttachment]?,
|
|
@@ -16,6 +17,7 @@ module EInvoiceAPI
|
|
|
16
17
|
customer_email: String?,
|
|
17
18
|
customer_id: String?,
|
|
18
19
|
customer_name: String?,
|
|
20
|
+
customer_peppol_id: String?,
|
|
19
21
|
customer_tax_id: String?,
|
|
20
22
|
direction: EInvoiceAPI::Models::document_direction,
|
|
21
23
|
document_type: EInvoiceAPI::Models::document_type,
|
|
@@ -55,6 +57,8 @@ module EInvoiceAPI
|
|
|
55
57
|
class DocumentResponse < EInvoiceAPI::Internal::Type::BaseModel
|
|
56
58
|
attr_accessor id: String
|
|
57
59
|
|
|
60
|
+
attr_accessor created_at: Time
|
|
61
|
+
|
|
58
62
|
attr_accessor allowances: ::Array[EInvoiceAPI::DocumentResponse::Allowance]?
|
|
59
63
|
|
|
60
64
|
attr_accessor amount_due: String?
|
|
@@ -85,6 +89,8 @@ module EInvoiceAPI
|
|
|
85
89
|
|
|
86
90
|
attr_accessor customer_name: String?
|
|
87
91
|
|
|
92
|
+
attr_accessor customer_peppol_id: String?
|
|
93
|
+
|
|
88
94
|
attr_accessor customer_tax_id: String?
|
|
89
95
|
|
|
90
96
|
attr_reader direction: EInvoiceAPI::Models::document_direction?
|
|
@@ -171,6 +177,7 @@ module EInvoiceAPI
|
|
|
171
177
|
|
|
172
178
|
def initialize: (
|
|
173
179
|
id: String,
|
|
180
|
+
created_at: Time,
|
|
174
181
|
?allowances: ::Array[EInvoiceAPI::DocumentResponse::Allowance]?,
|
|
175
182
|
?amount_due: String?,
|
|
176
183
|
?attachments: ::Array[EInvoiceAPI::Documents::DocumentAttachment]?,
|
|
@@ -184,6 +191,7 @@ module EInvoiceAPI
|
|
|
184
191
|
?customer_email: String?,
|
|
185
192
|
?customer_id: String?,
|
|
186
193
|
?customer_name: String?,
|
|
194
|
+
?customer_peppol_id: String?,
|
|
187
195
|
?customer_tax_id: String?,
|
|
188
196
|
?direction: EInvoiceAPI::Models::document_direction,
|
|
189
197
|
?document_type: EInvoiceAPI::Models::document_type,
|
|
@@ -222,6 +230,7 @@ module EInvoiceAPI
|
|
|
222
230
|
|
|
223
231
|
def to_hash: -> {
|
|
224
232
|
id: String,
|
|
233
|
+
created_at: Time,
|
|
225
234
|
allowances: ::Array[EInvoiceAPI::DocumentResponse::Allowance]?,
|
|
226
235
|
amount_due: String?,
|
|
227
236
|
attachments: ::Array[EInvoiceAPI::Documents::DocumentAttachment]?,
|
|
@@ -235,6 +244,7 @@ module EInvoiceAPI
|
|
|
235
244
|
customer_email: String?,
|
|
236
245
|
customer_id: String?,
|
|
237
246
|
customer_name: String?,
|
|
247
|
+
customer_peppol_id: String?,
|
|
238
248
|
customer_tax_id: String?,
|
|
239
249
|
direction: EInvoiceAPI::Models::document_direction,
|
|
240
250
|
document_type: EInvoiceAPI::Models::document_type,
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
module EInvoiceAPI
|
|
2
2
|
module Models
|
|
3
|
-
type document_type =
|
|
3
|
+
type document_type =
|
|
4
|
+
:INVOICE
|
|
5
|
+
| :CREDIT_NOTE
|
|
6
|
+
| :DEBIT_NOTE
|
|
7
|
+
| :SELFBILLING_INVOICE
|
|
8
|
+
| :SELFBILLING_CREDIT_NOTE
|
|
4
9
|
|
|
5
10
|
module DocumentType
|
|
6
11
|
extend EInvoiceAPI::Internal::Type::Enum
|
|
@@ -8,6 +13,8 @@ module EInvoiceAPI
|
|
|
8
13
|
INVOICE: :INVOICE
|
|
9
14
|
CREDIT_NOTE: :CREDIT_NOTE
|
|
10
15
|
DEBIT_NOTE: :DEBIT_NOTE
|
|
16
|
+
SELFBILLING_INVOICE: :SELFBILLING_INVOICE
|
|
17
|
+
SELFBILLING_CREDIT_NOTE: :SELFBILLING_CREDIT_NOTE
|
|
11
18
|
|
|
12
19
|
def self?.values: -> ::Array[EInvoiceAPI::Models::document_type]
|
|
13
20
|
end
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
module EInvoiceAPI
|
|
2
2
|
module Models
|
|
3
3
|
type inbox_list_credit_notes_params =
|
|
4
|
-
{
|
|
4
|
+
{
|
|
5
|
+
page: Integer,
|
|
6
|
+
page_size: Integer,
|
|
7
|
+
sort_by: EInvoiceAPI::Models::InboxListCreditNotesParams::sort_by,
|
|
8
|
+
sort_order: EInvoiceAPI::Models::InboxListCreditNotesParams::sort_order
|
|
9
|
+
}
|
|
5
10
|
& EInvoiceAPI::Internal::Type::request_parameters
|
|
6
11
|
|
|
7
12
|
class InboxListCreditNotesParams < EInvoiceAPI::Internal::Type::BaseModel
|
|
@@ -16,17 +21,67 @@ module EInvoiceAPI
|
|
|
16
21
|
|
|
17
22
|
def page_size=: (Integer) -> Integer
|
|
18
23
|
|
|
24
|
+
attr_reader sort_by: EInvoiceAPI::Models::InboxListCreditNotesParams::sort_by?
|
|
25
|
+
|
|
26
|
+
def sort_by=: (
|
|
27
|
+
EInvoiceAPI::Models::InboxListCreditNotesParams::sort_by
|
|
28
|
+
) -> EInvoiceAPI::Models::InboxListCreditNotesParams::sort_by
|
|
29
|
+
|
|
30
|
+
attr_reader sort_order: EInvoiceAPI::Models::InboxListCreditNotesParams::sort_order?
|
|
31
|
+
|
|
32
|
+
def sort_order=: (
|
|
33
|
+
EInvoiceAPI::Models::InboxListCreditNotesParams::sort_order
|
|
34
|
+
) -> EInvoiceAPI::Models::InboxListCreditNotesParams::sort_order
|
|
35
|
+
|
|
19
36
|
def initialize: (
|
|
20
37
|
?page: Integer,
|
|
21
38
|
?page_size: Integer,
|
|
39
|
+
?sort_by: EInvoiceAPI::Models::InboxListCreditNotesParams::sort_by,
|
|
40
|
+
?sort_order: EInvoiceAPI::Models::InboxListCreditNotesParams::sort_order,
|
|
22
41
|
?request_options: EInvoiceAPI::request_opts
|
|
23
42
|
) -> void
|
|
24
43
|
|
|
25
44
|
def to_hash: -> {
|
|
26
45
|
page: Integer,
|
|
27
46
|
page_size: Integer,
|
|
47
|
+
sort_by: EInvoiceAPI::Models::InboxListCreditNotesParams::sort_by,
|
|
48
|
+
sort_order: EInvoiceAPI::Models::InboxListCreditNotesParams::sort_order,
|
|
28
49
|
request_options: EInvoiceAPI::RequestOptions
|
|
29
50
|
}
|
|
51
|
+
|
|
52
|
+
type sort_by =
|
|
53
|
+
:created_at
|
|
54
|
+
| :invoice_date
|
|
55
|
+
| :due_date
|
|
56
|
+
| :invoice_total
|
|
57
|
+
| :customer_name
|
|
58
|
+
| :vendor_name
|
|
59
|
+
| :invoice_id
|
|
60
|
+
|
|
61
|
+
module SortBy
|
|
62
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
63
|
+
|
|
64
|
+
CREATED_AT: :created_at
|
|
65
|
+
INVOICE_DATE: :invoice_date
|
|
66
|
+
DUE_DATE: :due_date
|
|
67
|
+
INVOICE_TOTAL: :invoice_total
|
|
68
|
+
CUSTOMER_NAME: :customer_name
|
|
69
|
+
VENDOR_NAME: :vendor_name
|
|
70
|
+
INVOICE_ID: :invoice_id
|
|
71
|
+
|
|
72
|
+
def self?.values: -> ::Array[EInvoiceAPI::Models::InboxListCreditNotesParams::sort_by]
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
type sort_order = :asc | :desc
|
|
76
|
+
|
|
77
|
+
module SortOrder
|
|
78
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
79
|
+
|
|
80
|
+
ASC: :asc
|
|
81
|
+
DESC: :desc
|
|
82
|
+
|
|
83
|
+
def self?.values: -> ::Array[EInvoiceAPI::Models::InboxListCreditNotesParams::sort_order]
|
|
84
|
+
end
|
|
30
85
|
end
|
|
31
86
|
end
|
|
32
87
|
end
|