Class: OrderCloud::OrderApi

Inherits:
Object
  • Object
show all
Defined in:
lib/order_cloud/api/order_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ OrderApi

Returns a new instance of OrderApi.



30
31
32
# File 'lib/order_cloud/api/order_api.rb', line 30

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



28
29
30
# File 'lib/order_cloud/api/order_api.rb', line 28

def api_client
  @api_client
end

Instance Method Details

#add_promotion(buyer_id, order_id, promo_code, opts = {}) ⇒ Promotion

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

  • promo_code

    Promo code of the order.

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

    the optional parameters

Returns:



41
42
43
44
# File 'lib/order_cloud/api/order_api.rb', line 41

def add_promotion(buyer_id, order_id, promo_code, opts = {})
  data, _status_code, _headers = add_promotion_with_http_info(buyer_id, order_id, promo_code, opts)
  return data
end

#add_promotion_with_http_info(buyer_id, order_id, promo_code, opts = {}) ⇒ Array<(Promotion, Fixnum, Hash)>

Returns Promotion data, response status code and response headers.

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

  • promo_code

    Promo code of the order.

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

    the optional parameters

Returns:

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

    Promotion data, response status code and response headers



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/order_cloud/api/order_api.rb', line 53

def add_promotion_with_http_info(buyer_id, order_id, promo_code, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OrderApi.add_promotion ..."
  end
  # verify the required parameter 'buyer_id' is set
  fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.add_promotion" if buyer_id.nil?
  # verify the required parameter 'order_id' is set
  fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.add_promotion" if order_id.nil?
  # verify the required parameter 'promo_code' is set
  fail ArgumentError, "Missing the required parameter 'promo_code' when calling OrderApi.add_promotion" if promo_code.nil?
  # resource path
  local_var_path = "/buyers/{buyerID}/orders/{orderID}/promotions/{promoCode}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s).sub('{' + 'promoCode' + '}', promo_code.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2']
  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 => 'Promotion')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OrderApi#add_promotion\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#approve(buyer_id, order_id, opts = {}) ⇒ Order

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

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

    the optional parameters

Options Hash (opts):

  • :comments (String)

    Comments to be saved with the order approval.

Returns:



106
107
108
109
# File 'lib/order_cloud/api/order_api.rb', line 106

def approve(buyer_id, order_id, opts = {})
  data, _status_code, _headers = approve_with_http_info(buyer_id, order_id, opts)
  return data
end

#approve_with_http_info(buyer_id, order_id, opts = {}) ⇒ Array<(Order, Fixnum, Hash)>

Returns Order data, response status code and response headers.

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

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

    the optional parameters

Options Hash (opts):

  • :comments (String)

    Comments to be saved with the order approval.

Returns:

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

    Order data, response status code and response headers



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/order_cloud/api/order_api.rb', line 118

def approve_with_http_info(buyer_id, order_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OrderApi.approve ..."
  end
  # verify the required parameter 'buyer_id' is set
  fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.approve" if buyer_id.nil?
  # verify the required parameter 'order_id' is set
  fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.approve" if order_id.nil?
  # resource path
  local_var_path = "/buyers/{buyerID}/orders/{orderID}/approve".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'comments'] = opts[:'comments'] if !opts[:'comments'].nil?

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2']
  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 => 'Order')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OrderApi#approve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#cancel(buyer_id, order_id, opts = {}) ⇒ Order

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

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

    the optional parameters

Returns:



169
170
171
172
# File 'lib/order_cloud/api/order_api.rb', line 169

def cancel(buyer_id, order_id, opts = {})
  data, _status_code, _headers = cancel_with_http_info(buyer_id, order_id, opts)
  return data
end

#cancel_with_http_info(buyer_id, order_id, opts = {}) ⇒ Array<(Order, Fixnum, Hash)>

Returns Order data, response status code and response headers.

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

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

    the optional parameters

Returns:

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

    Order data, 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
# File 'lib/order_cloud/api/order_api.rb', line 180

def cancel_with_http_info(buyer_id, order_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OrderApi.cancel ..."
  end
  # verify the required parameter 'buyer_id' is set
  fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.cancel" if buyer_id.nil?
  # verify the required parameter 'order_id' is set
  fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.cancel" if order_id.nil?
  # resource path
  local_var_path = "/buyers/{buyerID}/orders/{orderID}/cancel".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2']
  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 => 'Order')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OrderApi#cancel\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create(buyer_id, order, opts = {}) ⇒ Order

