Class: UltracartClient::ChannelPartnerApi

Inherits:
Object
  • Object
show all
Defined in:
lib/ultracart_api/api/channel_partner_api.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ChannelPartnerApi

Returns a new instance of ChannelPartnerApi.



19
20
21
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 17

def api_client
  @api_client
end

Class Method Details

.new_using_api_key(simple_key, verify_ssl = true, debugging = false) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 23

def self.new_using_api_key(simple_key, verify_ssl = true, debugging = false)
  api_config = Configuration.new
  api_config.api_key_prefix['x-ultracart-simple-key'] = simple_key
  api_config.api_version = '2017-03-01'
  api_config.verify_ssl = verify_ssl

  api_client = ApiClient.new(api_config)
  api_client.config.debugging = debugging

  UltracartClient::ChannelPartnerApi.new(api_client)
end

Instance Method Details

#cancel_order_by_channel_partner_order_id(order_id, opts = {}) ⇒ ChannelPartnerCancelResponse

Cancel channel partner order by channel partner order id Cancel channel partner order by channel partner order id

Parameters:

  • order_id (String)

    The channel partner order id to delete.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



40
41
42
43
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 40

def cancel_order_by_channel_partner_order_id(order_id, opts = {})
  data, _status_code, _headers = cancel_order_by_channel_partner_order_id_with_http_info(order_id, opts)
  data
end

#cancel_order_by_channel_partner_order_id_with_http_info(order_id, opts = {}) ⇒ Array<(ChannelPartnerCancelResponse, Integer, Hash)>

Cancel channel partner order by channel partner order id Cancel channel partner order by channel partner order id

Parameters:

  • order_id (String)

    The channel partner order id to delete.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 50

