wallee-ruby-sdk 6.3.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 (28) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +55 -13
  3. data/LICENSE +1 -1
  4. data/README.md +22 -0
  5. data/lib/wallee-ruby-sdk/api_client.rb +1 -1
  6. data/lib/wallee-ruby-sdk/models/bogus_express_checkout_approval_request.rb +230 -0
  7. data/lib/wallee-ruby-sdk/models/bogus_express_checkout_payment_data.rb +241 -0
  8. data/lib/wallee-ruby-sdk/models/express_checkout_approval_response.rb +270 -0
  9. data/lib/wallee-ruby-sdk/models/express_checkout_create_response.rb +13 -4
  10. data/lib/wallee-ruby-sdk/models/express_checkout_session.rb +39 -1
  11. data/lib/wallee-ruby-sdk/models/express_checkout_session_create.rb +21 -1
  12. data/lib/wallee-ruby-sdk/models/express_checkout_shipping_address_change_request.rb +239 -0
  13. data/lib/wallee-ruby-sdk/models/express_checkout_shipping_address_change_response.rb +241 -0
  14. data/lib/wallee-ruby-sdk/models/express_checkout_shipping_method_change_request.rb +231 -0
  15. data/lib/wallee-ruby-sdk/models/express_checkout_shipping_method_change_response.rb +241 -0
  16. data/lib/wallee-ruby-sdk/models/express_checkout_shipping_option.rb +1 -1
  17. data/lib/wallee-ruby-sdk/models/refund.rb +13 -1
  18. data/lib/wallee-ruby-sdk/models/refund_create.rb +13 -1
  19. data/lib/wallee-ruby-sdk/models/scope.rb +15 -15
  20. data/lib/wallee-ruby-sdk/models/transaction_completion.rb +13 -1
  21. data/lib/wallee-ruby-sdk/models/transaction_completion_details.rb +26 -4
  22. data/lib/wallee-ruby-sdk/models/transaction_user_interface_type.rb +2 -1
  23. data/lib/wallee-ruby-sdk/service/bogus_express_checkout_service.rb +114 -0
  24. data/lib/wallee-ruby-sdk/service/express_checkout_service.rb +162 -0
  25. data/lib/wallee-ruby-sdk/version.rb +1 -1
  26. data/lib/wallee-ruby-sdk.rb +8 -0
  27. data/test/test_querying.rb +11 -0
  28. metadata +10 -2