Parameters:

  • buyer_id

    ID of the buyer.

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

    the optional parameters

Returns:



230
231
232
233
# File 'lib/order_cloud/api/order_api.rb', line 230

def create(buyer_id, order, opts = {})
  data, _status_code, _headers = create_with_http_info(buyer_id, order, opts)
  return data
end

#create_with_http_info(buyer_id, order, opts = {}) ⇒ Array<(Order, Fixnum, Hash)>

Returns Order data, response status code and response headers.

Parameters:

  • buyer_id

    ID of the buyer.

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

    the optional parameters

Returns:

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

    Order data, response status code and response headers



241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
# File 'lib/order_cloud/api/order_api.rb', line 241

def create_with_http_info(buyer_id, order, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OrderApi.create ..."
  end
  # verify the required parameter 'buyer_id' is set
  fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.create" if buyer_id.nil?
  # verify the required parameter 'order' is set
  fail ArgumentError, "Missing the required parameter 'order' when calling OrderApi.create" if order.nil?
  # resource path
  local_var_path = "/buyers/{buyerID}/orders".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(order)
  auth_names = ['oauth2']
  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 => 'Order')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OrderApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#decline(buyer_id, order_id, opts = {}) ⇒ Order

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

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

    the optional parameters

Options Hash (opts):

  • :comments (String)

    Comments to be saved with the order denial.

Returns:



292
293
294
295
# File 'lib/order_cloud/api/order_api.rb', line 292

def decline(buyer_id, order_id, opts = {})
  data, _status_code, _headers = decline_with_http_info(buyer_id, order_id, opts)
  return data
end

#decline_with_http_info(buyer_id, order_id, opts = {}) ⇒ Array<(Order, Fixnum, Hash)>

Returns Order data, response status code and response headers.

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

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

    the optional parameters

Options Hash (opts):

  • :comments (String)

    Comments to be saved with the order denial.

Returns:

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

    Order data, response status code and response headers



304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
# File 'lib/order_cloud/api/order_api.rb', line 304

def decline_with_http_info(buyer_id, order_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OrderApi.decline ..."
  end
  # verify the required parameter 'buyer_id' is set
  fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.decline" if buyer_id.nil?
  # verify the required parameter 'order_id' is set
  fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.decline" if order_id.nil?
  # resource path
  local_var_path = "/buyers/{buyerID}/orders/{orderID}/decline".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'comments'] = opts[:'comments'] if !opts[:'comments'].nil?

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2']
  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 => 'Order')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OrderApi#decline\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete(buyer_id, order_id, opts = {}) ⇒ nil

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

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

    the optional parameters

Returns:

  • (nil)


355
356
357
358
# File 'lib/order_cloud/api/order_api.rb', line 355

def delete(buyer_id, order_id, opts = {})
  delete_with_http_info(buyer_id, order_id, opts)
  return nil
end

#delete_with_http_info(buyer_id, order_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Returns nil, response status code and response headers.

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
# File 'lib/order_cloud/api/order_api.rb', line 366

