Class: KoronaCloudClient::StockOrdersApi

Inherits:
Object
  • Object
show all
Defined in:
lib/korona-cloud-client/api/stock_orders_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ StockOrdersApi

Returns a new instance of StockOrdersApi.



19
20
21
# File 'lib/korona-cloud-client/api/stock_orders_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/korona-cloud-client/api/stock_orders_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#add_stock_order_items(korona_account_id, stock_order_id, stock_order_item, opts = {}) ⇒ Array<AddOrUpdateResult>

adds stock order items

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • stock_order_id (String)

    id of the related object (important: id should match the uuid-format)

  • stock_order_item (Array<StockOrderItem>)

    data to add

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

    the optional parameters

Returns:



28
29
30
31
# File 'lib/korona-cloud-client/api/stock_orders_api.rb', line 28

def add_stock_order_items(, stock_order_id, stock_order_item, opts = {})
  data, _status_code, _headers = add_stock_order_items_with_http_info(, stock_order_id, stock_order_item, opts)
  data
end

#add_stock_order_items_with_http_info(korona_account_id, stock_order_id, stock_order_item, opts = {}) ⇒ Array<(Array<AddOrUpdateResult>, Integer, Hash)>

adds stock order items

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • stock_order_id (String)

    id of the related object (important: id should match the uuid-format)

  • stock_order_item (Array<StockOrderItem>)

    data to add

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

    the optional parameters

Returns:

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

    Array<AddOrUpdateResult> data, response status code and response headers



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/korona-cloud-client/api/stock_orders_api.rb', line 39

def add_stock_order_items_with_http_info(, stock_order_id, stock_order_item, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StockOrdersApi.add_stock_order_items ...'
  end
  # verify the required parameter 'korona_account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling StockOrdersApi.add_stock_order_items"
  end
  # verify the required parameter 'stock_order_id' is set
  if @api_client.config.client_side_validation && stock_order_id.nil?
    fail ArgumentError, "Missing the required parameter 'stock_order_id' when calling StockOrdersApi.add_stock_order_items"
  end
  # verify the required parameter 'stock_order_item' is set
  if @api_client.config.client_side_validation && stock_order_item.nil?
    fail ArgumentError, "Missing the required parameter 'stock_order_item' when calling StockOrdersApi.add_stock_order_items"
  end
  # resource path
  local_var_path = '/accounts/{koronaAccountId}/stockOrders/{stockOrderId}/items'.sub('{' + 'koronaAccountId' + '}', CGI.escape(.to_s)).sub('{' + 'stockOrderId' + '}', CGI.escape(stock_order_id.to_s))

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

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

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'Array<AddOrUpdateResult>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basicAuth']

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

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

#add_stock_orders(korona_account_id, stock_order, opts = {}) ⇒ Array<AddOrUpdateResult>

adds stock orders

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • stock_order (Array<StockOrder>)

    data to add

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

    the optional parameters

Returns:



105
106
107
108
# File 'lib/korona-cloud-client/api/stock_orders_api.rb', line 105

def add_stock_orders(, stock_order, opts = {})
  data, _status_code, _headers = add_stock_orders_with_http_info(, stock_order, opts)
  data
end

#add_stock_orders_with_http_info(korona_account_id, stock_order, opts = {}) ⇒ Array<(Array<AddOrUpdateResult>, Integer, Hash)>

adds stock orders

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • stock_order (Array<StockOrder>)

    data to add

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

    the optional parameters

Returns:

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

    Array<AddOrUpdateResult> data, response status code and response headers



115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# File 'lib/korona-cloud-client/api/stock_orders_api.rb', line 115

def add_stock_orders_with_http_info(, stock_order, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StockOrdersApi.add_stock_orders ...'
  end
  # verify the required parameter 'korona_account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling StockOrdersApi.add_stock_orders"
  end
  # verify the required parameter 'stock_order' is set
  if @api_client.config.client_side_validation && stock_order.nil?
    fail ArgumentError, "Missing the required parameter 'stock_order' when calling StockOrdersApi.add_stock_orders"
  end
  # resource path
  local_var_path = '/accounts/{koronaAccountId}/stockOrders'.sub('{' + 'koronaAccountId' + '}', CGI.escape(.to_s))

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

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

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'Array<AddOrUpdateResult>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basicAuth']

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

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

