e-invoice-api 0.16.2 → 0.18.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 +33 -0
- data/README.md +10 -1
- data/lib/e_invoice_api/models/document_response.rb +8 -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 +46 -3
- data/lib/e_invoice_api/models/lookup_retrieve_response.rb +17 -1
- 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 +60 -3
- 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 +3 -3
- data/lib/e_invoice_api/resources/inbox.rb +16 -4
- data/lib/e_invoice_api/resources/outbox.rb +24 -4
- data/lib/e_invoice_api/version.rb +1 -1
- data/rbi/e_invoice_api/models/document_response.rbi +6 -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 +99 -2
- data/rbi/e_invoice_api/models/lookup_retrieve_response.rbi +19 -3
- 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 +155 -2
- 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 +3 -3
- data/rbi/e_invoice_api/resources/inbox.rbi +20 -1
- data/rbi/e_invoice_api/resources/outbox.rbi +32 -2
- data/sig/e_invoice_api/models/document_response.rbs +5 -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 +52 -0
- data/sig/e_invoice_api/models/lookup_retrieve_response.rbs +13 -3
- 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 +57 -0
- data/sig/e_invoice_api/models/paginated_document_response.rbs +5 -0
- data/sig/e_invoice_api/resources/inbox.rbs +6 -0
- data/sig/e_invoice_api/resources/outbox.rbs +8 -0
- metadata +16 -2
|
@@ -28,10 +28,64 @@ module EInvoiceAPI
|
|
|
28
28
|
sig { params(page_size: Integer).void }
|
|
29
29
|
attr_writer :page_size
|
|
30
30
|
|
|
31
|
+
# Search in invoice number, seller/buyer names
|
|
32
|
+
sig { returns(T.nilable(String)) }
|
|
33
|
+
attr_accessor :search
|
|
34
|
+
|
|
35
|
+
# Field to sort by
|
|
36
|
+
sig do
|
|
37
|
+
returns(
|
|
38
|
+
T.nilable(
|
|
39
|
+
EInvoiceAPI::OutboxListDraftDocumentsParams::SortBy::OrSymbol
|
|
40
|
+
)
|
|
41
|
+
)
|
|
42
|
+
end
|
|
43
|
+
attr_reader :sort_by
|
|
44
|
+
|
|
45
|
+
sig do
|
|
46
|
+
params(
|
|
47
|
+
sort_by: EInvoiceAPI::OutboxListDraftDocumentsParams::SortBy::OrSymbol
|
|
48
|
+
).void
|
|
49
|
+
end
|
|
50
|
+
attr_writer :sort_by
|
|
51
|
+
|
|
52
|
+
# Sort direction (asc/desc)
|
|
53
|
+
sig do
|
|
54
|
+
returns(
|
|
55
|
+
T.nilable(
|
|
56
|
+
EInvoiceAPI::OutboxListDraftDocumentsParams::SortOrder::OrSymbol
|
|
57
|
+
)
|
|
58
|
+
)
|
|
59
|
+
end
|
|
60
|
+
attr_reader :sort_order
|
|
61
|
+
|
|
62
|
+
sig do
|
|
63
|
+
params(
|
|
64
|
+
sort_order:
|
|
65
|
+
EInvoiceAPI::OutboxListDraftDocumentsParams::SortOrder::OrSymbol
|
|
66
|
+
).void
|
|
67
|
+
end
|
|
68
|
+
attr_writer :sort_order
|
|
69
|
+
|
|
70
|
+
# Filter by document state
|
|
71
|
+
sig { returns(T.nilable(EInvoiceAPI::DocumentState::OrSymbol)) }
|
|
72
|
+
attr_accessor :state
|
|
73
|
+
|
|
74
|
+
# Filter by document type
|
|
75
|
+
sig { returns(T.nilable(EInvoiceAPI::DocumentType::OrSymbol)) }
|
|
76
|
+
attr_accessor :type
|
|
77
|
+
|
|
31
78
|
sig do
|
|
32
79
|
params(
|
|
33
80
|
page: Integer,
|
|
34
81
|
page_size: Integer,
|
|
82
|
+
search: T.nilable(String),
|
|
83
|
+
sort_by:
|
|
84
|
+
EInvoiceAPI::OutboxListDraftDocumentsParams::SortBy::OrSymbol,
|
|
85
|
+
sort_order:
|
|
86
|
+
EInvoiceAPI::OutboxListDraftDocumentsParams::SortOrder::OrSymbol,
|
|
87
|
+
state: T.nilable(EInvoiceAPI::DocumentState::OrSymbol),
|
|
88
|
+
type: T.nilable(EInvoiceAPI::DocumentType::OrSymbol),
|
|
35
89
|
request_options: EInvoiceAPI::RequestOptions::OrHash
|
|
36
90
|
).returns(T.attached_class)
|
|
37
91
|
end
|
|
@@ -40,6 +94,16 @@ module EInvoiceAPI
|
|
|
40
94
|
page: nil,
|
|
41
95
|
# Number of items per page
|
|
42
96
|
page_size: nil,
|
|
97
|
+
# Search in invoice number, seller/buyer names
|
|
98
|
+
search: nil,
|
|
99
|
+
# Field to sort by
|
|
100
|
+
sort_by: nil,
|
|
101
|
+
# Sort direction (asc/desc)
|
|
102
|
+
sort_order: nil,
|
|
103
|
+
# Filter by document state
|
|
104
|
+
state: nil,
|
|
105
|
+
# Filter by document type
|
|
106
|
+
type: nil,
|
|
43
107
|
request_options: {}
|
|
44
108
|
)
|
|
45
109
|
end
|
|
@@ -49,12 +113,111 @@ module EInvoiceAPI
|
|
|
49
113
|
{
|
|
50
114
|
page: Integer,
|
|
51
115
|
page_size: Integer,
|
|
116
|
+
search: T.nilable(String),
|
|
117
|
+
sort_by:
|
|
118
|
+
EInvoiceAPI::OutboxListDraftDocumentsParams::SortBy::OrSymbol,
|
|
119
|
+
sort_order:
|
|
120
|
+
EInvoiceAPI::OutboxListDraftDocumentsParams::SortOrder::OrSymbol,
|
|
121
|
+
state: T.nilable(EInvoiceAPI::DocumentState::OrSymbol),
|
|
122
|
+
type: T.nilable(EInvoiceAPI::DocumentType::OrSymbol),
|
|
52
123
|
request_options: EInvoiceAPI::RequestOptions
|
|
53
124
|
}
|
|
54
125
|
)
|
|
55
126
|
end
|
|
56
127
|
def to_hash
|
|
57
128
|
end
|
|
129
|
+
|
|
130
|
+
# Field to sort by
|
|
131
|
+
module SortBy
|
|
132
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
133
|
+
|
|
134
|
+
TaggedSymbol =
|
|
135
|
+
T.type_alias do
|
|
136
|
+
T.all(Symbol, EInvoiceAPI::OutboxListDraftDocumentsParams::SortBy)
|
|
137
|
+
end
|
|
138
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
139
|
+
|
|
140
|
+
CREATED_AT =
|
|
141
|
+
T.let(
|
|
142
|
+
:created_at,
|
|
143
|
+
EInvoiceAPI::OutboxListDraftDocumentsParams::SortBy::TaggedSymbol
|
|
144
|
+
)
|
|
145
|
+
INVOICE_DATE =
|
|
146
|
+
T.let(
|
|
147
|
+
:invoice_date,
|
|
148
|
+
EInvoiceAPI::OutboxListDraftDocumentsParams::SortBy::TaggedSymbol
|
|
149
|
+
)
|
|
150
|
+
DUE_DATE =
|
|
151
|
+
T.let(
|
|
152
|
+
:due_date,
|
|
153
|
+
EInvoiceAPI::OutboxListDraftDocumentsParams::SortBy::TaggedSymbol
|
|
154
|
+
)
|
|
155
|
+
INVOICE_TOTAL =
|
|
156
|
+
T.let(
|
|
157
|
+
:invoice_total,
|
|
158
|
+
EInvoiceAPI::OutboxListDraftDocumentsParams::SortBy::TaggedSymbol
|
|
159
|
+
)
|
|
160
|
+
CUSTOMER_NAME =
|
|
161
|
+
T.let(
|
|
162
|
+
:customer_name,
|
|
163
|
+
EInvoiceAPI::OutboxListDraftDocumentsParams::SortBy::TaggedSymbol
|
|
164
|
+
)
|
|
165
|
+
VENDOR_NAME =
|
|
166
|
+
T.let(
|
|
167
|
+
:vendor_name,
|
|
168
|
+
EInvoiceAPI::OutboxListDraftDocumentsParams::SortBy::TaggedSymbol
|
|
169
|
+
)
|
|
170
|
+
INVOICE_ID =
|
|
171
|
+
T.let(
|
|
172
|
+
:invoice_id,
|
|
173
|
+
EInvoiceAPI::OutboxListDraftDocumentsParams::SortBy::TaggedSymbol
|
|
174
|
+
)
|
|
175
|
+
|
|
176
|
+
sig do
|
|
177
|
+
override.returns(
|
|
178
|
+
T::Array[
|
|
179
|
+
EInvoiceAPI::OutboxListDraftDocumentsParams::SortBy::TaggedSymbol
|
|
180
|
+
]
|
|
181
|
+
)
|
|
182
|
+
end
|
|
183
|
+
def self.values
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Sort direction (asc/desc)
|
|
188
|
+
module SortOrder
|
|
189
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
190
|
+
|
|
191
|
+
TaggedSymbol =
|
|
192
|
+
T.type_alias do
|
|
193
|
+
T.all(
|
|
194
|
+
Symbol,
|
|
195
|
+
EInvoiceAPI::OutboxListDraftDocumentsParams::SortOrder
|
|
196
|
+
)
|
|
197
|
+
end
|
|
198
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
199
|
+
|
|
200
|
+
ASC =
|
|
201
|
+
T.let(
|
|
202
|
+
:asc,
|
|
203
|
+
EInvoiceAPI::OutboxListDraftDocumentsParams::SortOrder::TaggedSymbol
|
|
204
|
+
)
|
|
205
|
+
DESC =
|
|
206
|
+
T.let(
|
|
207
|
+
:desc,
|
|
208
|
+
EInvoiceAPI::OutboxListDraftDocumentsParams::SortOrder::TaggedSymbol
|
|
209
|
+
)
|
|
210
|
+
|
|
211
|
+
sig do
|
|
212
|
+
override.returns(
|
|
213
|
+
T::Array[
|
|
214
|
+
EInvoiceAPI::OutboxListDraftDocumentsParams::SortOrder::TaggedSymbol
|
|
215
|
+
]
|
|
216
|
+
)
|
|
217
|
+
end
|
|
218
|
+
def self.values
|
|
219
|
+
end
|
|
220
|
+
end
|
|
58
221
|
end
|
|
59
222
|
end
|
|
60
223
|
end
|
|
@@ -36,14 +36,55 @@ module EInvoiceAPI
|
|
|
36
36
|
sig { params(page_size: Integer).void }
|
|
37
37
|
attr_writer :page_size
|
|
38
38
|
|
|
39
|
+
# Filter by receiver (customer_name, customer_email, customer_tax_id,
|
|
40
|
+
# customer_company_id, customer_id)
|
|
41
|
+
sig { returns(T.nilable(String)) }
|
|
42
|
+
attr_accessor :receiver
|
|
43
|
+
|
|
39
44
|
# Search in invoice number, seller/buyer names
|
|
40
45
|
sig { returns(T.nilable(String)) }
|
|
41
46
|
attr_accessor :search
|
|
42
47
|
|
|
43
|
-
# Filter by sender ID
|
|
48
|
+
# (Deprecated) Filter by sender ID
|
|
44
49
|
sig { returns(T.nilable(String)) }
|
|
45
50
|
attr_accessor :sender
|
|
46
51
|
|
|
52
|
+
# Field to sort by
|
|
53
|
+
sig do
|
|
54
|
+
returns(
|
|
55
|
+
T.nilable(
|
|
56
|
+
EInvoiceAPI::OutboxListReceivedDocumentsParams::SortBy::OrSymbol
|
|
57
|
+
)
|
|
58
|
+
)
|
|
59
|
+
end
|
|
60
|
+
attr_reader :sort_by
|
|
61
|
+
|
|
62
|
+
sig do
|
|
63
|
+
params(
|
|
64
|
+
sort_by:
|
|
65
|
+
EInvoiceAPI::OutboxListReceivedDocumentsParams::SortBy::OrSymbol
|
|
66
|
+
).void
|
|
67
|
+
end
|
|
68
|
+
attr_writer :sort_by
|
|
69
|
+
|
|
70
|
+
# Sort direction (asc/desc)
|
|
71
|
+
sig do
|
|
72
|
+
returns(
|
|
73
|
+
T.nilable(
|
|
74
|
+
EInvoiceAPI::OutboxListReceivedDocumentsParams::SortOrder::OrSymbol
|
|
75
|
+
)
|
|
76
|
+
)
|
|
77
|
+
end
|
|
78
|
+
attr_reader :sort_order
|
|
79
|
+
|
|
80
|
+
sig do
|
|
81
|
+
params(
|
|
82
|
+
sort_order:
|
|
83
|
+
EInvoiceAPI::OutboxListReceivedDocumentsParams::SortOrder::OrSymbol
|
|
84
|
+
).void
|
|
85
|
+
end
|
|
86
|
+
attr_writer :sort_order
|
|
87
|
+
|
|
47
88
|
# Filter by document state
|
|
48
89
|
sig { returns(T.nilable(EInvoiceAPI::DocumentState::OrSymbol)) }
|
|
49
90
|
attr_accessor :state
|
|
@@ -58,8 +99,13 @@ module EInvoiceAPI
|
|
|
58
99
|
date_to: T.nilable(Time),
|
|
59
100
|
page: Integer,
|
|
60
101
|
page_size: Integer,
|
|
102
|
+
receiver: T.nilable(String),
|
|
61
103
|
search: T.nilable(String),
|
|
62
104
|
sender: T.nilable(String),
|
|
105
|
+
sort_by:
|
|
106
|
+
EInvoiceAPI::OutboxListReceivedDocumentsParams::SortBy::OrSymbol,
|
|
107
|
+
sort_order:
|
|
108
|
+
EInvoiceAPI::OutboxListReceivedDocumentsParams::SortOrder::OrSymbol,
|
|
63
109
|
state: T.nilable(EInvoiceAPI::DocumentState::OrSymbol),
|
|
64
110
|
type: T.nilable(EInvoiceAPI::DocumentType::OrSymbol),
|
|
65
111
|
request_options: EInvoiceAPI::RequestOptions::OrHash
|
|
@@ -74,10 +120,17 @@ module EInvoiceAPI
|
|
|
74
120
|
page: nil,
|
|
75
121
|
# Number of items per page
|
|
76
122
|
page_size: nil,
|
|
123
|
+
# Filter by receiver (customer_name, customer_email, customer_tax_id,
|
|
124
|
+
# customer_company_id, customer_id)
|
|
125
|
+
receiver: nil,
|
|
77
126
|
# Search in invoice number, seller/buyer names
|
|
78
127
|
search: nil,
|
|
79
|
-
# Filter by sender ID
|
|
128
|
+
# (Deprecated) Filter by sender ID
|
|
80
129
|
sender: nil,
|
|
130
|
+
# Field to sort by
|
|
131
|
+
sort_by: nil,
|
|
132
|
+
# Sort direction (asc/desc)
|
|
133
|
+
sort_order: nil,
|
|
81
134
|
# Filter by document state
|
|
82
135
|
state: nil,
|
|
83
136
|
# Filter by document type
|
|
@@ -93,8 +146,13 @@ module EInvoiceAPI
|
|
|
93
146
|
date_to: T.nilable(Time),
|
|
94
147
|
page: Integer,
|
|
95
148
|
page_size: Integer,
|
|
149
|
+
receiver: T.nilable(String),
|
|
96
150
|
search: T.nilable(String),
|
|
97
151
|
sender: T.nilable(String),
|
|
152
|
+
sort_by:
|
|
153
|
+
EInvoiceAPI::OutboxListReceivedDocumentsParams::SortBy::OrSymbol,
|
|
154
|
+
sort_order:
|
|
155
|
+
EInvoiceAPI::OutboxListReceivedDocumentsParams::SortOrder::OrSymbol,
|
|
98
156
|
state: T.nilable(EInvoiceAPI::DocumentState::OrSymbol),
|
|
99
157
|
type: T.nilable(EInvoiceAPI::DocumentType::OrSymbol),
|
|
100
158
|
request_options: EInvoiceAPI::RequestOptions
|
|
@@ -103,6 +161,101 @@ module EInvoiceAPI
|
|
|
103
161
|
end
|
|
104
162
|
def to_hash
|
|
105
163
|
end
|
|
164
|
+
|
|
165
|
+
# Field to sort by
|
|
166
|
+
module SortBy
|
|
167
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
168
|
+
|
|
169
|
+
TaggedSymbol =
|
|
170
|
+
T.type_alias do
|
|
171
|
+
T.all(
|
|
172
|
+
Symbol,
|
|
173
|
+
EInvoiceAPI::OutboxListReceivedDocumentsParams::SortBy
|
|
174
|
+
)
|
|
175
|
+
end
|
|
176
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
177
|
+
|
|
178
|
+
CREATED_AT =
|
|
179
|
+
T.let(
|
|
180
|
+
:created_at,
|
|
181
|
+
EInvoiceAPI::OutboxListReceivedDocumentsParams::SortBy::TaggedSymbol
|
|
182
|
+
)
|
|
183
|
+
INVOICE_DATE =
|
|
184
|
+
T.let(
|
|
185
|
+
:invoice_date,
|
|
186
|
+
EInvoiceAPI::OutboxListReceivedDocumentsParams::SortBy::TaggedSymbol
|
|
187
|
+
)
|
|
188
|
+
DUE_DATE =
|
|
189
|
+
T.let(
|
|
190
|
+
:due_date,
|
|
191
|
+
EInvoiceAPI::OutboxListReceivedDocumentsParams::SortBy::TaggedSymbol
|
|
192
|
+
)
|
|
193
|
+
INVOICE_TOTAL =
|
|
194
|
+
T.let(
|
|
195
|
+
:invoice_total,
|
|
196
|
+
EInvoiceAPI::OutboxListReceivedDocumentsParams::SortBy::TaggedSymbol
|
|
197
|
+
)
|
|
198
|
+
CUSTOMER_NAME =
|
|
199
|
+
T.let(
|
|
200
|
+
:customer_name,
|
|
201
|
+
EInvoiceAPI::OutboxListReceivedDocumentsParams::SortBy::TaggedSymbol
|
|
202
|
+
)
|
|
203
|
+
VENDOR_NAME =
|
|
204
|
+
T.let(
|
|
205
|
+
:vendor_name,
|
|
206
|
+
EInvoiceAPI::OutboxListReceivedDocumentsParams::SortBy::TaggedSymbol
|
|
207
|
+
)
|
|
208
|
+
INVOICE_ID =
|
|
209
|
+
T.let(
|
|
210
|
+
:invoice_id,
|
|
211
|
+
EInvoiceAPI::OutboxListReceivedDocumentsParams::SortBy::TaggedSymbol
|
|
212
|
+
)
|
|
213
|
+
|
|
214
|
+
sig do
|
|
215
|
+
override.returns(
|
|
216
|
+
T::Array[
|
|
217
|
+
EInvoiceAPI::OutboxListReceivedDocumentsParams::SortBy::TaggedSymbol
|
|
218
|
+
]
|
|
219
|
+
)
|
|
220
|
+
end
|
|
221
|
+
def self.values
|
|
222
|
+
end
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# Sort direction (asc/desc)
|
|
226
|
+
module SortOrder
|
|
227
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
228
|
+
|
|
229
|
+
TaggedSymbol =
|
|
230
|
+
T.type_alias do
|
|
231
|
+
T.all(
|
|
232
|
+
Symbol,
|
|
233
|
+
EInvoiceAPI::OutboxListReceivedDocumentsParams::SortOrder
|
|
234
|
+
)
|
|
235
|
+
end
|
|
236
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
237
|
+
|
|
238
|
+
ASC =
|
|
239
|
+
T.let(
|
|
240
|
+
:asc,
|
|
241
|
+
EInvoiceAPI::OutboxListReceivedDocumentsParams::SortOrder::TaggedSymbol
|
|
242
|
+
)
|
|
243
|
+
DESC =
|
|
244
|
+
T.let(
|
|
245
|
+
:desc,
|
|
246
|
+
EInvoiceAPI::OutboxListReceivedDocumentsParams::SortOrder::TaggedSymbol
|
|
247
|
+
)
|
|
248
|
+
|
|
249
|
+
sig do
|
|
250
|
+
override.returns(
|
|
251
|
+
T::Array[
|
|
252
|
+
EInvoiceAPI::OutboxListReceivedDocumentsParams::SortOrder::TaggedSymbol
|
|
253
|
+
]
|
|
254
|
+
)
|
|
255
|
+
end
|
|
256
|
+
def self.values
|
|
257
|
+
end
|
|
258
|
+
end
|
|
106
259
|
end
|
|
107
260
|
end
|
|
108
261
|
end
|
|
@@ -11,6 +11,9 @@ module EInvoiceAPI
|
|
|
11
11
|
)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
sig { returns(T::Boolean) }
|
|
15
|
+
attr_accessor :has_next_page
|
|
16
|
+
|
|
14
17
|
sig { returns(T::Array[EInvoiceAPI::DocumentResponse]) }
|
|
15
18
|
attr_accessor :items
|
|
16
19
|
|
|
@@ -28,6 +31,7 @@ module EInvoiceAPI
|
|
|
28
31
|
|
|
29
32
|
sig do
|
|
30
33
|
params(
|
|
34
|
+
has_next_page: T::Boolean,
|
|
31
35
|
items: T::Array[EInvoiceAPI::DocumentResponse::OrHash],
|
|
32
36
|
page: Integer,
|
|
33
37
|
page_size: Integer,
|
|
@@ -35,12 +39,13 @@ module EInvoiceAPI
|
|
|
35
39
|
total: Integer
|
|
36
40
|
).returns(T.attached_class)
|
|
37
41
|
end
|
|
38
|
-
def self.new(items:, page:, page_size:, pages:, total:)
|
|
42
|
+
def self.new(has_next_page:, items:, page:, page_size:, pages:, total:)
|
|
39
43
|
end
|
|
40
44
|
|
|
41
45
|
sig do
|
|
42
46
|
override.returns(
|
|
43
47
|
{
|
|
48
|
+
has_next_page: T::Boolean,
|
|
44
49
|
items: T::Array[EInvoiceAPI::DocumentResponse],
|
|
45
50
|
page: Integer,
|
|
46
51
|
page_size: Integer,
|
|
@@ -37,8 +37,10 @@ module EInvoiceAPI
|
|
|
37
37
|
def delete(attachment_id, document_id:, request_options: {})
|
|
38
38
|
end
|
|
39
39
|
|
|
40
|
-
# Add one or more attachments
|
|
41
|
-
#
|
|
40
|
+
# Add one or more attachments to an invoice. Be careful: the attachments ARE NOT
|
|
41
|
+
# ADDED to the UBL! They are only stored in our database and can be downloaded
|
|
42
|
+
# later. To add attachments to the UBL, you need to add the attachment(s) via POST
|
|
43
|
+
# /api/documents
|
|
42
44
|
sig do
|
|
43
45
|
params(
|
|
44
46
|
document_id: String,
|
|
@@ -218,11 +218,11 @@ module EInvoiceAPI
|
|
|
218
218
|
).returns(EInvoiceAPI::Models::DocumentCreateFromPdfResponse)
|
|
219
219
|
end
|
|
220
220
|
def create_from_pdf(
|
|
221
|
-
# Body param
|
|
221
|
+
# Body param
|
|
222
222
|
file:,
|
|
223
|
-
# Query param
|
|
223
|
+
# Query param
|
|
224
224
|
customer_tax_id: nil,
|
|
225
|
-
# Query param
|
|
225
|
+
# Query param
|
|
226
226
|
vendor_tax_id: nil,
|
|
227
227
|
request_options: {}
|
|
228
228
|
)
|
|
@@ -13,6 +13,8 @@ module EInvoiceAPI
|
|
|
13
13
|
page_size: Integer,
|
|
14
14
|
search: T.nilable(String),
|
|
15
15
|
sender: T.nilable(String),
|
|
16
|
+
sort_by: EInvoiceAPI::InboxListParams::SortBy::OrSymbol,
|
|
17
|
+
sort_order: EInvoiceAPI::InboxListParams::SortOrder::OrSymbol,
|
|
16
18
|
state: T.nilable(EInvoiceAPI::DocumentState::OrSymbol),
|
|
17
19
|
type: T.nilable(EInvoiceAPI::DocumentType::OrSymbol),
|
|
18
20
|
request_options: EInvoiceAPI::RequestOptions::OrHash
|
|
@@ -33,8 +35,12 @@ module EInvoiceAPI
|
|
|
33
35
|
page_size: nil,
|
|
34
36
|
# Search in invoice number, seller/buyer names
|
|
35
37
|
search: nil,
|
|
36
|
-
# Filter by sender
|
|
38
|
+
# Filter by sender (vendor_name, vendor_email, vendor_tax_id, vendor_company_id)
|
|
37
39
|
sender: nil,
|
|
40
|
+
# Field to sort by
|
|
41
|
+
sort_by: nil,
|
|
42
|
+
# Sort direction (asc/desc)
|
|
43
|
+
sort_order: nil,
|
|
38
44
|
# Filter by document state
|
|
39
45
|
state: nil,
|
|
40
46
|
# Filter by document type
|
|
@@ -48,6 +54,9 @@ module EInvoiceAPI
|
|
|
48
54
|
params(
|
|
49
55
|
page: Integer,
|
|
50
56
|
page_size: Integer,
|
|
57
|
+
sort_by: EInvoiceAPI::InboxListCreditNotesParams::SortBy::OrSymbol,
|
|
58
|
+
sort_order:
|
|
59
|
+
EInvoiceAPI::InboxListCreditNotesParams::SortOrder::OrSymbol,
|
|
51
60
|
request_options: EInvoiceAPI::RequestOptions::OrHash
|
|
52
61
|
).returns(
|
|
53
62
|
EInvoiceAPI::Internal::DocumentsNumberPage[
|
|
@@ -60,6 +69,10 @@ module EInvoiceAPI
|
|
|
60
69
|
page: nil,
|
|
61
70
|
# Number of items per page
|
|
62
71
|
page_size: nil,
|
|
72
|
+
# Field to sort by
|
|
73
|
+
sort_by: nil,
|
|
74
|
+
# Sort direction (asc/desc)
|
|
75
|
+
sort_order: nil,
|
|
63
76
|
request_options: {}
|
|
64
77
|
)
|
|
65
78
|
end
|
|
@@ -69,6 +82,8 @@ module EInvoiceAPI
|
|
|
69
82
|
params(
|
|
70
83
|
page: Integer,
|
|
71
84
|
page_size: Integer,
|
|
85
|
+
sort_by: EInvoiceAPI::InboxListInvoicesParams::SortBy::OrSymbol,
|
|
86
|
+
sort_order: EInvoiceAPI::InboxListInvoicesParams::SortOrder::OrSymbol,
|
|
72
87
|
request_options: EInvoiceAPI::RequestOptions::OrHash
|
|
73
88
|
).returns(
|
|
74
89
|
EInvoiceAPI::Internal::DocumentsNumberPage[
|
|
@@ -81,6 +96,10 @@ module EInvoiceAPI
|
|
|
81
96
|
page: nil,
|
|
82
97
|
# Number of items per page
|
|
83
98
|
page_size: nil,
|
|
99
|
+
# Field to sort by
|
|
100
|
+
sort_by: nil,
|
|
101
|
+
# Sort direction (asc/desc)
|
|
102
|
+
sort_order: nil,
|
|
84
103
|
request_options: {}
|
|
85
104
|
)
|
|
86
105
|
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,8 +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),
|
|
56
|
+
sort_by:
|
|
57
|
+
EInvoiceAPI::OutboxListReceivedDocumentsParams::SortBy::OrSymbol,
|
|
58
|
+
sort_order:
|
|
59
|
+
EInvoiceAPI::OutboxListReceivedDocumentsParams::SortOrder::OrSymbol,
|
|
37
60
|
state: T.nilable(EInvoiceAPI::DocumentState::OrSymbol),
|
|
38
61
|
type: T.nilable(EInvoiceAPI::DocumentType::OrSymbol),
|
|
39
62
|
request_options: EInvoiceAPI::RequestOptions::OrHash
|
|
@@ -52,10 +75,17 @@ module EInvoiceAPI
|
|
|
52
75
|
page: nil,
|
|
53
76
|
# Number of items per page
|
|
54
77
|
page_size: nil,
|
|
78
|
+
# Filter by receiver (customer_name, customer_email, customer_tax_id,
|
|
79
|
+
# customer_company_id, customer_id)
|
|
80
|
+
receiver: nil,
|
|
55
81
|
# Search in invoice number, seller/buyer names
|
|
56
82
|
search: nil,
|
|
57
|
-
# Filter by sender ID
|
|
83
|
+
# (Deprecated) Filter by sender ID
|
|
58
84
|
sender: nil,
|
|
85
|
+
# Field to sort by
|
|
86
|
+
sort_by: nil,
|
|
87
|
+
# Sort direction (asc/desc)
|
|
88
|
+
sort_order: nil,
|
|
59
89
|
# Filter by document state
|
|
60
90
|
state: nil,
|
|
61
91
|
# Filter by document type
|
|
@@ -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]?,
|
|
@@ -55,6 +56,8 @@ module EInvoiceAPI
|
|
|
55
56
|
class DocumentResponse < EInvoiceAPI::Internal::Type::BaseModel
|
|
56
57
|
attr_accessor id: String
|
|
57
58
|
|
|
59
|
+
attr_accessor created_at: Time
|
|
60
|
+
|
|
58
61
|
attr_accessor allowances: ::Array[EInvoiceAPI::DocumentResponse::Allowance]?
|
|
59
62
|
|
|
60
63
|
attr_accessor amount_due: String?
|
|
@@ -171,6 +174,7 @@ module EInvoiceAPI
|
|
|
171
174
|
|
|
172
175
|
def initialize: (
|
|
173
176
|
id: String,
|
|
177
|
+
created_at: Time,
|
|
174
178
|
?allowances: ::Array[EInvoiceAPI::DocumentResponse::Allowance]?,
|
|
175
179
|
?amount_due: String?,
|
|
176
180
|
?attachments: ::Array[EInvoiceAPI::Documents::DocumentAttachment]?,
|
|
@@ -222,6 +226,7 @@ module EInvoiceAPI
|
|
|
222
226
|
|
|
223
227
|
def to_hash: -> {
|
|
224
228
|
id: String,
|
|
229
|
+
created_at: Time,
|
|
225
230
|
allowances: ::Array[EInvoiceAPI::DocumentResponse::Allowance]?,
|
|
226
231
|
amount_due: String?,
|
|
227
232
|
attachments: ::Array[EInvoiceAPI::Documents::DocumentAttachment]?,
|
|
@@ -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
|