@@ -0,0 +1,114 @@
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 BogusExpressCheckoutService
27
+ attr_accessor :api_client
28
+
29
+
30
+ def initialize(api_client = ApiClient.default)
31
+ @api_client = api_client
32
+ end
33
+ # Approve express checkout wallet payment
34
+ # @param session_token [String]
35
+ # @param space [Integer] Specifies the ID of the space the operation should be executed in.
36
+ # @param bogus_express_checkout_approval_request [BogusExpressCheckoutApprovalRequest]
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [ExpressCheckoutApprovalResponse]
39
+ def post_bogus_express_checkout_on_approve(session_token, space, bogus_express_checkout_approval_request, opts = {})
40
+ data, _status_code, _headers = post_bogus_express_checkout_on_approve_with_http_info(session_token, space, bogus_express_checkout_approval_request, opts)
41
+ data
42
+ end
43
+
44
+ # Approve express checkout wallet payment
45
+
46
+ # @param session_token [String]
47
+ # @param space [Integer] Specifies the ID of the space the operation should be executed in.
48
+ # @param bogus_express_checkout_approval_request [BogusExpressCheckoutApprovalRequest]
49
+ # @param [Hash] opts the optional parameters
50
+ # @return [Array<(ExpressCheckoutApprovalResponse, Integer, Hash)>] ExpressCheckoutApprovalResponse data, response status code and response headers
51
+ def post_bogus_express_checkout_on_approve_with_http_info(session_token, space, bogus_express_checkout_approval_request, opts = {})
52
+ if @api_client.config.debugging
53
+ @api_client.config.logger.debug 'Calling API: BogusExpressCheckoutService.post_bogus_express_checkout_on_approve ...'
54
+ end
55
+ # verify the required parameter 'session_token' is set
56
+ if @api_client.config.client_side_validation && session_token.nil?
57
+ fail ArgumentError, "Missing the required parameter 'session_token' when calling BogusExpressCheckoutService.post_bogus_express_checkout_on_approve"
58
+ end
59
+ # verify the required parameter 'space' is set
60
+ if @api_client.config.client_side_validation && space.nil?
61
+ fail ArgumentError, "Missing the required parameter 'space' when calling BogusExpressCheckoutService.post_bogus_express_checkout_on_approve"
62
+ end
63
+ # verify the required parameter 'bogus_express_checkout_approval_request' is set
64
+ if @api_client.config.client_side_validation && bogus_express_checkout_approval_request.nil?
65
+ fail ArgumentError, "Missing the required parameter 'bogus_express_checkout_approval_request' when calling BogusExpressCheckoutService.post_bogus_express_checkout_on_approve"
66
+ end
67
+ # resource path
68
+ local_var_path = '/bogus-express-checkout/on-approve'
69
+
70
+ # query parameters
71
+ query_params = opts[:query_params] || {}
72
+ query_params[:'sessionToken'] = session_token
73
+
74
+ # header parameters
75
+ header_params = opts[:header_params] || {}
76
+ # HTTP header 'Accept' (if needed)
77
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
78
+ # HTTP header 'Content-Type'
79
+ content_type = @api_client.select_header_content_type(['application/json'])
80
+ if !content_type.nil?
81
+ header_params['Content-Type'] = content_type
82
+ end
83
+ header_params[:'Space'] = space
84
+
85
+ # form parameters
86
+ form_params = opts[:form_params] || {}
87
+
88
+ # connection timeout
89
+ connection_timeout = @api_client.config.timeout
90
+
91
+ # http body (model)
92
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(bogus_express_checkout_approval_request)
93
+
94
+ # return_type
95
+ return_type = opts[:debug_return_type] || 'ExpressCheckoutApprovalResponse'
96
+
97
+ new_options = opts.merge(
98
+ :operation => :"BogusExpressCheckoutService.post_bogus_express_checkout_on_approve",
99
+ :header_params => header_params,
100
+ :query_params => query_params,
101
+ :form_params => form_params,
102
+ :body => post_body,
103
+ :return_type => return_type
104
+ )
105
+
106
+ data, status_code, headers = @api_client.call_api(:POST.to_sym.downcase, local_var_path, new_options, connection_timeout)
107
+ if @api_client.config.debugging
108
+ @api_client.config.logger.debug "API called: BogusExpressCheckoutService#post_bogus_express_checkout_on_approve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
109
+ end
110
+ return data, status_code, headers
111
+ end
112
+
113
+ end
114
+ end
@@ -30,6 +30,168 @@ module WalleeRubySdk
30
30
  def initialize(api_client = ApiClient.default)
31
31
  @api_client = api_client
32
32
  end
