wallee-ruby-sdk 6.2.0 → 6.4.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.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +56 -14
  3. data/LICENSE +1 -1
  4. data/README.md +57 -29
  5. data/lib/wallee-ruby-sdk/api_client.rb +1 -1
  6. data/lib/wallee-ruby-sdk/api_exception_error_codes.rb +60 -0
  7. data/lib/wallee-ruby-sdk/models/bogus_express_checkout_approval_request.rb +230 -0
  8. data/lib/wallee-ruby-sdk/models/bogus_express_checkout_payment_data.rb +241 -0
  9. data/lib/wallee-ruby-sdk/models/express_checkout_approval_response.rb +270 -0
  10. data/lib/wallee-ruby-sdk/models/express_checkout_create_response.rb +13 -4
  11. data/lib/wallee-ruby-sdk/models/express_checkout_session.rb +39 -1
  12. data/lib/wallee-ruby-sdk/models/express_checkout_session_create.rb +21 -1
  13. data/lib/wallee-ruby-sdk/models/express_checkout_shipping_address_change_request.rb +239 -0
  14. data/lib/wallee-ruby-sdk/models/express_checkout_shipping_address_change_response.rb +241 -0
  15. data/lib/wallee-ruby-sdk/models/express_checkout_shipping_method_change_request.rb +231 -0
  16. data/lib/wallee-ruby-sdk/models/express_checkout_shipping_method_change_response.rb +241 -0
  17. data/lib/wallee-ruby-sdk/models/express_checkout_shipping_option.rb +1 -1
  18. data/lib/wallee-ruby-sdk/models/payment_terminal_address.rb +43 -5
  19. data/lib/wallee-ruby-sdk/models/payment_terminal_dcc_transaction_sum.rb +302 -0
  20. data/lib/wallee-ruby-sdk/models/payment_terminal_transaction_sum.rb +332 -0
  21. data/lib/wallee-ruby-sdk/models/payment_terminal_transaction_summary.rb +347 -0
  22. data/lib/wallee-ruby-sdk/models/refund.rb +13 -1
  23. data/lib/wallee-ruby-sdk/models/refund_create.rb +13 -1
  24. data/lib/wallee-ruby-sdk/models/rendered_terminal_transaction_summary.rb +241 -0
  25. data/lib/wallee-ruby-sdk/models/scope.rb +15 -15
  26. data/lib/wallee-ruby-sdk/models/terminal_transaction_summary_list_response.rb +253 -0
  27. data/lib/wallee-ruby-sdk/models/terminal_transaction_summary_search_response.rb +263 -0
  28. data/lib/wallee-ruby-sdk/models/transaction_completion.rb +13 -1
  29. data/lib/wallee-ruby-sdk/models/transaction_completion_details.rb +26 -4
  30. data/lib/wallee-ruby-sdk/models/transaction_user_interface_type.rb +2 -1
  31. data/lib/wallee-ruby-sdk/sdk_exception_error_codes.rb +55 -0
  32. data/lib/wallee-ruby-sdk/service/bogus_express_checkout_service.rb +114 -0
  33. data/lib/wallee-ruby-sdk/service/express_checkout_service.rb +162 -0
  34. data/lib/wallee-ruby-sdk/service/payment_terminal_transaction_summaries_service.rb +372 -0
  35. data/lib/wallee-ruby-sdk/service/webhook_encryption_keys_service.rb +2 -2
  36. data/lib/wallee-ruby-sdk/utils/encryption_util.rb +5 -5
  37. data/lib/wallee-ruby-sdk/version.rb +1 -1
  38. data/lib/wallee-ruby-sdk/wallee_sdk_exception.rb +2 -33
  39. data/lib/wallee-ruby-sdk.rb +20 -1
  40. data/test/test_querying.rb +11 -0
  41. metadata +19 -2
