Skip to content

Commit 769710d

Browse files
Release 6.3.0
1 parent 5ec0a36 commit 769710d

18 files changed

Lines changed: 2371 additions & 99 deletions

README.md

Lines changed: 35 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,6 +1128,26 @@ Web API client: [*link*](https://app-wallee.com//api/client)<br>
11281128
&nbsp;&nbsp;&nbsp;&nbsp;<strong>GET</strong> /payment/sales-channels/search
11291129
&nbsp;&nbsp;&nbsp;&nbsp;Search payment sales channels.
11301130
<br><br>
1131+
- <strong>PaymentTerminalTransactionSummariesService</strong><br>
1132+
&nbsp;&nbsp;* <code>get_payment_terminals_transaction_summaries</code>
1133+
&nbsp;&nbsp;&nbsp;&nbsp;<strong>GET</strong> /payment/terminals/transaction-summaries
1134+
&nbsp;&nbsp;&nbsp;&nbsp;List all summaries
1135+
<br><br>
1136+
- <strong>PaymentTerminalTransactionSummariesService</strong><br>
1137+
&nbsp;&nbsp;* <code>get_payment_terminals_transaction_summaries_id</code>
1138+
&nbsp;&nbsp;&nbsp;&nbsp;<strong>GET</strong> /payment/terminals/transaction-summaries/{id}
1139+
&nbsp;&nbsp;&nbsp;&nbsp;Retrieve a summary
1140+
<br><br>
1141+
- <strong>PaymentTerminalTransactionSummariesService</strong><br>
1142+
&nbsp;&nbsp;* <code>get_payment_terminals_transaction_summaries_id_receipt</code>
1143+
&nbsp;&nbsp;&nbsp;&nbsp;<strong>GET</strong> /payment/terminals/transaction-summaries/{id}/receipt
1144+
&nbsp;&nbsp;&nbsp;&nbsp;Retrieve a rendered summary receipt
1145+
<br><br>
1146+
- <strong>PaymentTerminalTransactionSummariesService</strong><br>
1147+
&nbsp;&nbsp;* <code>get_payment_terminals_transaction_summaries_search</code>
1148+
&nbsp;&nbsp;&nbsp;&nbsp;<strong>GET</strong> /payment/terminals/transaction-summaries/search
1149+
&nbsp;&nbsp;&nbsp;&nbsp;Search summaries
1150+
<br><br>
11311151
- <strong>PaymentTerminalsService</strong><br>
11321152
&nbsp;&nbsp;* <code>delete_payment_terminals_id</code>
11331153
&nbsp;&nbsp;&nbsp;&nbsp;<strong>DELETE</strong> /payment/terminals/{id}
@@ -2915,13 +2935,16 @@ Additional Api models documentation: [*link*](https://app-wallee.com/en-us/doc/a
29152935
* <strong>PaymentTerminalConfigurationVersion</strong>
29162936
* <strong>PaymentTerminalConfigurationVersionState</strong>
29172937
* <strong>PaymentTerminalCreate</strong>
2938+
* <strong>PaymentTerminalDccTransactionSum</strong>
29182939
* <strong>PaymentTerminalLocation</strong>
29192940
* <strong>PaymentTerminalLocationState</strong>
29202941
* <strong>PaymentTerminalLocationVersion</strong>
29212942
* <strong>PaymentTerminalLocationVersionState</strong>
29222943
* <strong>PaymentTerminalPreparing</strong>
29232944
* <strong>PaymentTerminalReceiptType</strong>
29242945
* <strong>PaymentTerminalState</strong>
2946+
* <strong>PaymentTerminalTransactionSum</strong>
2947+
* <strong>PaymentTerminalTransactionSummary</strong>
29252948
* <strong>PaymentTerminalTransactionSummaryReference</strong>
29262949
* <strong>PaymentTerminalType</strong>
29272950
* <strong>PaymentTerminalUpdate</strong>
@@ -2981,6 +3004,7 @@ Additional Api models documentation: [*link*](https://app-wallee.com/en-us/doc/a
29813004
* <strong>RenderedDocument</strong>
29823005
* <strong>RenderedTerminalReceipt</strong>
29833006
* <strong>RenderedTerminalReceiptListResponse</strong>
3007+
* <strong>RenderedTerminalTransactionSummary</strong>
29843008
* <strong>RestAddressFormat</strong>
29853009
* <strong>RestAddressFormatField</strong>
29863010
* <strong>RestApiBulkOperationResult</strong>
@@ -3106,6 +3130,8 @@ Additional Api models documentation: [*link*](https://app-wallee.com/en-us/doc/a
31063130
* <strong>TerminalListResponse</strong>
31073131
* <strong>TerminalReceiptFormat</strong>
31083132
* <strong>TerminalSearchResponse</strong>
3133+
* <strong>TerminalTransactionSummaryListResponse</strong>
3134+
* <strong>TerminalTransactionSummarySearchResponse</strong>
31093135
* <strong>Token</strong>
31103136
* <strong>TokenCreate</strong>
31113137
* <strong>TokenListResponse</strong>
@@ -3186,40 +3212,20 @@ When working with webhooks, the `WalleeRubySdk::WalleeSdkException` may throw er
31863212

31873213
### Error Code Categories
31883214

3189-
| **Range** | **Category** | **Description** |
3190-
|-----------|--------------|-----------------|
3191-
| **404** | Not Found | Indicates that the requested resource could not be found or the endpoint returned an empty response |
3192-
| **1000–1999** | Client-Side Errors | Errors typically caused by invalid input |
3193-
| **2000–2999** | Server-Side Errors | Errors typically caused by incorrect data provided by the server |
3194-
3195-
### Error Code Reference
3196-
3197-
| **Code** | **Error Name** | **Description** | **Category** |
3198-
|----------|----------------|-----------------|--------------|
3199-
| 404 | `UNKNOWN_WEBHOOK_ENCRYPTION_PUBLIC_KEY` | Unknown webhook signature public key | Not Found |
3200-
| 1000 | `WEBHOOK_ENCRYPTION_GENERAL_ERROR` | General webhook encryption error | Client-Side |
3201-
| 1001 | `INVALID_WEBHOOK_ENCRYPTION_PUBLIC_KEY` | Invalid webhook signature public key | Client-Side |
3202-
| 1002 | `INVALID_WEBHOOK_ENCRYPTION_HEADER_FORMAT` | Invalid webhook signature header | Client-Side |
3203-
| 1003 | `UNSUPPORTED_WEBHOOK_ENCRYPTION_ALGORYTHM` | Unsupported webhook signature algorithm | Client-Side |
3204-
| 1004 | `UNKNOWN_WEBHOOK_ENCRYPTION_PROVIDER` | Unknown webhook encryption provider | Client-Side |
3205-
| 1005 | `WEBHOOK_ENCRYPTION_VERIFIER_INIT_ERROR` | Encryption verifier initialization error | Client-Side |
3206-
| 1006 | `WEBHOOK_ENCRYPTION_VERIFIER_CONTENT_UPDATE_ERROR` | Error during content update in encryption verifier | Client-Side |
3207-
| 1007 | `WEBHOOK_ENCRYPTION_SIGNATURE_VERIFICATION_FAILED` | Encryption signature verification failed | Client-Side |
3208-
| 1008 | `INVALID_WEBHOOK_ENCRYPTION_CONTENT_SIGNATURE` | Invalid webhook content signature | Client-Side |
3209-
| 2000 | `MISSING_WEBHOOK_ENCRYPTION_ALGORYTHM` | Missing webhook signature algorithm value | Server-Side |
3215+
| **Exception** | **Description** |
3216+
|----------------------------|---------------------------------------------------------------------------------------|
3217+
| **ApiExceptionErrorCodes** | Lists the possible HTTP error codes an `ApiException` can generate |
3218+
| **SdkExceptionErrorCodes** | Lists the possible error codes a `WalleeSdkException` can generate |
32103219

32113220
### Usage Example
32123221
```ruby
32133222
begin
3214-
# Webhook SDK operation
3215-
rescue WalleeSdkException => e
3216-
case e.code
3217-
when 1001
3218-
# Handle invalid public key
3219-
when 1007
3220-
# Handle signature verification failure
3223+
# SDK operation
3224+
rescue WalleeRubySdk::ApiError => ex
3225+
if WalleeRubySdk::ApiExceptionErrorCodes.is?(ex, WalleeRubySdk::ApiExceptionErrorCodes::CONFLICT)
3226+
# Conflict error handling
32213227
else
3222-
# Handle other errors
3228+
# Other error handling
32233229
end
32243230
end
32253231
```

lib/wallee-ruby-sdk.rb

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,12 @@
2525
require 'wallee-ruby-sdk/api_error'
2626
require 'wallee-ruby-sdk/version'
2727
require 'wallee-ruby-sdk/configuration'
28-
require 'wallee-ruby-sdk/utils/encryption_util'
2928
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'
3034

3135
# Models
3236
require 'wallee-ruby-sdk/models/abstract_account_update'
@@ -352,13 +356,16 @@
352356
require 'wallee-ruby-sdk/models/payment_terminal_configuration_version'
353357
require 'wallee-ruby-sdk/models/payment_terminal_configuration_version_state'
354358
require 'wallee-ruby-sdk/models/payment_terminal_create'
359+
require 'wallee-ruby-sdk/models/payment_terminal_dcc_transaction_sum'
355360
require 'wallee-ruby-sdk/models/payment_terminal_location'
356361
require 'wallee-ruby-sdk/models/payment_terminal_location_state'
357362
require 'wallee-ruby-sdk/models/payment_terminal_location_version'
358363
require 'wallee-ruby-sdk/models/payment_terminal_location_version_state'
359364
require 'wallee-ruby-sdk/models/payment_terminal_preparing'
360365
require 'wallee-ruby-sdk/models/payment_terminal_receipt_type'
361366
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'
362369
require 'wallee-ruby-sdk/models/payment_terminal_transaction_summary_reference'
363370
require 'wallee-ruby-sdk/models/payment_terminal_type'
364371
require 'wallee-ruby-sdk/models/payment_terminal_update'
@@ -418,6 +425,7 @@
418425
require 'wallee-ruby-sdk/models/rendered_document'
419426
require 'wallee-ruby-sdk/models/rendered_terminal_receipt'
420427
require 'wallee-ruby-sdk/models/rendered_terminal_receipt_list_response'
428+
require 'wallee-ruby-sdk/models/rendered_terminal_transaction_summary'
421429
require 'wallee-ruby-sdk/models/rest_address_format'
422430
require 'wallee-ruby-sdk/models/rest_address_format_field'
423431
require 'wallee-ruby-sdk/models/rest_api_bulk_operation_result'
@@ -543,6 +551,8 @@
543551
require 'wallee-ruby-sdk/models/terminal_list_response'
544552
require 'wallee-ruby-sdk/models/terminal_receipt_format'
545553
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'
546556
require 'wallee-ruby-sdk/models/token'
547557
require 'wallee-ruby-sdk/models/token_create'
548558
require 'wallee-ruby-sdk/models/token_list_response'
@@ -662,6 +672,7 @@
662672
require 'wallee-ruby-sdk/service/payment_processor_configurations_service'
663673
require 'wallee-ruby-sdk/service/payment_processors_service'
664674
require 'wallee-ruby-sdk/service/payment_sales_channels_service'
675+
require 'wallee-ruby-sdk/service/payment_terminal_transaction_summaries_service'
665676
require 'wallee-ruby-sdk/service/payment_terminals_service'
666677
require 'wallee-ruby-sdk/service/payment_web_apps_service'
667678
require 'wallee-ruby-sdk/service/permissions_service'

lib/wallee-ruby-sdk/api_client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def build_request(http_method, path, request, opts = {}, connection_timeout)
118118
http_method = http_method.to_sym.downcase
119119

120120
default_headers = {
121-
'x-meta-sdk-version': "6.2.0",
121+
'x-meta-sdk-version': "6.3.0",
122122
'x-meta-sdk-language': "ruby",
123123
'x-meta-sdk-provider': "wallee",
124124
'x-meta-sdk-language-version': RUBY_VERSION
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
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+
module WalleeRubySdk
24+
module ApiExceptionErrorCodes
25+
# This class represents possible HTTP error codes which can be sent by the API.
26+
# This list corresponds to https://app-wallee.com/en-us/doc/api/web-service#_errors
27+
28+
# The request was not accepted often due to missing or invalid parameters
29+
BAD_REQUEST = 400
30+
# The necessary authentication credentials are missing or incorrect
31+
UNAUTHORIZED = 401
32+
# The application user is missing the required permissions
33+
FORBIDDEN = 403
34+
# The requested resource was not found
35+
NOT_FOUND = 404
36+
# The requested response format is not supported
37+
NOT_ACCEPTABLE = 406
38+
# The request conflicts with another request often because of to optimistic locking
39+
CONFLICT = 409
40+
# Too many operations in a bulk request
41+
PAYLOAD_TOO_LARGE = 413
42+
# The request provides unsupported or invalid data
43+
UNSUPPORTED_MEDIA_TYPE = 415
44+
# The pagination offset exceeds the limit
45+
RANGE_NOT_SATISFIABLE = 416
46+
# The request is well-formed but contains semantic errors. Check the response body for details
47+
UNPROCESSABLE_ENTITY = 422
48+
# Too many requests hit the API too quickly
49+
TOO_MANY_REQUESTS = 429
50+
# An internal error occurred on the server
51+
INTERNAL_SERVER_ERROR = 500
52+
53+
# Checks if the given exception matches the specific error code.
54+
# @param exception [ApiException] The exception to check
55+
# @param code [Integer] The error code to compare against
56+
def self.is?(exception, code)
57+
exception.code == code
58+
end
59+
end
60+
end

lib/wallee-ruby-sdk/models/payment_terminal_address.rb

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,12 +205,20 @@ def list_invalid_properties
205205
invalid_properties.push('invalid value for "mobile_phone_number", the character length must be smaller than or equal to 100.')
206206
end
207207

208+
if !@postcode.nil? && @postcode.to_s.length > 12
209+
invalid_properties.push('invalid value for "postcode", the character length must be smaller than or equal to 12.')
210+
end
211+
208212
if !@dependent_locality.nil? && @dependent_locality.to_s.length > 100
209213
invalid_properties.push('invalid value for "dependent_locality", the character length must be smaller than or equal to 100.')
210214
end
211215

212-
if !@email_address.nil? && @email_address.to_s.length > 254
213-
invalid_properties.push('invalid value for "email_address", the character length must be smaller than or equal to 254.')
216+
if !@email_address.nil? && @email_address.to_s.length > 80
217+
invalid_properties.push('invalid value for "email_address", the character length must be smaller than or equal to 80.')
218+
end
219+
220+
if !@phone_number.nil? && @phone_number.to_s.length > 20
221+
invalid_properties.push('invalid value for "phone_number", the character length must be smaller than or equal to 20.')
214222
end
215223

216224
if !@sorting_code.nil? && @sorting_code.to_s.length > 100
@@ -229,8 +237,10 @@ def list_invalid_properties
229237
def valid?
230238
warn '[DEPRECATED] the `valid?` method is obsolete'
231239
return false if !@mobile_phone_number.nil? && @mobile_phone_number.to_s.length > 100
240+
return false if !@postcode.nil? && @postcode.to_s.length > 12
232241
return false if !@dependent_locality.nil? && @dependent_locality.to_s.length > 100
233-
return false if !@email_address.nil? && @email_address.to_s.length > 254
242+
return false if !@email_address.nil? && @email_address.to_s.length > 80
243+
return false if !@phone_number.nil? && @phone_number.to_s.length > 20
234244
return false if !@sorting_code.nil? && @sorting_code.to_s.length > 100
235245
return false if !@salutation.nil? && @salutation.to_s.length > 20
236246
true
@@ -250,6 +260,20 @@ def mobile_phone_number=(mobile_phone_number)
250260
@mobile_phone_number = mobile_phone_number
251261
end
252262

263+
# Custom attribute writer method with validation
264+
# @param [Object] postcode Value to be assigned
265+
def postcode=(postcode)
266+
if postcode.nil?
267+
fail ArgumentError, 'postcode cannot be nil'
268+
end
269+
270+
if postcode.to_s.length > 12
271+
fail ArgumentError, 'invalid value for "postcode", the character length must be smaller than or equal to 12.'
272+
end
273+
274+
@postcode = postcode
275+
end
276+
253277
# Custom attribute writer method with validation
254278
# @param [Object] dependent_locality Value to be assigned
255279
def dependent_locality=(dependent_locality)
@@ -271,13 +295,27 @@ def email_address=(email_address)
271295
fail ArgumentError, 'email_address cannot be nil'
272296
end
273297

274-
if email_address.to_s.length > 254
275-
fail ArgumentError, 'invalid value for "email_address", the character length must be smaller than or equal to 254.'
298+
if email_address.to_s.length > 80
299+
fail ArgumentError, 'invalid value for "email_address", the character length must be smaller than or equal to 80.'
276300
end
277301

278302
@email_address = email_address
279303
end
280304

305+
# Custom attribute writer method with validation
306+
# @param [Object] phone_number Value to be assigned
307+
def phone_number=(phone_number)
308+
if phone_number.nil?
309+
fail ArgumentError, 'phone_number cannot be nil'
310+
end
311+
312+
if phone_number.to_s.length > 20
313+
fail ArgumentError, 'invalid value for "phone_number", the character length must be smaller than or equal to 20.'
314+
end
315+
316+
@phone_number = phone_number
317+
end
318+
281319
# Custom attribute writer method with validation
282320
# @param [Object] sorting_code Value to be assigned
283321
def sorting_code=(sorting_code)

0 commit comments

Comments
 (0)