33
+ # Change shipping address
34
+ # @param session_token [String]
35
+ # @param space [Integer] Specifies the ID of the space the operation should be executed in.
36
+ # @param express_checkout_shipping_address_change_request [ExpressCheckoutShippingAddressChangeRequest]
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [ExpressCheckoutShippingAddressChangeResponse]
39
+ def patch_express_checkout_shipping_address_change(session_token, space, express_checkout_shipping_address_change_request, opts = {})
40
+ data, _status_code, _headers = patch_express_checkout_shipping_address_change_with_http_info(session_token, space, express_checkout_shipping_address_change_request, opts)
41
+ data
42
+ end
43
+
44
+ # Change shipping address
45
+
46
+ # @param session_token [String]
47
+ # @param space [Integer] Specifies the ID of the space the operation should be executed in.
48
+ # @param express_checkout_shipping_address_change_request [ExpressCheckoutShippingAddressChangeRequest]
49
+ # @param [Hash] opts the optional parameters
50
+ # @return [Array<(ExpressCheckoutShippingAddressChangeResponse, Integer, Hash)>] ExpressCheckoutShippingAddressChangeResponse data, response status code and response headers
51
+ def patch_express_checkout_shipping_address_change_with_http_info(session_token, space, express_checkout_shipping_address_change_request, opts = {})
52
+ if @api_client.config.debugging
53
+ @api_client.config.logger.debug 'Calling API: ExpressCheckoutService.patch_express_checkout_shipping_address_change ...'
54
+ end
55
+ # verify the required parameter 'session_token' is set
56
+ if @api_client.config.client_side_validation && session_token.nil?
57
+ fail ArgumentError, "Missing the required parameter 'session_token' when calling ExpressCheckoutService.patch_express_checkout_shipping_address_change"
58
+ end
59
+ # verify the required parameter 'space' is set
60
+ if @api_client.config.client_side_validation && space.nil?
61
+ fail ArgumentError, "Missing the required parameter 'space' when calling ExpressCheckoutService.patch_express_checkout_shipping_address_change"
62
+ end
63
+ # verify the required parameter 'express_checkout_shipping_address_change_request' is set
64
+ if @api_client.config.client_side_validation && express_checkout_shipping_address_change_request.nil?
65
+ fail ArgumentError, "Missing the required parameter 'express_checkout_shipping_address_change_request' when calling ExpressCheckoutService.patch_express_checkout_shipping_address_change"
66
+ end
67
+ # resource path
68
+ local_var_path = '/express-checkout/shipping/address-change'
69
+
70
+ # query parameters
71
+ query_params = opts[:query_params] || {}
72
+ query_params[:'sessionToken'] = session_token
73
+
74
+ # header parameters
75
+ header_params = opts[:header_params] || {}
76
+ # HTTP header 'Accept' (if needed)
77
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
78
+ # HTTP header 'Content-Type'
79
+ content_type = @api_client.select_header_content_type(['application/json'])
80
+ if !content_type.nil?
81
+ header_params['Content-Type'] = content_type
82
+ end
83
+ header_params[:'Space'] = space
84
+
85
+ # form parameters
86
+ form_params = opts[:form_params] || {}
87
+
88
+ # connection timeout
89
+ connection_timeout = @api_client.config.timeout
90
+
91
+ # http body (model)
92
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(express_checkout_shipping_address_change_request)
93
+
94
+ # return_type
95
+ return_type = opts[:debug_return_type] || 'ExpressCheckoutShippingAddressChangeResponse'
96
+
97
+ new_options = opts.merge(
98
+ :operation => :"ExpressCheckoutService.patch_express_checkout_shipping_address_change",
99
+ :header_params => header_params,
100
+ :query_params => query_params,
101
+ :form_params => form_params,
102
+ :body => post_body,
103
+ :return_type => return_type
104
+ )
105
+
106
+ data, status_code, headers = @api_client.call_api(:PATCH.to_sym.downcase, local_var_path, new_options, connection_timeout)
107
+ if @api_client.config.debugging
108
+ @api_client.config.logger.debug "API called: ExpressCheckoutService#patch_express_checkout_shipping_address_change\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
109
+ end
110
+ return data, status_code, headers
111
+ end
112
+
113
+
114
+ # Change shipping method
115
+ # @param session_token [String]
116
+ # @param space [Integer] Specifies the ID of the space the operation should be executed in.
117
+ # @param express_checkout_shipping_method_change_request [ExpressCheckoutShippingMethodChangeRequest]
118
+ # @param [Hash] opts the optional parameters
119
+ # @return [ExpressCheckoutShippingMethodChangeResponse]
120
+ def patch_express_checkout_shipping_method_change(session_token, space, express_checkout_shipping_method_change_request, opts = {})
121
+ data, _status_code, _headers = patch_express_checkout_shipping_method_change_with_http_info(session_token, space, express_checkout_shipping_method_change_request, opts)
122
+ data
123
+ end
124
+
125
+ # Change shipping method
126
+
127
+ # @param session_token [String]
128
+ # @param space [Integer] Specifies the ID of the space the operation should be executed in.
129
+ # @param express_checkout_shipping_method_change_request [ExpressCheckoutShippingMethodChangeRequest]
130
+ # @param [Hash] opts the optional parameters
131
+ # @return [Array<(ExpressCheckoutShippingMethodChangeResponse, Integer, Hash)>] ExpressCheckoutShippingMethodChangeResponse data, response status code and response headers
132
+ def patch_express_checkout_shipping_method_change_with_http_info(session_token, space, express_checkout_shipping_method_change_request, opts = {})
133
+ if @api_client.config.debugging
134
+ @api_client.config.logger.debug 'Calling API: ExpressCheckoutService.patch_express_checkout_shipping_method_change ...'
135
+ end
136
+ # verify the required parameter 'session_token' is set
137
+ if @api_client.config.client_side_validation && session_token.nil?
138
+ fail ArgumentError, "Missing the required parameter 'session_token' when calling ExpressCheckoutService.patch_express_checkout_shipping_method_change"
139
+ end
140
+ # verify the required parameter 'space' is set
141
+ if @api_client.config.client_side_validation && space.nil?
142
+ fail ArgumentError, "Missing the required parameter 'space' when calling ExpressCheckoutService.patch_express_checkout_shipping_method_change"
143
+ end
144
+ # verify the required parameter 'express_checkout_shipping_method_change_request' is set
145
+ if @api_client.config.client_side_validation && express_checkout_shipping_method_change_request.nil?
146
+ fail ArgumentError, "Missing the required parameter 'express_checkout_shipping_method_change_request' when calling ExpressCheckoutService.patch_express_checkout_shipping_method_change"
147
+ end
148
+ # resource path
149
+ local_var_path = '/express-checkout/shipping/method-change'
150
+
151
+ # query parameters
152
+ query_params = opts[:query_params] || {}
153
+ query_params[:'sessionToken'] = session_token
154
+
155
+ # header parameters
156
+ header_params = opts[:header_params] || {}
157
+ # HTTP header 'Accept' (if needed)
158
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
159
+ # HTTP header 'Content-Type'
160
+ content_type = @api_client.select_header_content_type(['application/json'])
161
+ if !content_type.nil?
162
+ header_params['Content-Type'] = content_type
163
+ end
164
+ header_params[:'Space'] = space
165
+
166
+ # form parameters
167
+ form_params = opts[:form_params] || {}
168
+
169
+ # connection timeout
170
+ connection_timeout = @api_client.config.timeout
171
+
172
+ # http body (model)
173
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(express_checkout_shipping_method_change_request)
174
+
175
+ # return_type
176
+ return_type = opts[:debug_return_type] || 'ExpressCheckoutShippingMethodChangeResponse'
177
+
178
+ new_options = opts.merge(
179
+ :operation => :"ExpressCheckoutService.patch_express_checkout_shipping_method_change",
180
+ :header_params => header_params,
181
+ :query_params => query_params,
182
+ :form_params => form_params,
183
+ :body => post_body,
184
+ :return_type => return_type
185
+ )
186
+
187
+ data, status_code, headers = @api_client.call_api(:PATCH.to_sym.downcase, local_var_path, new_options, connection_timeout)
188
+ if @api_client.config.debugging
189
+ @api_client.config.logger.debug "API called: ExpressCheckoutService#patch_express_checkout_shipping_method_change\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
190
+ end
191
+ return data, status_code, headers
192
+ end
193
+
194
+
33
195
  # Create a new Express Checkout Session
