cybersource_rest_client 0.0.40 → 0.0.41
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/AuthenticationSDK/logging/sensitive_logging.rb +7 -4
- data/lib/cybersource_rest_client/api/asymmetric_key_management_api.rb +223 -219
- data/lib/cybersource_rest_client/api/chargeback_details_api.rb +116 -112
- data/lib/cybersource_rest_client/api/chargeback_summaries_api.rb +116 -112
- data/lib/cybersource_rest_client/api/conversion_details_api.rb +5 -1
- data/lib/cybersource_rest_client/api/customer_api.rb +368 -360
- data/lib/cybersource_rest_client/api/customer_payment_instrument_api.rb +530 -518
- data/lib/cybersource_rest_client/api/customer_shipping_address_api.rb +530 -518
- data/lib/cybersource_rest_client/api/download_dtd_api.rb +92 -88
- data/lib/cybersource_rest_client/api/download_xsd_api.rb +92 -88
- data/lib/cybersource_rest_client/api/instrument_identifier_api.rb +15 -3
- data/lib/cybersource_rest_client/api/interchange_clearing_level_details_api.rb +116 -112
- data/lib/cybersource_rest_client/api/invoice_settings_api.rb +152 -148
- data/lib/cybersource_rest_client/api/invoices_api.rb +447 -431
- data/lib/cybersource_rest_client/api/net_fundings_api.rb +5 -1
- data/lib/cybersource_rest_client/api/notification_of_changes_api.rb +5 -1
- data/lib/cybersource_rest_client/api/payer_authentication_api.rb +219 -219
- data/lib/cybersource_rest_client/api/payment_batch_summaries_api.rb +133 -129
- data/lib/cybersource_rest_client/api/payment_instrument_api.rb +10 -2
- data/lib/cybersource_rest_client/api/purchase_and_refund_details_api.rb +5 -1
- data/lib/cybersource_rest_client/api/report_definitions_api.rb +10 -2
- data/lib/cybersource_rest_client/api/report_downloads_api.rb +5 -1
- data/lib/cybersource_rest_client/api/report_subscriptions_api.rb +15 -3
- data/lib/cybersource_rest_client/api/reports_api.rb +10 -2
- data/lib/cybersource_rest_client/api/retrieval_details_api.rb +116 -112
- data/lib/cybersource_rest_client/api/retrieval_summaries_api.rb +116 -112
- data/lib/cybersource_rest_client/api/search_transactions_api.rb +5 -1
- data/lib/cybersource_rest_client/api/secure_file_share_api.rb +206 -198
- data/lib/cybersource_rest_client/api/symmetric_key_management_api.rb +5 -1
- data/lib/cybersource_rest_client/api/taxes_api.rb +160 -160
- data/lib/cybersource_rest_client/api/tokenization_api.rb +89 -89
- data/lib/cybersource_rest_client/api/transaction_batches_api.rb +15 -3
- data/lib/cybersource_rest_client/api/transaction_details_api.rb +5 -1
- data/lib/cybersource_rest_client/api/user_management_api.rb +5 -1
- data/lib/cybersource_rest_client/api/user_management_search_api.rb +89 -89
- data/lib/cybersource_rest_client/api/verification_api.rb +154 -154
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_account_information_card.rb +20 -4
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_merchant_advice.rb +20 -4
- data/lib/cybersource_rest_client/models/ptsv2payments_merchant_information_merchant_descriptor.rb +20 -4
- data/lib/cybersource_rest_client/models/ptsv2payments_order_information.rb +11 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_order_information_invoice_details.rb +20 -4
- data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_tokenized_card.rb +1 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_point_of_sale_information.rb +20 -4
- data/lib/cybersource_rest_client/models/ptsv2payments_point_of_sale_information_emv.rb +21 -7
- data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_authorization_options.rb +17 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_processor_information.rb +13 -4
- data/lib/cybersource_rest_client/models/ptsv2payments_processor_information_authorization_options.rb +190 -0
- data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_point_of_sale_information_emv.rb +0 -2
- data/lib/cybersource_rest_client/models/ptsv2paymentsidvoids_order_information.rb +183 -0
- data/lib/cybersource_rest_client/models/ptsv2payouts_order_information.rb +14 -4
- data/lib/cybersource_rest_client/models/ptsv2payouts_processing_information.rb +13 -4
- data/lib/cybersource_rest_client/models/ptsv2payouts_processing_information_funding_options.rb +183 -0
- data/lib/cybersource_rest_client/models/ptsv2payouts_processing_information_funding_options_initiator.rb +190 -0
- data/lib/cybersource_rest_client/models/ptsv2payouts_sender_information.rb +52 -4
- data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information_tokenized_card.rb +1 -1
- data/lib/cybersource_rest_client/models/riskv1authentications_payment_information_tokenized_card.rb +1 -1
- data/lib/cybersource_rest_client/models/riskv1authenticationsetups_payment_information_tokenized_card.rb +1 -1
- data/lib/cybersource_rest_client/models/riskv1decisions_payment_information_tokenized_card.rb +1 -1
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_amount_details.rb +1 -1
- data/lib/cybersource_rest_client/models/void_capture_request.rb +13 -4
- data/lib/cybersource_rest_client/models/void_credit_request.rb +13 -4
- data/lib/cybersource_rest_client/models/void_payment_request.rb +13 -4
- data/lib/cybersource_rest_client/models/void_refund_request.rb +13 -4
- data/lib/cybersource_rest_client.rb +4 -0
- metadata +7 -3
@@ -1,360 +1,368 @@
|
|
1
|
-
=begin
|
2
|
-
#CyberSource Merged Spec
|
3
|
-
|
4
|
-
#All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
|
5
|
-
|
6
|
-
OpenAPI spec version: 0.0.1
|
7
|
-
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.2.3
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'uri'
|
14
|
-
|
15
|
-
module CyberSource
|
16
|
-
class CustomerApi
|
17
|
-
attr_accessor :api_client
|
18
|
-
|
19
|
-
def initialize(api_client = ApiClient.default, config)
|
20
|
-
@api_client = api_client
|
21
|
-
@api_client.set_configuration(config)
|
22
|
-
end
|
23
|
-
# Delete a Customer
|
24
|
-
# @param customer_token_id The TokenId of a customer.
|
25
|
-
# @param [Hash] opts the optional parameters
|
26
|
-
# @option opts [String] :profile_id The id of a profile containing user specific TMS configuration.
|
27
|
-
# @return [nil]
|
28
|
-
def delete_customer(customer_token_id, opts = {})
|
29
|
-
data, status_code, headers = delete_customer_with_http_info(customer_token_id, opts)
|
30
|
-
return data, status_code, headers
|
31
|
-
end
|
32
|
-
|
33
|
-
# Delete a Customer
|
34
|
-
# @param customer_token_id The TokenId of a customer.
|
35
|
-
# @param [Hash] opts the optional parameters
|
36
|
-
# @option opts [String] :profile_id The id of a profile containing user specific TMS configuration.
|
37
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
38
|
-
def delete_customer_with_http_info(customer_token_id, opts = {})
|
39
|
-
|
40
|
-
if @api_client.config.debugging
|
41
|
-
begin
|
42
|
-
raise
|
43
|
-
@api_client.config.logger.debug 'Calling API: CustomerApi.delete_customer ...'
|
44
|
-
rescue
|
45
|
-
puts 'Cannot write to log'
|
46
|
-
end
|
47
|
-
end
|
48
|
-
# verify the required parameter 'customer_token_id' is set
|
49
|
-
if @api_client.config.client_side_validation && customer_token_id.nil?
|
50
|
-
fail ArgumentError, "Missing the required parameter 'customer_token_id' when calling CustomerApi.delete_customer"
|
51
|
-
end
|
52
|
-
if @api_client.config.client_side_validation && customer_token_id.to_s.length > 32
|
53
|
-
fail ArgumentError, 'invalid value for "customer_token_id" when calling CustomerApi.delete_customer, the character length must be smaller than or equal to 32.'
|
54
|
-
end
|
55
|
-
|
56
|
-
if @api_client.config.client_side_validation && customer_token_id.to_s.length < 1
|
57
|
-
fail ArgumentError, 'invalid value for "customer_token_id" when calling CustomerApi.delete_customer, the character length must be great than or equal to 1.'
|
58
|
-
end
|
59
|
-
|
60
|
-
if @api_client.config.client_side_validation && !opts[:'profile_id'].nil? && opts[:'profile_id'].to_s.length > 36
|
61
|
-
fail ArgumentError, 'invalid value for "opts[:"profile_id"]" when calling CustomerApi.delete_customer, the character length must be smaller than or equal to 36.'
|
62
|
-
end
|
63
|
-
|
64
|
-
if @api_client.config.client_side_validation && !opts[:'profile_id'].nil? && opts[:'profile_id'].to_s.length < 36
|
65
|
-
fail ArgumentError, 'invalid value for "opts[:"profile_id"]" when calling CustomerApi.delete_customer, the character length must be great than or equal to 36.'
|
66
|
-
end
|
67
|
-
|
68
|
-
# resource path
|
69
|
-
local_var_path = 'tms/v2/customers/{customerTokenId}'.sub('{' + 'customerTokenId' + '}', customer_token_id.to_s)
|
70
|
-
|
71
|
-
# query parameters
|
72
|
-
query_params = {}
|
73
|
-
|
74
|
-
# header parameters
|
75
|
-
header_params = {}
|
76
|
-
# HTTP header 'Accept' (if needed)
|
77
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=utf-8'])
|
78
|
-
# HTTP header 'Content-Type'
|
79
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
|
80
|
-
header_params[:'profile-id'] = opts[:'profile_id'] if !opts[:'profile_id'].nil?
|
81
|
-
|
82
|
-
# form parameters
|
83
|
-
form_params = {}
|
84
|
-
|
85
|
-
# http body (model)
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
:
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
#
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
#
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
end
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
if @api_client.config.client_side_validation && customer_token_id.to_s.length
|
138
|
-
fail ArgumentError, 'invalid value for "customer_token_id" when calling CustomerApi.get_customer, the character length must be
|
139
|
-
end
|
140
|
-
|
141
|
-
if @api_client.config.client_side_validation &&
|
142
|
-
fail ArgumentError, 'invalid value for "
|
143
|
-
end
|
144
|
-
|
145
|
-
if @api_client.config.client_side_validation && !opts[:'profile_id'].nil? && opts[:'profile_id'].to_s.length
|
146
|
-
fail ArgumentError, 'invalid value for "opts[:"profile_id"]" when calling CustomerApi.get_customer, the character length must be
|
147
|
-
end
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
#
|
160
|
-
header_params
|
161
|
-
|
162
|
-
|
163
|
-
#
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
#
|
199
|
-
# @
|
200
|
-
# @
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
if @api_client.config.client_side_validation &&
|
232
|
-
fail ArgumentError, 'invalid value for "
|
233
|
-
end
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
if @api_client.config.client_side_validation && !opts[:'
|
240
|
-
fail ArgumentError, 'invalid value for "opts[:"
|
241
|
-
end
|
242
|
-
|
243
|
-
if @api_client.config.client_side_validation && !opts[:'
|
244
|
-
fail ArgumentError, 'invalid value for "opts[:"
|
245
|
-
end
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
#
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
#
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
data, status_code, headers
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
#
|
296
|
-
# @
|
297
|
-
# @
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
#
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
#
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
1
|
+
=begin
|
2
|
+
#CyberSource Merged Spec
|
3
|
+
|
4
|
+
#All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
|
5
|
+
|
6
|
+
OpenAPI spec version: 0.0.1
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.2.3
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'uri'
|
14
|
+
|
15
|
+
module CyberSource
|
16
|
+
class CustomerApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default, config)
|
20
|
+
@api_client = api_client
|
21
|
+
@api_client.set_configuration(config)
|
22
|
+
end
|
23
|
+
# Delete a Customer
|
24
|
+
# @param customer_token_id The TokenId of a customer.
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [String] :profile_id The id of a profile containing user specific TMS configuration.
|
27
|
+
# @return [nil]
|
28
|
+
def delete_customer(customer_token_id, opts = {})
|
29
|
+
data, status_code, headers = delete_customer_with_http_info(customer_token_id, opts)
|
30
|
+
return data, status_code, headers
|
31
|
+
end
|
32
|
+
|
33
|
+
# Delete a Customer
|
34
|
+
# @param customer_token_id The TokenId of a customer.
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @option opts [String] :profile_id The id of a profile containing user specific TMS configuration.
|
37
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
38
|
+
def delete_customer_with_http_info(customer_token_id, opts = {})
|
39
|
+
|
40
|
+
if @api_client.config.debugging
|
41
|
+
begin
|
42
|
+
raise
|
43
|
+
@api_client.config.logger.debug 'Calling API: CustomerApi.delete_customer ...'
|
44
|
+
rescue
|
45
|
+
puts 'Cannot write to log'
|
46
|
+
end
|
47
|
+
end
|
48
|
+
# verify the required parameter 'customer_token_id' is set
|
49
|
+
if @api_client.config.client_side_validation && customer_token_id.nil?
|
50
|
+
fail ArgumentError, "Missing the required parameter 'customer_token_id' when calling CustomerApi.delete_customer"
|
51
|
+
end
|
52
|
+
if @api_client.config.client_side_validation && customer_token_id.to_s.length > 32
|
53
|
+
fail ArgumentError, 'invalid value for "customer_token_id" when calling CustomerApi.delete_customer, the character length must be smaller than or equal to 32.'
|
54
|
+
end
|
55
|
+
|
56
|
+
if @api_client.config.client_side_validation && customer_token_id.to_s.length < 1
|
57
|
+
fail ArgumentError, 'invalid value for "customer_token_id" when calling CustomerApi.delete_customer, the character length must be great than or equal to 1.'
|
58
|
+
end
|
59
|
+
|
60
|
+
if @api_client.config.client_side_validation && !opts[:'profile_id'].nil? && opts[:'profile_id'].to_s.length > 36
|
61
|
+
fail ArgumentError, 'invalid value for "opts[:"profile_id"]" when calling CustomerApi.delete_customer, the character length must be smaller than or equal to 36.'
|
62
|
+
end
|
63
|
+
|
64
|
+
if @api_client.config.client_side_validation && !opts[:'profile_id'].nil? && opts[:'profile_id'].to_s.length < 36
|
65
|
+
fail ArgumentError, 'invalid value for "opts[:"profile_id"]" when calling CustomerApi.delete_customer, the character length must be great than or equal to 36.'
|
66
|
+
end
|
67
|
+
|
68
|
+
# resource path
|
69
|
+
local_var_path = 'tms/v2/customers/{customerTokenId}'.sub('{' + 'customerTokenId' + '}', customer_token_id.to_s)
|
70
|
+
|
71
|
+
# query parameters
|
72
|
+
query_params = {}
|
73
|
+
|
74
|
+
# header parameters
|
75
|
+
header_params = {}
|
76
|
+
# HTTP header 'Accept' (if needed)
|
77
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=utf-8'])
|
78
|
+
# HTTP header 'Content-Type'
|
79
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
|
80
|
+
header_params[:'profile-id'] = opts[:'profile_id'] if !opts[:'profile_id'].nil?
|
81
|
+
|
82
|
+
# form parameters
|
83
|
+
form_params = {}
|
84
|
+
|
85
|
+
# http body (model)
|
86
|
+
if 'DELETE' == 'POST'
|
87
|
+
post_body = '{}'
|
88
|
+
else
|
89
|
+
post_body = nil
|
90
|
+
end
|
91
|
+
auth_names = []
|
92
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
93
|
+
:header_params => header_params,
|
94
|
+
:query_params => query_params,
|
95
|
+
:form_params => form_params,
|
96
|
+
:body => post_body,
|
97
|
+
:auth_names => auth_names)
|
98
|
+
if @api_client.config.debugging
|
99
|
+
begin
|
100
|
+
raise
|
101
|
+
@api_client.config.logger.debug "API called: CustomerApi#delete_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
102
|
+
rescue
|
103
|
+
puts 'Cannot write to log'
|
104
|
+
end
|
105
|
+
end
|
106
|
+
return data, status_code, headers
|
107
|
+
end
|
108
|
+
# Retrieve a Customer
|
109
|
+
# @param customer_token_id The TokenId of a customer.
|
110
|
+
# @param [Hash] opts the optional parameters
|
111
|
+
# @option opts [String] :profile_id The id of a profile containing user specific TMS configuration.
|
112
|
+
# @return [TmsV2CustomersResponse]
|
113
|
+
def get_customer(customer_token_id, opts = {})
|
114
|
+
data, status_code, headers = get_customer_with_http_info(customer_token_id, opts)
|
115
|
+
return data, status_code, headers
|
116
|
+
end
|
117
|
+
|
118
|
+
# Retrieve a Customer
|
119
|
+
# @param customer_token_id The TokenId of a customer.
|
120
|
+
# @param [Hash] opts the optional parameters
|
121
|
+
# @option opts [String] :profile_id The id of a profile containing user specific TMS configuration.
|
122
|
+
# @return [Array<(TmsV2CustomersResponse, Fixnum, Hash)>] TmsV2CustomersResponse data, response status code and response headers
|
123
|
+
def get_customer_with_http_info(customer_token_id, opts = {})
|
124
|
+
|
125
|
+
if @api_client.config.debugging
|
126
|
+
begin
|
127
|
+
raise
|
128
|
+
@api_client.config.logger.debug 'Calling API: CustomerApi.get_customer ...'
|
129
|
+
rescue
|
130
|
+
puts 'Cannot write to log'
|
131
|
+
end
|
132
|
+
end
|
133
|
+
# verify the required parameter 'customer_token_id' is set
|
134
|
+
if @api_client.config.client_side_validation && customer_token_id.nil?
|
135
|
+
fail ArgumentError, "Missing the required parameter 'customer_token_id' when calling CustomerApi.get_customer"
|
136
|
+
end
|
137
|
+
if @api_client.config.client_side_validation && customer_token_id.to_s.length > 32
|
138
|
+
fail ArgumentError, 'invalid value for "customer_token_id" when calling CustomerApi.get_customer, the character length must be smaller than or equal to 32.'
|
139
|
+
end
|
140
|
+
|
141
|
+
if @api_client.config.client_side_validation && customer_token_id.to_s.length < 1
|
142
|
+
fail ArgumentError, 'invalid value for "customer_token_id" when calling CustomerApi.get_customer, the character length must be great than or equal to 1.'
|
143
|
+
end
|
144
|
+
|
145
|
+
if @api_client.config.client_side_validation && !opts[:'profile_id'].nil? && opts[:'profile_id'].to_s.length > 36
|
146
|
+
fail ArgumentError, 'invalid value for "opts[:"profile_id"]" when calling CustomerApi.get_customer, the character length must be smaller than or equal to 36.'
|
147
|
+
end
|
148
|
+
|
149
|
+
if @api_client.config.client_side_validation && !opts[:'profile_id'].nil? && opts[:'profile_id'].to_s.length < 36
|
150
|
+
fail ArgumentError, 'invalid value for "opts[:"profile_id"]" when calling CustomerApi.get_customer, the character length must be great than or equal to 36.'
|
151
|
+
end
|
152
|
+
|
153
|
+
# resource path
|
154
|
+
local_var_path = 'tms/v2/customers/{customerTokenId}'.sub('{' + 'customerTokenId' + '}', customer_token_id.to_s)
|
155
|
+
|
156
|
+
# query parameters
|
157
|
+
query_params = {}
|
158
|
+
|
159
|
+
# header parameters
|
160
|
+
header_params = {}
|
161
|
+
# HTTP header 'Accept' (if needed)
|
162
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=utf-8'])
|
163
|
+
# HTTP header 'Content-Type'
|
164
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
|
165
|
+
header_params[:'profile-id'] = opts[:'profile_id'] if !opts[:'profile_id'].nil?
|
166
|
+
|
167
|
+
# form parameters
|
168
|
+
form_params = {}
|
169
|
+
|
170
|
+
# http body (model)
|
171
|
+
if 'GET' == 'POST'
|
172
|
+
post_body = '{}'
|
173
|
+
else
|
174
|
+
post_body = nil
|
175
|
+
end
|
176
|
+
auth_names = []
|
177
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
178
|
+
:header_params => header_params,
|
179
|
+
:query_params => query_params,
|
180
|
+
:form_params => form_params,
|
181
|
+
:body => post_body,
|
182
|
+
:auth_names => auth_names,
|
183
|
+
:return_type => 'TmsV2CustomersResponse')
|
184
|
+
if @api_client.config.debugging
|
185
|
+
begin
|
186
|
+
raise
|
187
|
+
@api_client.config.logger.debug "API called: CustomerApi#get_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
188
|
+
rescue
|
189
|
+
puts 'Cannot write to log'
|
190
|
+
end
|
191
|
+
end
|
192
|
+
return data, status_code, headers
|
193
|
+
end
|
194
|
+
# Update a Customer
|
195
|
+
# @param customer_token_id The TokenId of a customer.
|
196
|
+
# @param patch_customer_request
|
197
|
+
# @param [Hash] opts the optional parameters
|
198
|
+
# @option opts [String] :profile_id The id of a profile containing user specific TMS configuration.
|
199
|
+
# @option opts [String] :if_match Contains an ETag value from a GET request to make the request conditional.
|
200
|
+
# @return [TmsV2CustomersResponse]
|
201
|
+
def patch_customer(customer_token_id, patch_customer_request, opts = {})
|
202
|
+
data, status_code, headers = patch_customer_with_http_info(customer_token_id, patch_customer_request, opts)
|
203
|
+
return data, status_code, headers
|
204
|
+
end
|
205
|
+
|
206
|
+
# Update a Customer
|
207
|
+
# @param customer_token_id The TokenId of a customer.
|
208
|
+
# @param patch_customer_request
|
209
|
+
# @param [Hash] opts the optional parameters
|
210
|
+
# @option opts [String] :profile_id The id of a profile containing user specific TMS configuration.
|
211
|
+
# @option opts [String] :if_match Contains an ETag value from a GET request to make the request conditional.
|
212
|
+
# @return [Array<(TmsV2CustomersResponse, Fixnum, Hash)>] TmsV2CustomersResponse data, response status code and response headers
|
213
|
+
def patch_customer_with_http_info(customer_token_id, patch_customer_request, opts = {})
|
214
|
+
|
215
|
+
if @api_client.config.debugging
|
216
|
+
begin
|
217
|
+
raise
|
218
|
+
@api_client.config.logger.debug 'Calling API: CustomerApi.patch_customer ...'
|
219
|
+
rescue
|
220
|
+
puts 'Cannot write to log'
|
221
|
+
end
|
222
|
+
end
|
223
|
+
# verify the required parameter 'customer_token_id' is set
|
224
|
+
if @api_client.config.client_side_validation && customer_token_id.nil?
|
225
|
+
fail ArgumentError, "Missing the required parameter 'customer_token_id' when calling CustomerApi.patch_customer"
|
226
|
+
end
|
227
|
+
if @api_client.config.client_side_validation && customer_token_id.to_s.length > 32
|
228
|
+
fail ArgumentError, 'invalid value for "customer_token_id" when calling CustomerApi.patch_customer, the character length must be smaller than or equal to 32.'
|
229
|
+
end
|
230
|
+
|
231
|
+
if @api_client.config.client_side_validation && customer_token_id.to_s.length < 1
|
232
|
+
fail ArgumentError, 'invalid value for "customer_token_id" when calling CustomerApi.patch_customer, the character length must be great than or equal to 1.'
|
233
|
+
end
|
234
|
+
|
235
|
+
# verify the required parameter 'patch_customer_request' is set
|
236
|
+
if @api_client.config.client_side_validation && patch_customer_request.nil?
|
237
|
+
fail ArgumentError, "Missing the required parameter 'patch_customer_request' when calling CustomerApi.patch_customer"
|
238
|
+
end
|
239
|
+
if @api_client.config.client_side_validation && !opts[:'profile_id'].nil? && opts[:'profile_id'].to_s.length > 36
|
240
|
+
fail ArgumentError, 'invalid value for "opts[:"profile_id"]" when calling CustomerApi.patch_customer, the character length must be smaller than or equal to 36.'
|
241
|
+
end
|
242
|
+
|
243
|
+
if @api_client.config.client_side_validation && !opts[:'profile_id'].nil? && opts[:'profile_id'].to_s.length < 36
|
244
|
+
fail ArgumentError, 'invalid value for "opts[:"profile_id"]" when calling CustomerApi.patch_customer, the character length must be great than or equal to 36.'
|
245
|
+
end
|
246
|
+
|
247
|
+
if @api_client.config.client_side_validation && !opts[:'if_match'].nil? && opts[:'if_match'].to_s.length > 32
|
248
|
+
fail ArgumentError, 'invalid value for "opts[:"if_match"]" when calling CustomerApi.patch_customer, the character length must be smaller than or equal to 32.'
|
249
|
+
end
|
250
|
+
|
251
|
+
if @api_client.config.client_side_validation && !opts[:'if_match'].nil? && opts[:'if_match'].to_s.length < 1
|
252
|
+
fail ArgumentError, 'invalid value for "opts[:"if_match"]" when calling CustomerApi.patch_customer, the character length must be great than or equal to 1.'
|
253
|
+
end
|
254
|
+
|
255
|
+
# resource path
|
256
|
+
local_var_path = 'tms/v2/customers/{customerTokenId}'.sub('{' + 'customerTokenId' + '}', customer_token_id.to_s)
|
257
|
+
|
258
|
+
# query parameters
|
259
|
+
query_params = {}
|
260
|
+
|
261
|
+
# header parameters
|
262
|
+
header_params = {}
|
263
|
+
# HTTP header 'Accept' (if needed)
|
264
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=utf-8'])
|
265
|
+
# HTTP header 'Content-Type'
|
266
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
|
267
|
+
header_params[:'profile-id'] = opts[:'profile_id'] if !opts[:'profile_id'].nil?
|
268
|
+
header_params[:'if-match'] = opts[:'if_match'] if !opts[:'if_match'].nil?
|
269
|
+
|
270
|
+
# form parameters
|
271
|
+
form_params = {}
|
272
|
+
|
273
|
+
# http body (model)
|
274
|
+
post_body = @api_client.object_to_http_body(patch_customer_request)
|
275
|
+
auth_names = []
|
276
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
277
|
+
:header_params => header_params,
|
278
|
+
:query_params => query_params,
|
279
|
+
:form_params => form_params,
|
280
|
+
:body => post_body,
|
281
|
+
:auth_names => auth_names,
|
282
|
+
:return_type => 'TmsV2CustomersResponse')
|
283
|
+
if @api_client.config.debugging
|
284
|
+
begin
|
285
|
+
raise
|
286
|
+
@api_client.config.logger.debug "API called: CustomerApi#patch_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
287
|
+
rescue
|
288
|
+
puts 'Cannot write to log'
|
289
|
+
end
|
290
|
+
end
|
291
|
+
return data, status_code, headers
|
292
|
+
end
|
293
|
+
# Create a Customer
|
294
|
+
# @param post_customer_request
|
295
|
+
# @param [Hash] opts the optional parameters
|
296
|
+
# @option opts [String] :profile_id The id of a profile containing user specific TMS configuration.
|
297
|
+
# @return [TmsV2CustomersResponse]
|
298
|
+
def post_customer(post_customer_request, opts = {})
|
299
|
+
data, status_code, headers = post_customer_with_http_info(post_customer_request, opts)
|
300
|
+
return data, status_code, headers
|
301
|
+
end
|
302
|
+
|
303
|
+
# Create a Customer
|
304
|
+
# @param post_customer_request
|
305
|
+
# @param [Hash] opts the optional parameters
|
306
|
+
# @option opts [String] :profile_id The id of a profile containing user specific TMS configuration.
|
307
|
+
# @return [Array<(TmsV2CustomersResponse, Fixnum, Hash)>] TmsV2CustomersResponse data, response status code and response headers
|
308
|
+
def post_customer_with_http_info(post_customer_request, opts = {})
|
309
|
+
|
310
|
+
if @api_client.config.debugging
|
311
|
+
begin
|
312
|
+
raise
|
313
|
+
@api_client.config.logger.debug 'Calling API: CustomerApi.post_customer ...'
|
314
|
+
rescue
|
315
|
+
puts 'Cannot write to log'
|
316
|
+
end
|
317
|
+
end
|
318
|
+
# verify the required parameter 'post_customer_request' is set
|
319
|
+
if @api_client.config.client_side_validation && post_customer_request.nil?
|
320
|
+
fail ArgumentError, "Missing the required parameter 'post_customer_request' when calling CustomerApi.post_customer"
|
321
|
+
end
|
322
|
+
if @api_client.config.client_side_validation && !opts[:'profile_id'].nil? && opts[:'profile_id'].to_s.length > 36
|
323
|
+
fail ArgumentError, 'invalid value for "opts[:"profile_id"]" when calling CustomerApi.post_customer, the character length must be smaller than or equal to 36.'
|
324
|
+
end
|
325
|
+
|
326
|
+
if @api_client.config.client_side_validation && !opts[:'profile_id'].nil? && opts[:'profile_id'].to_s.length < 36
|
327
|
+
fail ArgumentError, 'invalid value for "opts[:"profile_id"]" when calling CustomerApi.post_customer, the character length must be great than or equal to 36.'
|
328
|
+
end
|
329
|
+
|
330
|
+
# resource path
|
331
|
+
local_var_path = 'tms/v2/customers'
|
332
|
+
|
333
|
+
# query parameters
|
334
|
+
query_params = {}
|
335
|
+
|
336
|
+
# header parameters
|
337
|
+
header_params = {}
|
338
|
+
# HTTP header 'Accept' (if needed)
|
339
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=utf-8'])
|
340
|
+
# HTTP header 'Content-Type'
|
341
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])
|
342
|
+
header_params[:'profile-id'] = opts[:'profile_id'] if !opts[:'profile_id'].nil?
|
343
|
+
|
344
|
+
# form parameters
|
345
|
+
form_params = {}
|
346
|
+
|
347
|
+
# http body (model)
|
348
|
+
post_body = @api_client.object_to_http_body(post_customer_request)
|
349
|
+
auth_names = []
|
350
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
351
|
+
:header_params => header_params,
|
352
|
+
:query_params => query_params,
|
353
|
+
:form_params => form_params,
|
354
|
+
:body => post_body,
|
355
|
+
:auth_names => auth_names,
|
356
|
+
:return_type => 'TmsV2CustomersResponse')
|
357
|
+
if @api_client.config.debugging
|
358
|
+
begin
|
359
|
+
raise
|
360
|
+
@api_client.config.logger.debug "API called: CustomerApi#post_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
361
|
+
rescue
|
362
|
+
puts 'Cannot write to log'
|
363
|
+
end
|
364
|
+
end
|
365
|
+
return data, status_code, headers
|
366
|
+
end
|
367
|
+
end
|
368
|
+
end
|