def delete_with_http_info(buyer_id, order_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OrderApi.delete ..."
  end
  # verify the required parameter 'buyer_id' is set
  fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.delete" if buyer_id.nil?
  # verify the required parameter 'order_id' is set
  fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.delete" if order_id.nil?
  # resource path
  local_var_path = "/buyers/{buyerID}/orders/{orderID}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2']
  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: OrderApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get(buyer_id, order_id, opts = {}) ⇒ Order

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

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

    the optional parameters

Returns:



415
416
417
418
# File 'lib/order_cloud/api/order_api.rb', line 415

def get(buyer_id, order_id, opts = {})
  data, _status_code, _headers = get_with_http_info(buyer_id, order_id, opts)
  return data
end

#get_with_http_info(buyer_id, order_id, opts = {}) ⇒ Array<(Order, Fixnum, Hash)>

Returns Order data, response status code and response headers.

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

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

    the optional parameters

Returns:

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

    Order data, response status code and response headers



426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
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
# File 'lib/order_cloud/api/order_api.rb', line 426

def get_with_http_info(buyer_id, order_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OrderApi.get ..."
  end
  # verify the required parameter 'buyer_id' is set
  fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.get" if buyer_id.nil?
  # verify the required parameter 'order_id' is set
  fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.get" if order_id.nil?
  # resource path
  local_var_path = "/buyers/{buyerID}/orders/{orderID}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2']
  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 => 'Order')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OrderApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_approvals(buyer_id, order_id, opts = {}) ⇒ ListOrderApproval

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

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

    the optional parameters

Options Hash (opts):

  • :search (String)

    Word or phrase to search for.

  • :search_on (String)

    Comma-delimited list of fields to search on.

  • :sort_by (String)

    Comma-delimited list of fields to sort by.

  • :page (Integer)

    Page of results to return. Default: 1

  • :page_size (Integer)

    Number of results to return per page. Default: 20, max: 100.

  • :filters (Hash<String, String>)

    Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or &#39;xp.???&#39;

Returns:



482
483
484
485
# File 'lib/order_cloud/api/order_api.rb', line 482

def list_approvals(buyer_id, order_id, opts = {})
  data, _status_code, _headers = list_approvals_with_http_info(buyer_id, order_id, opts)
  return data
end

#list_approvals_with_http_info(buyer_id, order_id, opts = {}) ⇒ Array<(ListOrderApproval, Fixnum, Hash)>

Returns ListOrderApproval data, response status code and response headers.

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

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

    the optional parameters

Options Hash (opts):

  • :search (String)

    Word or phrase to search for.

  • :search_on (String)

    Comma-delimited list of fields to search on.

  • :sort_by (String)

    Comma-delimited list of fields to sort by.

  • :page (Integer)

    Page of results to return. Default: 1

  • :page_size (Integer)

    Number of results to return per page. Default: 20, max: 100.

  • :filters (Hash<String, String>)

    Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or &#39;xp.???&#39;

Returns:

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

    ListOrderApproval data, response status code and response headers



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
535
536
537
538
539
540
541
542
543
544
545
546
547
# File 'lib/order_cloud/api/order_api.rb', line 499

def list_approvals_with_http_info(buyer_id, order_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OrderApi.list_approvals ..."
  end
  # verify the required parameter 'buyer_id' is set
  fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.list_approvals" if buyer_id.nil?
  # verify the required parameter 'order_id' is set
  fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.list_approvals" if order_id.nil?
  # resource path
  local_var_path = "/buyers/{buyerID}/orders/{orderID}/approvals".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
  query_params[:'searchOn'] = opts[:'search_on'] if !opts[:'search_on'].nil?
  query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2']
  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 => 'ListOrderApproval')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OrderApi#list_approvals\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_eligible_approvers(buyer_id, order_id, opts = {}) ⇒ ListUser

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

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

    the optional parameters

Options Hash (opts):

  • :search (String)

    Word or phrase to search for.

  • :search_on (String)

    Comma-delimited list of fields to search on.

  • :sort_by (String)

    Comma-delimited list of fields to sort by.

  • :page (Integer)

    Page of results to return. Default: 1

  • :page_size (Integer)

    Number of results to return per page. Default: 20, max: 100.

  • :filters (Hash<String, String>)

    Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or &#39;xp.???&#39;

Returns:



561
562
563
564
# File 'lib/order_cloud/api/order_api.rb', line 561

def list_eligible_approvers(buyer_id, order_id, opts = {})
  data, _status_code, _headers = list_eligible_approvers_with_http_info(buyer_id, order_id, opts)
  return data
end

#list_eligible_approvers_with_http_info(buyer_id, order_id, opts = {}) ⇒ Array<(ListUser, Fixnum, Hash)>

Returns ListUser data, response status code and response headers.

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

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

    the optional parameters

Options Hash (opts):

  • :search (String)

    Word or phrase to search for.

  • :search_on (String)

    Comma-delimited list of fields to search on.

  • :sort_by (String)

    Comma-delimited list of fields to sort by.

  • :page (Integer)

    Page of results to return. Default: 1

  • :page_size (Integer)

    Number of results to return per page. Default: 20, max: 100.

  • :filters (Hash<String, String>)

    Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or &#39;xp.???&#39;

Returns:

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

    ListUser data, response status code and response headers



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
# File 'lib/order_cloud/api/order_api.rb', line 578

def list_eligible_approvers_with_http_info(buyer_id, order_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OrderApi.list_eligible_approvers ..."
  end
  # verify the required parameter 'buyer_id' is set
  fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.list_eligible_approvers" if buyer_id.nil?
  # verify the required parameter 'order_id' is set
  fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.list_eligible_approvers" if order_id.nil?
  # resource path
  local_var_path = "/buyers/{buyerID}/orders/{orderID}/eligibleapprovers".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
  query_params[:'searchOn'] = opts[:'search_on'] if !opts[:'search_on'].nil?
  query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2']
  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 => 'ListUser')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OrderApi#list_eligible_approvers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_incoming(opts = {}) ⇒ ListOrder

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :buyer_id (String)

    ID of the buyer.

  • :from (String)

    Lower bound of date range that the order was submitted.

  • :to (String)

    Upper bound of date range that the order was submitted.

  • :search (String)

    Word or phrase to search for.

  • :search_on (String)

    Comma-delimited list of fields to search on.

  • :sort_by (String)

    Comma-delimited list of fields to sort by.

  • :page (Integer)

    Page of results to return. Default: 1

  • :page_size (Integer)

    Number of results to return per page. Default: 20, max: 100.

  • :filters (Hash<String, String>)

    Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or &#39;xp.???&#39;

Returns:



641
642
643
644
# File 'lib/order_cloud/api/order_api.rb', line 641

def list_incoming(opts = {})
  data, _status_code, _headers = list_incoming_with_http_info(opts)
  return data
end

#list_incoming_with_http_info(opts = {}) ⇒ Array<(ListOrder, Fixnum, Hash)>

Returns ListOrder data, response status code and response headers.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :buyer_id (String)

    ID of the buyer.

  • :from (String)

    Lower bound of date range that the order was submitted.

  • :to (String)

    Upper bound of date range that the order was submitted.

  • :search (String)

    Word or phrase to search for.

  • :search_on (String)

    Comma-delimited list of fields to search on.

  • :sort_by (String)

    Comma-delimited list of fields to sort by.

  • :page (Integer)

    Page of results to return. Default: 1

  • :page_size (Integer)

    Number of results to return per page. Default: 20, max: 100.

  • :filters (Hash<String, String>)

    Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or &#39;xp.???&#39;

Returns:

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

    ListOrder data, response status code and response headers



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
706
# File 'lib/order_cloud/api/order_api.rb', line 659

def list_incoming_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OrderApi.list_incoming ..."
  end
  # resource path
  local_var_path = "/orders/incoming".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'buyerID'] = opts[:'buyer_id'] if !opts[:'buyer_id'].nil?
  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
  query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
  query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
  query_params[:'searchOn'] = opts[:'search_on'] if !opts[:'search_on'].nil?
  query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2']
  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 => 'ListOrder')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OrderApi#list_incoming\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_outgoing(opts = {}) ⇒ ListOrder

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :buyer_id (String)

    ID of the buyer.

  • :from (String)

    Lower bound of date range that the order was created.

  • :to (String)

    Upper bound of date range that the order was created.

  • :search (String)

    Word or phrase to search for.

  • :search_on (String)

    Comma-delimited list of fields to search on.

  • :sort_by (String)

    Comma-delimited list of fields to sort by.

  • :page (Integer)

    Page of results to return. Default: 1

  • :page_size (Integer)

    Number of results to return per page. Default: 20, max: 100.

  • :filters (Hash<String, String>)

    Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or &#39;xp.???&#39;