def cancel_order_by_channel_partner_order_id_with_http_info(order_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChannelPartnerApi.cancel_order_by_channel_partner_order_id ...'
  end
  # verify the required parameter 'order_id' is set
  if @api_client.config.client_side_validation && order_id.nil?
    fail ArgumentError, "Missing the required parameter 'order_id' when calling ChannelPartnerApi.cancel_order_by_channel_partner_order_id"
  end
  # resource path
  local_var_path = '/channel_partner/cancel/by_channel_partner_order_id/{order_id}'.sub('{' + 'order_id' + '}', CGI.escape(order_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ChannelPartnerCancelResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"ChannelPartnerApi.cancel_order_by_channel_partner_order_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChannelPartnerApi#cancel_order_by_channel_partner_order_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#cancel_order_by_ultra_cart_order_id(order_id, opts = {}) ⇒ ChannelPartnerCancelResponse

Cancel channel partner order by UltraCart order id Cancel channel partner order by UltraCart order id

Parameters:

  • order_id (String)

    The UltraCart order id to delete.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



104
105
106
107
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 104

def cancel_order_by_ultra_cart_order_id(order_id, opts = {})
  data, _status_code, _headers = cancel_order_by_ultra_cart_order_id_with_http_info(order_id, opts)
  data
end

#cancel_order_by_ultra_cart_order_id_with_http_info(order_id, opts = {}) ⇒ Array<(ChannelPartnerCancelResponse, Integer, Hash)>

Cancel channel partner order by UltraCart order id Cancel channel partner order by UltraCart order id

Parameters:

  • order_id (String)

    The UltraCart order id to delete.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 114

def cancel_order_by_ultra_cart_order_id_with_http_info(order_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChannelPartnerApi.cancel_order_by_ultra_cart_order_id ...'
  end
  # verify the required parameter 'order_id' is set
  if @api_client.config.client_side_validation && order_id.nil?
    fail ArgumentError, "Missing the required parameter 'order_id' when calling ChannelPartnerApi.cancel_order_by_ultra_cart_order_id"
  end
  # resource path
  local_var_path = '/channel_partner/cancel/by_ultracart_order_id/{order_id}'.sub('{' + 'order_id' + '}', CGI.escape(order_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ChannelPartnerCancelResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"ChannelPartnerApi.cancel_order_by_ultra_cart_order_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChannelPartnerApi#cancel_order_by_ultra_cart_order_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_channel_partner_ship_to_preference(channel_partner_oid, channel_partner_ship_to_preference_oid, opts = {}) ⇒ nil

Delete a ship to preference record for the channel partner. Delete a ship to preference record for the channel partner.

Parameters:

  • channel_partner_oid (Integer)
  • channel_partner_ship_to_preference_oid (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


169
170
171
172
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 169

def delete_channel_partner_ship_to_preference(channel_partner_oid, channel_partner_ship_to_preference_oid, opts = {})
  delete_channel_partner_ship_to_preference_with_http_info(channel_partner_oid, channel_partner_ship_to_preference_oid, opts)
  nil
end

#delete_channel_partner_ship_to_preference_with_http_info(channel_partner_oid, channel_partner_ship_to_preference_oid, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete a ship to preference record for the channel partner. Delete a ship to preference record for the channel partner.

Parameters:

  • channel_partner_oid (Integer)
  • channel_partner_ship_to_preference_oid (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



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
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 180

def delete_channel_partner_ship_to_preference_with_http_info(channel_partner_oid, channel_partner_ship_to_preference_oid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChannelPartnerApi.delete_channel_partner_ship_to_preference ...'
  end
  # verify the required parameter 'channel_partner_oid' is set
  if @api_client.config.client_side_validation && channel_partner_oid.nil?
    fail ArgumentError, "Missing the required parameter 'channel_partner_oid' when calling ChannelPartnerApi.delete_channel_partner_ship_to_preference"
  end
  # verify the required parameter 'channel_partner_ship_to_preference_oid' is set
  if @api_client.config.client_side_validation && channel_partner_ship_to_preference_oid.nil?
    fail ArgumentError, "Missing the required parameter 'channel_partner_ship_to_preference_oid' when calling ChannelPartnerApi.delete_channel_partner_ship_to_preference"
  end
  # resource path
  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))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"ChannelPartnerApi.delete_channel_partner_ship_to_preference",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChannelPartnerApi#delete_channel_partner_ship_to_preference\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#estimate_shipping_for_channel_partner_order(channel_partner_order, opts = {}) ⇒ ChannelPartnerEstimateShippingResponse

Estimate shipping for channel partner order Estimate shipping for order from a channel partner.

Parameters:

  • channel_partner_order (ChannelPartnerOrder)

    Order needing shipping estimate

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



238
239
240
241
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 238

def estimate_shipping_for_channel_partner_order(channel_partner_order, opts = {})
  data, _status_code, _headers = estimate_shipping_for_channel_partner_order_with_http_info(channel_partner_order, opts)
  data
end

#estimate_shipping_for_channel_partner_order_with_http_info(channel_partner_order, opts = {}) ⇒ Array<(ChannelPartnerEstimateShippingResponse, Integer, Hash)>

Estimate shipping for channel partner order Estimate shipping for order from a channel partner.

Parameters:

  • channel_partner_order (ChannelPartnerOrder)

    Order needing shipping estimate

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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
292
293
294
295
296
297
298
299
300
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 248

def estimate_shipping_for_channel_partner_order_with_http_info(channel_partner_order, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChannelPartnerApi.estimate_shipping_for_channel_partner_order ...'
  end
  # verify the required parameter 'channel_partner_order' is set
  if @api_client.config.client_side_validation && channel_partner_order.nil?
    fail ArgumentError, "Missing the required parameter 'channel_partner_order' when calling ChannelPartnerApi.estimate_shipping_for_channel_partner_order"
  end
  # resource path
  local_var_path = '/channel_partner/estimate_shipping'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(channel_partner_order)

  # return_type
  return_type = opts[:debug_return_type] || 'ChannelPartnerEstimateShippingResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"ChannelPartnerApi.estimate_shipping_for_channel_partner_order",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChannelPartnerApi#estimate_shipping_for_channel_partner_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#estimate_tax_for_channel_partner_order(channel_partner_order, opts = {}) ⇒ ChannelPartnerEstimateTaxResponse

Estimate tax for channel partner order Estimate tax for order from a channel partner.

Parameters:

  • channel_partner_order (ChannelPartnerOrder)

    Order needing tax estimate

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



307
308
309
310
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 307

def estimate_tax_for_channel_partner_order(channel_partner_order, opts = {})
  data, _status_code, _headers = estimate_tax_for_channel_partner_order_with_http_info(channel_partner_order, opts)
  data
end

#estimate_tax_for_channel_partner_order_with_http_info(channel_partner_order, opts = {}) ⇒ Array<(ChannelPartnerEstimateTaxResponse, Integer, Hash)>

Estimate tax for channel partner order Estimate tax for order from a channel partner.

Parameters:

  • channel_partner_order (ChannelPartnerOrder)

    Order needing tax estimate

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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
361
362
363
364
365
366
367
368
369
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 317

def estimate_tax_for_channel_partner_order_with_http_info(channel_partner_order, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChannelPartnerApi.estimate_tax_for_channel_partner_order ...'
  end
  # verify the required parameter 'channel_partner_order' is set
  if @api_client.config.client_side_validation && channel_partner_order.nil?
    fail ArgumentError, "Missing the required parameter 'channel_partner_order' when calling ChannelPartnerApi.estimate_tax_for_channel_partner_order"
  end
  # resource path
  local_var_path = '/channel_partner/estimate_tax'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(channel_partner_order)

  # return_type
  return_type = opts[:debug_return_type] || 'ChannelPartnerEstimateTaxResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"ChannelPartnerApi.estimate_tax_for_channel_partner_order",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChannelPartnerApi#estimate_tax_for_channel_partner_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_channel_partner_ship_to_preference(channel_partner_oid, channel_partner_ship_to_preference_oid, opts = {}) ⇒ ChannelPartnerShipToPreferenceResponse

Retrieve the ship to preference associated with the channel partner and the specific id. Retrieve the ship to preference associated with the channel partner and the specific id.

Parameters:

  • channel_partner_oid (Integer)
  • channel_partner_ship_to_preference_oid (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



377
378
379
380
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 377

def get_channel_partner_ship_to_preference(channel_partner_oid, channel_partner_ship_to_preference_oid, opts = {})
  data, _status_code, _headers = get_channel_partner_ship_to_preference_with_http_info(channel_partner_oid, channel_partner_ship_to_preference_oid, opts)
  data
end

#get_channel_partner_ship_to_preference_with_http_info(channel_partner_oid, channel_partner_ship_to_preference_oid, opts = {}) ⇒ Array<(ChannelPartnerShipToPreferenceResponse, Integer, Hash)>

Retrieve the ship to preference associated with the channel partner and the specific id. Retrieve the ship to preference associated with the channel partner and the specific id.

Parameters:

  • channel_partner_oid (Integer)
  • channel_partner_ship_to_preference_oid (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 388

def get_channel_partner_ship_to_preference_with_http_info(channel_partner_oid, channel_partner_ship_to_preference_oid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChannelPartnerApi.get_channel_partner_ship_to_preference ...'
  end
  # verify the required parameter 'channel_partner_oid' is set
  if @api_client.config.client_side_validation && channel_partner_oid.nil?
    fail ArgumentError, "Missing the required parameter 'channel_partner_oid' when calling ChannelPartnerApi.get_channel_partner_ship_to_preference"
  end
  # verify the required parameter 'channel_partner_ship_to_preference_oid' is set
  if @api_client.config.client_side_validation && channel_partner_ship_to_preference_oid.nil?
    fail ArgumentError, "Missing the required parameter 'channel_partner_ship_to_preference_oid' when calling ChannelPartnerApi.get_channel_partner_ship_to_preference"
  end
  # resource path
  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))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ChannelPartnerShipToPreferenceResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"ChannelPartnerApi.get_channel_partner_ship_to_preference",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChannelPartnerApi#get_channel_partner_ship_to_preference\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_channel_partner_ship_to_preferences(channel_partner_oid, opts = {}) ⇒ ChannelPartnerShipToPreferencesResponse

Retrieve the ship to preferences associated with the channel partner. Retrieve the ship to preferences associated with the channel partner.

Parameters:

  • channel_partner_oid (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



446
447
448
449
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 446

def get_channel_partner_ship_to_preferences(channel_partner_oid, opts = {})
  data, _status_code, _headers = get_channel_partner_ship_to_preferences_with_http_info(channel_partner_oid, opts)
  data
end

#get_channel_partner_ship_to_preferences_with_http_info(channel_partner_oid, opts = {}) ⇒ Array<(ChannelPartnerShipToPreferencesResponse, Integer, Hash)>

Retrieve the ship to preferences associated with the channel partner. Retrieve the ship to preferences associated with the channel partner.

Parameters:

  • channel_partner_oid (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 456

def get_channel_partner_ship_to_preferences_with_http_info(channel_partner_oid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChannelPartnerApi.get_channel_partner_ship_to_preferences ...'
  end
  # verify the required parameter 'channel_partner_oid' is set
  if @api_client.config.client_side_validation && channel_partner_oid.nil?
    fail ArgumentError, "Missing the required parameter 'channel_partner_oid' when calling ChannelPartnerApi.get_channel_partner_ship_to_preferences"
  end
  # resource path
  local_var_path = '/channel_partner/channel_partners/{channel_partner_oid}/ship_to_preferences'.sub('{' + 'channel_partner_oid' + '}', CGI.escape(channel_partner_oid.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ChannelPartnerShipToPreferencesResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"ChannelPartnerApi.get_channel_partner_ship_to_preferences",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChannelPartnerApi#get_channel_partner_ship_to_preferences\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_channel_partners(opts = {}) ⇒ ChannelPartnersResponse

Retrieve the channel partners configured on the account. Retrieve the channel partners configured on the account.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



509
510
511
512
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 509

def get_channel_partners(opts = {})
  data, _status_code, _headers = get_channel_partners_with_http_info(opts)
  data
end

#get_channel_partners_with_http_info(opts = {}) ⇒ Array<(ChannelPartnersResponse, Integer, Hash)>

Retrieve the channel partners configured on the account. Retrieve the channel partners configured on the account.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ChannelPartnersResponse, Integer, Hash)>)

    ChannelPartnersResponse data, response status code and response headers



518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 518

def get_channel_partners_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChannelPartnerApi.get_channel_partners ...'
  end
  # resource path
  local_var_path = '/channel_partner/channel_partners'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ChannelPartnersResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"ChannelPartnerApi.get_channel_partners",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChannelPartnerApi#get_channel_partners\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#import_channel_partner_order(channel_partner_order, opts = {}) ⇒ ChannelPartnerImportResponse

Insert channel partner order Insert order from a channel partner.

Parameters:

  • channel_partner_order (ChannelPartnerOrder)

    Order to insert

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



568
569
570
571
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 568

def import_channel_partner_order(channel_partner_order, opts = {})
  data, _status_code, _headers = import_channel_partner_order_with_http_info(channel_partner_order, opts)
  data
end

#import_channel_partner_order_with_http_info(channel_partner_order, opts = {}) ⇒ Array<(ChannelPartnerImportResponse, Integer, Hash)>

Insert channel partner order Insert order from a channel partner.

Parameters:

  • channel_partner_order (ChannelPartnerOrder)

    Order to insert

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 578

def import_channel_partner_order_with_http_info(channel_partner_order, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChannelPartnerApi.import_channel_partner_order ...'
  end
  # verify the required parameter 'channel_partner_order' is set
  if @api_client.config.client_side_validation && channel_partner_order.nil?
    fail ArgumentError, "Missing the required parameter 'channel_partner_order' when calling ChannelPartnerApi.import_channel_partner_order"
  end
  # resource path
  local_var_path = '/channel_partner/import'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(channel_partner_order)

  # return_type
  return_type = opts[:debug_return_type] || 'ChannelPartnerImportResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"ChannelPartnerApi.import_channel_partner_order",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChannelPartnerApi#import_channel_partner_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#insert_channel_partner_ship_to_preference(channel_partner_oid, ship_to_preference, opts = {}) ⇒ ChannelPartnerShipToPreferenceResponse

Insert a ship to preference record for the channel partner. Insert a ship to preference record for the channel partner.

Parameters:

  • channel_partner_oid (Integer)
  • ship_to_preference (ChannelPartnerShipToPreference)

    Ship to preference to create

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



638
639
640
641
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 638

def insert_channel_partner_ship_to_preference(channel_partner_oid, ship_to_preference, opts = {})
  data, _status_code, _headers = insert_channel_partner_ship_to_preference_with_http_info(channel_partner_oid, ship_to_preference, opts)
  data
end

#insert_channel_partner_ship_to_preference_with_http_info(channel_partner_oid, ship_to_preference, opts = {}) ⇒ Array<(ChannelPartnerShipToPreferenceResponse, Integer, Hash)>

Insert a ship to preference record for the channel partner. Insert a ship to preference record for the channel partner.

Parameters:

  • channel_partner_oid (Integer)
  • ship_to_preference (ChannelPartnerShipToPreference)

    Ship to preference to create

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 649

def insert_channel_partner_ship_to_preference_with_http_info(channel_partner_oid, ship_to_preference, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChannelPartnerApi.insert_channel_partner_ship_to_preference ...'
  end
  # verify the required parameter 'channel_partner_oid' is set
  if @api_client.config.client_side_validation && channel_partner_oid.nil?
    fail ArgumentError, "Missing the required parameter 'channel_partner_oid' when calling ChannelPartnerApi.insert_channel_partner_ship_to_preference"
  end
  # verify the required parameter 'ship_to_preference' is set
  if @api_client.config.client_side_validation && ship_to_preference.nil?
    fail ArgumentError, "Missing the required parameter 'ship_to_preference' when calling ChannelPartnerApi.insert_channel_partner_ship_to_preference"
  end
  # resource path
  local_var_path = '/channel_partner/channel_partners/{channel_partner_oid}/ship_to_preferences'.sub('{' + 'channel_partner_oid' + '}', CGI.escape(channel_partner_oid.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(ship_to_preference)

  # return_type
  return_type = opts[:debug_return_type] || 'ChannelPartnerShipToPreferenceResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"ChannelPartnerApi.insert_channel_partner_ship_to_preference",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChannelPartnerApi#insert_channel_partner_ship_to_preference\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_channel_partner_ship_to_preference(channel_partner_oid, channel_partner_ship_to_preference_oid, ship_to_preference, opts = {}) ⇒ ChannelPartnerShipToPreferenceResponse

Update a ship to preference record for the channel partner. Update a ship to preference record for the channel partner.

Parameters:

  • channel_partner_oid (Integer)
  • channel_partner_ship_to_preference_oid (Integer)
  • ship_to_preference (ChannelPartnerShipToPreference)

    Ship to preference to create

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



714
715
716
717
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 714

def update_channel_partner_ship_to_preference(channel_partner_oid, channel_partner_ship_to_preference_oid, ship_to_preference, opts = {})
  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)
  data
end

#update_channel_partner_ship_to_preference_with_http_info(channel_partner_oid, channel_partner_ship_to_preference_oid, ship_to_preference, opts = {}) ⇒ Array<(ChannelPartnerShipToPreferenceResponse, Integer, Hash)>

Update a ship to preference record for the channel partner. Update a ship to preference record for the channel partner.

Parameters:

  • channel_partner_oid (Integer)
  • channel_partner_ship_to_preference_oid (Integer)
  • ship_to_preference (ChannelPartnerShipToPreference)

    Ship to preference to create

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 726

def update_channel_partner_ship_to_preference_with_http_info(channel_partner_oid, channel_partner_ship_to_preference_oid, ship_to_preference, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChannelPartnerApi.update_channel_partner_ship_to_preference ...'
  end
  # verify the required parameter 'channel_partner_oid' is set
  if @api_client.config.client_side_validation && channel_partner_oid.nil?
    fail ArgumentError, "Missing the required parameter 'channel_partner_oid' when calling ChannelPartnerApi.update_channel_partner_ship_to_preference"
  end
  # verify the required parameter 'channel_partner_ship_to_preference_oid' is set
  if @api_client.config.client_side_validation && channel_partner_ship_to_preference_oid.nil?
    fail ArgumentError, "Missing the required parameter 'channel_partner_ship_to_preference_oid' when calling ChannelPartnerApi.update_channel_partner_ship_to_preference"
  end
  # verify the required parameter 'ship_to_preference' is set
  if @api_client.config.client_side_validation && ship_to_preference.nil?
    fail ArgumentError, "Missing the required parameter 'ship_to_preference' when calling ChannelPartnerApi.update_channel_partner_ship_to_preference"
  end
  # resource path
  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))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(ship_to_preference)

  # return_type
  return_type = opts[:debug_return_type] || 'ChannelPartnerShipToPreferenceResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"ChannelPartnerApi.update_channel_partner_ship_to_preference",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChannelPartnerApi#update_channel_partner_ship_to_preference\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end