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
|
@@ -3,14 +3,25 @@
|
|
|
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
|
#
|
|
8
|
-
# @overload list_draft_documents(page: nil, page_size: nil, request_options: {})
|
|
9
|
+
# @overload list_draft_documents(page: nil, page_size: nil, search: nil, sort_by: nil, sort_order: nil, state: nil, type: nil, request_options: {})
|
|
9
10
|
#
|
|
10
11
|
# @param page [Integer] Page number
|
|
11
12
|
#
|
|
12
13
|
# @param page_size [Integer] Number of items per page
|
|
13
14
|
#
|
|
15
|
+
# @param search [String, nil] Search in invoice number, seller/buyer names
|
|
16
|
+
#
|
|
17
|
+
# @param sort_by [Symbol, EInvoiceAPI::Models::OutboxListDraftDocumentsParams::SortBy] Field to sort by
|
|
18
|
+
#
|
|
19
|
+
# @param sort_order [Symbol, EInvoiceAPI::Models::OutboxListDraftDocumentsParams::SortOrder] Sort direction (asc/desc)
|
|
20
|
+
#
|
|
21
|
+
# @param state [Symbol, EInvoiceAPI::Models::DocumentState, nil] Filter by document state
|
|
22
|
+
#
|
|
23
|
+
# @param type [Symbol, EInvoiceAPI::Models::DocumentType, nil] Filter by document type
|
|
24
|
+
#
|
|
14
25
|
# @param request_options [EInvoiceAPI::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
15
26
|
#
|
|
16
27
|
# @return [EInvoiceAPI::Internal::DocumentsNumberPage<EInvoiceAPI::Models::DocumentResponse>]
|
|
@@ -28,10 +39,13 @@ module EInvoiceAPI
|
|
|
28
39
|
)
|
|
29
40
|
end
|
|
30
41
|
|
|
42
|
+
# Some parameter documentations has been truncated, see
|
|
43
|
+
# {EInvoiceAPI::Models::OutboxListReceivedDocumentsParams} for more details.
|
|
44
|
+
#
|
|
31
45
|
# Retrieve a paginated list of sent documents with filtering options including
|
|
32
46
|
# state, type, sender, date range, and text search.
|
|
33
47
|
#
|
|
34
|
-
# @overload list_received_documents(date_from: nil, date_to: nil, page: nil, page_size: nil, search: nil, sender: nil, state: nil, type: nil, request_options: {})
|
|
48
|
+
# @overload list_received_documents(date_from: nil, date_to: nil, page: nil, page_size: nil, receiver: nil, search: nil, sender: nil, sort_by: nil, sort_order: nil, state: nil, type: nil, request_options: {})
|
|
35
49
|
#
|
|
36
50
|
# @param date_from [Time, nil] Filter by issue date (from)
|
|
37
51
|
#
|
|
@@ -41,9 +55,15 @@ module EInvoiceAPI
|
|
|
41
55
|
#
|
|
42
56
|
# @param page_size [Integer] Number of items per page
|
|
43
57
|
#
|
|
58
|
+
# @param receiver [String, nil] Filter by receiver (customer_name, customer_email, customer_tax_id, customer_com
|
|
59
|
+
#
|
|
44
60
|
# @param search [String, nil] Search in invoice number, seller/buyer names
|
|
45
61
|
#
|
|
46
|
-
# @param sender [String, nil] Filter by sender ID
|
|
62
|
+
# @param sender [String, nil] (Deprecated) Filter by sender ID
|
|
63
|
+
#
|
|
64
|
+
# @param sort_by [Symbol, EInvoiceAPI::Models::OutboxListReceivedDocumentsParams::SortBy] Field to sort by
|
|
65
|
+
#
|
|
66
|
+
# @param sort_order [Symbol, EInvoiceAPI::Models::OutboxListReceivedDocumentsParams::SortOrder] Sort direction (asc/desc)
|
|
47
67
|
#
|
|
48
68
|
# @param state [Symbol, EInvoiceAPI::Models::DocumentState, nil] Filter by document state
|
|
49
69
|
#
|
|
@@ -11,6 +11,9 @@ module EInvoiceAPI
|
|
|
11
11
|
sig { returns(String) }
|
|
12
12
|
attr_accessor :id
|
|
13
13
|
|
|
14
|
+
sig { returns(Time) }
|
|
15
|
+
attr_accessor :created_at
|
|
16
|
+
|
|
14
17
|
sig do
|
|
15
18
|
returns(T.nilable(T::Array[EInvoiceAPI::DocumentResponse::Allowance]))
|
|
16
19
|
end
|
|
@@ -242,6 +245,7 @@ module EInvoiceAPI
|
|
|
242
245
|
sig do
|
|
243
246
|
params(
|
|
244
247
|
id: String,
|
|
248
|
+
created_at: Time,
|
|
245
249
|
allowances:
|
|
246
250
|
T.nilable(
|
|
247
251
|
T::Array[EInvoiceAPI::DocumentResponse::Allowance::OrHash]
|
|
@@ -307,6 +311,7 @@ module EInvoiceAPI
|
|
|
307
311
|
end
|
|
308
312
|
def self.new(
|
|
309
313
|
id:,
|
|
314
|
+
created_at:,
|
|
310
315
|
allowances: nil,
|
|
311
316
|
# The amount due for payment. Must be positive and rounded to maximum 2 decimals
|
|
312
317
|
amount_due: nil,
|
|
@@ -415,6 +420,7 @@ module EInvoiceAPI
|
|
|
415
420
|
override.returns(
|
|
416
421
|
{
|
|
417
422
|
id: String,
|
|
423
|
+
created_at: Time,
|
|
418
424
|
allowances:
|
|
419
425
|
T.nilable(T::Array[EInvoiceAPI::DocumentResponse::Allowance]),
|
|
420
426
|
amount_due: T.nilable(String),
|
|
@@ -11,6 +11,10 @@ module EInvoiceAPI
|
|
|
11
11
|
INVOICE = T.let(:INVOICE, EInvoiceAPI::DocumentType::TaggedSymbol)
|
|
12
12
|
CREDIT_NOTE = T.let(:CREDIT_NOTE, EInvoiceAPI::DocumentType::TaggedSymbol)
|
|
13
13
|
DEBIT_NOTE = T.let(:DEBIT_NOTE, EInvoiceAPI::DocumentType::TaggedSymbol)
|
|
14
|
+
SELFBILLING_INVOICE =
|
|
15
|
+
T.let(:SELFBILLING_INVOICE, EInvoiceAPI::DocumentType::TaggedSymbol)
|
|
16
|
+
SELFBILLING_CREDIT_NOTE =
|
|
17
|
+
T.let(:SELFBILLING_CREDIT_NOTE, EInvoiceAPI::DocumentType::TaggedSymbol)
|
|
14
18
|
|
|
15
19
|
sig do
|
|
16
20
|
override.returns(T::Array[EInvoiceAPI::DocumentType::TaggedSymbol])
|
|
@@ -28,10 +28,46 @@ module EInvoiceAPI
|
|
|
28
28
|
sig { params(page_size: Integer).void }
|
|
29
29
|
attr_writer :page_size
|
|
30
30
|
|
|
31
|
+
# Field to sort by
|
|
32
|
+
sig do
|
|
33
|
+
returns(
|
|
34
|
+
T.nilable(EInvoiceAPI::InboxListCreditNotesParams::SortBy::OrSymbol)
|
|
35
|
+
)
|
|
36
|
+
end
|
|
37
|
+
attr_reader :sort_by
|
|
38
|
+
|
|
39
|
+
sig do
|
|
40
|
+
params(
|
|
41
|
+
sort_by: EInvoiceAPI::InboxListCreditNotesParams::SortBy::OrSymbol
|
|
42
|
+
).void
|
|
43
|
+
end
|
|
44
|
+
attr_writer :sort_by
|
|
45
|
+
|
|
46
|
+
# Sort direction (asc/desc)
|
|
47
|
+
sig do
|
|
48
|
+
returns(
|
|
49
|
+
T.nilable(
|
|
50
|
+
EInvoiceAPI::InboxListCreditNotesParams::SortOrder::OrSymbol
|
|
51
|
+
)
|
|
52
|
+
)
|
|
53
|
+
end
|
|
54
|
+
attr_reader :sort_order
|
|
55
|
+
|
|
56
|
+
sig do
|
|
57
|
+
params(
|
|
58
|
+
sort_order:
|
|
59
|
+
EInvoiceAPI::InboxListCreditNotesParams::SortOrder::OrSymbol
|
|
60
|
+
).void
|
|
61
|
+
end
|
|
62
|
+
attr_writer :sort_order
|
|
63
|
+
|
|
31
64
|
sig do
|
|
32
65
|
params(
|
|
33
66
|
page: Integer,
|
|
34
67
|
page_size: Integer,
|
|
68
|
+
sort_by: EInvoiceAPI::InboxListCreditNotesParams::SortBy::OrSymbol,
|
|
69
|
+
sort_order:
|
|
70
|
+
EInvoiceAPI::InboxListCreditNotesParams::SortOrder::OrSymbol,
|
|
35
71
|
request_options: EInvoiceAPI::RequestOptions::OrHash
|
|
36
72
|
).returns(T.attached_class)
|
|
37
73
|
end
|
|
@@ -40,6 +76,10 @@ module EInvoiceAPI
|
|
|
40
76
|
page: nil,
|
|
41
77
|
# Number of items per page
|
|
42
78
|
page_size: nil,
|
|
79
|
+
# Field to sort by
|
|
80
|
+
sort_by: nil,
|
|
81
|
+
# Sort direction (asc/desc)
|
|
82
|
+
sort_order: nil,
|
|
43
83
|
request_options: {}
|
|
44
84
|
)
|
|
45
85
|
end
|
|
@@ -49,12 +89,104 @@ module EInvoiceAPI
|
|
|
49
89
|
{
|
|
50
90
|
page: Integer,
|
|
51
91
|
page_size: Integer,
|
|
92
|
+
sort_by: EInvoiceAPI::InboxListCreditNotesParams::SortBy::OrSymbol,
|
|
93
|
+
sort_order:
|
|
94
|
+
EInvoiceAPI::InboxListCreditNotesParams::SortOrder::OrSymbol,
|
|
52
95
|
request_options: EInvoiceAPI::RequestOptions
|
|
53
96
|
}
|
|
54
97
|
)
|
|
55
98
|
end
|
|
56
99
|
def to_hash
|
|
57
100
|
end
|
|
101
|
+
|
|
102
|
+
# Field to sort by
|
|
103
|
+
module SortBy
|
|
104
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
105
|
+
|
|
106
|
+
TaggedSymbol =
|
|
107
|
+
T.type_alias do
|
|
108
|
+
T.all(Symbol, EInvoiceAPI::InboxListCreditNotesParams::SortBy)
|
|
109
|
+
end
|
|
110
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
111
|
+
|
|
112
|
+
CREATED_AT =
|
|
113
|
+
T.let(
|
|
114
|
+
:created_at,
|
|
115
|
+
EInvoiceAPI::InboxListCreditNotesParams::SortBy::TaggedSymbol
|
|
116
|
+
)
|
|
117
|
+
INVOICE_DATE =
|
|
118
|
+
T.let(
|
|
119
|
+
:invoice_date,
|
|
120
|
+
EInvoiceAPI::InboxListCreditNotesParams::SortBy::TaggedSymbol
|
|
121
|
+
)
|
|
122
|
+
DUE_DATE =
|
|
123
|
+
T.let(
|
|
124
|
+
:due_date,
|
|
125
|
+
EInvoiceAPI::InboxListCreditNotesParams::SortBy::TaggedSymbol
|
|
126
|
+
)
|
|
127
|
+
INVOICE_TOTAL =
|
|
128
|
+
T.let(
|
|
129
|
+
:invoice_total,
|
|
130
|
+
EInvoiceAPI::InboxListCreditNotesParams::SortBy::TaggedSymbol
|
|
131
|
+
)
|
|
132
|
+
CUSTOMER_NAME =
|
|
133
|
+
T.let(
|
|
134
|
+
:customer_name,
|
|
135
|
+
EInvoiceAPI::InboxListCreditNotesParams::SortBy::TaggedSymbol
|
|
136
|
+
)
|
|
137
|
+
VENDOR_NAME =
|
|
138
|
+
T.let(
|
|
139
|
+
:vendor_name,
|
|
140
|
+
EInvoiceAPI::InboxListCreditNotesParams::SortBy::TaggedSymbol
|
|
141
|
+
)
|
|
142
|
+
INVOICE_ID =
|
|
143
|
+
T.let(
|
|
144
|
+
:invoice_id,
|
|
145
|
+
EInvoiceAPI::InboxListCreditNotesParams::SortBy::TaggedSymbol
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
sig do
|
|
149
|
+
override.returns(
|
|
150
|
+
T::Array[
|
|
151
|
+
EInvoiceAPI::InboxListCreditNotesParams::SortBy::TaggedSymbol
|
|
152
|
+
]
|
|
153
|
+
)
|
|
154
|
+
end
|
|
155
|
+
def self.values
|
|
156
|
+
end
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Sort direction (asc/desc)
|
|
160
|
+
module SortOrder
|
|
161
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
162
|
+
|
|
163
|
+
TaggedSymbol =
|
|
164
|
+
T.type_alias do
|
|
165
|
+
T.all(Symbol, EInvoiceAPI::InboxListCreditNotesParams::SortOrder)
|
|
166
|
+
end
|
|
167
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
168
|
+
|
|
169
|
+
ASC =
|
|
170
|
+
T.let(
|
|
171
|
+
:asc,
|
|
172
|
+
EInvoiceAPI::InboxListCreditNotesParams::SortOrder::TaggedSymbol
|
|
173
|
+
)
|
|
174
|
+
DESC =
|
|
175
|
+
T.let(
|
|
176
|
+
:desc,
|
|
177
|
+
EInvoiceAPI::InboxListCreditNotesParams::SortOrder::TaggedSymbol
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
sig do
|
|
181
|
+
override.returns(
|
|
182
|
+
T::Array[
|
|
183
|
+
EInvoiceAPI::InboxListCreditNotesParams::SortOrder::TaggedSymbol
|
|
184
|
+
]
|
|
185
|
+
)
|
|
186
|
+
end
|
|
187
|
+
def self.values
|
|
188
|
+
end
|
|
189
|
+
end
|
|
58
190
|
end
|
|
59
191
|
end
|
|
60
192
|
end
|
|
@@ -28,10 +28,42 @@ module EInvoiceAPI
|
|
|
28
28
|
sig { params(page_size: Integer).void }
|
|
29
29
|
attr_writer :page_size
|
|
30
30
|
|
|
31
|
+
# Field to sort by
|
|
32
|
+
sig do
|
|
33
|
+
returns(
|
|
34
|
+
T.nilable(EInvoiceAPI::InboxListInvoicesParams::SortBy::OrSymbol)
|
|
35
|
+
)
|
|
36
|
+
end
|
|
37
|
+
attr_reader :sort_by
|
|
38
|
+
|
|
39
|
+
sig do
|
|
40
|
+
params(
|
|
41
|
+
sort_by: EInvoiceAPI::InboxListInvoicesParams::SortBy::OrSymbol
|
|
42
|
+
).void
|
|
43
|
+
end
|
|
44
|
+
attr_writer :sort_by
|
|
45
|
+
|
|
46
|
+
# Sort direction (asc/desc)
|
|
47
|
+
sig do
|
|
48
|
+
returns(
|
|
49
|
+
T.nilable(EInvoiceAPI::InboxListInvoicesParams::SortOrder::OrSymbol)
|
|
50
|
+
)
|
|
51
|
+
end
|
|
52
|
+
attr_reader :sort_order
|
|
53
|
+
|
|
54
|
+
sig do
|
|
55
|
+
params(
|
|
56
|
+
sort_order: EInvoiceAPI::InboxListInvoicesParams::SortOrder::OrSymbol
|
|
57
|
+
).void
|
|
58
|
+
end
|
|
59
|
+
attr_writer :sort_order
|
|
60
|
+
|
|
31
61
|
sig do
|
|
32
62
|
params(
|
|
33
63
|
page: Integer,
|
|
34
64
|
page_size: Integer,
|
|
65
|
+
sort_by: EInvoiceAPI::InboxListInvoicesParams::SortBy::OrSymbol,
|
|
66
|
+
sort_order: EInvoiceAPI::InboxListInvoicesParams::SortOrder::OrSymbol,
|
|
35
67
|
request_options: EInvoiceAPI::RequestOptions::OrHash
|
|
36
68
|
).returns(T.attached_class)
|
|
37
69
|
end
|
|
@@ -40,6 +72,10 @@ module EInvoiceAPI
|
|
|
40
72
|
page: nil,
|
|
41
73
|
# Number of items per page
|
|
42
74
|
page_size: nil,
|
|
75
|
+
# Field to sort by
|
|
76
|
+
sort_by: nil,
|
|
77
|
+
# Sort direction (asc/desc)
|
|
78
|
+
sort_order: nil,
|
|
43
79
|
request_options: {}
|
|
44
80
|
)
|
|
45
81
|
end
|
|
@@ -49,12 +85,102 @@ module EInvoiceAPI
|
|
|
49
85
|
{
|
|
50
86
|
page: Integer,
|
|
51
87
|
page_size: Integer,
|
|
88
|
+
sort_by: EInvoiceAPI::InboxListInvoicesParams::SortBy::OrSymbol,
|
|
89
|
+
sort_order:
|
|
90
|
+
EInvoiceAPI::InboxListInvoicesParams::SortOrder::OrSymbol,
|
|
52
91
|
request_options: EInvoiceAPI::RequestOptions
|
|
53
92
|
}
|
|
54
93
|
)
|
|
55
94
|
end
|
|
56
95
|
def to_hash
|
|
57
96
|
end
|
|
97
|
+
|
|
98
|
+
# Field to sort by
|
|
99
|
+
module SortBy
|
|
100
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
101
|
+
|
|
102
|
+
TaggedSymbol =
|
|
103
|
+
T.type_alias do
|
|
104
|
+
T.all(Symbol, EInvoiceAPI::InboxListInvoicesParams::SortBy)
|
|
105
|
+
end
|
|
106
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
107
|
+
|
|
108
|
+
CREATED_AT =
|
|
109
|
+
T.let(
|
|
110
|
+
:created_at,
|
|
111
|
+
EInvoiceAPI::InboxListInvoicesParams::SortBy::TaggedSymbol
|
|
112
|
+
)
|
|
113
|
+
INVOICE_DATE =
|
|
114
|
+
T.let(
|
|
115
|
+
:invoice_date,
|
|
116
|
+
EInvoiceAPI::InboxListInvoicesParams::SortBy::TaggedSymbol
|
|
117
|
+
)
|
|
118
|
+
DUE_DATE =
|
|
119
|
+
T.let(
|
|
120
|
+
:due_date,
|
|
121
|
+
EInvoiceAPI::InboxListInvoicesParams::SortBy::TaggedSymbol
|
|
122
|
+
)
|
|
123
|
+
INVOICE_TOTAL =
|
|
124
|
+
T.let(
|
|
125
|
+
:invoice_total,
|
|
126
|
+
EInvoiceAPI::InboxListInvoicesParams::SortBy::TaggedSymbol
|
|
127
|
+
)
|
|
128
|
+
CUSTOMER_NAME =
|
|
129
|
+
T.let(
|
|
130
|
+
:customer_name,
|
|
131
|
+
EInvoiceAPI::InboxListInvoicesParams::SortBy::TaggedSymbol
|
|
132
|
+
)
|
|
133
|
+
VENDOR_NAME =
|
|
134
|
+
T.let(
|
|
135
|
+
:vendor_name,
|
|
136
|
+
EInvoiceAPI::InboxListInvoicesParams::SortBy::TaggedSymbol
|
|
137
|
+
)
|
|
138
|
+
INVOICE_ID =
|
|
139
|
+
T.let(
|
|
140
|
+
:invoice_id,
|
|
141
|
+
EInvoiceAPI::InboxListInvoicesParams::SortBy::TaggedSymbol
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
sig do
|
|
145
|
+
override.returns(
|
|
146
|
+
T::Array[EInvoiceAPI::InboxListInvoicesParams::SortBy::TaggedSymbol]
|
|
147
|
+
)
|
|
148
|
+
end
|
|
149
|
+
def self.values
|
|
150
|
+
end
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Sort direction (asc/desc)
|
|
154
|
+
module SortOrder
|
|
155
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
156
|
+
|
|
157
|
+
TaggedSymbol =
|
|
158
|
+
T.type_alias do
|
|
159
|
+
T.all(Symbol, EInvoiceAPI::InboxListInvoicesParams::SortOrder)
|
|
160
|
+
end
|
|
161
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
162
|
+
|
|
163
|
+
ASC =
|
|
164
|
+
T.let(
|
|
165
|
+
:asc,
|
|
166
|
+
EInvoiceAPI::InboxListInvoicesParams::SortOrder::TaggedSymbol
|
|
167
|
+
)
|
|
168
|
+
DESC =
|
|
169
|
+
T.let(
|
|
170
|
+
:desc,
|
|
171
|
+
EInvoiceAPI::InboxListInvoicesParams::SortOrder::TaggedSymbol
|
|
172
|
+
)
|
|
173
|
+
|
|
174
|
+
sig do
|
|
175
|
+
override.returns(
|
|
176
|
+
T::Array[
|
|
177
|
+
EInvoiceAPI::InboxListInvoicesParams::SortOrder::TaggedSymbol
|
|
178
|
+
]
|
|
179
|
+
)
|
|
180
|
+
end
|
|
181
|
+
def self.values
|
|
182
|
+
end
|
|
183
|
+
end
|
|
58
184
|
end
|
|
59
185
|
end
|
|
60
186
|
end
|
|
@@ -37,10 +37,32 @@ module EInvoiceAPI
|
|
|
37
37
|
sig { returns(T.nilable(String)) }
|
|
38
38
|
attr_accessor :search
|
|
39
39
|
|
|
40
|
-
# Filter by sender
|
|
40
|
+
# Filter by sender (vendor_name, vendor_email, vendor_tax_id, vendor_company_id)
|
|
41
41
|
sig { returns(T.nilable(String)) }
|
|
42
42
|
attr_accessor :sender
|
|
43
43
|
|
|
44
|
+
# Field to sort by
|
|
45
|
+
sig { returns(T.nilable(EInvoiceAPI::InboxListParams::SortBy::OrSymbol)) }
|
|
46
|
+
attr_reader :sort_by
|
|
47
|
+
|
|
48
|
+
sig do
|
|
49
|
+
params(sort_by: EInvoiceAPI::InboxListParams::SortBy::OrSymbol).void
|
|
50
|
+
end
|
|
51
|
+
attr_writer :sort_by
|
|
52
|
+
|
|
53
|
+
# Sort direction (asc/desc)
|
|
54
|
+
sig do
|
|
55
|
+
returns(T.nilable(EInvoiceAPI::InboxListParams::SortOrder::OrSymbol))
|
|
56
|
+
end
|
|
57
|
+
attr_reader :sort_order
|
|
58
|
+
|
|
59
|
+
sig do
|
|
60
|
+
params(
|
|
61
|
+
sort_order: EInvoiceAPI::InboxListParams::SortOrder::OrSymbol
|
|
62
|
+
).void
|
|
63
|
+
end
|
|
64
|
+
attr_writer :sort_order
|
|
65
|
+
|
|
44
66
|
# Filter by document state
|
|
45
67
|
sig { returns(T.nilable(EInvoiceAPI::DocumentState::OrSymbol)) }
|
|
46
68
|
attr_accessor :state
|
|
@@ -57,6 +79,8 @@ module EInvoiceAPI
|
|
|
57
79
|
page_size: Integer,
|
|
58
80
|
search: T.nilable(String),
|
|
59
81
|
sender: T.nilable(String),
|
|
82
|
+
sort_by: EInvoiceAPI::InboxListParams::SortBy::OrSymbol,
|
|
83
|
+
sort_order: EInvoiceAPI::InboxListParams::SortOrder::OrSymbol,
|
|
60
84
|
state: T.nilable(EInvoiceAPI::DocumentState::OrSymbol),
|
|
61
85
|
type: T.nilable(EInvoiceAPI::DocumentType::OrSymbol),
|
|
62
86
|
request_options: EInvoiceAPI::RequestOptions::OrHash
|
|
@@ -73,8 +97,12 @@ module EInvoiceAPI
|
|
|
73
97
|
page_size: nil,
|
|
74
98
|
# Search in invoice number, seller/buyer names
|
|
75
99
|
search: nil,
|
|
76
|
-
# Filter by sender
|
|
100
|
+
# Filter by sender (vendor_name, vendor_email, vendor_tax_id, vendor_company_id)
|
|
77
101
|
sender: nil,
|
|
102
|
+
# Field to sort by
|
|
103
|
+
sort_by: nil,
|
|
104
|
+
# Sort direction (asc/desc)
|
|
105
|
+
sort_order: nil,
|
|
78
106
|
# Filter by document state
|
|
79
107
|
state: nil,
|
|
80
108
|
# Filter by document type
|
|
@@ -92,6 +120,8 @@ module EInvoiceAPI
|
|
|
92
120
|
page_size: Integer,
|
|
93
121
|
search: T.nilable(String),
|
|
94
122
|
sender: T.nilable(String),
|
|
123
|
+
sort_by: EInvoiceAPI::InboxListParams::SortBy::OrSymbol,
|
|
124
|
+
sort_order: EInvoiceAPI::InboxListParams::SortOrder::OrSymbol,
|
|
95
125
|
state: T.nilable(EInvoiceAPI::DocumentState::OrSymbol),
|
|
96
126
|
type: T.nilable(EInvoiceAPI::DocumentType::OrSymbol),
|
|
97
127
|
request_options: EInvoiceAPI::RequestOptions
|
|
@@ -100,6 +130,73 @@ module EInvoiceAPI
|
|
|
100
130
|
end
|
|
101
131
|
def to_hash
|
|
102
132
|
end
|
|
133
|
+
|
|
134
|
+
# Field to sort by
|
|
135
|
+
module SortBy
|
|
136
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
137
|
+
|
|
138
|
+
TaggedSymbol =
|
|
139
|
+
T.type_alias { T.all(Symbol, EInvoiceAPI::InboxListParams::SortBy) }
|
|
140
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
141
|
+
|
|
142
|
+
CREATED_AT =
|
|
143
|
+
T.let(:created_at, EInvoiceAPI::InboxListParams::SortBy::TaggedSymbol)
|
|
144
|
+
INVOICE_DATE =
|
|
145
|
+
T.let(
|
|
146
|
+
:invoice_date,
|
|
147
|
+
EInvoiceAPI::InboxListParams::SortBy::TaggedSymbol
|
|
148
|
+
)
|
|
149
|
+
DUE_DATE =
|
|
150
|
+
T.let(:due_date, EInvoiceAPI::InboxListParams::SortBy::TaggedSymbol)
|
|
151
|
+
INVOICE_TOTAL =
|
|
152
|
+
T.let(
|
|
153
|
+
:invoice_total,
|
|
154
|
+
EInvoiceAPI::InboxListParams::SortBy::TaggedSymbol
|
|
155
|
+
)
|
|
156
|
+
CUSTOMER_NAME =
|
|
157
|
+
T.let(
|
|
158
|
+
:customer_name,
|
|
159
|
+
EInvoiceAPI::InboxListParams::SortBy::TaggedSymbol
|
|
160
|
+
)
|
|
161
|
+
VENDOR_NAME =
|
|
162
|
+
T.let(
|
|
163
|
+
:vendor_name,
|
|
164
|
+
EInvoiceAPI::InboxListParams::SortBy::TaggedSymbol
|
|
165
|
+
)
|
|
166
|
+
INVOICE_ID =
|
|
167
|
+
T.let(:invoice_id, EInvoiceAPI::InboxListParams::SortBy::TaggedSymbol)
|
|
168
|
+
|
|
169
|
+
sig do
|
|
170
|
+
override.returns(
|
|
171
|
+
T::Array[EInvoiceAPI::InboxListParams::SortBy::TaggedSymbol]
|
|
172
|
+
)
|
|
173
|
+
end
|
|
174
|
+
def self.values
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Sort direction (asc/desc)
|
|
179
|
+
module SortOrder
|
|
180
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
181
|
+
|
|
182
|
+
TaggedSymbol =
|
|
183
|
+
T.type_alias do
|
|
184
|
+
T.all(Symbol, EInvoiceAPI::InboxListParams::SortOrder)
|
|
185
|
+
end
|
|
186
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
187
|
+
|
|
188
|
+
ASC = T.let(:asc, EInvoiceAPI::InboxListParams::SortOrder::TaggedSymbol)
|
|
189
|
+
DESC =
|
|
190
|
+
T.let(:desc, EInvoiceAPI::InboxListParams::SortOrder::TaggedSymbol)
|
|
191
|
+
|
|
192
|
+
sig do
|
|
193
|
+
override.returns(
|
|
194
|
+
T::Array[EInvoiceAPI::InboxListParams::SortOrder::TaggedSymbol]
|
|
195
|
+
)
|
|
196
|
+
end
|
|
197
|
+
def self.values
|
|
198
|
+
end
|
|
199
|
+
end
|
|
103
200
|
end
|
|
104
201
|
end
|
|
105
202
|
end
|
|
@@ -306,6 +306,14 @@ module EInvoiceAPI
|
|
|
306
306
|
sig { returns(T.nilable(String)) }
|
|
307
307
|
attr_accessor :error
|
|
308
308
|
|
|
309
|
+
# DNS lookup method used: 'naptr' (new spec) or 'busdox' (legacy)
|
|
310
|
+
sig { returns(T.nilable(String)) }
|
|
311
|
+
attr_accessor :lookup_method
|
|
312
|
+
|
|
313
|
+
# Hostname of the SMP (Service Metadata Publisher) discovered via DNS
|
|
314
|
+
sig { returns(T.nilable(String)) }
|
|
315
|
+
attr_accessor :smp_hostname
|
|
316
|
+
|
|
309
317
|
# Information about the DNS lookup performed
|
|
310
318
|
sig do
|
|
311
319
|
params(
|
|
@@ -315,7 +323,9 @@ module EInvoiceAPI
|
|
|
315
323
|
],
|
|
316
324
|
sml_hostname: String,
|
|
317
325
|
status: String,
|
|
318
|
-
error: T.nilable(String)
|
|
326
|
+
error: T.nilable(String),
|
|
327
|
+
lookup_method: T.nilable(String),
|
|
328
|
+
smp_hostname: T.nilable(String)
|
|
319
329
|
).returns(T.attached_class)
|
|
320
330
|
end
|
|
321
331
|
def self.new(
|
|
@@ -326,7 +336,11 @@ module EInvoiceAPI
|
|
|
326
336
|
# Status of the DNS lookup: 'success', 'error', or 'pending'
|
|
327
337
|
status:,
|
|
328
338
|
# Error message if the DNS lookup failed
|
|
329
|
-
error: nil
|
|
339
|
+
error: nil,
|
|
340
|
+
# DNS lookup method used: 'naptr' (new spec) or 'busdox' (legacy)
|
|
341
|
+
lookup_method: nil,
|
|
342
|
+
# Hostname of the SMP (Service Metadata Publisher) discovered via DNS
|
|
343
|
+
smp_hostname: nil
|
|
330
344
|
)
|
|
331
345
|
end
|
|
332
346
|
|
|
@@ -339,7 +353,9 @@ module EInvoiceAPI
|
|
|
339
353
|
],
|
|
340
354
|
sml_hostname: String,
|
|
341
355
|
status: String,
|
|
342
|
-
error: T.nilable(String)
|
|
356
|
+
error: T.nilable(String),
|
|
357
|
+
lookup_method: T.nilable(String),
|
|
358
|
+
smp_hostname: T.nilable(String)
|
|
343
359
|
}
|
|
344
360
|
)
|
|
345
361
|
end
|