Returns:



721
722
723
724
# File 'lib/order_cloud/api/order_api.rb', line 721

def list_outgoing(opts = {})
  data, _status_code, _headers = list_outgoing_with_http_info(opts)
  return data
end

#list_outgoing_with_http_info(opts = {}) ⇒ Array<(ListOrder, Fixnum, Hash)>

Returns ListOrder data, response status code and response headers.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :buyer_id (String)

    ID of the buyer.

  • :from (String)

    Lower bound of date range that the order was created.

  • :to (String)

    Upper bound of date range that the order was created.

  • :search (String)

    Word or phrase to search for.

  • :search_on (String)

    Comma-delimited list of fields to search on.

  • :sort_by (String)

    Comma-delimited list of fields to sort by.

  • :page (Integer)

    Page of results to return. Default: 1

  • :page_size (Integer)

    Number of results to return per page. Default: 20, max: 100.

  • :filters (Hash<String, String>)

    Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or &#39;xp.???&#39;

Returns:

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

    ListOrder data, response status code and response headers



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/order_cloud/api/order_api.rb', line 739

def list_outgoing_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OrderApi.list_outgoing ..."
  end
  # resource path
  local_var_path = "/orders/outgoing".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'buyerID'] = opts[:'buyer_id'] if !opts[:'buyer_id'].nil?
  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
  query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
  query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
  query_params[:'searchOn'] = opts[:'search_on'] if !opts[:'search_on'].nil?
  query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2']
  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 => 'ListOrder')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OrderApi#list_outgoing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_promotions(buyer_id, order_id, opts = {}) ⇒ ListOrderPromotion

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

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

    the optional parameters

