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

    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, Fixnum, Hash)>

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

Parameters:

  • order_id

    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
# 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' + '}', order_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  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'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ChannelPartnerCancelResponse')
  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

    The UltraCart order id to delete.

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

    the optional parameters

Returns:



95
96
97
98
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 95

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, Fixnum, Hash)>

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

Parameters:

  • order_id

    The UltraCart order id to delete.

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

    the optional parameters

Returns:



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
133
134
135
136
137
138
139
140
141
142
143
144
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 105

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' + '}', order_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  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'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ChannelPartnerCancelResponse')
  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
  • channel_partner_ship_to_preference_oid
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


151
152
153
154
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 151

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, Fixnum, 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
  • channel_partner_ship_to_preference_oid
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    nil, response status code and response headers



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

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' + '}', channel_partner_oid.to_s).sub('{' + 'channel_partner_ship_to_preference_oid' + '}', channel_partner_ship_to_preference_oid.to_s)

  # query parameters
  query_params = {}

  # header parameters
  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'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  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

    Order needing shipping estimate

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

    the optional parameters

Returns:



210
211
212
213
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 210

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, Fixnum, Hash)>

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

Parameters:

  • channel_partner_order

    Order needing shipping estimate

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

    the optional parameters

Returns:



220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 220

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 = {}

  # header parameters
  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'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(channel_partner_order)
  auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ChannelPartnerEstimateShippingResponse')
  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

    Order needing tax estimate

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

    the optional parameters

Returns:



265
266
267
268
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 265

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, Fixnum, Hash)>

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

Parameters:

  • channel_partner_order

    Order needing tax estimate

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

    the optional parameters

Returns:



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
301
302
303
304
305
306
307
308
309
310
311
312
313
314
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 275

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 = {}

  # header parameters
  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'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(channel_partner_order)
  auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ChannelPartnerEstimateTaxResponse')
  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
  • channel_partner_ship_to_preference_oid
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



321
322
323
324
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 321

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, Fixnum, 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
  • channel_partner_ship_to_preference_oid
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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
370
371
372
373
374
375
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 332

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' + '}', channel_partner_oid.to_s).sub('{' + 'channel_partner_ship_to_preference_oid' + '}', channel_partner_ship_to_preference_oid.to_s)

  # query parameters
  query_params = {}

  # header parameters
  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'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ChannelPartnerShipToPreferenceResponse')
  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
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



381
382
383
384
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 381

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, Fixnum, 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
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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

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' + '}', channel_partner_oid.to_s)

  # query parameters
  query_params = {}

  # header parameters
  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'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ChannelPartnerShipToPreferencesResponse')
  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:



435
436
437
438
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 435

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, Fixnum, 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, Fixnum, Hash)>)

    ChannelPartnersResponse data, response status code and response headers



444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 444

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 = {}

  # header parameters
  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'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ChannelPartnersResponse')
  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

    Order to insert

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

    the optional parameters

Returns:



485
486
487
488
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 485

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, Fixnum, Hash)>

Insert channel partner order Insert order from a channel partner.

Parameters:

  • channel_partner_order

    Order to insert

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

    the optional parameters

Returns:



495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 495

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 = {}

  # header parameters
  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'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(channel_partner_order)
  auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ChannelPartnerImportResponse')
  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
  • ship_to_preference

    Ship to preference to create

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

    the optional parameters

Returns:



541
542
543
544
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 541

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, Fixnum, 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
  • ship_to_preference

    Ship to preference to create

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

    the optional parameters

Returns:



552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 552

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' + '}', channel_partner_oid.to_s)

  # query parameters
  query_params = {}

  # header parameters
  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'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(ship_to_preference)
  auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ChannelPartnerShipToPreferenceResponse')
  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
  • channel_partner_ship_to_preference_oid
  • ship_to_preference

    Ship to preference to create

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

    the optional parameters

Returns:



603
604
605
606
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 603

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, Fixnum, 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
  • channel_partner_ship_to_preference_oid
  • ship_to_preference

    Ship to preference to create

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

    the optional parameters

Returns:



615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 615

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' + '}', channel_partner_oid.to_s).sub('{' + 'channel_partner_ship_to_preference_oid' + '}', channel_partner_ship_to_preference_oid.to_s)

  # query parameters
  query_params = {}

  # header parameters
  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'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(ship_to_preference)
  auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ChannelPartnerShipToPreferenceResponse')
  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