@@ -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&#39;s ID to retrieve the page of objects coming immediately after the named object.
52
+ # @option opts [Integer] :before Set to an object&#39;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(ErrorCode::UNKNOWN_WEBHOOK_ENCRYPTION_PUBLIC_KEY,
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(ErrorCode::INVALID_WEBHOOK_ENCRYPTION_HEADER_FORMAT,
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
- ErrorCode::MISSING_WEBHOOK_ENCRYPTION_ALGORYTHM,
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(ErrorCode::UNSUPPORTED_WEBHOOK_ENCRYPTION_ALGORYTHM,
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(ErrorCode::INVALID_WEBHOOK_ENCRYPTION_CONTENT_SIGNATURE, 'Invalid signature value format')
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(ErrorCode::INVALID_WEBHOOK_ENCRYPTION_PUBLIC_KEY, 'Invalid public key value format')
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
- ErrorCode::INVALID_WEBHOOK_ENCRYPTION_PUBLIC_KEY,
61
+ SdkExceptionErrorCodes::INVALID_WEBHOOK_ENCRYPTION_PUBLIC_KEY,
62
62
  'Invalid public key: unsupported or unparseable format'
63
63
  )
64
64
  end
@@ -21,5 +21,5 @@
21
21
  =end
22
22
 
23
23
  module WalleeRubySdk
24
- VERSION = '6.2.0'
24
+ VERSION = '6.4.0'
25
25
  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
- full_message = "Error code: #{code[:code]}. #{message}"
59
- super(full_message)
28
+ super("Error code: #{code}. #{message}")
60
29
  end
61
- end
30
+ end
@@ -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'
@@ -93,6 +97,8 @@ require 'wallee-ruby-sdk/models/bank_transaction_type'
93
97
  require 'wallee-ruby-sdk/models/billing_cycle_model'
94
98
  require 'wallee-ruby-sdk/models/billing_cycle_type'
95
99
  require 'wallee-ruby-sdk/models/billing_day_customization'
100
+ require 'wallee-ruby-sdk/models/bogus_express_checkout_approval_request'
101
+ require 'wallee-ruby-sdk/models/bogus_express_checkout_payment_data'
96
102
  require 'wallee-ruby-sdk/models/card_authentication_response'
97
103
  require 'wallee-ruby-sdk/models/card_authentication_version'
98
104
  require 'wallee-ruby-sdk/models/card_cryptogram'
@@ -214,10 +220,15 @@ require 'wallee-ruby-sdk/models/dunning_flow_list_response'
214
220
  require 'wallee-ruby-sdk/models/dunning_flow_search_response'
215
221
  require 'wallee-ruby-sdk/models/dunning_flow_type'
216
222
  require 'wallee-ruby-sdk/models/environment'
223
+ require 'wallee-ruby-sdk/models/express_checkout_approval_response'
217
224
  require 'wallee-ruby-sdk/models/express_checkout_create_response'
218
225
  require 'wallee-ruby-sdk/models/express_checkout_session'
219
226
  require 'wallee-ruby-sdk/models/express_checkout_session_create'
220
227
  require 'wallee-ruby-sdk/models/express_checkout_session_state'
228
+ require 'wallee-ruby-sdk/models/express_checkout_shipping_address_change_request'
229
+ require 'wallee-ruby-sdk/models/express_checkout_shipping_address_change_response'
230
+ require 'wallee-ruby-sdk/models/express_checkout_shipping_method_change_request'
231
+ require 'wallee-ruby-sdk/models/express_checkout_shipping_method_change_response'
221
232
  require 'wallee-ruby-sdk/models/express_checkout_shipping_option'
222
233
  require 'wallee-ruby-sdk/models/express_checkout_wallet_type'
223
234
  require 'wallee-ruby-sdk/models/external_transfer_bank_transaction'
@@ -352,6 +363,7 @@ require 'wallee-ruby-sdk/models/payment_terminal_configuration_state'
352
363
  require 'wallee-ruby-sdk/models/payment_terminal_configuration_version'
353
364
  require 'wallee-ruby-sdk/models/payment_terminal_configuration_version_state'
354
365
  require 'wallee-ruby-sdk/models/payment_terminal_create'
366
+ require 'wallee-ruby-sdk/models/payment_terminal_dcc_transaction_sum'
355
367
  require 'wallee-ruby-sdk/models/payment_terminal_location'
356
368
  require 'wallee-ruby-sdk/models/payment_terminal_location_state'
357
369
  require 'wallee-ruby-sdk/models/payment_terminal_location_version'
@@ -359,6 +371,8 @@ require 'wallee-ruby-sdk/models/payment_terminal_location_version_state'
359
371
  require 'wallee-ruby-sdk/models/payment_terminal_preparing'
360
372
  require 'wallee-ruby-sdk/models/payment_terminal_receipt_type'
361
373
  require 'wallee-ruby-sdk/models/payment_terminal_state'
374
+ require 'wallee-ruby-sdk/models/payment_terminal_transaction_sum'
375
+ require 'wallee-ruby-sdk/models/payment_terminal_transaction_summary'
362
376
  require 'wallee-ruby-sdk/models/payment_terminal_transaction_summary_reference'
363
377
  require 'wallee-ruby-sdk/models/payment_terminal_type'
364
378
  require 'wallee-ruby-sdk/models/payment_terminal_update'
@@ -418,6 +432,7 @@ require 'wallee-ruby-sdk/models/refund_type'
418
432
  require 'wallee-ruby-sdk/models/rendered_document'
419
433
  require 'wallee-ruby-sdk/models/rendered_terminal_receipt'
420
434
  require 'wallee-ruby-sdk/models/rendered_terminal_receipt_list_response'
435
+ require 'wallee-ruby-sdk/models/rendered_terminal_transaction_summary'
421
436
  require 'wallee-ruby-sdk/models/rest_address_format'
422
437
  require 'wallee-ruby-sdk/models/rest_address_format_field'
423
438
  require 'wallee-ruby-sdk/models/rest_api_bulk_operation_result'
@@ -543,6 +558,8 @@ require 'wallee-ruby-sdk/models/tenant_database'
543
558
  require 'wallee-ruby-sdk/models/terminal_list_response'
544
559
  require 'wallee-ruby-sdk/models/terminal_receipt_format'
545
560
  require 'wallee-ruby-sdk/models/terminal_search_response'
561
+ require 'wallee-ruby-sdk/models/terminal_transaction_summary_list_response'
562
+ require 'wallee-ruby-sdk/models/terminal_transaction_summary_search_response'
546
563
  require 'wallee-ruby-sdk/models/token'
547
564
  require 'wallee-ruby-sdk/models/token_create'
548
565
  require 'wallee-ruby-sdk/models/token_list_response'
@@ -622,6 +639,7 @@ require 'wallee-ruby-sdk/service/application_users_service'
622
639
  require 'wallee-ruby-sdk/service/application_users_roles_service'
623
640
  require 'wallee-ruby-sdk/service/bank_accounts_service'
624
641
  require 'wallee-ruby-sdk/service/bank_transactions_service'
642
+ require 'wallee-ruby-sdk/service/bogus_express_checkout_service'
625
643
  require 'wallee-ruby-sdk/service/charge_attempts_service'
626
644
  require 'wallee-ruby-sdk/service/charge_bank_transactions_service'
627
645
  require 'wallee-ruby-sdk/service/charge_flow_levels_service'
@@ -662,6 +680,7 @@ require 'wallee-ruby-sdk/service/payment_methods_service'
662
680
  require 'wallee-ruby-sdk/service/payment_processor_configurations_service'
663
681
  require 'wallee-ruby-sdk/service/payment_processors_service'
664
682
  require 'wallee-ruby-sdk/service/payment_sales_channels_service'
683
+ require 'wallee-ruby-sdk/service/payment_terminal_transaction_summaries_service'
665
684
  require 'wallee-ruby-sdk/service/payment_terminals_service'
666
685
  require 'wallee-ruby-sdk/service/payment_web_apps_service'
667
686
  require 'wallee-ruby-sdk/service/permissions_service'
@@ -241,4 +241,15 @@ class QueryingTest < Test::Unit::TestCase
241
241
  assert_not_nil(response.payment_connector_configuration.processor_configuration)
242
242
  assert_not_nil(response.payment_connector_configuration.processor_configuration.linked_space_id, 'Items in nested response should be present')
243
243
  end
244
+
245
+ # Querying with single quote sign.
246
+ def test_search_with_quote_sign_should_return_correct_amount_of_items
247
+ response = @transactions_service.get_payment_transactions_search(
248
+ SPACE_ID,
249
+ { expand: [], limit: 2, offset: 0, order: '', query: "completedOn:<'2026-01-15'" }
250
+ )
251
+
252
+ assert_not_nil(response.data, 'Response should not be nil')
253
+ assert_not_equal(0, response.data.length, 'Response should contain items')
254
+ end
244
255
  end