Options Hash (opts):

  • :search (String)

    Word or phrase to search for.

  • :search_on (String)

    Comma-delimited list of fields to search on.

  • :sort_by (String)

    Comma-delimited list of fields to sort by.

  • :page (Integer)

    Page of results to return. Default: 1

  • :page_size (Integer)

    Number of results to return per page. Default: 20, max: 100.

  • :filters (Hash<String, String>)

    Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or &#39;xp.???&#39;

Returns:



800
801
802
803
# File 'lib/order_cloud/api/order_api.rb', line 800

def list_promotions(buyer_id, order_id, opts = {})
  data, _status_code, _headers = list_promotions_with_http_info(buyer_id, order_id, opts)
  return data
end

#list_promotions_with_http_info(buyer_id, order_id, opts = {}) ⇒ Array<(ListOrderPromotion, Fixnum, Hash)>

Returns ListOrderPromotion data, response status code and response headers.

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

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

    the optional parameters

Options Hash (opts):

  • :search (String)

    Word or phrase to search for.

  • :search_on (String)

    Comma-delimited list of fields to search on.

  • :sort_by (String)

    Comma-delimited list of fields to sort by.

  • :page (Integer)

    Page of results to return. Default: 1

  • :page_size (Integer)

    Number of results to return per page. Default: 20, max: 100.

  • :filters (Hash<String, String>)

    Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or &#39;xp.???&#39;

Returns:

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

    ListOrderPromotion data, response status code and response headers



817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
# File 'lib/order_cloud/api/order_api.rb', line 817

def list_promotions_with_http_info(buyer_id, order_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OrderApi.list_promotions ..."
  end
  # verify the required parameter 'buyer_id' is set
  fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.list_promotions" if buyer_id.nil?
  # verify the required parameter 'order_id' is set
  fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.list_promotions" if order_id.nil?
  # resource path
  local_var_path = "/buyers/{buyerID}/orders/{orderID}/promotions".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
  query_params[:'searchOn'] = opts[:'search_on'] if !opts[:'search_on'].nil?
  query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2']
  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 => 'ListOrderPromotion')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OrderApi#list_promotions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#patch(buyer_id, order_id, partial_order, opts = {}) ⇒ Order

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

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

    the optional parameters

Returns:



874
875
876
877
# File 'lib/order_cloud/api/order_api.rb', line 874

def patch(buyer_id, order_id, partial_order, opts = {})
  data, _status_code, _headers = patch_with_http_info(buyer_id, order_id, partial_order, opts)
  return data
end

#patch_billing_address(buyer_id, order_id, address, opts = {}) ⇒ Order

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

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

    the optional parameters

Returns:



939
940
941
942
# File 'lib/order_cloud/api/order_api.rb', line 939

def patch_billing_address(buyer_id, order_id, address, opts = {})
  data, _status_code, _headers = patch_billing_address_with_http_info(buyer_id, order_id, address, opts)
  return data
end

#patch_billing_address_with_http_info(buyer_id, order_id, address, opts = {}) ⇒ Array<(Order, Fixnum, Hash)>

Returns Order data, response status code and response headers.

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

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

    the optional parameters

Returns:

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

    Order data, response status code and response headers



951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
# File 'lib/order_cloud/api/order_api.rb', line 951

