postfinancecheckout-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.
@@ -0,0 +1,372 @@
1
+ =begin
2
+ # PostFinance Ruby SDK
3
+ #
4
+ # This library allows to interact with the PostFinance payment service.
5
+ #
6
+ # Copyright owner: Wallee AG
7
+ # Website: https://www.postfinance.ch/en/private.html
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 PostfinancecheckoutRubySdk
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 PostfinancecheckoutRubySdk
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 PostFinanceCheckoutSdkException.new(ErrorCode::UNKNOWN_WEBHOOK_ENCRYPTION_PUBLIC_KEY,
116
+ raise PostFinanceCheckoutSdkException.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 PostfinancecheckoutRubySdk
127
127
  signature_algorithm
128
128
  )
129
129
  else
130
- raise PostFinanceCheckoutSdkException.new(ErrorCode::INVALID_WEBHOOK_ENCRYPTION_HEADER_FORMAT,
130
+ raise PostFinanceCheckoutSdkException.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 PostfinancecheckoutRubySdk
29
29
 
30
30
  if encryption_algorithm.nil? || encryption_algorithm.empty?
31
31
  raise PostFinanceCheckoutSdkException.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 PostfinancecheckoutRubySdk
45
45
  begin
46
46
  signature = Base64.decode64(signature)
47
47
  rescue ArgumentError
48
- raise PostFinanceCheckoutSdkException.new(ErrorCode::INVALID_WEBHOOK_ENCRYPTION_CONTENT_SIGNATURE, 'Invalid signature value format')
48
+ raise PostFinanceCheckoutSdkException.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 PostFinanceCheckoutSdkException.new(ErrorCode::INVALID_WEBHOOK_ENCRYPTION_PUBLIC_KEY, 'Invalid public key value format')
54
+ raise PostFinanceCheckoutSdkException.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 PostFinanceCheckoutSdkException.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 PostfinancecheckoutRubySdk
24
- VERSION = '6.2.0'
24
+ VERSION = '6.3.0'
25
25
  end
@@ -25,8 +25,12 @@ require 'postfinancecheckout-ruby-sdk/api_client'
25
25
  require 'postfinancecheckout-ruby-sdk/api_error'
26
26
  require 'postfinancecheckout-ruby-sdk/version'
27
27
  require 'postfinancecheckout-ruby-sdk/configuration'
28
- require 'postfinancecheckout-ruby-sdk/utils/encryption_util'
29
28
  require 'postfinancecheckout-ruby-sdk/postfinancecheckout_sdk_exception'
29
+ require 'postfinancecheckout-ruby-sdk/sdk_exception_error_codes'
30
+ require 'postfinancecheckout-ruby-sdk/api_exception_error_codes'
31
+
32
+ # Utils
33
+ require 'postfinancecheckout-ruby-sdk/utils/encryption_util'
30
34
 
31
35
  # Models
32
36
  require 'postfinancecheckout-ruby-sdk/models/abstract_account_update'
@@ -306,6 +310,7 @@ require 'postfinancecheckout-ruby-sdk/models/payment_terminal_configuration_stat
306
310
  require 'postfinancecheckout-ruby-sdk/models/payment_terminal_configuration_version'
307
311
  require 'postfinancecheckout-ruby-sdk/models/payment_terminal_configuration_version_state'
308
312
  require 'postfinancecheckout-ruby-sdk/models/payment_terminal_create'
313
+ require 'postfinancecheckout-ruby-sdk/models/payment_terminal_dcc_transaction_sum'
309
314
  require 'postfinancecheckout-ruby-sdk/models/payment_terminal_location'
310
315
  require 'postfinancecheckout-ruby-sdk/models/payment_terminal_location_state'
311
316
  require 'postfinancecheckout-ruby-sdk/models/payment_terminal_location_version'
@@ -313,6 +318,8 @@ require 'postfinancecheckout-ruby-sdk/models/payment_terminal_location_version_s
313
318
  require 'postfinancecheckout-ruby-sdk/models/payment_terminal_preparing'
314
319
  require 'postfinancecheckout-ruby-sdk/models/payment_terminal_receipt_type'
315
320
  require 'postfinancecheckout-ruby-sdk/models/payment_terminal_state'
321
+ require 'postfinancecheckout-ruby-sdk/models/payment_terminal_transaction_sum'
322
+ require 'postfinancecheckout-ruby-sdk/models/payment_terminal_transaction_summary'
316
323
  require 'postfinancecheckout-ruby-sdk/models/payment_terminal_transaction_summary_reference'
317
324
  require 'postfinancecheckout-ruby-sdk/models/payment_terminal_type'
318
325
  require 'postfinancecheckout-ruby-sdk/models/payment_terminal_update'
@@ -372,6 +379,7 @@ require 'postfinancecheckout-ruby-sdk/models/refund_type'
372
379
  require 'postfinancecheckout-ruby-sdk/models/rendered_document'
373
380
  require 'postfinancecheckout-ruby-sdk/models/rendered_terminal_receipt'
374
381
  require 'postfinancecheckout-ruby-sdk/models/rendered_terminal_receipt_list_response'
382
+ require 'postfinancecheckout-ruby-sdk/models/rendered_terminal_transaction_summary'
375
383
  require 'postfinancecheckout-ruby-sdk/models/rest_address_format'
376
384
  require 'postfinancecheckout-ruby-sdk/models/rest_address_format_field'
377
385
  require 'postfinancecheckout-ruby-sdk/models/rest_api_bulk_operation_result'
@@ -497,6 +505,8 @@ require 'postfinancecheckout-ruby-sdk/models/tenant_database'
497
505
  require 'postfinancecheckout-ruby-sdk/models/terminal_list_response'
498
506
  require 'postfinancecheckout-ruby-sdk/models/terminal_receipt_format'
499
507
  require 'postfinancecheckout-ruby-sdk/models/terminal_search_response'
508
+ require 'postfinancecheckout-ruby-sdk/models/terminal_transaction_summary_list_response'
509
+ require 'postfinancecheckout-ruby-sdk/models/terminal_transaction_summary_search_response'
500
510
  require 'postfinancecheckout-ruby-sdk/models/token'
501
511
  require 'postfinancecheckout-ruby-sdk/models/token_create'
502
512
  require 'postfinancecheckout-ruby-sdk/models/token_list_response'
@@ -612,6 +622,7 @@ require 'postfinancecheckout-ruby-sdk/service/payment_methods_service'
612
622
  require 'postfinancecheckout-ruby-sdk/service/payment_processor_configurations_service'
613
623
  require 'postfinancecheckout-ruby-sdk/service/payment_processors_service'
614
624
  require 'postfinancecheckout-ruby-sdk/service/payment_sales_channels_service'
625
+ require 'postfinancecheckout-ruby-sdk/service/payment_terminal_transaction_summaries_service'
615
626
  require 'postfinancecheckout-ruby-sdk/service/payment_terminals_service'
616
627
  require 'postfinancecheckout-ruby-sdk/service/permissions_service'
617
628
  require 'postfinancecheckout-ruby-sdk/service/refund_bank_transactions_service'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postfinancecheckout-ruby-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.2.0
4
+ version: 6.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - wallee AG
@@ -129,6 +129,7 @@ files:
129
129
  - lib/postfinancecheckout-ruby-sdk.rb
130
130
  - lib/postfinancecheckout-ruby-sdk/api_client.rb
131
131
  - lib/postfinancecheckout-ruby-sdk/api_error.rb
132
+ - lib/postfinancecheckout-ruby-sdk/api_exception_error_codes.rb
132
133
  - lib/postfinancecheckout-ruby-sdk/configuration.rb
133
134
  - lib/postfinancecheckout-ruby-sdk/models/abstract_account_update.rb
134
135
  - lib/postfinancecheckout-ruby-sdk/models/abstract_application_user_update.rb
@@ -407,6 +408,7 @@ files:
407
408
  - lib/postfinancecheckout-ruby-sdk/models/payment_terminal_configuration_version.rb
408
409
  - lib/postfinancecheckout-ruby-sdk/models/payment_terminal_configuration_version_state.rb
409
410
  - lib/postfinancecheckout-ruby-sdk/models/payment_terminal_create.rb
411
+ - lib/postfinancecheckout-ruby-sdk/models/payment_terminal_dcc_transaction_sum.rb
410
412
  - lib/postfinancecheckout-ruby-sdk/models/payment_terminal_location.rb
411
413
  - lib/postfinancecheckout-ruby-sdk/models/payment_terminal_location_state.rb
412
414
  - lib/postfinancecheckout-ruby-sdk/models/payment_terminal_location_version.rb
@@ -414,6 +416,8 @@ files:
414
416
  - lib/postfinancecheckout-ruby-sdk/models/payment_terminal_preparing.rb
415
417
  - lib/postfinancecheckout-ruby-sdk/models/payment_terminal_receipt_type.rb
416
418
  - lib/postfinancecheckout-ruby-sdk/models/payment_terminal_state.rb
419
+ - lib/postfinancecheckout-ruby-sdk/models/payment_terminal_transaction_sum.rb
420
+ - lib/postfinancecheckout-ruby-sdk/models/payment_terminal_transaction_summary.rb
417
421
  - lib/postfinancecheckout-ruby-sdk/models/payment_terminal_transaction_summary_reference.rb
418
422
  - lib/postfinancecheckout-ruby-sdk/models/payment_terminal_type.rb
419
423
  - lib/postfinancecheckout-ruby-sdk/models/payment_terminal_update.rb
@@ -473,6 +477,7 @@ files:
473
477
  - lib/postfinancecheckout-ruby-sdk/models/rendered_document.rb
474
478
  - lib/postfinancecheckout-ruby-sdk/models/rendered_terminal_receipt.rb
475
479
  - lib/postfinancecheckout-ruby-sdk/models/rendered_terminal_receipt_list_response.rb
480
+ - lib/postfinancecheckout-ruby-sdk/models/rendered_terminal_transaction_summary.rb
476
481
  - lib/postfinancecheckout-ruby-sdk/models/rest_address_format.rb
477
482
  - lib/postfinancecheckout-ruby-sdk/models/rest_address_format_field.rb
478
483
  - lib/postfinancecheckout-ruby-sdk/models/rest_api_bulk_operation_result.rb
@@ -598,6 +603,8 @@ files:
598
603
  - lib/postfinancecheckout-ruby-sdk/models/terminal_list_response.rb
599
604
  - lib/postfinancecheckout-ruby-sdk/models/terminal_receipt_format.rb
600
605
  - lib/postfinancecheckout-ruby-sdk/models/terminal_search_response.rb
606
+ - lib/postfinancecheckout-ruby-sdk/models/terminal_transaction_summary_list_response.rb
607
+ - lib/postfinancecheckout-ruby-sdk/models/terminal_transaction_summary_search_response.rb
601
608
  - lib/postfinancecheckout-ruby-sdk/models/token.rb
602
609
  - lib/postfinancecheckout-ruby-sdk/models/token_create.rb
603
610
  - lib/postfinancecheckout-ruby-sdk/models/token_list_response.rb
@@ -670,6 +677,7 @@ files:
670
677
  - lib/postfinancecheckout-ruby-sdk/models/webhook_url_search_response.rb
671
678
  - lib/postfinancecheckout-ruby-sdk/models/webhook_url_update.rb
672
679
  - lib/postfinancecheckout-ruby-sdk/postfinancecheckout_sdk_exception.rb
680
+ - lib/postfinancecheckout-ruby-sdk/sdk_exception_error_codes.rb
673
681
  - lib/postfinancecheckout-ruby-sdk/service/accounts_service.rb
674
682
  - lib/postfinancecheckout-ruby-sdk/service/analytics_queries_service.rb
675
683
  - lib/postfinancecheckout-ruby-sdk/service/application_users_roles_service.rb
@@ -712,6 +720,7 @@ files:
712
720
  - lib/postfinancecheckout-ruby-sdk/service/payment_processor_configurations_service.rb
713
721
  - lib/postfinancecheckout-ruby-sdk/service/payment_processors_service.rb
714
722
  - lib/postfinancecheckout-ruby-sdk/service/payment_sales_channels_service.rb
723
+ - lib/postfinancecheckout-ruby-sdk/service/payment_terminal_transaction_summaries_service.rb
715
724
  - lib/postfinancecheckout-ruby-sdk/service/payment_terminals_service.rb
716
725
  - lib/postfinancecheckout-ruby-sdk/service/permissions_service.rb
717
726
  - lib/postfinancecheckout-ruby-sdk/service/refund_bank_transactions_service.rb