wallee-ruby-sdk 6.2.0 → 6.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +56 -14
- data/LICENSE +1 -1
- data/README.md +57 -29
- data/lib/wallee-ruby-sdk/api_client.rb +1 -1
- data/lib/wallee-ruby-sdk/api_exception_error_codes.rb +60 -0
- data/lib/wallee-ruby-sdk/models/bogus_express_checkout_approval_request.rb +230 -0
- data/lib/wallee-ruby-sdk/models/bogus_express_checkout_payment_data.rb +241 -0
- data/lib/wallee-ruby-sdk/models/express_checkout_approval_response.rb +270 -0
- data/lib/wallee-ruby-sdk/models/express_checkout_create_response.rb +13 -4
- data/lib/wallee-ruby-sdk/models/express_checkout_session.rb +39 -1
- data/lib/wallee-ruby-sdk/models/express_checkout_session_create.rb +21 -1
- data/lib/wallee-ruby-sdk/models/express_checkout_shipping_address_change_request.rb +239 -0
- data/lib/wallee-ruby-sdk/models/express_checkout_shipping_address_change_response.rb +241 -0
- data/lib/wallee-ruby-sdk/models/express_checkout_shipping_method_change_request.rb +231 -0
- data/lib/wallee-ruby-sdk/models/express_checkout_shipping_method_change_response.rb +241 -0
- data/lib/wallee-ruby-sdk/models/express_checkout_shipping_option.rb +1 -1
- data/lib/wallee-ruby-sdk/models/payment_terminal_address.rb +43 -5
- data/lib/wallee-ruby-sdk/models/payment_terminal_dcc_transaction_sum.rb +302 -0
- data/lib/wallee-ruby-sdk/models/payment_terminal_transaction_sum.rb +332 -0
- data/lib/wallee-ruby-sdk/models/payment_terminal_transaction_summary.rb +347 -0
- data/lib/wallee-ruby-sdk/models/refund.rb +13 -1
- data/lib/wallee-ruby-sdk/models/refund_create.rb +13 -1
- data/lib/wallee-ruby-sdk/models/rendered_terminal_transaction_summary.rb +241 -0
- data/lib/wallee-ruby-sdk/models/scope.rb +15 -15
- data/lib/wallee-ruby-sdk/models/terminal_transaction_summary_list_response.rb +253 -0
- data/lib/wallee-ruby-sdk/models/terminal_transaction_summary_search_response.rb +263 -0
- data/lib/wallee-ruby-sdk/models/transaction_completion.rb +13 -1
- data/lib/wallee-ruby-sdk/models/transaction_completion_details.rb +26 -4
- data/lib/wallee-ruby-sdk/models/transaction_user_interface_type.rb +2 -1
- data/lib/wallee-ruby-sdk/sdk_exception_error_codes.rb +55 -0
- data/lib/wallee-ruby-sdk/service/bogus_express_checkout_service.rb +114 -0
- data/lib/wallee-ruby-sdk/service/express_checkout_service.rb +162 -0
- data/lib/wallee-ruby-sdk/service/payment_terminal_transaction_summaries_service.rb +372 -0
- data/lib/wallee-ruby-sdk/service/webhook_encryption_keys_service.rb +2 -2
- data/lib/wallee-ruby-sdk/utils/encryption_util.rb +5 -5
- data/lib/wallee-ruby-sdk/version.rb +1 -1
- data/lib/wallee-ruby-sdk/wallee_sdk_exception.rb +2 -33
- data/lib/wallee-ruby-sdk.rb +20 -1
- data/test/test_querying.rb +11 -0
- metadata +19 -2
|
@@ -28,6 +28,9 @@ module WalleeRubySdk
|
|
|
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 WalleeRubySdk
|
|
|
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 WalleeRubySdk
|
|
|
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 WalleeRubySdk
|
|
|
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 WalleeRubySdk
|
|
|
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 WalleeRubySdk
|
|
|
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 WalleeRubySdk
|
|
|
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 WalleeRubySdk
|
|
|
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,55 @@
|
|
|
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 SdkExceptionErrorCodes
|
|
25
|
+
# Unknown webhook signature public key
|
|
26
|
+
UNKNOWN_WEBHOOK_ENCRYPTION_PUBLIC_KEY = 'unknown_public_key'
|
|
27
|
+
# General webhook encryption error
|
|
28
|
+
WEBHOOK_ENCRYPTION_GENERAL_ERROR = 'encryption_error'
|
|
29
|
+
# Invalid webhook signature public key
|
|
30
|
+
INVALID_WEBHOOK_ENCRYPTION_PUBLIC_KEY = 'invalid_public_key'
|
|
31
|
+
# Invalid webhook signature header
|
|
32
|
+
INVALID_WEBHOOK_ENCRYPTION_HEADER_FORMAT = 'invalid_webhook_header'
|
|
33
|
+
# Unsupported webhook signature algorithm
|
|
34
|
+
UNSUPPORTED_WEBHOOK_ENCRYPTION_ALGORYTHM = 'unsupported_encryption_algorythm'
|
|
35
|
+
# Unknown webhook encryption provider
|
|
36
|
+
UNKNOWN_WEBHOOK_ENCRYPTION_PROVIDER = 'unknown_encryption_provider'
|
|
37
|
+
# Encryption verifier initialization error
|
|
38
|
+
WEBHOOK_ENCRYPTION_VERIFIER_INIT_ERROR = 'verifier_init_failure'
|
|
39
|
+
# Error during content update in encryption verifier
|
|
40
|
+
WEBHOOK_ENCRYPTION_VERIFIER_CONTENT_UPDATE_ERROR = 'content_update_failure'
|
|
41
|
+
# Encryption signature verification failed
|
|
42
|
+
WEBHOOK_ENCRYPTION_SIGNATURE_VERIFICATION_FAILED = 'signature_verification_failure'
|
|
43
|
+
# Invalid webhook content signature
|
|
44
|
+
INVALID_WEBHOOK_ENCRYPTION_CONTENT_SIGNATURE = 'invalid_content_signature'
|
|
45
|
+
# Missing webhook signature algorithm value
|
|
46
|
+
MISSING_WEBHOOK_ENCRYPTION_ALGORYTHM = 'missing_encryption_algorythm'
|
|
47
|
+
|
|
48
|
+
# Checks if the given exception matches the specific error code.
|
|
49
|
+
# @param exception [WalleeSdkException] The exception to check
|
|
50
|
+
# @param code [String] The error code to compare against
|
|
51
|
+
def self.is?(exception, code)
|
|
52
|
+
exception.code == code
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -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]
|