#book_stock_order(korona_account_id, stock_order_id, opts = {}) ⇒ nil

book the single stock order

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • stock_order_id (String)

    id of the related object (important: id should match the uuid-format)

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

    the optional parameters

Returns:

  • (nil)


177
178
179
180
# File 'lib/korona-cloud-client/api/stock_orders_api.rb', line 177

def book_stock_order(, stock_order_id, opts = {})
  book_stock_order_with_http_info(, stock_order_id, opts)
  nil
end

#book_stock_order_with_http_info(korona_account_id, stock_order_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

book the single stock order

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • stock_order_id (String)

    id of the related object (important: id should match the uuid-format)

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
# File 'lib/korona-cloud-client/api/stock_orders_api.rb', line 187

def book_stock_order_with_http_info(, stock_order_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StockOrdersApi.book_stock_order ...'
  end
  # verify the required parameter 'korona_account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling StockOrdersApi.book_stock_order"
  end
  # verify the required parameter 'stock_order_id' is set
  if @api_client.config.client_side_validation && stock_order_id.nil?
    fail ArgumentError, "Missing the required parameter 'stock_order_id' when calling StockOrdersApi.book_stock_order"
  end
  # resource path
  local_var_path = '/accounts/{koronaAccountId}/stockOrders/{stockOrderId}/book'.sub('{' + 'koronaAccountId' + '}', CGI.escape(.to_s)).sub('{' + 'stockOrderId' + '}', CGI.escape(stock_order_id.to_s))

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

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

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

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

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basicAuth']

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

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

#delete_stock_order_item(korona_account_id, stock_order_id, product_id, opts = {}) ⇒ nil

deletes the single stock order item

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • stock_order_id (String)

    id of the related object (important: id should match the uuid-format)

  • product_id (String)

    id of the related object (important: id should match the uuid-format)

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

    the optional parameters

Returns:

  • (nil)


245
246
247
248
# File 'lib/korona-cloud-client/api/stock_orders_api.rb', line 245

def delete_stock_order_item(, stock_order_id, product_id, opts = {})
  delete_stock_order_item_with_http_info(, stock_order_id, product_id, opts)
  nil
end

#delete_stock_order_item_with_http_info(korona_account_id, stock_order_id, product_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

deletes the single stock order item

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • stock_order_id (String)

    id of the related object (important: id should match the uuid-format)

  • product_id (String)

    id of the related object (important: id should match the uuid-format)

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
# File 'lib/korona-cloud-client/api/stock_orders_api.rb', line 256

def delete_stock_order_item_with_http_info(, stock_order_id, product_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StockOrdersApi.delete_stock_order_item ...'
  end
  # verify the required parameter 'korona_account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling StockOrdersApi.delete_stock_order_item"
  end
  # verify the required parameter 'stock_order_id' is set
  if @api_client.config.client_side_validation && stock_order_id.nil?
    fail ArgumentError, "Missing the required parameter 'stock_order_id' when calling StockOrdersApi.delete_stock_order_item"
  end
  # verify the required parameter 'product_id' is set
  if @api_client.config.client_side_validation && product_id.nil?
    fail ArgumentError, "Missing the required parameter 'product_id' when calling StockOrdersApi.delete_stock_order_item"
  end
  # resource path
  local_var_path = '/accounts/{koronaAccountId}/stockOrders/{stockOrderId}/items/{productId}'.sub('{' + 'koronaAccountId' + '}', CGI.escape(.to_s)).sub('{' + 'stockOrderId' + '}', CGI.escape(stock_order_id.to_s)).sub('{' + 'productId' + '}', CGI.escape(product_id.to_s))

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

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

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

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

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basicAuth']

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

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

#finalize_stock_order(korona_account_id, stock_order_id, opts = {}) ⇒ nil

finalize the single stock order

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • stock_order_id (String)

    id of the related object (important: id should match the uuid-format)

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

    the optional parameters

Returns:

  • (nil)


317
318
319
320
# File 'lib/korona-cloud-client/api/stock_orders_api.rb', line 317

def finalize_stock_order(, stock_order_id, opts = {})
  finalize_stock_order_with_http_info(, stock_order_id, opts)
  nil
end

#finalize_stock_order_with_http_info(korona_account_id, stock_order_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

finalize the single stock order

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • stock_order_id (String)

    id of the related object (important: id should match the uuid-format)

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
# File 'lib/korona-cloud-client/api/stock_orders_api.rb', line 327

def finalize_stock_order_with_http_info(, stock_order_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StockOrdersApi.finalize_stock_order ...'
  end
  # verify the required parameter 'korona_account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling StockOrdersApi.finalize_stock_order"
  end
  # verify the required parameter 'stock_order_id' is set
  if @api_client.config.client_side_validation && stock_order_id.nil?
    fail ArgumentError, "Missing the required parameter 'stock_order_id' when calling StockOrdersApi.finalize_stock_order"
  end
  # resource path
  local_var_path = '/accounts/{koronaAccountId}/stockOrders/{stockOrderId}/finalize'.sub('{' + 'koronaAccountId' + '}', CGI.escape(.to_s)).sub('{' + 'stockOrderId' + '}', CGI.escape(stock_order_id.to_s))

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

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

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

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

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basicAuth']

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

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

#get_stock_order(korona_account_id, stock_order_id, opts = {}) ⇒ StockOrder

returns a single stock order

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • stock_order_id (String)

    id of the related object (important: id should match the uuid-format)

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

    the optional parameters

Options Hash (opts):

  • :include_items (Boolean)

    include items of receipt (default: true; setting to false improves performance)

Returns:



385
386
387
388
# File 'lib/korona-cloud-client/api/stock_orders_api.rb', line 385

def get_stock_order(, stock_order_id, opts = {})
  data, _status_code, _headers = get_stock_order_with_http_info(, stock_order_id, opts)
  data
end

#get_stock_order_item(korona_account_id, stock_order_id, product_id, opts = {}) ⇒ StockOrderItem

returns the single stock order item

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • stock_order_id (String)

    id of the related object (important: id should match the uuid-format)

  • product_id (String)

    id of the related object (important: id should match the uuid-format)

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

    the optional parameters

Returns:



455
456
457
458
# File 'lib/korona-cloud-client/api/stock_orders_api.rb', line 455

def get_stock_order_item(, stock_order_id, product_id, opts = {})
  data, _status_code, _headers = get_stock_order_item_with_http_info(, stock_order_id, product_id, opts)
  data
end

#get_stock_order_item_with_http_info(korona_account_id, stock_order_id, product_id, opts = {}) ⇒ Array<(StockOrderItem, Integer, Hash)>

returns the single stock order item

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • stock_order_id (String)

    id of the related object (important: id should match the uuid-format)

  • product_id (String)

    id of the related object (important: id should match the uuid-format)

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

    the optional parameters

Returns:

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

    StockOrderItem data, response status code and response headers



466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
# File 'lib/korona-cloud-client/api/stock_orders_api.rb', line 466

def get_stock_order_item_with_http_info(, stock_order_id, product_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StockOrdersApi.get_stock_order_item ...'
  end
  # verify the required parameter 'korona_account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling StockOrdersApi.get_stock_order_item"
  end
  # verify the required parameter 'stock_order_id' is set
  if @api_client.config.client_side_validation && stock_order_id.nil?
    fail ArgumentError, "Missing the required parameter 'stock_order_id' when calling StockOrdersApi.get_stock_order_item"
  end
  # verify the required parameter 'product_id' is set
  if @api_client.config.client_side_validation && product_id.nil?
    fail ArgumentError, "Missing the required parameter 'product_id' when calling StockOrdersApi.get_stock_order_item"
  end
  # resource path
  local_var_path = '/accounts/{koronaAccountId}/stockOrders/{stockOrderId}/items/{productId}'.sub('{' + 'koronaAccountId' + '}', CGI.escape(.to_s)).sub('{' + 'stockOrderId' + '}', CGI.escape(stock_order_id.to_s)).sub('{' + 'productId' + '}', CGI.escape(product_id.to_s))

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

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

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basicAuth']

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

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

#get_stock_order_items(korona_account_id, stock_order_id, opts = {}) ⇒ ResultListStockOrderItem

lists all stock order items

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • stock_order_id (String)

    id of the related object (important: id should match the uuid-format)

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    number of the page to fetch

  • :size (Integer)

    amount of objects to return per page

  • :sort (String)

    attribute to sort by (multiple separated by comma; max. 5)

  • :revision (Integer)

    last revision number, objects with a greater revision than this will be returned

Returns:



531
532
533
534
# File 'lib/korona-cloud-client/api/stock_orders_api.rb', line 531

def get_stock_order_items(, stock_order_id, opts = {})
  data, _status_code, _headers = get_stock_order_items_with_http_info(, stock_order_id, opts)
  data
end

#get_stock_order_items_with_http_info(korona_account_id, stock_order_id, opts = {}) ⇒ Array<(ResultListStockOrderItem, Integer, Hash)>

lists all stock order items

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • stock_order_id (String)

    id of the related object (important: id should match the uuid-format)

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    number of the page to fetch

  • :size (Integer)

    amount of objects to return per page

  • :sort (String)

    attribute to sort by (multiple separated by comma; max. 5)

  • :revision (Integer)

    last revision number, objects with a greater revision than this will be returned

Returns:

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

    ResultListStockOrderItem data, response status code and response headers



545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
# File 'lib/korona-cloud-client/api/stock_orders_api.rb', line 545

def get_stock_order_items_with_http_info(, stock_order_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StockOrdersApi.get_stock_order_items ...'
  end
  # verify the required parameter 'korona_account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling StockOrdersApi.get_stock_order_items"
  end
  # verify the required parameter 'stock_order_id' is set
  if @api_client.config.client_side_validation && stock_order_id.nil?
    fail ArgumentError, "Missing the required parameter 'stock_order_id' when calling StockOrdersApi.get_stock_order_items"
  end
  # resource path
  local_var_path = '/accounts/{koronaAccountId}/stockOrders/{stockOrderId}/items'.sub('{' + 'koronaAccountId' + '}', CGI.escape(.to_s)).sub('{' + 'stockOrderId' + '}', CGI.escape(stock_order_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'revision'] = opts[:'revision'] if !opts[:'revision'].nil?

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

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basicAuth']

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

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

#get_stock_order_with_http_info(korona_account_id, stock_order_id, opts = {}) ⇒ Array<(StockOrder, Integer, Hash)>

returns a single stock order

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • stock_order_id (String)

    id of the related object (important: id should match the uuid-format)

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

    the optional parameters

Options Hash (opts):

  • :include_items (Boolean)

    include items of receipt (default: true; setting to false improves performance)

Returns:

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

    StockOrder data, response status code and response headers



396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
# File 'lib/korona-cloud-client/api/stock_orders_api.rb', line 396

def get_stock_order_with_http_info(, stock_order_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StockOrdersApi.get_stock_order ...'
  end
  # verify the required parameter 'korona_account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling StockOrdersApi.get_stock_order"
  end
  # verify the required parameter 'stock_order_id' is set
  if @api_client.config.client_side_validation && stock_order_id.nil?
    fail ArgumentError, "Missing the required parameter 'stock_order_id' when calling StockOrdersApi.get_stock_order"
  end
  # resource path
  local_var_path = '/accounts/{koronaAccountId}/stockOrders/{stockOrderId}'.sub('{' + 'koronaAccountId' + '}', CGI.escape(.to_s)).sub('{' + 'stockOrderId' + '}', CGI.escape(stock_order_id.to_s))

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

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

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basicAuth']

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

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

#get_stock_orders(korona_account_id, opts = {}) ⇒ ResultListStockOrder

lists all stock orders

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    number of the page to fetch

  • :size (Integer)

    amount of objects to return per page

  • :sort (String)

    attribute to sort by (multiple separated by comma; max. 5)

  • :revision (Integer)

    last revision number, objects with a greater revision than this will be returned

  • :include_deleted (Boolean)

    indicates deleted objects should be loaded or not (default: false)

  • :min_create_time (Time)

    min (inclusive) create time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional)

  • :max_create_time (Time)

    max (inclusive) create time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional)

  • :min_booking_time (Time)

    min (inclusive) booking time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional)

  • :max_booking_time (Time)

    max (inclusive) booking time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional)

  • :organizational_unit (String)

    organizational unit

  • :source_organizational_unit (String)

    source organizational unit

  • :booking_status (String)

    booking status (possible values: BOOKED, IN_PROGRESS)

  • :number (String)

    number of the related object

  • :finalized (Boolean)

    load only objects with this finalized status

  • :include_items (Boolean)

    include items of receipt (default: true; setting to false improves performance)

Returns:



620
621
622
623
# File 'lib/korona-cloud-client/api/stock_orders_api.rb', line 620

def get_stock_orders(, opts = {})
  data, _status_code, _headers = get_stock_orders_with_http_info(, opts)
  data
end

#get_stock_orders_with_http_info(korona_account_id, opts = {}) ⇒ Array<(ResultListStockOrder, Integer, Hash)>

lists all stock orders

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    number of the page to fetch

  • :size (Integer)

    amount of objects to return per page

  • :sort (String)

    attribute to sort by (multiple separated by comma; max. 5)

  • :revision (Integer)

    last revision number, objects with a greater revision than this will be returned

  • :include_deleted (Boolean)

    indicates deleted objects should be loaded or not (default: false)

  • :min_create_time (Time)

    min (inclusive) create time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional)

  • :max_create_time (Time)

    max (inclusive) create time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional)

  • :min_booking_time (Time)

    min (inclusive) booking time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional)

  • :max_booking_time (Time)

    max (inclusive) booking time of the receipt (ISO 8601; Format: YYYY-MM-DDTHH:MM:SS; timezone optional)

  • :organizational_unit (String)

    organizational unit

  • :source_organizational_unit (String)

    source organizational unit

  • :booking_status (String)

    booking status (possible values: BOOKED, IN_PROGRESS)

  • :number (String)

    number of the related object

  • :finalized (Boolean)

    load only objects with this finalized status

  • :include_items (Boolean)

    include items of receipt (default: true; setting to false improves performance)