34
196
  # @param space [Integer] Specifies the ID of the space the operation should be executed in.
35
197
  # @param express_checkout_session_create [ExpressCheckoutSessionCreate]
@@ -21,5 +21,5 @@
21
21
  =end
22
22
 
23
23
  module WalleeRubySdk
24
- VERSION = '6.3.0'
24
+ VERSION = '6.4.0'
25
25
  end
@@ -97,6 +97,8 @@ require 'wallee-ruby-sdk/models/bank_transaction_type'
97
97
  require 'wallee-ruby-sdk/models/billing_cycle_model'
98
98
  require 'wallee-ruby-sdk/models/billing_cycle_type'
99
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'
100
102
  require 'wallee-ruby-sdk/models/card_authentication_response'
101
103
  require 'wallee-ruby-sdk/models/card_authentication_version'
102
104
  require 'wallee-ruby-sdk/models/card_cryptogram'
@@ -218,10 +220,15 @@ require 'wallee-ruby-sdk/models/dunning_flow_list_response'
218
220
  require 'wallee-ruby-sdk/models/dunning_flow_search_response'
219
221
  require 'wallee-ruby-sdk/models/dunning_flow_type'
220
222
  require 'wallee-ruby-sdk/models/environment'
223
+ require 'wallee-ruby-sdk/models/express_checkout_approval_response'
221
224
  require 'wallee-ruby-sdk/models/express_checkout_create_response'
222
225
  require 'wallee-ruby-sdk/models/express_checkout_session'
223
226
  require 'wallee-ruby-sdk/models/express_checkout_session_create'
