Class: KoronaCloudClient::StockAdjustmentsApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ StockAdjustmentsApi

Returns a new instance of StockAdjustmentsApi.



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

def api_client
  @api_client
end

Instance Method Details

#add_stock_adjustment_items(korona_account_id, stock_adjustment_id, body, opts = {}) ⇒ Array<AddOrUpdateResult>

adds stock adjustment items

Parameters:

  • korona_account_id (String)

    account id of the KORONA.cloud account

  • stock_adjustment_id (String)

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

  • body (Array<StockAdjustmentItem>)

    data to add

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

    the optional parameters

Returns:



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

def add_stock_adjustment_items(, stock_adjustment_id, body, opts = {})
  data, _status_code, _headers = add_stock_adjustment_items_with_http_info(, stock_adjustment_id, body, opts)
  data
end

#add_stock_adjustment_items_with_http_info(korona_account_id, stock_adjustment_id, body, opts = {}) ⇒ Array<(Array<AddOrUpdateResult>, Integer, Hash)>

adds stock adjustment items

Parameters:

  • korona_account_id (String)

    account id of the KORONA.cloud account

  • stock_adjustment_id (String)

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

  • body (Array<StockAdjustmentItem>)

    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_adjustments_api.rb', line 39

def add_stock_adjustment_items_with_http_info(, stock_adjustment_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StockAdjustmentsApi.add_stock_adjustment_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 StockAdjustmentsApi.add_stock_adjustment_items"
  end
  # verify the required parameter 'stock_adjustment_id' is set
  if @api_client.config.client_side_validation && stock_adjustment_id.nil?
    fail ArgumentError, "Missing the required parameter 'stock_adjustment_id' when calling StockAdjustmentsApi.add_stock_adjustment_items"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling StockAdjustmentsApi.add_stock_adjustment_items"
  end
  # resource path
  local_var_path = '/accounts/{koronaAccountId}/stockAdjustments/{stockAdjustmentId}/items'.sub('{' + 'koronaAccountId' + '}', CGI.escape(.to_s)).sub('{' + 'stockAdjustmentId' + '}', CGI.escape(stock_adjustment_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(body)

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

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

  new_options = opts.merge(
    :operation => :"StockAdjustmentsApi.add_stock_adjustment_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: StockAdjustmentsApi#add_stock_adjustment_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#add_stock_adjustments(korona_account_id, body, opts = {}) ⇒ Array<AddOrUpdateResult>

adds stock adjustments

Parameters:

  • korona_account_id (String)

    account id of the KORONA.cloud account

  • body (Array<StockAdjustment>)

    data to add

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

    the optional parameters

Returns:



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

def add_stock_adjustments(, body, opts = {})
  data, _status_code, _headers = add_stock_adjustments_with_http_info(, body, opts)
  data
end

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

adds stock adjustments

Parameters:

  • korona_account_id (String)

    account id of the KORONA.cloud account

  • body (Array<StockAdjustment>)

    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_adjustments_api.rb', line 115

def add_stock_adjustments_with_http_info(, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StockAdjustmentsApi.add_stock_adjustments ...'
  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 StockAdjustmentsApi.add_stock_adjustments"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling StockAdjustmentsApi.add_stock_adjustments"
  end
  # resource path
  local_var_path = '/accounts/{koronaAccountId}/stockAdjustments'.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(body)

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

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

  new_options = opts.merge(
    :operation => :"StockAdjustmentsApi.add_stock_adjustments",
    :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: StockAdjustmentsApi#add_stock_adjustments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#book_stock_adjustment(korona_account_id, stock_adjustment_id, opts = {}) ⇒ nil

book the single stock adjustment

Parameters:

  • korona_account_id (String)

    account id of the KORONA.cloud account

  • stock_adjustment_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_adjustments_api.rb', line 177

def book_stock_adjustment(, stock_adjustment_id, opts = {})
  book_stock_adjustment_with_http_info(, stock_adjustment_id, opts)
  nil
end

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

book the single stock adjustment

Parameters:

  • korona_account_id (String)

    account id of the KORONA.cloud account

  • stock_adjustment_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_adjustments_api.rb', line 187

def book_stock_adjustment_with_http_info(, stock_adjustment_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StockAdjustmentsApi.book_stock_adjustment ...'
  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 StockAdjustmentsApi.book_stock_adjustment"
  end
  # verify the required parameter 'stock_adjustment_id' is set
  if @api_client.config.client_side_validation && stock_adjustment_id.nil?
    fail ArgumentError, "Missing the required parameter 'stock_adjustment_id' when calling StockAdjustmentsApi.book_stock_adjustment"
  end
  # resource path
  local_var_path = '/accounts/{koronaAccountId}/stockAdjustments/{stockAdjustmentId}/book'.sub('{' + 'koronaAccountId' + '}', CGI.escape(.to_s)).sub('{' + 'stockAdjustmentId' + '}', CGI.escape(stock_adjustment_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 => :"StockAdjustmentsApi.book_stock_adjustment",
    :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: StockAdjustmentsApi#book_stock_adjustment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_stock_adjustment_item(korona_account_id, stock_adjustment_id, product_id, opts = {}) ⇒ nil

deletes the single stock adjustment item

Parameters:

  • korona_account_id (String)

    account id of the KORONA.cloud account

  • stock_adjustment_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_adjustments_api.rb', line 245

def delete_stock_adjustment_item(, stock_adjustment_id, product_id, opts = {})
  delete_stock_adjustment_item_with_http_info(, stock_adjustment_id, product_id, opts)
  nil
end

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

deletes the single stock adjustment item

Parameters:

  • korona_account_id (String)

    account id of the KORONA.cloud account

  • stock_adjustment_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_adjustments_api.rb', line 256

def delete_stock_adjustment_item_with_http_info(, stock_adjustment_id, product_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StockAdjustmentsApi.delete_stock_adjustment_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 StockAdjustmentsApi.delete_stock_adjustment_item"
  end
  # verify the required parameter 'stock_adjustment_id' is set
  if @api_client.config.client_side_validation && stock_adjustment_id.nil?
    fail ArgumentError, "Missing the required parameter 'stock_adjustment_id' when calling StockAdjustmentsApi.delete_stock_adjustment_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 StockAdjustmentsApi.delete_stock_adjustment_item"
  end
  # resource path
  local_var_path = '/accounts/{koronaAccountId}/stockAdjustments/{stockAdjustmentId}/items/{productId}'.sub('{' + 'koronaAccountId' + '}', CGI.escape(.to_s)).sub('{' + 'stockAdjustmentId' + '}', CGI.escape(stock_adjustment_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 => :"StockAdjustmentsApi.delete_stock_adjustment_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: StockAdjustmentsApi#delete_stock_adjustment_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_stock_adjustment(korona_account_id, stock_adjustment_id, opts = {}) ⇒ StockAdjustment

returns a single stock adjustment

Parameters:

  • korona_account_id (String)

    account id of the KORONA.cloud account

  • stock_adjustment_id (String)

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

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

    the optional parameters

Returns:



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

def get_stock_adjustment(, stock_adjustment_id, opts = {})
  data, _status_code, _headers = get_stock_adjustment_with_http_info(, stock_adjustment_id, opts)
  data
end

#get_stock_adjustment_item(korona_account_id, stock_adjustment_id, product_id, opts = {}) ⇒ StockAdjustmentItem

returns a single stock adjustment item

Parameters:

  • korona_account_id (String)

    account id of the KORONA.cloud account

  • stock_adjustment_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:



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

def get_stock_adjustment_item(, stock_adjustment_id, product_id, opts = {})
  data, _status_code, _headers = get_stock_adjustment_item_with_http_info(, stock_adjustment_id, product_id, opts)
  data
end

#get_stock_adjustment_item_with_http_info(korona_account_id, stock_adjustment_id, product_id, opts = {}) ⇒ Array<(StockAdjustmentItem, Integer, Hash)>

returns a single stock adjustment item

Parameters:

  • korona_account_id (String)

    account id of the KORONA.cloud account

  • stock_adjustment_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<(StockAdjustmentItem, Integer, Hash)>)

    StockAdjustmentItem 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
448
449
450
# File 'lib/korona-cloud-client/api/stock_adjustments_api.rb', line 396

def get_stock_adjustment_item_with_http_info(, stock_adjustment_id, product_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StockAdjustmentsApi.get_stock_adjustment_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 StockAdjustmentsApi.get_stock_adjustment_item"
  end
  # verify the required parameter 'stock_adjustment_id' is set
  if @api_client.config.client_side_validation && stock_adjustment_id.nil?
    fail ArgumentError, "Missing the required parameter 'stock_adjustment_id' when calling StockAdjustmentsApi.get_stock_adjustment_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 StockAdjustmentsApi.get_stock_adjustment_item"
  end
  # resource path
  local_var_path = '/accounts/{koronaAccountId}/stockAdjustments/{stockAdjustmentId}/items/{productId}'.sub('{' + 'koronaAccountId' + '}', CGI.escape(.to_s)).sub('{' + 'stockAdjustmentId' + '}', CGI.escape(stock_adjustment_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] || 'StockAdjustmentItem'

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

  new_options = opts.merge(
    :operation => :"StockAdjustmentsApi.get_stock_adjustment_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: StockAdjustmentsApi#get_stock_adjustment_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_stock_adjustment_items(korona_account_id, stock_adjustment_id, opts = {}) ⇒ ResultListStockAdjustmentItem

lists all stock adjustment items

Parameters:

  • korona_account_id (String)

    account id of the KORONA.cloud account

  • stock_adjustment_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:



461
462
463
464
# File 'lib/korona-cloud-client/api/stock_adjustments_api.rb', line 461

def get_stock_adjustment_items(, stock_adjustment_id, opts = {})
  data, _status_code, _headers = get_stock_adjustment_items_with_http_info(, stock_adjustment_id, opts)
  data
end

#get_stock_adjustment_items_with_http_info(korona_account_id, stock_adjustment_id, opts = {}) ⇒ Array<(ResultListStockAdjustmentItem, Integer, Hash)>

lists all stock adjustment items

Parameters:

  • korona_account_id (String)

    account id of the KORONA.cloud account

  • stock_adjustment_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:



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
521
522
523
524
525
526
527
528
529
# File 'lib/korona-cloud-client/api/stock_adjustments_api.rb', line 475

def get_stock_adjustment_items_with_http_info(, stock_adjustment_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StockAdjustmentsApi.get_stock_adjustment_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 StockAdjustmentsApi.get_stock_adjustment_items"
  end
  # verify the required parameter 'stock_adjustment_id' is set
  if @api_client.config.client_side_validation && stock_adjustment_id.nil?
    fail ArgumentError, "Missing the required parameter 'stock_adjustment_id' when calling StockAdjustmentsApi.get_stock_adjustment_items"
  end
  # resource path
  local_var_path = '/accounts/{koronaAccountId}/stockAdjustments/{stockAdjustmentId}/items'.sub('{' + 'koronaAccountId' + '}', CGI.escape(.to_s)).sub('{' + 'stockAdjustmentId' + '}', CGI.escape(stock_adjustment_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] || 'ResultListStockAdjustmentItem'

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

  new_options = opts.merge(
    :operation => :"StockAdjustmentsApi.get_stock_adjustment_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: StockAdjustmentsApi#get_stock_adjustment_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_stock_adjustment_with_http_info(korona_account_id, stock_adjustment_id, opts = {}) ⇒ Array<(StockAdjustment, Integer, Hash)>

returns a single stock adjustment

Parameters:

  • korona_account_id (String)

    account id of the KORONA.cloud account

  • stock_adjustment_id (String)

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

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

    the optional parameters

Returns:

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

    StockAdjustment data, 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_adjustments_api.rb', line 327

def get_stock_adjustment_with_http_info(, stock_adjustment_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StockAdjustmentsApi.get_stock_adjustment ...'
  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 StockAdjustmentsApi.get_stock_adjustment"
  end
  # verify the required parameter 'stock_adjustment_id' is set
  if @api_client.config.client_side_validation && stock_adjustment_id.nil?
    fail ArgumentError, "Missing the required parameter 'stock_adjustment_id' when calling StockAdjustmentsApi.get_stock_adjustment"
  end
  # resource path
  local_var_path = '/accounts/{koronaAccountId}/stockAdjustments/{stockAdjustmentId}'.sub('{' + 'koronaAccountId' + '}', CGI.escape(.to_s)).sub('{' + 'stockAdjustmentId' + '}', CGI.escape(stock_adjustment_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] || 'StockAdjustment'

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

  new_options = opts.merge(
    :operation => :"StockAdjustmentsApi.get_stock_adjustment",
    :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: StockAdjustmentsApi#get_stock_adjustment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_stock_adjustments(korona_account_id, opts = {}) ⇒ ResultListStockAdjustment

lists all stock adjustments

Parameters:

  • korona_account_id (String)

    account id of the KORONA.cloud 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_finish_time (Time)

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

  • :max_finish_time (Time)

    max (inclusive) finish 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)

  • :warehouse (String)

    warehouse (&#x3D; organizational unit having warehouse flag)

  • :booking_status (String)

    booking status (possible values: BOOKED, IN_PROGRESS)

  • :number (String)

    number of the related object

  • :receipt_number (String)

    receipt number

Returns:



548
549
550
551
# File 'lib/korona-cloud-client/api/stock_adjustments_api.rb', line 548

def get_stock_adjustments(, opts = {})
  data, _status_code, _headers = get_stock_adjustments_with_http_info(, opts)
  data
end

#get_stock_adjustments_with_http_info(korona_account_id, opts = {}) ⇒ Array<(ResultListStockAdjustment, Integer, Hash)>

lists all stock adjustments

Parameters:

  • korona_account_id (String)

    account id of the KORONA.cloud 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_finish_time (Time)

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

  • :max_finish_time (Time)

    max (inclusive) finish 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)

  • :warehouse (String)

    warehouse (&#x3D; organizational unit having warehouse flag)

  • :booking_status (String)

    booking status (possible values: BOOKED, IN_PROGRESS)

  • :number (String)

    number of the related object

  • :receipt_number (String)

    receipt number

Returns:

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

    ResultListStockAdjustment data, response status code and response headers



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
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
# File 'lib/korona-cloud-client/api/stock_adjustments_api.rb', line 570

def get_stock_adjustments_with_http_info(, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StockAdjustmentsApi.get_stock_adjustments ...'
  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 StockAdjustmentsApi.get_stock_adjustments"
  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}/stockAdjustments'.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[:'minFinishTime'] = opts[:'min_finish_time'] if !opts[:'min_finish_time'].nil?
  query_params[:'maxFinishTime'] = opts[:'max_finish_time'] if !opts[:'max_finish_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[:'warehouse'] = opts[:'warehouse'] if !opts[:'warehouse'].nil?
  query_params[:'bookingStatus'] = opts[:'booking_status'] if !opts[:'booking_status'].nil?
  query_params[:'number'] = opts[:'number'] if !opts[:'number'].nil?
  query_params[:'receiptNumber'] = opts[:'receipt_number'] if !opts[:'receipt_number'].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] || 'ResultListStockAdjustment'

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

  new_options = opts.merge(
    :operation => :"StockAdjustmentsApi.get_stock_adjustments",
    :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: StockAdjustmentsApi#get_stock_adjustments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_stock_adjustment(korona_account_id, stock_adjustment_id, body, opts = {}) ⇒ nil

updates the single stock adjustment

Parameters:

  • korona_account_id (String)

    account id of the KORONA.cloud account

  • stock_adjustment_id (String)

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

  • body (StockAdjustment)

    data to update

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

    the optional parameters

Returns:

  • (nil)


641
642
643
644
# File 'lib/korona-cloud-client/api/stock_adjustments_api.rb', line 641

def update_stock_adjustment(, stock_adjustment_id, body, opts = {})
  update_stock_adjustment_with_http_info(, stock_adjustment_id, body, opts)
  nil
end

#update_stock_adjustment_item(korona_account_id, stock_adjustment_id, product_id, body, opts = {}) ⇒ nil

updates the single stock adjustment item

Parameters:

  • korona_account_id (String)

    account id of the KORONA.cloud account

  • stock_adjustment_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)

  • body (StockAdjustmentItem)

    data to update

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

    the optional parameters

Returns:

  • (nil)


720
721
722
723
# File 'lib/korona-cloud-client/api/stock_adjustments_api.rb', line 720

def update_stock_adjustment_item(, stock_adjustment_id, product_id, body, opts = {})
  update_stock_adjustment_item_with_http_info(, stock_adjustment_id, product_id, body, opts)
  nil
end

#update_stock_adjustment_item_with_http_info(korona_account_id, stock_adjustment_id, product_id, body, opts = {}) ⇒ Array<(nil, Integer, Hash)>

updates the single stock adjustment item

Parameters:

  • korona_account_id (String)

    account id of the KORONA.cloud account

  • stock_adjustment_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)

  • body (StockAdjustmentItem)

    data to update

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
788
789
790
791
792
793
794
795
# File 'lib/korona-cloud-client/api/stock_adjustments_api.rb', line 732

def update_stock_adjustment_item_with_http_info(, stock_adjustment_id, product_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StockAdjustmentsApi.update_stock_adjustment_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 StockAdjustmentsApi.update_stock_adjustment_item"
  end
  # verify the required parameter 'stock_adjustment_id' is set
  if @api_client.config.client_side_validation && stock_adjustment_id.nil?
    fail ArgumentError, "Missing the required parameter 'stock_adjustment_id' when calling StockAdjustmentsApi.update_stock_adjustment_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 StockAdjustmentsApi.update_stock_adjustment_item"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling StockAdjustmentsApi.update_stock_adjustment_item"
  end
  # resource path
  local_var_path = '/accounts/{koronaAccountId}/stockAdjustments/{stockAdjustmentId}/items/{productId}'.sub('{' + 'koronaAccountId' + '}', CGI.escape(.to_s)).sub('{' + 'stockAdjustmentId' + '}', CGI.escape(stock_adjustment_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(body)

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"StockAdjustmentsApi.update_stock_adjustment_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: StockAdjustmentsApi#update_stock_adjustment_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_stock_adjustment_items(korona_account_id, stock_adjustment_id, body, opts = {}) ⇒ Array<AddOrUpdateResult>

updates stock adjustment items

Parameters:

  • korona_account_id (String)

    account id of the KORONA.cloud account

  • stock_adjustment_id (String)

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

  • body (Array<StockAdjustmentItem>)

    data to update

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

    the optional parameters

Returns:



803
804
805
806
# File 'lib/korona-cloud-client/api/stock_adjustments_api.rb', line 803

def update_stock_adjustment_items(, stock_adjustment_id, body, opts = {})
  data, _status_code, _headers = update_stock_adjustment_items_with_http_info(, stock_adjustment_id, body, opts)
  data
end

#update_stock_adjustment_items_with_http_info(korona_account_id, stock_adjustment_id, body, opts = {}) ⇒ Array<(Array<AddOrUpdateResult>, Integer, Hash)>

updates stock adjustment items

Parameters:

  • korona_account_id (String)

    account id of the KORONA.cloud account

  • stock_adjustment_id (String)

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

  • body (Array<StockAdjustmentItem>)

    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



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
872
873
# File 'lib/korona-cloud-client/api/stock_adjustments_api.rb', line 814

def update_stock_adjustment_items_with_http_info(, stock_adjustment_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StockAdjustmentsApi.update_stock_adjustment_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 StockAdjustmentsApi.update_stock_adjustment_items"
  end
  # verify the required parameter 'stock_adjustment_id' is set
  if @api_client.config.client_side_validation && stock_adjustment_id.nil?
    fail ArgumentError, "Missing the required parameter 'stock_adjustment_id' when calling StockAdjustmentsApi.update_stock_adjustment_items"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling StockAdjustmentsApi.update_stock_adjustment_items"
  end
  # resource path
  local_var_path = '/accounts/{koronaAccountId}/stockAdjustments/{stockAdjustmentId}/items'.sub('{' + 'koronaAccountId' + '}', CGI.escape(.to_s)).sub('{' + 'stockAdjustmentId' + '}', CGI.escape(stock_adjustment_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(body)

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

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

  new_options = opts.merge(
    :operation => :"StockAdjustmentsApi.update_stock_adjustment_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: StockAdjustmentsApi#update_stock_adjustment_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_stock_adjustment_with_http_info(korona_account_id, stock_adjustment_id, body, opts = {}) ⇒ Array<(nil, Integer, Hash)>

updates the single stock adjustment

Parameters:

  • korona_account_id (String)

    account id of the KORONA.cloud account

  • stock_adjustment_id (String)

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

  • body (StockAdjustment)

    data to update

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
710
711
# File 'lib/korona-cloud-client/api/stock_adjustments_api.rb', line 652

def update_stock_adjustment_with_http_info(, stock_adjustment_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StockAdjustmentsApi.update_stock_adjustment ...'
  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 StockAdjustmentsApi.update_stock_adjustment"
  end
  # verify the required parameter 'stock_adjustment_id' is set
  if @api_client.config.client_side_validation && stock_adjustment_id.nil?
    fail ArgumentError, "Missing the required parameter 'stock_adjustment_id' when calling StockAdjustmentsApi.update_stock_adjustment"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling StockAdjustmentsApi.update_stock_adjustment"
  end
  # resource path
  local_var_path = '/accounts/{koronaAccountId}/stockAdjustments/{stockAdjustmentId}'.sub('{' + 'koronaAccountId' + '}', CGI.escape(.to_s)).sub('{' + 'stockAdjustmentId' + '}', CGI.escape(stock_adjustment_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(body)

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"StockAdjustmentsApi.update_stock_adjustment",
    :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: StockAdjustmentsApi#update_stock_adjustment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end