def patch_billing_address_with_http_info(buyer_id, order_id, address, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OrderApi.patch_billing_address ..."
  end
  # verify the required parameter 'buyer_id' is set
  fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.patch_billing_address" if buyer_id.nil?
  # verify the required parameter 'order_id' is set
  fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.patch_billing_address" if order_id.nil?
  # verify the required parameter 'address' is set
  fail ArgumentError, "Missing the required parameter 'address' when calling OrderApi.patch_billing_address" if address.nil?
  # resource path
  local_var_path = "/buyers/{buyerID}/orders/{orderID}/billto".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(address)
  auth_names = ['oauth2']
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Order')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OrderApi#patch_billing_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#patch_shipping_address(buyer_id, order_id, address, opts = {}) ⇒ Order

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

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

    the optional parameters

Returns:



1004
1005
1006
1007
# File 'lib/order_cloud/api/order_api.rb', line 1004

def patch_shipping_address(buyer_id, order_id, address, opts = {})
  data, _status_code, _headers = patch_shipping_address_with_http_info(buyer_id, order_id, address, opts)
  return data
end

#patch_shipping_address_with_http_info(buyer_id, order_id, address, opts = {}) ⇒ Array<(Order, Fixnum, Hash)>

Returns Order data, response status code and response headers.

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

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

    the optional parameters

Returns:

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

    Order data, response status code and response headers



1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
# File 'lib/order_cloud/api/order_api.rb', line 1016

def patch_shipping_address_with_http_info(buyer_id, order_id, address, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OrderApi.patch_shipping_address ..."
  end
  # verify the required parameter 'buyer_id' is set
  fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.patch_shipping_address" if buyer_id.nil?
  # verify the required parameter 'order_id' is set
  fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.patch_shipping_address" if order_id.nil?
  # verify the required parameter 'address' is set
  fail ArgumentError, "Missing the required parameter 'address' when calling OrderApi.patch_shipping_address" if address.nil?
  # resource path
  local_var_path = "/buyers/{buyerID}/orders/{orderID}/shipto".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(address)
  auth_names = ['oauth2']
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Order')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OrderApi#patch_shipping_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#patch_with_http_info(buyer_id, order_id, partial_order, opts = {}) ⇒ Array<(Order, Fixnum, Hash)>

Returns Order data, response status code and response headers.

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

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

    the optional parameters

Returns:

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

    Order data, response status code and response headers



886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
# File 'lib/order_cloud/api/order_api.rb', line 886

def patch_with_http_info(buyer_id, order_id, partial_order, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OrderApi.patch ..."
  end
  # verify the required parameter 'buyer_id' is set
  fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.patch" if buyer_id.nil?
  # verify the required parameter 'order_id' is set
  fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.patch" if order_id.nil?
  # verify the required parameter 'partial_order' is set
  fail ArgumentError, "Missing the required parameter 'partial_order' when calling OrderApi.patch" if partial_order.nil?
  # resource path
  local_var_path = "/buyers/{buyerID}/orders/{orderID}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(partial_order)
  auth_names = ['oauth2']
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Order')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OrderApi#patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#remove_promotion(buyer_id, order_id, promo_code, opts = {}) ⇒ Order

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

  • promo_code

    Promo code of the order.

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

    the optional parameters

Returns:



1069
1070
1071
1072
# File 'lib/order_cloud/api/order_api.rb', line 1069

def remove_promotion(buyer_id, order_id, promo_code, opts = {})
  data, _status_code, _headers = remove_promotion_with_http_info(buyer_id, order_id, promo_code, opts)
  return data
end

#remove_promotion_with_http_info(buyer_id, order_id, promo_code, opts = {}) ⇒ Array<(Order, Fixnum, Hash)>

Returns Order data, response status code and response headers.

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

  • promo_code

    Promo code of the order.

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

    the optional parameters

Returns:

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

    Order data, response status code and response headers



1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
# File 'lib/order_cloud/api/order_api.rb', line 1081

def remove_promotion_with_http_info(buyer_id, order_id, promo_code, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OrderApi.remove_promotion ..."
  end
  # verify the required parameter 'buyer_id' is set
  fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.remove_promotion" if buyer_id.nil?
  # verify the required parameter 'order_id' is set
  fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.remove_promotion" if order_id.nil?
  # verify the required parameter 'promo_code' is set
  fail ArgumentError, "Missing the required parameter 'promo_code' when calling OrderApi.remove_promotion" if promo_code.nil?
  # resource path
  local_var_path = "/buyers/{buyerID}/orders/{orderID}/promotions/{promoCode}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s).sub('{' + 'promoCode' + '}', promo_code.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2']
  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 => 'Order')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OrderApi#remove_promotion\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#set_billing_address(buyer_id, order_id, address, opts = {}) ⇒ Order

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

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

    the optional parameters

Returns:



1134
1135
1136
1137
# File 'lib/order_cloud/api/order_api.rb', line 1134

def set_billing_address(buyer_id, order_id, address, opts = {})
  data, _status_code, _headers = set_billing_address_with_http_info(buyer_id, order_id, address, opts)
  return data
end

#set_billing_address_with_http_info(buyer_id, order_id, address, opts = {}) ⇒ Array<(Order, Fixnum, Hash)>

Returns Order data, response status code and response headers.

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

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

    the optional parameters

Returns:

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

    Order data, response status code and response headers



1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
# File 'lib/order_cloud/api/order_api.rb', line 1146

def set_billing_address_with_http_info(buyer_id, order_id, address, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OrderApi.set_billing_address ..."
  end
  # verify the required parameter 'buyer_id' is set
  fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.set_billing_address" if buyer_id.nil?
  # verify the required parameter 'order_id' is set
  fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.set_billing_address" if order_id.nil?
  # verify the required parameter 'address' is set
  fail ArgumentError, "Missing the required parameter 'address' when calling OrderApi.set_billing_address" if address.nil?
  # resource path
  local_var_path = "/buyers/{buyerID}/orders/{orderID}/billto".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(address)
  auth_names = ['oauth2']
  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 => 'Order')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OrderApi#set_billing_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#set_shipping_address(buyer_id, order_id, address, opts = {}) ⇒ Order

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

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

    the optional parameters

Returns:



1199
1200
1201
1202
# File 'lib/order_cloud/api/order_api.rb', line 1199

def set_shipping_address(buyer_id, order_id, address, opts = {})
  data, _status_code, _headers = set_shipping_address_with_http_info(buyer_id, order_id, address, opts)
  return data
end

#set_shipping_address_with_http_info(buyer_id, order_id, address, opts = {}) ⇒ Array<(Order, Fixnum, Hash)>

Returns Order data, response status code and response headers.

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

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

    the optional parameters

Returns:

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

    Order data, response status code and response headers



1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
# File 'lib/order_cloud/api/order_api.rb', line 1211

def set_shipping_address_with_http_info(buyer_id, order_id, address, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OrderApi.set_shipping_address ..."
  end
  # verify the required parameter 'buyer_id' is set
  fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.set_shipping_address" if buyer_id.nil?
  # verify the required parameter 'order_id' is set
  fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.set_shipping_address" if order_id.nil?
  # verify the required parameter 'address' is set
  fail ArgumentError, "Missing the required parameter 'address' when calling OrderApi.set_shipping_address" if address.nil?
  # resource path
  local_var_path = "/buyers/{buyerID}/orders/{orderID}/shipto".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(address)
  auth_names = ['oauth2']
  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 => 'Order')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OrderApi#set_shipping_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#ship(buyer_id, order_id, shipment, opts = {}) ⇒ Order

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

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

    the optional parameters

Returns:



1264
1265
1266
1267
# File 'lib/order_cloud/api/order_api.rb', line 1264

def ship(buyer_id, order_id, shipment, opts = {})
  data, _status_code, _headers = ship_with_http_info(buyer_id, order_id, shipment, opts)
  return data
end

#ship_with_http_info(buyer_id, order_id, shipment, opts = {}) ⇒ Array<(Order, Fixnum, Hash)>

Returns Order data, response status code and response headers.

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

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

    the optional parameters

Returns:

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

    Order data, response status code and response headers



1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
# File 'lib/order_cloud/api/order_api.rb', line 1276

def ship_with_http_info(buyer_id, order_id, shipment, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OrderApi.ship ..."
  end
  # verify the required parameter 'buyer_id' is set
  fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.ship" if buyer_id.nil?
  # verify the required parameter 'order_id' is set
  fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.ship" if order_id.nil?
  # verify the required parameter 'shipment' is set
  fail ArgumentError, "Missing the required parameter 'shipment' when calling OrderApi.ship" if shipment.nil?
  # resource path
  local_var_path = "/buyers/{buyerID}/orders/{orderID}/ship".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(shipment)
  auth_names = ['oauth2']
  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 => 'Order')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OrderApi#ship\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#submit(buyer_id, order_id, opts = {}) ⇒ Order

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

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

    the optional parameters

Returns:



1328
1329
1330
1331
# File 'lib/order_cloud/api/order_api.rb', line 1328

def submit(buyer_id, order_id, opts = {})
  data, _status_code, _headers = submit_with_http_info(buyer_id, order_id, opts)
  return data
end

#submit_with_http_info(buyer_id, order_id, opts = {}) ⇒ Array<(Order, Fixnum, Hash)>

Returns Order data, response status code and response headers.

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

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

    the optional parameters

Returns:

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

    Order data, response status code and response headers



1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
# File 'lib/order_cloud/api/order_api.rb', line 1339

def submit_with_http_info(buyer_id, order_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OrderApi.submit ..."
  end
  # verify the required parameter 'buyer_id' is set
  fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.submit" if buyer_id.nil?
  # verify the required parameter 'order_id' is set
  fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.submit" if order_id.nil?
  # resource path
  local_var_path = "/buyers/{buyerID}/orders/{orderID}/submit".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2']
  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 => 'Order')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OrderApi#submit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#transfer_temp_user_order(buyer_id, temp_user_token, opts = {}) ⇒ nil

Parameters:

  • buyer_id

    ID of the buyer.

  • temp_user_token

    Temp user token of the order.

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

    the optional parameters

Returns:

  • (nil)


1389
1390
1391
1392
# File 'lib/order_cloud/api/order_api.rb', line 1389

def transfer_temp_user_order(buyer_id, temp_user_token, opts = {})
  transfer_temp_user_order_with_http_info(buyer_id, temp_user_token, opts)
  return nil
end

#transfer_temp_user_order_with_http_info(buyer_id, temp_user_token, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Returns nil, response status code and response headers.

Parameters:

  • buyer_id

    ID of the buyer.

  • temp_user_token

    Temp user token of the order.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
# File 'lib/order_cloud/api/order_api.rb', line 1400

def transfer_temp_user_order_with_http_info(buyer_id, temp_user_token, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OrderApi.transfer_temp_user_order ..."
  end
  # verify the required parameter 'buyer_id' is set
  fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.transfer_temp_user_order" if buyer_id.nil?
  # verify the required parameter 'temp_user_token' is set
  fail ArgumentError, "Missing the required parameter 'temp_user_token' when calling OrderApi.transfer_temp_user_order" if temp_user_token.nil?
  # resource path
  local_var_path = "/buyers/{buyerID}/orders".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'tempUserToken'] = temp_user_token

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2']
  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)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OrderApi#transfer_temp_user_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update(buyer_id, order_id, order, opts = {}) ⇒ Order

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

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

    the optional parameters

Returns:



1451
1452
1453
1454
# File 'lib/order_cloud/api/order_api.rb', line 1451

def update(buyer_id, order_id, order, opts = {})
  data, _status_code, _headers = update_with_http_info(buyer_id, order_id, order, opts)
  return data
end

#update_with_http_info(buyer_id, order_id, order, opts = {}) ⇒ Array<(Order, Fixnum, Hash)>

Returns Order data, response status code and response headers.

Parameters:

  • buyer_id

    ID of the buyer.

  • order_id

    ID of the order.

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

    the optional parameters

Returns:

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

    Order data, response status code and response headers



1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
# File 'lib/order_cloud/api/order_api.rb', line 1463

def update_with_http_info(buyer_id, order_id, order, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OrderApi.update ..."
  end
  # verify the required parameter 'buyer_id' is set
  fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.update" if buyer_id.nil?
  # verify the required parameter 'order_id' is set
  fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.update" if order_id.nil?
  # verify the required parameter 'order' is set
  fail ArgumentError, "Missing the required parameter 'order' when calling OrderApi.update" if order.nil?
  # resource path
  local_var_path = "/buyers/{buyerID}/orders/{orderID}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(order)
  auth_names = ['oauth2']
  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 => 'Order')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OrderApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end