Returns:

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

    ResultListStockOrder data, response status code and response headers



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

def get_stock_orders_with_http_info(, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StockOrdersApi.get_stock_orders ...'
  end
  # verify the required parameter 'korona_account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling StockOrdersApi.get_stock_orders"
  end
  allowable_values = ["BOOKED", "IN_PROGRESS"]
  if @api_client.config.client_side_validation && opts[:'booking_status'] && !allowable_values.include?(opts[:'booking_status'])
    fail ArgumentError, "invalid value for \"booking_status\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/accounts/{koronaAccountId}/stockOrders'.sub('{' + 'koronaAccountId' + '}', CGI.escape(.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'revision'] = opts[:'revision'] if !opts[:'revision'].nil?
  query_params[:'includeDeleted'] = opts[:'include_deleted'] if !opts[:'include_deleted'].nil?
  query_params[:'minCreateTime'] = opts[:'min_create_time'] if !opts[:'min_create_time'].nil?
  query_params[:'maxCreateTime'] = opts[:'max_create_time'] if !opts[:'max_create_time'].nil?
  query_params[:'minBookingTime'] = opts[:'min_booking_time'] if !opts[:'min_booking_time'].nil?
  query_params[:'maxBookingTime'] = opts[:'max_booking_time'] if !opts[:'max_booking_time'].nil?
  query_params[:'organizationalUnit'] = opts[:'organizational_unit'] if !opts[:'organizational_unit'].nil?
  query_params[:'sourceOrganizationalUnit'] = opts[:'source_organizational_unit'] if !opts[:'source_organizational_unit'].nil?
  query_params[:'bookingStatus'] = opts[:'booking_status'] if !opts[:'booking_status'].nil?
  query_params[:'number'] = opts[:'number'] if !opts[:'number'].nil?
  query_params[:'finalized'] = opts[:'finalized'] if !opts[:'finalized'].nil?
  query_params[:'includeItems'] = opts[:'include_items'] if !opts[:'include_items'].nil?

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

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basicAuth']

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

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

#update_stock_order(korona_account_id, stock_order_id, stock_order, opts = {}) ⇒ nil

updates the single stock order

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • stock_order_id (String)

    id of the related object (important: id should match the uuid-format)

  • stock_order (StockOrder)

    data to update

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

    the optional parameters

Returns:

  • (nil)


717
718
719
720
# File 'lib/korona-cloud-client/api/stock_orders_api.rb', line 717

def update_stock_order(, stock_order_id, stock_order, opts = {})
  update_stock_order_with_http_info(, stock_order_id, stock_order, opts)
  nil
end

#update_stock_order_item(korona_account_id, stock_order_id, product_id, stock_order_item, opts = {}) ⇒ nil

updates the single stock order item

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • stock_order_id (String)

    id of the related object (important: id should match the uuid-format)

  • product_id (String)

    id of the related object (important: id should match the uuid-format)

  • stock_order_item (StockOrderItem)

    data to update

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

    the optional parameters

Returns:

  • (nil)


796
797
798
799
# File 'lib/korona-cloud-client/api/stock_orders_api.rb', line 796

def update_stock_order_item(, stock_order_id, product_id, stock_order_item, opts = {})
  update_stock_order_item_with_http_info(, stock_order_id, product_id, stock_order_item, opts)
  nil
end

#update_stock_order_item_with_http_info(korona_account_id, stock_order_id, product_id, stock_order_item, opts = {}) ⇒ Array<(nil, Integer, Hash)>

updates the single stock order item

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • stock_order_id (String)

    id of the related object (important: id should match the uuid-format)

  • product_id (String)

    id of the related object (important: id should match the uuid-format)

  • stock_order_item (StockOrderItem)

    data to update

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



808
809
810
811
812
813
814
815
816
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
866
867
868
869
870
871
# File 'lib/korona-cloud-client/api/stock_orders_api.rb', line 808

def update_stock_order_item_with_http_info(, stock_order_id, product_id, stock_order_item, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StockOrdersApi.update_stock_order_item ...'
  end
  # verify the required parameter 'korona_account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling StockOrdersApi.update_stock_order_item"
  end
  # verify the required parameter 'stock_order_id' is set
  if @api_client.config.client_side_validation && stock_order_id.nil?
    fail ArgumentError, "Missing the required parameter 'stock_order_id' when calling StockOrdersApi.update_stock_order_item"
  end
  # verify the required parameter 'product_id' is set
  if @api_client.config.client_side_validation && product_id.nil?
    fail ArgumentError, "Missing the required parameter 'product_id' when calling StockOrdersApi.update_stock_order_item"
  end
  # verify the required parameter 'stock_order_item' is set
  if @api_client.config.client_side_validation && stock_order_item.nil?
    fail ArgumentError, "Missing the required parameter 'stock_order_item' when calling StockOrdersApi.update_stock_order_item"
  end
  # resource path
  local_var_path = '/accounts/{koronaAccountId}/stockOrders/{stockOrderId}/items/{productId}'.sub('{' + 'koronaAccountId' + '}', CGI.escape(.to_s)).sub('{' + 'stockOrderId' + '}', CGI.escape(stock_order_id.to_s)).sub('{' + 'productId' + '}', CGI.escape(product_id.to_s))

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

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

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

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

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basicAuth']

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

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

#update_stock_order_items(korona_account_id, stock_order_id, stock_order_item, opts = {}) ⇒ Array<AddOrUpdateResult>

updates stock order items

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • stock_order_id (String)

    id of the related object (important: id should match the uuid-format)

  • stock_order_item (Array<StockOrderItem>)

    data to update

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

    the optional parameters

Returns:



879
880
881
882
# File 'lib/korona-cloud-client/api/stock_orders_api.rb', line 879

def update_stock_order_items(, stock_order_id, stock_order_item, opts = {})
  data, _status_code, _headers = update_stock_order_items_with_http_info(, stock_order_id, stock_order_item, opts)
  data
end

#update_stock_order_items_with_http_info(korona_account_id, stock_order_id, stock_order_item, opts = {}) ⇒ Array<(Array<AddOrUpdateResult>, Integer, Hash)>

updates stock order items

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • stock_order_id (String)

    id of the related object (important: id should match the uuid-format)

  • stock_order_item (Array<StockOrderItem>)

    data to update

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

    the optional parameters

Returns:

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

    Array<AddOrUpdateResult> data, response status code and response headers



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
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
# File 'lib/korona-cloud-client/api/stock_orders_api.rb', line 890

def update_stock_order_items_with_http_info(, stock_order_id, stock_order_item, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StockOrdersApi.update_stock_order_items ...'
  end
  # verify the required parameter 'korona_account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling StockOrdersApi.update_stock_order_items"
  end
  # verify the required parameter 'stock_order_id' is set
  if @api_client.config.client_side_validation && stock_order_id.nil?
    fail ArgumentError, "Missing the required parameter 'stock_order_id' when calling StockOrdersApi.update_stock_order_items"
  end
  # verify the required parameter 'stock_order_item' is set
  if @api_client.config.client_side_validation && stock_order_item.nil?
    fail ArgumentError, "Missing the required parameter 'stock_order_item' when calling StockOrdersApi.update_stock_order_items"
  end
  # resource path
  local_var_path = '/accounts/{koronaAccountId}/stockOrders/{stockOrderId}/items'.sub('{' + 'koronaAccountId' + '}', CGI.escape(.to_s)).sub('{' + 'stockOrderId' + '}', CGI.escape(stock_order_id.to_s))

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

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

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'Array<AddOrUpdateResult>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basicAuth']

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

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

#update_stock_order_with_http_info(korona_account_id, stock_order_id, stock_order, opts = {}) ⇒ Array<(nil, Integer, Hash)>

updates the single stock order

Parameters:

  • korona_account_id (String)

    account id of the KORONA Studio account

  • stock_order_id (String)

    id of the related object (important: id should match the uuid-format)

  • stock_order (StockOrder)

    data to update

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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

def update_stock_order_with_http_info(, stock_order_id, stock_order, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StockOrdersApi.update_stock_order ...'
  end
  # verify the required parameter 'korona_account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling StockOrdersApi.update_stock_order"
  end
  # verify the required parameter 'stock_order_id' is set
  if @api_client.config.client_side_validation && stock_order_id.nil?
    fail ArgumentError, "Missing the required parameter 'stock_order_id' when calling StockOrdersApi.update_stock_order"
  end
  # verify the required parameter 'stock_order' is set
  if @api_client.config.client_side_validation && stock_order.nil?
    fail ArgumentError, "Missing the required parameter 'stock_order' when calling StockOrdersApi.update_stock_order"
  end
  # resource path
  local_var_path = '/accounts/{koronaAccountId}/stockOrders/{stockOrderId}'.sub('{' + 'koronaAccountId' + '}', CGI.escape(.to_s)).sub('{' + 'stockOrderId' + '}', CGI.escape(stock_order_id.to_s))

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

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

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

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

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basicAuth']

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

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