ultracart_api 4.0.111.rc → 4.0.112.rc
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +15 -4
- data/docs/ChannelPartnerApi.md +438 -0
- data/docs/ChannelPartnerShipToPreference.md +28 -0
- data/docs/ChannelPartnerShipToPreferenceResponse.md +26 -0
- data/docs/ChannelPartnerShipToPreferencesResponse.md +26 -0
- data/docs/ChannelPartnersResponse.md +26 -0
- data/lib/ultracart_api/api/channel_partner_api.rb +418 -0
- data/lib/ultracart_api/models/channel_partner_ship_to_preference.rb +272 -0
- data/lib/ultracart_api/models/channel_partner_ship_to_preference_response.rb +256 -0
- data/lib/ultracart_api/models/channel_partner_ship_to_preferences_response.rb +259 -0
- data/lib/ultracart_api/models/channel_partners_response.rb +259 -0
- data/lib/ultracart_api/models/order_payment.rb +2 -2
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +4 -0
- metadata +10 -2
@@ -160,6 +160,76 @@ module UltracartClient
|
|
160
160
|
return data, status_code, headers
|
161
161
|
end
|
162
162
|
|
163
|
+
# Delete a ship to preference record for the channel partner.
|
164
|
+
# Delete a ship to preference record for the channel partner.
|
165
|
+
# @param channel_partner_oid [Integer]
|
166
|
+
# @param channel_partner_ship_to_preference_oid [Integer]
|
167
|
+
# @param [Hash] opts the optional parameters
|
168
|
+
# @return [nil]
|
169
|
+
def delete_channel_partner_ship_to_preference(channel_partner_oid, channel_partner_ship_to_preference_oid, opts = {})
|
170
|
+
delete_channel_partner_ship_to_preference_with_http_info(channel_partner_oid, channel_partner_ship_to_preference_oid, opts)
|
171
|
+
nil
|
172
|
+
end
|
173
|
+
|
174
|
+
# Delete a ship to preference record for the channel partner.
|
175
|
+
# Delete a ship to preference record for the channel partner.
|
176
|
+
# @param channel_partner_oid [Integer]
|
177
|
+
# @param channel_partner_ship_to_preference_oid [Integer]
|
178
|
+
# @param [Hash] opts the optional parameters
|
179
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
180
|
+
def delete_channel_partner_ship_to_preference_with_http_info(channel_partner_oid, channel_partner_ship_to_preference_oid, opts = {})
|
181
|
+
if @api_client.config.debugging
|
182
|
+
@api_client.config.logger.debug 'Calling API: ChannelPartnerApi.delete_channel_partner_ship_to_preference ...'
|
183
|
+
end
|
184
|
+
# verify the required parameter 'channel_partner_oid' is set
|
185
|
+
if @api_client.config.client_side_validation && channel_partner_oid.nil?
|
186
|
+
fail ArgumentError, "Missing the required parameter 'channel_partner_oid' when calling ChannelPartnerApi.delete_channel_partner_ship_to_preference"
|
187
|
+
end
|
188
|
+
# verify the required parameter 'channel_partner_ship_to_preference_oid' is set
|
189
|
+
if @api_client.config.client_side_validation && channel_partner_ship_to_preference_oid.nil?
|
190
|
+
fail ArgumentError, "Missing the required parameter 'channel_partner_ship_to_preference_oid' when calling ChannelPartnerApi.delete_channel_partner_ship_to_preference"
|
191
|
+
end
|
192
|
+
# resource path
|
193
|
+
local_var_path = '/channel_partner/channel_partners/{channel_partner_oid}/ship_to_preferences/{channel_partner_ship_to_preference_oid}'.sub('{' + 'channel_partner_oid' + '}', CGI.escape(channel_partner_oid.to_s)).sub('{' + 'channel_partner_ship_to_preference_oid' + '}', CGI.escape(channel_partner_ship_to_preference_oid.to_s))
|
194
|
+
|
195
|
+
# query parameters
|
196
|
+
query_params = opts[:query_params] || {}
|
197
|
+
|
198
|
+
# header parameters
|
199
|
+
header_params = opts[:header_params] || {}
|
200
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
201
|
+
# HTTP header 'Accept' (if needed)
|
202
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
203
|
+
|
204
|
+
# form parameters
|
205
|
+
form_params = opts[:form_params] || {}
|
206
|
+
|
207
|
+
# http body (model)
|
208
|
+
post_body = opts[:debug_body]
|
209
|
+
|
210
|
+
# return_type
|
211
|
+
return_type = opts[:debug_return_type]
|
212
|
+
|
213
|
+
# auth_names
|
214
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
215
|
+
|
216
|
+
new_options = opts.merge(
|
217
|
+
:operation => :"ChannelPartnerApi.delete_channel_partner_ship_to_preference",
|
218
|
+
:header_params => header_params,
|
219
|
+
:query_params => query_params,
|
220
|
+
:form_params => form_params,
|
221
|
+
:body => post_body,
|
222
|
+
:auth_names => auth_names,
|
223
|
+
:return_type => return_type
|
224
|
+
)
|
225
|
+
|
226
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
227
|
+
if @api_client.config.debugging
|
228
|
+
@api_client.config.logger.debug "API called: ChannelPartnerApi#delete_channel_partner_ship_to_preference\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
229
|
+
end
|
230
|
+
return data, status_code, headers
|
231
|
+
end
|
232
|
+
|
163
233
|
# Estimate shipping for channel partner order
|
164
234
|
# Estimate shipping for order from a channel partner.
|
165
235
|
# @param channel_partner_order [ChannelPartnerOrder] Order needing shipping estimate
|
@@ -298,6 +368,198 @@ module UltracartClient
|
|
298
368
|
return data, status_code, headers
|
299
369
|
end
|
300
370
|
|
371
|
+
# Retrieve the ship to preference associated with the channel partner and the specific id.
|
372
|
+
# Retrieve the ship to preference associated with the channel partner and the specific id.
|
373
|
+
# @param channel_partner_oid [Integer]
|
374
|
+
# @param channel_partner_ship_to_preference_oid [Integer]
|
375
|
+
# @param [Hash] opts the optional parameters
|
376
|
+
# @return [ChannelPartnerShipToPreferenceResponse]
|
377
|
+
def get_channel_partner_ship_to_preference(channel_partner_oid, channel_partner_ship_to_preference_oid, opts = {})
|
378
|
+
data, _status_code, _headers = get_channel_partner_ship_to_preference_with_http_info(channel_partner_oid, channel_partner_ship_to_preference_oid, opts)
|
379
|
+
data
|
380
|
+
end
|
381
|
+
|
382
|
+
# Retrieve the ship to preference associated with the channel partner and the specific id.
|
383
|
+
# Retrieve the ship to preference associated with the channel partner and the specific id.
|
384
|
+
# @param channel_partner_oid [Integer]
|
385
|
+
# @param channel_partner_ship_to_preference_oid [Integer]
|
386
|
+
# @param [Hash] opts the optional parameters
|
387
|
+
# @return [Array<(ChannelPartnerShipToPreferenceResponse, Integer, Hash)>] ChannelPartnerShipToPreferenceResponse data, response status code and response headers
|
388
|
+
def get_channel_partner_ship_to_preference_with_http_info(channel_partner_oid, channel_partner_ship_to_preference_oid, opts = {})
|
389
|
+
if @api_client.config.debugging
|
390
|
+
@api_client.config.logger.debug 'Calling API: ChannelPartnerApi.get_channel_partner_ship_to_preference ...'
|
391
|
+
end
|
392
|
+
# verify the required parameter 'channel_partner_oid' is set
|
393
|
+
if @api_client.config.client_side_validation && channel_partner_oid.nil?
|
394
|
+
fail ArgumentError, "Missing the required parameter 'channel_partner_oid' when calling ChannelPartnerApi.get_channel_partner_ship_to_preference"
|
395
|
+
end
|
396
|
+
# verify the required parameter 'channel_partner_ship_to_preference_oid' is set
|
397
|
+
if @api_client.config.client_side_validation && channel_partner_ship_to_preference_oid.nil?
|
398
|
+
fail ArgumentError, "Missing the required parameter 'channel_partner_ship_to_preference_oid' when calling ChannelPartnerApi.get_channel_partner_ship_to_preference"
|
399
|
+
end
|
400
|
+
# resource path
|
401
|
+
local_var_path = '/channel_partner/channel_partners/{channel_partner_oid}/ship_to_preferences/{channel_partner_ship_to_preference_oid}'.sub('{' + 'channel_partner_oid' + '}', CGI.escape(channel_partner_oid.to_s)).sub('{' + 'channel_partner_ship_to_preference_oid' + '}', CGI.escape(channel_partner_ship_to_preference_oid.to_s))
|
402
|
+
|
403
|
+
# query parameters
|
404
|
+
query_params = opts[:query_params] || {}
|
405
|
+
|
406
|
+
# header parameters
|
407
|
+
header_params = opts[:header_params] || {}
|
408
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
409
|
+
# HTTP header 'Accept' (if needed)
|
410
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
411
|
+
|
412
|
+
# form parameters
|
413
|
+
form_params = opts[:form_params] || {}
|
414
|
+
|
415
|
+
# http body (model)
|
416
|
+
post_body = opts[:debug_body]
|
417
|
+
|
418
|
+
# return_type
|
419
|
+
return_type = opts[:debug_return_type] || 'ChannelPartnerShipToPreferenceResponse'
|
420
|
+
|
421
|
+
# auth_names
|
422
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
423
|
+
|
424
|
+
new_options = opts.merge(
|
425
|
+
:operation => :"ChannelPartnerApi.get_channel_partner_ship_to_preference",
|
426
|
+
:header_params => header_params,
|
427
|
+
:query_params => query_params,
|
428
|
+
:form_params => form_params,
|
429
|
+
:body => post_body,
|
430
|
+
:auth_names => auth_names,
|
431
|
+
:return_type => return_type
|
432
|
+
)
|
433
|
+
|
434
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
435
|
+
if @api_client.config.debugging
|
436
|
+
@api_client.config.logger.debug "API called: ChannelPartnerApi#get_channel_partner_ship_to_preference\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
437
|
+
end
|
438
|
+
return data, status_code, headers
|
439
|
+
end
|
440
|
+
|
441
|
+
# Retrieve the ship to preferences associated with the channel partner.
|
442
|
+
# Retrieve the ship to preferences associated with the channel partner.
|
443
|
+
# @param channel_partner_oid [Integer]
|
444
|
+
# @param [Hash] opts the optional parameters
|
445
|
+
# @return [ChannelPartnerShipToPreferencesResponse]
|
446
|
+
def get_channel_partner_ship_to_preferences(channel_partner_oid, opts = {})
|
447
|
+
data, _status_code, _headers = get_channel_partner_ship_to_preferences_with_http_info(channel_partner_oid, opts)
|
448
|
+
data
|
449
|
+
end
|
450
|
+
|
451
|
+
# Retrieve the ship to preferences associated with the channel partner.
|
452
|
+
# Retrieve the ship to preferences associated with the channel partner.
|
453
|
+
# @param channel_partner_oid [Integer]
|
454
|
+
# @param [Hash] opts the optional parameters
|
455
|
+
# @return [Array<(ChannelPartnerShipToPreferencesResponse, Integer, Hash)>] ChannelPartnerShipToPreferencesResponse data, response status code and response headers
|
456
|
+
def get_channel_partner_ship_to_preferences_with_http_info(channel_partner_oid, opts = {})
|
457
|
+
if @api_client.config.debugging
|
458
|
+
@api_client.config.logger.debug 'Calling API: ChannelPartnerApi.get_channel_partner_ship_to_preferences ...'
|
459
|
+
end
|
460
|
+
# verify the required parameter 'channel_partner_oid' is set
|
461
|
+
if @api_client.config.client_side_validation && channel_partner_oid.nil?
|
462
|
+
fail ArgumentError, "Missing the required parameter 'channel_partner_oid' when calling ChannelPartnerApi.get_channel_partner_ship_to_preferences"
|
463
|
+
end
|
464
|
+
# resource path
|
465
|
+
local_var_path = '/channel_partner/channel_partners/{channel_partner_oid}/ship_to_preferences'.sub('{' + 'channel_partner_oid' + '}', CGI.escape(channel_partner_oid.to_s))
|
466
|
+
|
467
|
+
# query parameters
|
468
|
+
query_params = opts[:query_params] || {}
|
469
|
+
|
470
|
+
# header parameters
|
471
|
+
header_params = opts[:header_params] || {}
|
472
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
473
|
+
# HTTP header 'Accept' (if needed)
|
474
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
475
|
+
|
476
|
+
# form parameters
|
477
|
+
form_params = opts[:form_params] || {}
|
478
|
+
|
479
|
+
# http body (model)
|
480
|
+
post_body = opts[:debug_body]
|
481
|
+
|
482
|
+
# return_type
|
483
|
+
return_type = opts[:debug_return_type] || 'ChannelPartnerShipToPreferencesResponse'
|
484
|
+
|
485
|
+
# auth_names
|
486
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
487
|
+
|
488
|
+
new_options = opts.merge(
|
489
|
+
:operation => :"ChannelPartnerApi.get_channel_partner_ship_to_preferences",
|
490
|
+
:header_params => header_params,
|
491
|
+
:query_params => query_params,
|
492
|
+
:form_params => form_params,
|
493
|
+
:body => post_body,
|
494
|
+
:auth_names => auth_names,
|
495
|
+
:return_type => return_type
|
496
|
+
)
|
497
|
+
|
498
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
499
|
+
if @api_client.config.debugging
|
500
|
+
@api_client.config.logger.debug "API called: ChannelPartnerApi#get_channel_partner_ship_to_preferences\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
501
|
+
end
|
502
|
+
return data, status_code, headers
|
503
|
+
end
|
504
|
+
|
505
|
+
# Retrieve the channel partners configured on the account.
|
506
|
+
# Retrieve the channel partners configured on the account.
|
507
|
+
# @param [Hash] opts the optional parameters
|
508
|
+
# @return [ChannelPartnersResponse]
|
509
|
+
def get_channel_partners(opts = {})
|
510
|
+
data, _status_code, _headers = get_channel_partners_with_http_info(opts)
|
511
|
+
data
|
512
|
+
end
|
513
|
+
|
514
|
+
# Retrieve the channel partners configured on the account.
|
515
|
+
# Retrieve the channel partners configured on the account.
|
516
|
+
# @param [Hash] opts the optional parameters
|
517
|
+
# @return [Array<(ChannelPartnersResponse, Integer, Hash)>] ChannelPartnersResponse data, response status code and response headers
|
518
|
+
def get_channel_partners_with_http_info(opts = {})
|
519
|
+
if @api_client.config.debugging
|
520
|
+
@api_client.config.logger.debug 'Calling API: ChannelPartnerApi.get_channel_partners ...'
|
521
|
+
end
|
522
|
+
# resource path
|
523
|
+
local_var_path = '/channel_partner/channel_partners'
|
524
|
+
|
525
|
+
# query parameters
|
526
|
+
query_params = opts[:query_params] || {}
|
527
|
+
|
528
|
+
# header parameters
|
529
|
+
header_params = opts[:header_params] || {}
|
530
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
531
|
+
# HTTP header 'Accept' (if needed)
|
532
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
533
|
+
|
534
|
+
# form parameters
|
535
|
+
form_params = opts[:form_params] || {}
|
536
|
+
|
537
|
+
# http body (model)
|
538
|
+
post_body = opts[:debug_body]
|
539
|
+
|
540
|
+
# return_type
|
541
|
+
return_type = opts[:debug_return_type] || 'ChannelPartnersResponse'
|
542
|
+
|
543
|
+
# auth_names
|
544
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
545
|
+
|
546
|
+
new_options = opts.merge(
|
547
|
+
:operation => :"ChannelPartnerApi.get_channel_partners",
|
548
|
+
:header_params => header_params,
|
549
|
+
:query_params => query_params,
|
550
|
+
:form_params => form_params,
|
551
|
+
:body => post_body,
|
552
|
+
:auth_names => auth_names,
|
553
|
+
:return_type => return_type
|
554
|
+
)
|
555
|
+
|
556
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
557
|
+
if @api_client.config.debugging
|
558
|
+
@api_client.config.logger.debug "API called: ChannelPartnerApi#get_channel_partners\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
559
|
+
end
|
560
|
+
return data, status_code, headers
|
561
|
+
end
|
562
|
+
|
301
563
|
# Insert channel partner order
|
302
564
|
# Insert order from a channel partner.
|
303
565
|
# @param channel_partner_order [ChannelPartnerOrder] Order to insert
|
@@ -366,5 +628,161 @@ module UltracartClient
|
|
366
628
|
end
|
367
629
|
return data, status_code, headers
|
368
630
|
end
|
631
|
+
|
632
|
+
# Insert a ship to preference record for the channel partner.
|
633
|
+
# Insert a ship to preference record for the channel partner.
|
634
|
+
# @param channel_partner_oid [Integer]
|
635
|
+
# @param ship_to_preference [ChannelPartnerShipToPreference] Ship to preference to create
|
636
|
+
# @param [Hash] opts the optional parameters
|
637
|
+
# @return [ChannelPartnerShipToPreferenceResponse]
|
638
|
+
def insert_channel_partner_ship_to_preference(channel_partner_oid, ship_to_preference, opts = {})
|
639
|
+
data, _status_code, _headers = insert_channel_partner_ship_to_preference_with_http_info(channel_partner_oid, ship_to_preference, opts)
|
640
|
+
data
|
641
|
+
end
|
642
|
+
|
643
|
+
# Insert a ship to preference record for the channel partner.
|
644
|
+
# Insert a ship to preference record for the channel partner.
|
645
|
+
# @param channel_partner_oid [Integer]
|
646
|
+
# @param ship_to_preference [ChannelPartnerShipToPreference] Ship to preference to create
|
647
|
+
# @param [Hash] opts the optional parameters
|
648
|
+
# @return [Array<(ChannelPartnerShipToPreferenceResponse, Integer, Hash)>] ChannelPartnerShipToPreferenceResponse data, response status code and response headers
|
649
|
+
def insert_channel_partner_ship_to_preference_with_http_info(channel_partner_oid, ship_to_preference, opts = {})
|
650
|
+
if @api_client.config.debugging
|
651
|
+
@api_client.config.logger.debug 'Calling API: ChannelPartnerApi.insert_channel_partner_ship_to_preference ...'
|
652
|
+
end
|
653
|
+
# verify the required parameter 'channel_partner_oid' is set
|
654
|
+
if @api_client.config.client_side_validation && channel_partner_oid.nil?
|
655
|
+
fail ArgumentError, "Missing the required parameter 'channel_partner_oid' when calling ChannelPartnerApi.insert_channel_partner_ship_to_preference"
|
656
|
+
end
|
657
|
+
# verify the required parameter 'ship_to_preference' is set
|
658
|
+
if @api_client.config.client_side_validation && ship_to_preference.nil?
|
659
|
+
fail ArgumentError, "Missing the required parameter 'ship_to_preference' when calling ChannelPartnerApi.insert_channel_partner_ship_to_preference"
|
660
|
+
end
|
661
|
+
# resource path
|
662
|
+
local_var_path = '/channel_partner/channel_partners/{channel_partner_oid}/ship_to_preferences'.sub('{' + 'channel_partner_oid' + '}', CGI.escape(channel_partner_oid.to_s))
|
663
|
+
|
664
|
+
# query parameters
|
665
|
+
query_params = opts[:query_params] || {}
|
666
|
+
|
667
|
+
# header parameters
|
668
|
+
header_params = opts[:header_params] || {}
|
669
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
670
|
+
# HTTP header 'Accept' (if needed)
|
671
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
672
|
+
# HTTP header 'Content-Type'
|
673
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
674
|
+
if !content_type.nil?
|
675
|
+
header_params['Content-Type'] = content_type
|
676
|
+
end
|
677
|
+
|
678
|
+
# form parameters
|
679
|
+
form_params = opts[:form_params] || {}
|
680
|
+
|
681
|
+
# http body (model)
|
682
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(ship_to_preference)
|
683
|
+
|
684
|
+
# return_type
|
685
|
+
return_type = opts[:debug_return_type] || 'ChannelPartnerShipToPreferenceResponse'
|
686
|
+
|
687
|
+
# auth_names
|
688
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
689
|
+
|
690
|
+
new_options = opts.merge(
|
691
|
+
:operation => :"ChannelPartnerApi.insert_channel_partner_ship_to_preference",
|
692
|
+
:header_params => header_params,
|
693
|
+
:query_params => query_params,
|
694
|
+
:form_params => form_params,
|
695
|
+
:body => post_body,
|
696
|
+
:auth_names => auth_names,
|
697
|
+
:return_type => return_type
|
698
|
+
)
|
699
|
+
|
700
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
701
|
+
if @api_client.config.debugging
|
702
|
+
@api_client.config.logger.debug "API called: ChannelPartnerApi#insert_channel_partner_ship_to_preference\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
703
|
+
end
|
704
|
+
return data, status_code, headers
|
705
|
+
end
|
706
|
+
|
707
|
+
# Update a ship to preference record for the channel partner.
|
708
|
+
# Update a ship to preference record for the channel partner.
|
709
|
+
# @param channel_partner_oid [Integer]
|
710
|
+
# @param channel_partner_ship_to_preference_oid [Integer]
|
711
|
+
# @param ship_to_preference [ChannelPartnerShipToPreference] Ship to preference to create
|
712
|
+
# @param [Hash] opts the optional parameters
|
713
|
+
# @return [ChannelPartnerShipToPreferenceResponse]
|
714
|
+
def update_channel_partner_ship_to_preference(channel_partner_oid, channel_partner_ship_to_preference_oid, ship_to_preference, opts = {})
|
715
|
+
data, _status_code, _headers = update_channel_partner_ship_to_preference_with_http_info(channel_partner_oid, channel_partner_ship_to_preference_oid, ship_to_preference, opts)
|
716
|
+
data
|
717
|
+
end
|
718
|
+
|
719
|
+
# Update a ship to preference record for the channel partner.
|
720
|
+
# Update a ship to preference record for the channel partner.
|
721
|
+
# @param channel_partner_oid [Integer]
|
722
|
+
# @param channel_partner_ship_to_preference_oid [Integer]
|
723
|
+
# @param ship_to_preference [ChannelPartnerShipToPreference] Ship to preference to create
|
724
|
+
# @param [Hash] opts the optional parameters
|
725
|
+
# @return [Array<(ChannelPartnerShipToPreferenceResponse, Integer, Hash)>] ChannelPartnerShipToPreferenceResponse data, response status code and response headers
|
726
|
+
def update_channel_partner_ship_to_preference_with_http_info(channel_partner_oid, channel_partner_ship_to_preference_oid, ship_to_preference, opts = {})
|
727
|
+
if @api_client.config.debugging
|
728
|
+
@api_client.config.logger.debug 'Calling API: ChannelPartnerApi.update_channel_partner_ship_to_preference ...'
|
729
|
+
end
|
730
|
+
# verify the required parameter 'channel_partner_oid' is set
|
731
|
+
if @api_client.config.client_side_validation && channel_partner_oid.nil?
|
732
|
+
fail ArgumentError, "Missing the required parameter 'channel_partner_oid' when calling ChannelPartnerApi.update_channel_partner_ship_to_preference"
|
733
|
+
end
|
734
|
+
# verify the required parameter 'channel_partner_ship_to_preference_oid' is set
|
735
|
+
if @api_client.config.client_side_validation && channel_partner_ship_to_preference_oid.nil?
|
736
|
+
fail ArgumentError, "Missing the required parameter 'channel_partner_ship_to_preference_oid' when calling ChannelPartnerApi.update_channel_partner_ship_to_preference"
|
737
|
+
end
|
738
|
+
# verify the required parameter 'ship_to_preference' is set
|
739
|
+
if @api_client.config.client_side_validation && ship_to_preference.nil?
|
740
|
+
fail ArgumentError, "Missing the required parameter 'ship_to_preference' when calling ChannelPartnerApi.update_channel_partner_ship_to_preference"
|
741
|
+
end
|
742
|
+
# resource path
|
743
|
+
local_var_path = '/channel_partner/channel_partners/{channel_partner_oid}/ship_to_preferences/{channel_partner_ship_to_preference_oid}'.sub('{' + 'channel_partner_oid' + '}', CGI.escape(channel_partner_oid.to_s)).sub('{' + 'channel_partner_ship_to_preference_oid' + '}', CGI.escape(channel_partner_ship_to_preference_oid.to_s))
|
744
|
+
|
745
|
+
# query parameters
|
746
|
+
query_params = opts[:query_params] || {}
|
747
|
+
|
748
|
+
# header parameters
|
749
|
+
header_params = opts[:header_params] || {}
|
750
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
751
|
+
# HTTP header 'Accept' (if needed)
|
752
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
753
|
+
# HTTP header 'Content-Type'
|
754
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
755
|
+
if !content_type.nil?
|
756
|
+
header_params['Content-Type'] = content_type
|
757
|
+
end
|
758
|
+
|
759
|
+
# form parameters
|
760
|
+
form_params = opts[:form_params] || {}
|
761
|
+
|
762
|
+
# http body (model)
|
763
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(ship_to_preference)
|
764
|
+
|
765
|
+
# return_type
|
766
|
+
return_type = opts[:debug_return_type] || 'ChannelPartnerShipToPreferenceResponse'
|
767
|
+
|
768
|
+
# auth_names
|
769
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
770
|
+
|
771
|
+
new_options = opts.merge(
|
772
|
+
:operation => :"ChannelPartnerApi.update_channel_partner_ship_to_preference",
|
773
|
+
:header_params => header_params,
|
774
|
+
:query_params => query_params,
|
775
|
+
:form_params => form_params,
|
776
|
+
:body => post_body,
|
777
|
+
:auth_names => auth_names,
|
778
|
+
:return_type => return_type
|
779
|
+
)
|
780
|
+
|
781
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
782
|
+
if @api_client.config.debugging
|
783
|
+
@api_client.config.logger.debug "API called: ChannelPartnerApi#update_channel_partner_ship_to_preference\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
784
|
+
end
|
785
|
+
return data, status_code, headers
|
786
|
+
end
|
369
787
|
end
|
370
788
|
end
|