224
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'
225
232
  require 'wallee-ruby-sdk/models/express_checkout_shipping_option'
226
233
  require 'wallee-ruby-sdk/models/express_checkout_wallet_type'
227
234
  require 'wallee-ruby-sdk/models/external_transfer_bank_transaction'
@@ -632,6 +639,7 @@ require 'wallee-ruby-sdk/service/application_users_service'
632
639
  require 'wallee-ruby-sdk/service/application_users_roles_service'
633
640
  require 'wallee-ruby-sdk/service/bank_accounts_service'
634
641
  require 'wallee-ruby-sdk/service/bank_transactions_service'
642
+ require 'wallee-ruby-sdk/service/bogus_express_checkout_service'
635
643
  require 'wallee-ruby-sdk/service/charge_attempts_service'
636
644
  require 'wallee-ruby-sdk/service/charge_bank_transactions_service'
637
645
  require 'wallee-ruby-sdk/service/charge_flow_levels_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
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.3.0
4
+ version: 6.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - wallee AG
@@ -194,6 +194,8 @@ files:
194
194
  - lib/wallee-ruby-sdk/models/billing_cycle_model.rb
195
195
  - lib/wallee-ruby-sdk/models/billing_cycle_type.rb
196
196
  - lib/wallee-ruby-sdk/models/billing_day_customization.rb
197
+ - lib/wallee-ruby-sdk/models/bogus_express_checkout_approval_request.rb
198
+ - lib/wallee-ruby-sdk/models/bogus_express_checkout_payment_data.rb
197
199
  - lib/wallee-ruby-sdk/models/card_authentication_response.rb
198
200
  - lib/wallee-ruby-sdk/models/card_authentication_version.rb
199
201
  - lib/wallee-ruby-sdk/models/card_cryptogram.rb
@@ -315,10 +317,15 @@ files:
315
317
  - lib/wallee-ruby-sdk/models/dunning_flow_search_response.rb
316
318
  - lib/wallee-ruby-sdk/models/dunning_flow_type.rb
317
319
  - lib/wallee-ruby-sdk/models/environment.rb
320
+ - lib/wallee-ruby-sdk/models/express_checkout_approval_response.rb
318
321
  - lib/wallee-ruby-sdk/models/express_checkout_create_response.rb
319
322
  - lib/wallee-ruby-sdk/models/express_checkout_session.rb
320
323
  - lib/wallee-ruby-sdk/models/express_checkout_session_create.rb
321
324
  - lib/wallee-ruby-sdk/models/express_checkout_session_state.rb
325
+ - lib/wallee-ruby-sdk/models/express_checkout_shipping_address_change_request.rb
326
+ - lib/wallee-ruby-sdk/models/express_checkout_shipping_address_change_response.rb
327
+ - lib/wallee-ruby-sdk/models/express_checkout_shipping_method_change_request.rb
328
+ - lib/wallee-ruby-sdk/models/express_checkout_shipping_method_change_response.rb
322
329
  - lib/wallee-ruby-sdk/models/express_checkout_shipping_option.rb
323
330
  - lib/wallee-ruby-sdk/models/express_checkout_wallet_type.rb
324
331
  - lib/wallee-ruby-sdk/models/external_transfer_bank_transaction.rb
@@ -728,6 +735,7 @@ files:
728
735
  - lib/wallee-ruby-sdk/service/application_users_service.rb
729
736
  - lib/wallee-ruby-sdk/service/bank_accounts_service.rb
730
737
  - lib/wallee-ruby-sdk/service/bank_transactions_service.rb
738
+ - lib/wallee-ruby-sdk/service/bogus_express_checkout_service.rb
731
739
  - lib/wallee-ruby-sdk/service/charge_attempts_service.rb
732
740
  - lib/wallee-ruby-sdk/service/charge_bank_transactions_service.rb
733
741
  - lib/wallee-ruby-sdk/service/charge_flow_levels_service.rb
@@ -846,7 +854,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
846
854
  - !ruby/object:Gem::Version
847
855
  version: '0'
848
856
  requirements: []
849
- rubygems_version: 3.7.2
857
+ rubygems_version: 4.0.4
850
858
  specification_version: 4
851
859
  summary: A ruby wrapper around the wallee API.
852
860
  test_files: