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

#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:



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

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:



160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 160

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:



205
206
207
208
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 205

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:



215
216
217
218
219
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
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 215

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

#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:



260
261
262
263
# File 'lib/ultracart_api/api/channel_partner_api.rb', line 260

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:



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

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