wallee-ruby-sdk 6.2.0 → 6.3.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/Gemfile.lock +5 -5
- data/README.md +35 -29
- data/lib/wallee-ruby-sdk/api_client.rb +1 -1
- data/lib/wallee-ruby-sdk/api_exception_error_codes.rb +60 -0
- data/lib/wallee-ruby-sdk/models/payment_terminal_address.rb +43 -5
- data/lib/wallee-ruby-sdk/models/payment_terminal_dcc_transaction_sum.rb +302 -0
- data/lib/wallee-ruby-sdk/models/payment_terminal_transaction_sum.rb +332 -0
- data/lib/wallee-ruby-sdk/models/payment_terminal_transaction_summary.rb +347 -0
- data/lib/wallee-ruby-sdk/models/rendered_terminal_transaction_summary.rb +241 -0
- data/lib/wallee-ruby-sdk/models/terminal_transaction_summary_list_response.rb +253 -0
- data/lib/wallee-ruby-sdk/models/terminal_transaction_summary_search_response.rb +263 -0
- data/lib/wallee-ruby-sdk/sdk_exception_error_codes.rb +55 -0
- data/lib/wallee-ruby-sdk/service/payment_terminal_transaction_summaries_service.rb +372 -0
- data/lib/wallee-ruby-sdk/service/webhook_encryption_keys_service.rb +2 -2
- data/lib/wallee-ruby-sdk/utils/encryption_util.rb +5 -5
- data/lib/wallee-ruby-sdk/version.rb +1 -1
- data/lib/wallee-ruby-sdk/wallee_sdk_exception.rb +2 -33
- data/lib/wallee-ruby-sdk.rb +12 -1
- metadata +10 -1
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
# Wallee AG Ruby SDK
|
|
3
|
+
#
|
|
4
|
+
# This library allows to interact with the Wallee AG payment service.
|
|
5
|
+
#
|
|
6
|
+
# Copyright owner: Wallee AG
|
|
7
|
+
# Website: https://en.wallee.com
|
|
8
|
+
# Developer email: ecosystem-team@wallee.com
|
|
9
|
+
#
|
|
10
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
11
|
+
# you may not use this file except in compliance with the License.
|
|
12
|
+
# You may obtain a copy of the License at
|
|
13
|
+
#
|
|
14
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
+
#
|
|
16
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
17
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
18
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
+
# See the License for the specific language governing permissions and
|
|
20
|
+
# limitations under the License.
|
|
21
|
+
=end
|
|
22
|
+
|
|
23
|
+
require 'cgi'
|
|
24
|
+
|
|
25
|
+
module WalleeRubySdk
|
|
26
|
+
class PaymentTerminalTransactionSummariesService
|
|
27
|
+
attr_accessor :api_client
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def initialize(api_client = ApiClient.default)
|
|
31
|
+
@api_client = api_client
|
|
32
|
+
end
|
|
33
|
+
# List all summaries
|
|
34
|
+
# @param space [Integer] Specifies the ID of the space the operation should be executed in.
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @option opts [Integer] :after Set to an object's ID to retrieve the page of objects coming immediately after the named object.
|
|
37
|
+
# @option opts [Integer] :before Set to an object's ID to retrieve the page of objects coming immediately before the named object.
|
|
38
|
+
# @option opts [Array<String>] :expand
|
|
39
|
+
# @option opts [Integer] :limit A limit on the number of objects to be returned, between 1 and 100. Default is 10.
|
|
40
|
+
# @option opts [SortingOrder] :order Specify to retrieve objects in chronological (ASC) or reverse chronological (DESC) order.
|
|
41
|
+
# @return [TerminalTransactionSummaryListResponse]
|
|
42
|
+
def get_payment_terminals_transaction_summaries(space, opts = {})
|
|
43
|
+
data, _status_code, _headers = get_payment_terminals_transaction_summaries_with_http_info(space, opts)
|
|
44
|
+
data
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# List all summaries
|
|
48
|
+
|
|
49
|
+
# @param space [Integer] Specifies the ID of the space the operation should be executed in.
|
|
50
|
+
# @param [Hash] opts the optional parameters
|
|
51
|
+
# @option opts [Integer] :after Set to an object's ID to retrieve the page of objects coming immediately after the named object.
|
|
52
|
+
# @option opts [Integer] :before Set to an object's ID to retrieve the page of objects coming immediately before the named object.
|
|
53
|
+
# @option opts [Array<String>] :expand
|
|
54
|
+
# @option opts [Integer] :limit A limit on the number of objects to be returned, between 1 and 100. Default is 10.
|
|
55
|
+
# @option opts [SortingOrder] :order Specify to retrieve objects in chronological (ASC) or reverse chronological (DESC) order.
|
|
56
|
+
# @return [Array<(TerminalTransactionSummaryListResponse, Integer, Hash)>] TerminalTransactionSummaryListResponse data, response status code and response headers
|
|
57
|
+
def get_payment_terminals_transaction_summaries_with_http_info(space, opts = {})
|
|
58
|
+
if @api_client.config.debugging
|
|
59
|
+
@api_client.config.logger.debug 'Calling API: PaymentTerminalTransactionSummariesService.get_payment_terminals_transaction_summaries ...'
|
|
60
|
+
end
|
|
61
|
+
# verify the required parameter 'space' is set
|
|
62
|
+
if @api_client.config.client_side_validation && space.nil?
|
|
63
|
+
fail ArgumentError, "Missing the required parameter 'space' when calling PaymentTerminalTransactionSummariesService.get_payment_terminals_transaction_summaries"
|
|
64
|
+
end
|
|
65
|
+
if @api_client.config.client_side_validation && !opts[:'after'].nil? && opts[:'after'] < 1
|
|
66
|
+
fail ArgumentError, 'invalid value for "opts[:"after"]" when calling PaymentTerminalTransactionSummariesService.get_payment_terminals_transaction_summaries, must be greater than or equal to 1.'
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
if @api_client.config.client_side_validation && !opts[:'before'].nil? && opts[:'before'] < 1
|
|
70
|
+
fail ArgumentError, 'invalid value for "opts[:"before"]" when calling PaymentTerminalTransactionSummariesService.get_payment_terminals_transaction_summaries, must be greater than or equal to 1.'
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
74
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PaymentTerminalTransactionSummariesService.get_payment_terminals_transaction_summaries, must be smaller than or equal to 100.'
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
78
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PaymentTerminalTransactionSummariesService.get_payment_terminals_transaction_summaries, must be greater than or equal to 1.'
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# resource path
|
|
82
|
+
local_var_path = '/payment/terminals/transaction-summaries'
|
|
83
|
+
|
|
84
|
+
# query parameters
|
|
85
|
+
query_params = opts[:query_params] || {}
|
|
86
|
+
query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
|
|
87
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
|
88
|
+
query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if !opts[:'expand'].nil?
|
|
89
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
90
|
+
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
|
91
|
+
|
|
92
|
+
# header parameters
|
|
93
|
+
header_params = opts[:header_params] || {}
|
|
94
|
+
# HTTP header 'Accept' (if needed)
|
|
95
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
96
|
+
header_params[:'Space'] = space
|
|
97
|
+
|
|
98
|
+
# form parameters
|
|
99
|
+
form_params = opts[:form_params] || {}
|
|
100
|
+
|
|
101
|
+
# connection timeout
|
|
102
|
+
connection_timeout = @api_client.config.timeout
|
|
103
|
+
|
|
104
|
+
# http body (model)
|
|
105
|
+
post_body = opts[:debug_body]
|
|
106
|
+
|
|
107
|
+
# return_type
|
|
108
|
+
return_type = opts[:debug_return_type] || 'TerminalTransactionSummaryListResponse'
|
|
109
|
+
|
|
110
|
+
new_options = opts.merge(
|
|
111
|
+
:operation => :"PaymentTerminalTransactionSummariesService.get_payment_terminals_transaction_summaries",
|
|
112
|
+
:header_params => header_params,
|
|
113
|
+
:query_params => query_params,
|
|
114
|
+
:form_params => form_params,
|
|
115
|
+
:body => post_body,
|
|
116
|
+
:return_type => return_type
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
data, status_code, headers = @api_client.call_api(:GET.to_sym.downcase, local_var_path, new_options, connection_timeout)
|
|
120
|
+
if @api_client.config.debugging
|
|
121
|
+
@api_client.config.logger.debug "API called: PaymentTerminalTransactionSummariesService#get_payment_terminals_transaction_summaries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
|
|
122
|
+
end
|
|
123
|
+
return data, status_code, headers
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
# Retrieve a summary
|
|
128
|
+
# @param id [Integer]
|
|
129
|
+
# @param space [Integer] Specifies the ID of the space the operation should be executed in.
|
|
130
|
+
# @param [Hash] opts the optional parameters
|
|
131
|
+
# @option opts [Array<String>] :expand
|
|
132
|
+
# @return [PaymentTerminalTransactionSummary]
|
|
133
|
+
def get_payment_terminals_transaction_summaries_id(id, space, opts = {})
|
|
134
|
+
data, _status_code, _headers = get_payment_terminals_transaction_summaries_id_with_http_info(id, space, opts)
|
|
135
|
+
data
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Retrieve a summary
|
|
139
|
+
|
|
140
|
+
# @param id [Integer]
|
|
141
|
+
# @param space [Integer] Specifies the ID of the space the operation should be executed in.
|
|
142
|
+
# @param [Hash] opts the optional parameters
|
|
143
|
+
# @option opts [Array<String>] :expand
|
|
144
|
+
# @return [Array<(PaymentTerminalTransactionSummary, Integer, Hash)>] PaymentTerminalTransactionSummary data, response status code and response headers
|
|
145
|
+
def get_payment_terminals_transaction_summaries_id_with_http_info(id, space, opts = {})
|
|
146
|
+
if @api_client.config.debugging
|
|
147
|
+
@api_client.config.logger.debug 'Calling API: PaymentTerminalTransactionSummariesService.get_payment_terminals_transaction_summaries_id ...'
|
|
148
|
+
end
|
|
149
|
+
# verify the required parameter 'id' is set
|
|
150
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
151
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling PaymentTerminalTransactionSummariesService.get_payment_terminals_transaction_summaries_id"
|
|
152
|
+
end
|
|
153
|
+
# verify the required parameter 'space' is set
|
|
154
|
+
if @api_client.config.client_side_validation && space.nil?
|
|
155
|
+
fail ArgumentError, "Missing the required parameter 'space' when calling PaymentTerminalTransactionSummariesService.get_payment_terminals_transaction_summaries_id"
|
|
156
|
+
end
|
|
157
|
+
# resource path
|
|
158
|
+
local_var_path = '/payment/terminals/transaction-summaries/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
159
|
+
|
|
160
|
+
# query parameters
|
|
161
|
+
query_params = opts[:query_params] || {}
|
|
162
|
+
query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if !opts[:'expand'].nil?
|
|
163
|
+
|
|
164
|
+
# header parameters
|
|
165
|
+
header_params = opts[:header_params] || {}
|
|
166
|
+
# HTTP header 'Accept' (if needed)
|
|
167
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
168
|
+
header_params[:'Space'] = space
|
|
169
|
+
|
|
170
|
+
# form parameters
|
|
171
|
+
form_params = opts[:form_params] || {}
|
|
172
|
+
|
|
173
|
+
# connection timeout
|
|
174
|
+
connection_timeout = @api_client.config.timeout
|
|
175
|
+
|
|
176
|
+
# http body (model)
|
|
177
|
+
post_body = opts[:debug_body]
|
|
178
|
+
|
|
179
|
+
# return_type
|
|
180
|
+
return_type = opts[:debug_return_type] || 'PaymentTerminalTransactionSummary'
|
|
181
|
+
|
|
182
|
+
new_options = opts.merge(
|
|
183
|
+
:operation => :"PaymentTerminalTransactionSummariesService.get_payment_terminals_transaction_summaries_id",
|
|
184
|
+
:header_params => header_params,
|
|
185
|
+
:query_params => query_params,
|
|
186
|
+
:form_params => form_params,
|
|
187
|
+
:body => post_body,
|
|
188
|
+
:return_type => return_type
|
|
189
|
+
)
|
|
190
|
+
|
|
191
|
+
data, status_code, headers = @api_client.call_api(:GET.to_sym.downcase, local_var_path, new_options, connection_timeout)
|
|
192
|
+
if @api_client.config.debugging
|
|
193
|
+
@api_client.config.logger.debug "API called: PaymentTerminalTransactionSummariesService#get_payment_terminals_transaction_summaries_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
|
|
194
|
+
end
|
|
195
|
+
return data, status_code, headers
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
# Retrieve a rendered summary receipt
|
|
200
|
+
# @param id [Integer]
|
|
201
|
+
# @param format [TerminalReceiptFormat] The format specifies how the receipt will be presented in the response.
|
|
202
|
+
# @param width [Integer] The width defines the dimensions for rendering the document. For PDF format, the width is specified in millimeters, while for text format, it represents the number of characters per line.
|
|
203
|
+
# @param space [Integer] Specifies the ID of the space the operation should be executed in.
|
|
204
|
+
# @param [Hash] opts the optional parameters
|
|
205
|
+
# @return [RenderedTerminalTransactionSummary]
|
|
206
|
+
def get_payment_terminals_transaction_summaries_id_receipt(id, format, width, space, opts = {})
|
|
207
|
+
data, _status_code, _headers = get_payment_terminals_transaction_summaries_id_receipt_with_http_info(id, format, width, space, opts)
|
|
208
|
+
data
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# Retrieve a rendered summary receipt
|
|
212
|
+
|
|
213
|
+
# @param id [Integer]
|
|
214
|
+
# @param format [TerminalReceiptFormat] The format specifies how the receipt will be presented in the response.
|
|
215
|
+
# @param width [Integer] The width defines the dimensions for rendering the document. For PDF format, the width is specified in millimeters, while for text format, it represents the number of characters per line.
|
|
216
|
+
# @param space [Integer] Specifies the ID of the space the operation should be executed in.
|
|
217
|
+
# @param [Hash] opts the optional parameters
|
|
218
|
+
# @return [Array<(RenderedTerminalTransactionSummary, Integer, Hash)>] RenderedTerminalTransactionSummary data, response status code and response headers
|
|
219
|
+
def get_payment_terminals_transaction_summaries_id_receipt_with_http_info(id, format, width, space, opts = {})
|
|
220
|
+
if @api_client.config.debugging
|
|
221
|
+
@api_client.config.logger.debug 'Calling API: PaymentTerminalTransactionSummariesService.get_payment_terminals_transaction_summaries_id_receipt ...'
|
|
222
|
+
end
|
|
223
|
+
# verify the required parameter 'id' is set
|
|
224
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
225
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling PaymentTerminalTransactionSummariesService.get_payment_terminals_transaction_summaries_id_receipt"
|
|
226
|
+
end
|
|
227
|
+
# verify the required parameter 'format' is set
|
|
228
|
+
if @api_client.config.client_side_validation && format.nil?
|
|
229
|
+
fail ArgumentError, "Missing the required parameter 'format' when calling PaymentTerminalTransactionSummariesService.get_payment_terminals_transaction_summaries_id_receipt"
|
|
230
|
+
end
|
|
231
|
+
# verify the required parameter 'width' is set
|
|
232
|
+
if @api_client.config.client_side_validation && width.nil?
|
|
233
|
+
fail ArgumentError, "Missing the required parameter 'width' when calling PaymentTerminalTransactionSummariesService.get_payment_terminals_transaction_summaries_id_receipt"
|
|
234
|
+
end
|
|
235
|
+
# verify the required parameter 'space' is set
|
|
236
|
+
if @api_client.config.client_side_validation && space.nil?
|
|
237
|
+
fail ArgumentError, "Missing the required parameter 'space' when calling PaymentTerminalTransactionSummariesService.get_payment_terminals_transaction_summaries_id_receipt"
|
|
238
|
+
end
|
|
239
|
+
# resource path
|
|
240
|
+
local_var_path = '/payment/terminals/transaction-summaries/{id}/receipt'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
241
|
+
|
|
242
|
+
# query parameters
|
|
243
|
+
query_params = opts[:query_params] || {}
|
|
244
|
+
query_params[:'format'] = format
|
|
245
|
+
query_params[:'width'] = width
|
|
246
|
+
|
|
247
|
+
# header parameters
|
|
248
|
+
header_params = opts[:header_params] || {}
|
|
249
|
+
# HTTP header 'Accept' (if needed)
|
|
250
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
251
|
+
header_params[:'Space'] = space
|
|
252
|
+
|
|
253
|
+
# form parameters
|
|
254
|
+
form_params = opts[:form_params] || {}
|
|
255
|
+
|
|
256
|
+
# connection timeout
|
|
257
|
+
connection_timeout = @api_client.config.timeout
|
|
258
|
+
|
|
259
|
+
# http body (model)
|
|
260
|
+
post_body = opts[:debug_body]
|
|
261
|
+
|
|
262
|
+
# return_type
|
|
263
|
+
return_type = opts[:debug_return_type] || 'RenderedTerminalTransactionSummary'
|
|
264
|
+
|
|
265
|
+
new_options = opts.merge(
|
|
266
|
+
:operation => :"PaymentTerminalTransactionSummariesService.get_payment_terminals_transaction_summaries_id_receipt",
|
|
267
|
+
:header_params => header_params,
|
|
268
|
+
:query_params => query_params,
|
|
269
|
+
:form_params => form_params,
|
|
270
|
+
:body => post_body,
|
|
271
|
+
:return_type => return_type
|
|
272
|
+
)
|
|
273
|
+
|
|
274
|
+
data, status_code, headers = @api_client.call_api(:GET.to_sym.downcase, local_var_path, new_options, connection_timeout)
|
|
275
|
+
if @api_client.config.debugging
|
|
276
|
+
@api_client.config.logger.debug "API called: PaymentTerminalTransactionSummariesService#get_payment_terminals_transaction_summaries_id_receipt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
|
|
277
|
+
end
|
|
278
|
+
return data, status_code, headers
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
# Search summaries
|
|
283
|
+
# @param space [Integer] Specifies the ID of the space the operation should be executed in.
|
|
284
|
+
# @param [Hash] opts the optional parameters
|
|
285
|
+
# @option opts [Array<String>] :expand
|
|
286
|
+
# @option opts [Integer] :limit A limit on the number of objects to be returned, between 1 and 100. Default is 10.
|
|
287
|
+
# @option opts [Integer] :offset A cursor for pagination, specifies the number of objects to skip.
|
|
288
|
+
# @option opts [String] :order The fields and order to sort the objects by.
|
|
289
|
+
# @option opts [String] :query The search query to filter the objects by.
|
|
290
|
+
# @return [TerminalTransactionSummarySearchResponse]
|
|
291
|
+
def get_payment_terminals_transaction_summaries_search(space, opts = {})
|
|
292
|
+
data, _status_code, _headers = get_payment_terminals_transaction_summaries_search_with_http_info(space, opts)
|
|
293
|
+
data
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# Search summaries
|
|
297
|
+
|
|
298
|
+
# @param space [Integer] Specifies the ID of the space the operation should be executed in.
|
|
299
|
+
# @param [Hash] opts the optional parameters
|
|
300
|
+
# @option opts [Array<String>] :expand
|
|
301
|
+
# @option opts [Integer] :limit A limit on the number of objects to be returned, between 1 and 100. Default is 10.
|
|
302
|
+
# @option opts [Integer] :offset A cursor for pagination, specifies the number of objects to skip.
|
|
303
|
+
# @option opts [String] :order The fields and order to sort the objects by.
|
|
304
|
+
# @option opts [String] :query The search query to filter the objects by.
|
|
305
|
+
# @return [Array<(TerminalTransactionSummarySearchResponse, Integer, Hash)>] TerminalTransactionSummarySearchResponse data, response status code and response headers
|
|
306
|
+
def get_payment_terminals_transaction_summaries_search_with_http_info(space, opts = {})
|
|
307
|
+
if @api_client.config.debugging
|
|
308
|
+
@api_client.config.logger.debug 'Calling API: PaymentTerminalTransactionSummariesService.get_payment_terminals_transaction_summaries_search ...'
|
|
309
|
+
end
|
|
310
|
+
# verify the required parameter 'space' is set
|
|
311
|
+
if @api_client.config.client_side_validation && space.nil?
|
|
312
|
+
fail ArgumentError, "Missing the required parameter 'space' when calling PaymentTerminalTransactionSummariesService.get_payment_terminals_transaction_summaries_search"
|
|
313
|
+
end
|
|
314
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
315
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PaymentTerminalTransactionSummariesService.get_payment_terminals_transaction_summaries_search, must be smaller than or equal to 100.'
|
|
316
|
+
end
|
|
317
|
+
|
|
318
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
319
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PaymentTerminalTransactionSummariesService.get_payment_terminals_transaction_summaries_search, must be greater than or equal to 1.'
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] > 10000
|
|
323
|
+
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling PaymentTerminalTransactionSummariesService.get_payment_terminals_transaction_summaries_search, must be smaller than or equal to 10000.'
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
# resource path
|
|
327
|
+
local_var_path = '/payment/terminals/transaction-summaries/search'
|
|
328
|
+
|
|
329
|
+
# query parameters
|
|
330
|
+
query_params = opts[:query_params] || {}
|
|
331
|
+
query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if !opts[:'expand'].nil?
|
|
332
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
333
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
334
|
+
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
|
335
|
+
query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
|
|
336
|
+
|
|
337
|
+
# header parameters
|
|
338
|
+
header_params = opts[:header_params] || {}
|
|
339
|
+
# HTTP header 'Accept' (if needed)
|
|
340
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
341
|
+
header_params[:'Space'] = space
|
|
342
|
+
|
|
343
|
+
# form parameters
|
|
344
|
+
form_params = opts[:form_params] || {}
|
|
345
|
+
|
|
346
|
+
# connection timeout
|
|
347
|
+
connection_timeout = @api_client.config.timeout
|
|
348
|
+
|
|
349
|
+
# http body (model)
|
|
350
|
+
post_body = opts[:debug_body]
|
|
351
|
+
|
|
352
|
+
# return_type
|
|
353
|
+
return_type = opts[:debug_return_type] || 'TerminalTransactionSummarySearchResponse'
|
|
354
|
+
|
|
355
|
+
new_options = opts.merge(
|
|
356
|
+
:operation => :"PaymentTerminalTransactionSummariesService.get_payment_terminals_transaction_summaries_search",
|
|
357
|
+
:header_params => header_params,
|
|
358
|
+
:query_params => query_params,
|
|
359
|
+
:form_params => form_params,
|
|
360
|
+
:body => post_body,
|
|
361
|
+
:return_type => return_type
|
|
362
|
+
)
|
|
363
|
+
|
|
364
|
+
data, status_code, headers = @api_client.call_api(:GET.to_sym.downcase, local_var_path, new_options, connection_timeout)
|
|
365
|
+
if @api_client.config.debugging
|
|
366
|
+
@api_client.config.logger.debug "API called: PaymentTerminalTransactionSummariesService#get_payment_terminals_transaction_summaries_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
|
|
367
|
+
end
|
|
368
|
+
return data, status_code, headers
|
|
369
|
+
end
|
|
370
|
+
|
|
371
|
+
end
|
|
372
|
+
end
|
|
@@ -113,7 +113,7 @@ module WalleeRubySdk
|
|
|
113
113
|
public_key = CACHE[public_key_id]
|
|
114
114
|
else
|
|
115
115
|
fetched_key, = get_webhooks_encryption_keys_id_with_http_info(public_key_id)
|
|
116
|
-
raise WalleeSdkException.new(
|
|
116
|
+
raise WalleeSdkException.new(SdkExceptionErrorCodes::UNKNOWN_WEBHOOK_ENCRYPTION_PUBLIC_KEY,
|
|
117
117
|
"Could not retrieve public key with ID: #{public_key_id}") if fetched_key.nil? || fetched_key.strip.empty?
|
|
118
118
|
|
|
119
119
|
CACHE[public_key_id] = fetched_key
|
|
@@ -127,7 +127,7 @@ module WalleeRubySdk
|
|
|
127
127
|
signature_algorithm
|
|
128
128
|
)
|
|
129
129
|
else
|
|
130
|
-
raise WalleeSdkException.new(
|
|
130
|
+
raise WalleeSdkException.new(SdkExceptionErrorCodes::INVALID_WEBHOOK_ENCRYPTION_HEADER_FORMAT,
|
|
131
131
|
"Invalid webhook encryption header format. Expected format: 'algorithm=<algorithm>, keyId=<keyId>, signature=<signature>'")
|
|
132
132
|
end
|
|
133
133
|
end
|
|
@@ -29,14 +29,14 @@ module WalleeRubySdk
|
|
|
29
29
|
|
|
30
30
|
if encryption_algorithm.nil? || encryption_algorithm.empty?
|
|
31
31
|
raise WalleeSdkException.new(
|
|
32
|
-
|
|
32
|
+
SdkExceptionErrorCodes::MISSING_WEBHOOK_ENCRYPTION_ALGORYTHM,
|
|
33
33
|
"Webhook signature algorithm was not provided"
|
|
34
34
|
)
|
|
35
35
|
end
|
|
36
36
|
|
|
37
37
|
algorithm_class = get_algorithm_class(encryption_algorithm)
|
|
38
38
|
if algorithm_class.nil?
|
|
39
|
-
raise WalleeSdkException.new(
|
|
39
|
+
raise WalleeSdkException.new(SdkExceptionErrorCodes::UNSUPPORTED_WEBHOOK_ENCRYPTION_ALGORYTHM,
|
|
40
40
|
"Unsupported webhook signature algorithm: '#{encryption_algorithm}'. " \
|
|
41
41
|
"This may indicate that the REST API is using a new encryption algorithm for webhooks. " \
|
|
42
42
|
"Please check whether a newer version of the SDK is available.")
|
|
@@ -45,20 +45,20 @@ module WalleeRubySdk
|
|
|
45
45
|
begin
|
|
46
46
|
signature = Base64.decode64(signature)
|
|
47
47
|
rescue ArgumentError
|
|
48
|
-
raise WalleeSdkException.new(
|
|
48
|
+
raise WalleeSdkException.new(SdkExceptionErrorCodes::INVALID_WEBHOOK_ENCRYPTION_CONTENT_SIGNATURE, 'Invalid signature value format')
|
|
49
49
|
end
|
|
50
50
|
|
|
51
51
|
begin
|
|
52
52
|
public_key_bytes = Base64.decode64(public_key)
|
|
53
53
|
rescue ArgumentError
|
|
54
|
-
raise WalleeSdkException.new(
|
|
54
|
+
raise WalleeSdkException.new(SdkExceptionErrorCodes::INVALID_WEBHOOK_ENCRYPTION_PUBLIC_KEY, 'Invalid public key value format')
|
|
55
55
|
end
|
|
56
56
|
|
|
57
57
|
begin
|
|
58
58
|
public_key = OpenSSL::PKey.read(public_key_bytes)
|
|
59
59
|
rescue OpenSSL::PKey::PKeyError
|
|
60
60
|
raise WalleeSdkException.new(
|
|
61
|
-
|
|
61
|
+
SdkExceptionErrorCodes::INVALID_WEBHOOK_ENCRYPTION_PUBLIC_KEY,
|
|
62
62
|
'Invalid public key: unsupported or unparseable format'
|
|
63
63
|
)
|
|
64
64
|
end
|
|
@@ -20,42 +20,11 @@
|
|
|
20
20
|
# limitations under the License.
|
|
21
21
|
=end
|
|
22
22
|
|
|
23
|
-
# The `ErrorCode` module defines potential error codes that may be raised by the Wallee SDK.
|
|
24
|
-
#
|
|
25
|
-
# ## Error Code Ranges:
|
|
26
|
-
# - **1000–1999**: Client-side errors – typically due to invalid input (e.g., malformed headers, bad keys).
|
|
27
|
-
# - **2000–2999**: Server-side errors – typically due to incorrect data provided by the server.
|
|
28
|
-
# - **404**: Not Found – used when an endpoint returns an empty response.
|
|
29
|
-
#
|
|
30
|
-
module ErrorCode
|
|
31
|
-
# 404
|
|
32
|
-
UNKNOWN_WEBHOOK_ENCRYPTION_PUBLIC_KEY = { code: 404, description: "Unknown webhook signature public key" }
|
|
33
|
-
|
|
34
|
-
# 1000–1999
|
|
35
|
-
WEBHOOK_ENCRYPTION_GENERAL_ERROR = { code: 1000, description: "General webhook encryption error" }
|
|
36
|
-
INVALID_WEBHOOK_ENCRYPTION_PUBLIC_KEY = { code: 1001, description: "Invalid webhook signature public key" }
|
|
37
|
-
INVALID_WEBHOOK_ENCRYPTION_HEADER_FORMAT = { code: 1002, description: "Invalid webhook signature header" }
|
|
38
|
-
UNSUPPORTED_WEBHOOK_ENCRYPTION_ALGORYTHM = { code: 1003, description: "Unsupported webhook signature algorithm" }
|
|
39
|
-
UNKNOWN_WEBHOOK_ENCRYPTION_PROVIDER = { code: 1004, description: "Unknown webhook encryption provider" }
|
|
40
|
-
WEBHOOK_ENCRYPTION_VERIFIER_INIT_ERROR = { code: 1005, description: "Encryption verifier initialization error" }
|
|
41
|
-
WEBHOOK_ENCRYPTION_VERIFIER_CONTENT_UPDATE_ERROR = { code: 1006, description: "Error during content update in encryption verifier" }
|
|
42
|
-
WEBHOOK_ENCRYPTION_SIGNATURE_VERIFICATION_FAILED = { code: 1007, description: "Encryption signature verification failed" }
|
|
43
|
-
INVALID_WEBHOOK_ENCRYPTION_CONTENT_SIGNATURE = { code: 1008, description: "Invalid webhook content signature" }
|
|
44
|
-
|
|
45
|
-
# 2000–2999
|
|
46
|
-
MISSING_WEBHOOK_ENCRYPTION_ALGORYTHM = { code: 2000, description: "Missing webhook signature algorithm value" }
|
|
47
|
-
|
|
48
|
-
def self.to_s(error)
|
|
49
|
-
"#{error[:code]}: #{error[:description]}"
|
|
50
|
-
end
|
|
51
|
-
end
|
|
52
|
-
|
|
53
23
|
class WalleeSdkException < StandardError
|
|
54
24
|
attr_reader :code
|
|
55
25
|
|
|
56
26
|
def initialize(code, message)
|
|
57
27
|
@code = code
|
|
58
|
-
|
|
59
|
-
super(full_message)
|
|
28
|
+
super("Error code: #{code}. #{message}")
|
|
60
29
|
end
|
|
61
|
-
end
|
|
30
|
+
end
|
data/lib/wallee-ruby-sdk.rb
CHANGED
|
@@ -25,8 +25,12 @@ require 'wallee-ruby-sdk/api_client'
|
|
|
25
25
|
require 'wallee-ruby-sdk/api_error'
|
|
26
26
|
require 'wallee-ruby-sdk/version'
|
|
27
27
|
require 'wallee-ruby-sdk/configuration'
|
|
28
|
-
require 'wallee-ruby-sdk/utils/encryption_util'
|
|
29
28
|
require 'wallee-ruby-sdk/wallee_sdk_exception'
|
|
29
|
+
require 'wallee-ruby-sdk/sdk_exception_error_codes'
|
|
30
|
+
require 'wallee-ruby-sdk/api_exception_error_codes'
|
|
31
|
+
|
|
32
|
+
# Utils
|
|
33
|
+
require 'wallee-ruby-sdk/utils/encryption_util'
|
|
30
34
|
|
|
31
35
|
# Models
|
|
32
36
|
require 'wallee-ruby-sdk/models/abstract_account_update'
|
|
@@ -352,6 +356,7 @@ require 'wallee-ruby-sdk/models/payment_terminal_configuration_state'
|
|
|
352
356
|
require 'wallee-ruby-sdk/models/payment_terminal_configuration_version'
|
|
353
357
|
require 'wallee-ruby-sdk/models/payment_terminal_configuration_version_state'
|
|
354
358
|
require 'wallee-ruby-sdk/models/payment_terminal_create'
|
|
359
|
+
require 'wallee-ruby-sdk/models/payment_terminal_dcc_transaction_sum'
|
|
355
360
|
require 'wallee-ruby-sdk/models/payment_terminal_location'
|
|
356
361
|
require 'wallee-ruby-sdk/models/payment_terminal_location_state'
|
|
357
362
|
require 'wallee-ruby-sdk/models/payment_terminal_location_version'
|
|
@@ -359,6 +364,8 @@ require 'wallee-ruby-sdk/models/payment_terminal_location_version_state'
|
|
|
359
364
|
require 'wallee-ruby-sdk/models/payment_terminal_preparing'
|
|
360
365
|
require 'wallee-ruby-sdk/models/payment_terminal_receipt_type'
|
|
361
366
|
require 'wallee-ruby-sdk/models/payment_terminal_state'
|
|
367
|
+
require 'wallee-ruby-sdk/models/payment_terminal_transaction_sum'
|
|
368
|
+
require 'wallee-ruby-sdk/models/payment_terminal_transaction_summary'
|
|
362
369
|
require 'wallee-ruby-sdk/models/payment_terminal_transaction_summary_reference'
|
|
363
370
|
require 'wallee-ruby-sdk/models/payment_terminal_type'
|
|
364
371
|
require 'wallee-ruby-sdk/models/payment_terminal_update'
|
|
@@ -418,6 +425,7 @@ require 'wallee-ruby-sdk/models/refund_type'
|
|
|
418
425
|
require 'wallee-ruby-sdk/models/rendered_document'
|
|
419
426
|
require 'wallee-ruby-sdk/models/rendered_terminal_receipt'
|
|
420
427
|
require 'wallee-ruby-sdk/models/rendered_terminal_receipt_list_response'
|
|
428
|
+
require 'wallee-ruby-sdk/models/rendered_terminal_transaction_summary'
|
|
421
429
|
require 'wallee-ruby-sdk/models/rest_address_format'
|
|
422
430
|
require 'wallee-ruby-sdk/models/rest_address_format_field'
|
|
423
431
|
require 'wallee-ruby-sdk/models/rest_api_bulk_operation_result'
|
|
@@ -543,6 +551,8 @@ require 'wallee-ruby-sdk/models/tenant_database'
|
|
|
543
551
|
require 'wallee-ruby-sdk/models/terminal_list_response'
|
|
544
552
|
require 'wallee-ruby-sdk/models/terminal_receipt_format'
|
|
545
553
|
require 'wallee-ruby-sdk/models/terminal_search_response'
|
|
554
|
+
require 'wallee-ruby-sdk/models/terminal_transaction_summary_list_response'
|
|
555
|
+
require 'wallee-ruby-sdk/models/terminal_transaction_summary_search_response'
|
|
546
556
|
require 'wallee-ruby-sdk/models/token'
|
|
547
557
|
require 'wallee-ruby-sdk/models/token_create'
|
|
548
558
|
require 'wallee-ruby-sdk/models/token_list_response'
|
|
@@ -662,6 +672,7 @@ require 'wallee-ruby-sdk/service/payment_methods_service'
|
|
|
662
672
|
require 'wallee-ruby-sdk/service/payment_processor_configurations_service'
|
|
663
673
|
require 'wallee-ruby-sdk/service/payment_processors_service'
|
|
664
674
|
require 'wallee-ruby-sdk/service/payment_sales_channels_service'
|
|
675
|
+
require 'wallee-ruby-sdk/service/payment_terminal_transaction_summaries_service'
|
|
665
676
|
require 'wallee-ruby-sdk/service/payment_terminals_service'
|
|
666
677
|
require 'wallee-ruby-sdk/service/payment_web_apps_service'
|
|
667
678
|
require 'wallee-ruby-sdk/service/permissions_service'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: wallee-ruby-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 6.
|
|
4
|
+
version: 6.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- wallee AG
|
|
@@ -128,6 +128,7 @@ files:
|
|
|
128
128
|
- lib/wallee-ruby-sdk.rb
|
|
129
129
|
- lib/wallee-ruby-sdk/api_client.rb
|
|
130
130
|
- lib/wallee-ruby-sdk/api_error.rb
|
|
131
|
+
- lib/wallee-ruby-sdk/api_exception_error_codes.rb
|
|
131
132
|
- lib/wallee-ruby-sdk/configuration.rb
|
|
132
133
|
- lib/wallee-ruby-sdk/models/abstract_account_update.rb
|
|
133
134
|
- lib/wallee-ruby-sdk/models/abstract_application_user_update.rb
|
|
@@ -452,6 +453,7 @@ files:
|
|
|
452
453
|
- lib/wallee-ruby-sdk/models/payment_terminal_configuration_version.rb
|
|
453
454
|
- lib/wallee-ruby-sdk/models/payment_terminal_configuration_version_state.rb
|
|
454
455
|
- lib/wallee-ruby-sdk/models/payment_terminal_create.rb
|
|
456
|
+
- lib/wallee-ruby-sdk/models/payment_terminal_dcc_transaction_sum.rb
|
|
455
457
|
- lib/wallee-ruby-sdk/models/payment_terminal_location.rb
|
|
456
458
|
- lib/wallee-ruby-sdk/models/payment_terminal_location_state.rb
|
|
457
459
|
- lib/wallee-ruby-sdk/models/payment_terminal_location_version.rb
|
|
@@ -459,6 +461,8 @@ files:
|
|
|
459
461
|
- lib/wallee-ruby-sdk/models/payment_terminal_preparing.rb
|
|
460
462
|
- lib/wallee-ruby-sdk/models/payment_terminal_receipt_type.rb
|
|
461
463
|
- lib/wallee-ruby-sdk/models/payment_terminal_state.rb
|
|
464
|
+
- lib/wallee-ruby-sdk/models/payment_terminal_transaction_sum.rb
|
|
465
|
+
- lib/wallee-ruby-sdk/models/payment_terminal_transaction_summary.rb
|
|
462
466
|
- lib/wallee-ruby-sdk/models/payment_terminal_transaction_summary_reference.rb
|
|
463
467
|
- lib/wallee-ruby-sdk/models/payment_terminal_type.rb
|
|
464
468
|
- lib/wallee-ruby-sdk/models/payment_terminal_update.rb
|
|
@@ -518,6 +522,7 @@ files:
|
|
|
518
522
|
- lib/wallee-ruby-sdk/models/rendered_document.rb
|
|
519
523
|
- lib/wallee-ruby-sdk/models/rendered_terminal_receipt.rb
|
|
520
524
|
- lib/wallee-ruby-sdk/models/rendered_terminal_receipt_list_response.rb
|
|
525
|
+
- lib/wallee-ruby-sdk/models/rendered_terminal_transaction_summary.rb
|
|
521
526
|
- lib/wallee-ruby-sdk/models/rest_address_format.rb
|
|
522
527
|
- lib/wallee-ruby-sdk/models/rest_address_format_field.rb
|
|
523
528
|
- lib/wallee-ruby-sdk/models/rest_api_bulk_operation_result.rb
|
|
@@ -643,6 +648,8 @@ files:
|
|
|
643
648
|
- lib/wallee-ruby-sdk/models/terminal_list_response.rb
|
|
644
649
|
- lib/wallee-ruby-sdk/models/terminal_receipt_format.rb
|
|
645
650
|
- lib/wallee-ruby-sdk/models/terminal_search_response.rb
|
|
651
|
+
- lib/wallee-ruby-sdk/models/terminal_transaction_summary_list_response.rb
|
|
652
|
+
- lib/wallee-ruby-sdk/models/terminal_transaction_summary_search_response.rb
|
|
646
653
|
- lib/wallee-ruby-sdk/models/token.rb
|
|
647
654
|
- lib/wallee-ruby-sdk/models/token_create.rb
|
|
648
655
|
- lib/wallee-ruby-sdk/models/token_list_response.rb
|
|
@@ -714,6 +721,7 @@ files:
|
|
|
714
721
|
- lib/wallee-ruby-sdk/models/webhook_url_list_response.rb
|
|
715
722
|
- lib/wallee-ruby-sdk/models/webhook_url_search_response.rb
|
|
716
723
|
- lib/wallee-ruby-sdk/models/webhook_url_update.rb
|
|
724
|
+
- lib/wallee-ruby-sdk/sdk_exception_error_codes.rb
|
|
717
725
|
- lib/wallee-ruby-sdk/service/accounts_service.rb
|
|
718
726
|
- lib/wallee-ruby-sdk/service/analytics_queries_service.rb
|
|
719
727
|
- lib/wallee-ruby-sdk/service/application_users_roles_service.rb
|
|
@@ -760,6 +768,7 @@ files:
|
|
|
760
768
|
- lib/wallee-ruby-sdk/service/payment_processor_configurations_service.rb
|
|
761
769
|
- lib/wallee-ruby-sdk/service/payment_processors_service.rb
|
|
762
770
|
- lib/wallee-ruby-sdk/service/payment_sales_channels_service.rb
|
|
771
|
+
- lib/wallee-ruby-sdk/service/payment_terminal_transaction_summaries_service.rb
|
|
763
772
|
- lib/wallee-ruby-sdk/service/payment_terminals_service.rb
|
|
764
773
|
- lib/wallee-ruby-sdk/service/payment_web_apps_service.rb
|
|
765
774
|
- lib/wallee-ruby-sdk/service/permissions_service.rb
|