postfinancecheckout-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.
- checksums.yaml +4 -4
- data/Gemfile.lock +55 -13
- data/LICENSE +1 -1
- data/README.md +22 -0
- data/lib/postfinancecheckout-ruby-sdk/api_client.rb +1 -1
- data/lib/postfinancecheckout-ruby-sdk/models/bogus_express_checkout_approval_request.rb +230 -0
- data/lib/postfinancecheckout-ruby-sdk/models/bogus_express_checkout_payment_data.rb +241 -0
- data/lib/postfinancecheckout-ruby-sdk/models/express_checkout_approval_response.rb +270 -0
- data/lib/postfinancecheckout-ruby-sdk/models/express_checkout_create_response.rb +13 -4
- data/lib/postfinancecheckout-ruby-sdk/models/express_checkout_session.rb +39 -1
- data/lib/postfinancecheckout-ruby-sdk/models/express_checkout_session_create.rb +21 -1
- data/lib/postfinancecheckout-ruby-sdk/models/express_checkout_shipping_address_change_request.rb +239 -0
- data/lib/postfinancecheckout-ruby-sdk/models/express_checkout_shipping_address_change_response.rb +241 -0
- data/lib/postfinancecheckout-ruby-sdk/models/express_checkout_shipping_method_change_request.rb +231 -0
- data/lib/postfinancecheckout-ruby-sdk/models/express_checkout_shipping_method_change_response.rb +241 -0
- data/lib/postfinancecheckout-ruby-sdk/models/express_checkout_shipping_option.rb +1 -1
- data/lib/postfinancecheckout-ruby-sdk/models/refund.rb +13 -1
- data/lib/postfinancecheckout-ruby-sdk/models/refund_create.rb +13 -1
- data/lib/postfinancecheckout-ruby-sdk/models/scope.rb +15 -15
- data/lib/postfinancecheckout-ruby-sdk/models/subscription_update_request.rb +45 -22
- data/lib/postfinancecheckout-ruby-sdk/models/transaction_completion.rb +13 -1
- data/lib/postfinancecheckout-ruby-sdk/models/transaction_completion_details.rb +26 -4
- data/lib/postfinancecheckout-ruby-sdk/models/transaction_user_interface_type.rb +2 -1
- data/lib/postfinancecheckout-ruby-sdk/service/bogus_express_checkout_service.rb +114 -0
- data/lib/postfinancecheckout-ruby-sdk/service/express_checkout_service.rb +162 -0
- data/lib/postfinancecheckout-ruby-sdk/version.rb +1 -1
- data/lib/postfinancecheckout-ruby-sdk.rb +8 -0
- data/test/test_querying.rb +11 -0
- metadata +10 -2
|
@@ -28,6 +28,9 @@ module PostfinancecheckoutRubySdk
|
|
|
28
28
|
# The line items to be captured in the transaction completion.
|
|
29
29
|
attr_accessor :line_items
|
|
30
30
|
|
|
31
|
+
# Allow to store additional information about the object.
|
|
32
|
+
attr_accessor :meta_data
|
|
33
|
+
|
|
31
34
|
# Whether this is the final completion for the transaction, meaning no further completions can occur, and the transaction will move to its completed state upon success.
|
|
32
35
|
attr_accessor :last_completion
|
|
33
36
|
|
|
@@ -40,14 +43,19 @@ module PostfinancecheckoutRubySdk
|
|
|
40
43
|
# The merchant's reference used to identify the invoice.
|
|
41
44
|
attr_accessor :invoice_merchant_reference
|
|
42
45
|
|
|
46
|
+
# A unique identifier for the object.
|
|
47
|
+
attr_accessor :id
|
|
48
|
+
|
|
43
49
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
44
50
|
def self.attribute_map
|
|
45
51
|
{
|
|
46
52
|
:'line_items' => :'lineItems',
|
|
53
|
+
:'meta_data' => :'metaData',
|
|
47
54
|
:'last_completion' => :'lastCompletion',
|
|
48
55
|
:'statement_descriptor' => :'statementDescriptor',
|
|
49
56
|
:'external_id' => :'externalId',
|
|
50
|
-
:'invoice_merchant_reference' => :'invoiceMerchantReference'
|
|
57
|
+
:'invoice_merchant_reference' => :'invoiceMerchantReference',
|
|
58
|
+
:'id' => :'id'
|
|
51
59
|
}
|
|
52
60
|
end
|
|
53
61
|
|
|
@@ -65,10 +73,12 @@ module PostfinancecheckoutRubySdk
|
|
|
65
73
|
def self.openapi_types
|
|
66
74
|
{
|
|
67
75
|
:'line_items' => :'Array<CompletionLineItemCreate>',
|
|
76
|
+
:'meta_data' => :'Hash<String, String>',
|
|
68
77
|
:'last_completion' => :'Boolean',
|
|
69
78
|
:'statement_descriptor' => :'String',
|
|
70
79
|
:'external_id' => :'String',
|
|
71
|
-
:'invoice_merchant_reference' => :'String'
|
|
80
|
+
:'invoice_merchant_reference' => :'String',
|
|
81
|
+
:'id' => :'Integer'
|
|
72
82
|
}
|
|
73
83
|
end
|
|
74
84
|
|
|
@@ -100,6 +110,12 @@ module PostfinancecheckoutRubySdk
|
|
|
100
110
|
end
|
|
101
111
|
end
|
|
102
112
|
|
|
113
|
+
if attributes.key?(:'meta_data')
|
|
114
|
+
if (value = attributes[:'meta_data']).is_a?(Hash)
|
|
115
|
+
self.meta_data = value
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
|
|
103
119
|
if attributes.key?(:'last_completion')
|
|
104
120
|
self.last_completion = attributes[:'last_completion']
|
|
105
121
|
end
|
|
@@ -115,6 +131,10 @@ module PostfinancecheckoutRubySdk
|
|
|
115
131
|
if attributes.key?(:'invoice_merchant_reference')
|
|
116
132
|
self.invoice_merchant_reference = attributes[:'invoice_merchant_reference']
|
|
117
133
|
end
|
|
134
|
+
|
|
135
|
+
if attributes.key?(:'id')
|
|
136
|
+
self.id = attributes[:'id']
|
|
137
|
+
end
|
|
118
138
|
end
|
|
119
139
|
|
|
120
140
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -237,10 +257,12 @@ module PostfinancecheckoutRubySdk
|
|
|
237
257
|
return true if self.equal?(o)
|
|
238
258
|
self.class == o.class &&
|
|
239
259
|
line_items == o.line_items &&
|
|
260
|
+
meta_data == o.meta_data &&
|
|
240
261
|
last_completion == o.last_completion &&
|
|
241
262
|
statement_descriptor == o.statement_descriptor &&
|
|
242
263
|
external_id == o.external_id &&
|
|
243
|
-
invoice_merchant_reference == o.invoice_merchant_reference
|
|
264
|
+
invoice_merchant_reference == o.invoice_merchant_reference &&
|
|
265
|
+
id == o.id
|
|
244
266
|
end
|
|
245
267
|
|
|
246
268
|
# @see the `==` method
|
|
@@ -252,7 +274,7 @@ module PostfinancecheckoutRubySdk
|
|
|
252
274
|
# Calculates hash code according to all attributes.
|
|
253
275
|
# @return [Integer] Hash code
|
|
254
276
|
def hash
|
|
255
|
-
[line_items, last_completion, statement_descriptor, external_id, invoice_merchant_reference].hash
|
|
277
|
+
[line_items, meta_data, last_completion, statement_descriptor, external_id, invoice_merchant_reference, id].hash
|
|
256
278
|
end
|
|
257
279
|
|
|
258
280
|
# Builds the object from hash
|
|
@@ -30,10 +30,11 @@ module PostfinancecheckoutRubySdk
|
|
|
30
30
|
PAYMENT_PAGE = "PAYMENT_PAGE".freeze
|
|
31
31
|
MOBILE_SDK = "MOBILE_SDK".freeze
|
|
32
32
|
TERMINAL = "TERMINAL".freeze
|
|
33
|
+
CLOUD_TILL_INTERFACE = "CLOUD_TILL_INTERFACE".freeze
|
|
33
34
|
EXPRESS_CHECKOUT = "EXPRESS_CHECKOUT".freeze
|
|
34
35
|
|
|
35
36
|
def self.all_vars
|
|
36
|
-
@all_vars ||= [IFRAME, LIGHTBOX, PAYMENT_PAGE, MOBILE_SDK, TERMINAL, EXPRESS_CHECKOUT].freeze
|
|
37
|
+
@all_vars ||= [IFRAME, LIGHTBOX, PAYMENT_PAGE, MOBILE_SDK, TERMINAL, CLOUD_TILL_INTERFACE, EXPRESS_CHECKOUT].freeze
|
|
37
38
|
end
|
|
38
39
|
|
|
39
40
|
# Builds the enum from string
|
|
@@ -0,0 +1,114 @@
|
|
|
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 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 PostfinancecheckoutRubySdk
|
|
|
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]
|
|
@@ -95,6 +95,8 @@ require 'postfinancecheckout-ruby-sdk/models/bank_transaction_type'
|
|
|
95
95
|
require 'postfinancecheckout-ruby-sdk/models/billing_cycle_model'
|
|
96
96
|
require 'postfinancecheckout-ruby-sdk/models/billing_cycle_type'
|
|
97
97
|
require 'postfinancecheckout-ruby-sdk/models/billing_day_customization'
|
|
98
|
+
require 'postfinancecheckout-ruby-sdk/models/bogus_express_checkout_approval_request'
|
|
99
|
+
require 'postfinancecheckout-ruby-sdk/models/bogus_express_checkout_payment_data'
|
|
98
100
|
require 'postfinancecheckout-ruby-sdk/models/card_authentication_response'
|
|
99
101
|
require 'postfinancecheckout-ruby-sdk/models/card_authentication_version'
|
|
100
102
|
require 'postfinancecheckout-ruby-sdk/models/card_cryptogram'
|
|
@@ -194,10 +196,15 @@ require 'postfinancecheckout-ruby-sdk/models/dunning_flow_list_response'
|
|
|
194
196
|
require 'postfinancecheckout-ruby-sdk/models/dunning_flow_search_response'
|
|
195
197
|
require 'postfinancecheckout-ruby-sdk/models/dunning_flow_type'
|
|
196
198
|
require 'postfinancecheckout-ruby-sdk/models/environment'
|
|
199
|
+
require 'postfinancecheckout-ruby-sdk/models/express_checkout_approval_response'
|
|
197
200
|
require 'postfinancecheckout-ruby-sdk/models/express_checkout_create_response'
|
|
198
201
|
require 'postfinancecheckout-ruby-sdk/models/express_checkout_session'
|
|
199
202
|
require 'postfinancecheckout-ruby-sdk/models/express_checkout_session_create'
|
|
200
203
|
require 'postfinancecheckout-ruby-sdk/models/express_checkout_session_state'
|
|
204
|
+
require 'postfinancecheckout-ruby-sdk/models/express_checkout_shipping_address_change_request'
|
|
205
|
+
require 'postfinancecheckout-ruby-sdk/models/express_checkout_shipping_address_change_response'
|
|
206
|
+
require 'postfinancecheckout-ruby-sdk/models/express_checkout_shipping_method_change_request'
|
|
207
|
+
require 'postfinancecheckout-ruby-sdk/models/express_checkout_shipping_method_change_response'
|
|
201
208
|
require 'postfinancecheckout-ruby-sdk/models/express_checkout_shipping_option'
|
|
202
209
|
require 'postfinancecheckout-ruby-sdk/models/express_checkout_wallet_type'
|
|
203
210
|
require 'postfinancecheckout-ruby-sdk/models/external_transfer_bank_transaction'
|
|
@@ -586,6 +593,7 @@ require 'postfinancecheckout-ruby-sdk/service/application_users_service'
|
|
|
586
593
|
require 'postfinancecheckout-ruby-sdk/service/application_users_roles_service'
|
|
587
594
|
require 'postfinancecheckout-ruby-sdk/service/bank_accounts_service'
|
|
588
595
|
require 'postfinancecheckout-ruby-sdk/service/bank_transactions_service'
|
|
596
|
+
require 'postfinancecheckout-ruby-sdk/service/bogus_express_checkout_service'
|
|
589
597
|
require 'postfinancecheckout-ruby-sdk/service/charge_attempts_service'
|
|
590
598
|
require 'postfinancecheckout-ruby-sdk/service/charge_bank_transactions_service'
|
|
591
599
|
require 'postfinancecheckout-ruby-sdk/service/charge_flow_levels_service'
|
data/test/test_querying.rb
CHANGED
|
@@ -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: postfinancecheckout-ruby-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 6.
|
|
4
|
+
version: 6.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- wallee AG
|
|
@@ -193,6 +193,8 @@ files:
|
|
|
193
193
|
- lib/postfinancecheckout-ruby-sdk/models/billing_cycle_model.rb
|
|
194
194
|
- lib/postfinancecheckout-ruby-sdk/models/billing_cycle_type.rb
|
|
195
195
|
- lib/postfinancecheckout-ruby-sdk/models/billing_day_customization.rb
|
|
196
|
+
- lib/postfinancecheckout-ruby-sdk/models/bogus_express_checkout_approval_request.rb
|
|
197
|
+
- lib/postfinancecheckout-ruby-sdk/models/bogus_express_checkout_payment_data.rb
|
|
196
198
|
- lib/postfinancecheckout-ruby-sdk/models/card_authentication_response.rb
|
|
197
199
|
- lib/postfinancecheckout-ruby-sdk/models/card_authentication_version.rb
|
|
198
200
|
- lib/postfinancecheckout-ruby-sdk/models/card_cryptogram.rb
|
|
@@ -292,10 +294,15 @@ files:
|
|
|
292
294
|
- lib/postfinancecheckout-ruby-sdk/models/dunning_flow_search_response.rb
|
|
293
295
|
- lib/postfinancecheckout-ruby-sdk/models/dunning_flow_type.rb
|
|
294
296
|
- lib/postfinancecheckout-ruby-sdk/models/environment.rb
|
|
297
|
+
- lib/postfinancecheckout-ruby-sdk/models/express_checkout_approval_response.rb
|
|
295
298
|
- lib/postfinancecheckout-ruby-sdk/models/express_checkout_create_response.rb
|
|
296
299
|
- lib/postfinancecheckout-ruby-sdk/models/express_checkout_session.rb
|
|
297
300
|
- lib/postfinancecheckout-ruby-sdk/models/express_checkout_session_create.rb
|
|
298
301
|
- lib/postfinancecheckout-ruby-sdk/models/express_checkout_session_state.rb
|
|
302
|
+
- lib/postfinancecheckout-ruby-sdk/models/express_checkout_shipping_address_change_request.rb
|
|
303
|
+
- lib/postfinancecheckout-ruby-sdk/models/express_checkout_shipping_address_change_response.rb
|
|
304
|
+
- lib/postfinancecheckout-ruby-sdk/models/express_checkout_shipping_method_change_request.rb
|
|
305
|
+
- lib/postfinancecheckout-ruby-sdk/models/express_checkout_shipping_method_change_response.rb
|
|
299
306
|
- lib/postfinancecheckout-ruby-sdk/models/express_checkout_shipping_option.rb
|
|
300
307
|
- lib/postfinancecheckout-ruby-sdk/models/express_checkout_wallet_type.rb
|
|
301
308
|
- lib/postfinancecheckout-ruby-sdk/models/external_transfer_bank_transaction.rb
|
|
@@ -684,6 +691,7 @@ files:
|
|
|
684
691
|
- lib/postfinancecheckout-ruby-sdk/service/application_users_service.rb
|
|
685
692
|
- lib/postfinancecheckout-ruby-sdk/service/bank_accounts_service.rb
|
|
686
693
|
- lib/postfinancecheckout-ruby-sdk/service/bank_transactions_service.rb
|
|
694
|
+
- lib/postfinancecheckout-ruby-sdk/service/bogus_express_checkout_service.rb
|
|
687
695
|
- lib/postfinancecheckout-ruby-sdk/service/charge_attempts_service.rb
|
|
688
696
|
- lib/postfinancecheckout-ruby-sdk/service/charge_bank_transactions_service.rb
|
|
689
697
|
- lib/postfinancecheckout-ruby-sdk/service/charge_flow_levels_service.rb
|
|
@@ -796,7 +804,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
796
804
|
- !ruby/object:Gem::Version
|
|
797
805
|
version: '0'
|
|
798
806
|
requirements: []
|
|
799
|
-
rubygems_version:
|
|
807
|
+
rubygems_version: 4.0.4
|
|
800
808
|
specification_version: 4
|
|
801
809
|
summary: A ruby wrapper around the PostFinance Checkout API.
|
|
802
810
|
test_files:
|