Class: KoronaClient::StockReceiptsKORONARetailApi

Inherits:
Object
  • Object
show all
Defined in:
lib/korona_client/api/stock_receipts_korona_retail_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ StockReceiptsKORONARetailApi

Returns a new instance of StockReceiptsKORONARetailApi.



19
20
21
# File 'lib/korona_client/api/stock_receipts_korona_retail_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_client/api/stock_receipts_korona_retail_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

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

adds stock-receipt items

Parameters:

  • korona_account_id

    the account id

  • stock_receipt_id_or_number

    id or number of the related object (important: if a number should match the uuid-format, the system will lookup for an id instead of a number)

  • body

    data to add

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

    the optional parameters

Returns:



30
31
32
33
# File 'lib/korona_client/api/stock_receipts_korona_retail_api.rb', line 30

def add_stock_receipt_items(, stock_receipt_id_or_number, body, opts = {})
  data, _status_code, _headers = add_stock_receipt_items_with_http_info(, stock_receipt_id_or_number, body, opts)
  return data
end

#add_stock_receipt_items_with_http_info(korona_account_id, stock_receipt_id_or_number, body, opts = {}) ⇒ Array<(Array<AddOrUpdateResult>, Fixnum, Hash)>

adds stock-receipt items

Parameters:

  • korona_account_id

    the account id

  • stock_receipt_id_or_number

    id or number of the related object (important: if a number should match the uuid-format, the system will lookup for an id instead of a number)

  • body

    data to add

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

    the optional parameters

Returns:

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

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



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
# File 'lib/korona_client/api/stock_receipts_korona_retail_api.rb', line 42

def add_stock_receipt_items_with_http_info(, stock_receipt_id_or_number, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: StockReceiptsKORONARetailApi.add_stock_receipt_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 StockReceiptsKORONARetailApi.add_stock_receipt_items"
  end
  # verify the required parameter 'stock_receipt_id_or_number' is set
  if @api_client.config.client_side_validation && stock_receipt_id_or_number.nil?
    fail ArgumentError, "Missing the required parameter 'stock_receipt_id_or_number' when calling StockReceiptsKORONARetailApi.add_stock_receipt_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 StockReceiptsKORONARetailApi.add_stock_receipt_items"
  end
  # resource path
  local_var_path = "/accounts/{koronaAccountId}/stockReceipts/{stockReceiptIdOrNumber}/items".sub('{' + 'koronaAccountId' + '}', .to_s).sub('{' + 'stockReceiptIdOrNumber' + '}', stock_receipt_id_or_number.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<AddOrUpdateResult>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StockReceiptsKORONARetailApi#add_stock_receipt_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

adds stock-receipts

Parameters:

  • korona_account_id

    the account id

  • body

    data to add

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

    the optional parameters

Returns:



96
97
98
99
# File 'lib/korona_client/api/stock_receipts_korona_retail_api.rb', line 96

def add_stock_receipts(, body, opts = {})
  data, _status_code, _headers = add_stock_receipts_with_http_info(, body, opts)
  return data
end

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

adds stock-receipts

Parameters:

  • korona_account_id

    the account id

  • body

    data to add

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

    the optional parameters

Returns:

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

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



107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# File 'lib/korona_client/api/stock_receipts_korona_retail_api.rb', line 107

def add_stock_receipts_with_http_info(, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: StockReceiptsKORONARetailApi.add_stock_receipts ..."
  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 StockReceiptsKORONARetailApi.add_stock_receipts"
  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 StockReceiptsKORONARetailApi.add_stock_receipts"
  end
  # resource path
  local_var_path = "/accounts/{koronaAccountId}/stockReceipts".sub('{' + 'koronaAccountId' + '}', .to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<AddOrUpdateResult>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StockReceiptsKORONARetailApi#add_stock_receipts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_stock_receipt_item(korona_account_id, stock_receipt_id_or_number, product_id_or_number, opts = {}) ⇒ nil

deletes the stock-receipt item

Parameters:

  • korona_account_id

    the account id

  • stock_receipt_id_or_number

    id or number of the related object (important: if a number should match the uuid-format, the system will lookup for an id instead of a number)

  • product_id_or_number

    id or number of the related object (important: if a number should match the uuid-format, the system will lookup for an id instead of a number)

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

    the optional parameters

Returns:

  • (nil)


158
159
160
161
# File 'lib/korona_client/api/stock_receipts_korona_retail_api.rb', line 158

def delete_stock_receipt_item(, stock_receipt_id_or_number, product_id_or_number, opts = {})
  delete_stock_receipt_item_with_http_info(, stock_receipt_id_or_number, product_id_or_number, opts)
  return nil
end

#delete_stock_receipt_item_with_http_info(korona_account_id, stock_receipt_id_or_number, product_id_or_number, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

deletes the stock-receipt item

Parameters:

  • korona_account_id

    the account id

  • stock_receipt_id_or_number

    id or number of the related object (important: if a number should match the uuid-format, the system will lookup for an id instead of a number)

  • product_id_or_number

    id or number of the related object (important: if a number should match the uuid-format, the system will lookup for an id instead of a number)

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
# File 'lib/korona_client/api/stock_receipts_korona_retail_api.rb', line 170

def delete_stock_receipt_item_with_http_info(, stock_receipt_id_or_number, product_id_or_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: StockReceiptsKORONARetailApi.delete_stock_receipt_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 StockReceiptsKORONARetailApi.delete_stock_receipt_item"
  end
  # verify the required parameter 'stock_receipt_id_or_number' is set
  if @api_client.config.client_side_validation && stock_receipt_id_or_number.nil?
    fail ArgumentError, "Missing the required parameter 'stock_receipt_id_or_number' when calling StockReceiptsKORONARetailApi.delete_stock_receipt_item"
  end
  # verify the required parameter 'product_id_or_number' is set
  if @api_client.config.client_side_validation && product_id_or_number.nil?
    fail ArgumentError, "Missing the required parameter 'product_id_or_number' when calling StockReceiptsKORONARetailApi.delete_stock_receipt_item"
  end
  # resource path
  local_var_path = "/accounts/{koronaAccountId}/stockReceipts/{stockReceiptIdOrNumber}/items/{productIdOrNumber}".sub('{' + 'koronaAccountId' + '}', .to_s).sub('{' + 'stockReceiptIdOrNumber' + '}', stock_receipt_id_or_number.to_s).sub('{' + 'productIdOrNumber' + '}', product_id_or_number.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StockReceiptsKORONARetailApi#delete_stock_receipt_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_stock_receipt(korona_account_id, stock_receipt_id_or_number, opts = {}) ⇒ StockReceipt

lists the stock-receipt

Parameters:

  • korona_account_id

    the account id

  • stock_receipt_id_or_number

    id or number of the related object (important: if a number should match the uuid-format, the system will lookup for an id instead of a number)

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

    the optional parameters

Returns:



223
224
225
226
# File 'lib/korona_client/api/stock_receipts_korona_retail_api.rb', line 223

def get_stock_receipt(, stock_receipt_id_or_number, opts = {})
  data, _status_code, _headers = get_stock_receipt_with_http_info(, stock_receipt_id_or_number, opts)
  return data
end

#get_stock_receipt_item(korona_account_id, stock_receipt_id_or_number, product_id_or_number, opts = {}) ⇒ StockReceiptItem

lists the stock-receipt item

Parameters:

  • korona_account_id

    the account id

  • stock_receipt_id_or_number

    id or number of the related object (important: if a number should match the uuid-format, the system will lookup for an id instead of a number)

  • product_id_or_number

    id or number of the related object (important: if a number should match the uuid-format, the system will lookup for an id instead of a number)

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

    the optional parameters

Returns:



285
286
287
288
# File 'lib/korona_client/api/stock_receipts_korona_retail_api.rb', line 285

def get_stock_receipt_item(, stock_receipt_id_or_number, product_id_or_number, opts = {})
  data, _status_code, _headers = get_stock_receipt_item_with_http_info(, stock_receipt_id_or_number, product_id_or_number, opts)
  return data
end

#get_stock_receipt_item_with_http_info(korona_account_id, stock_receipt_id_or_number, product_id_or_number, opts = {}) ⇒ Array<(StockReceiptItem, Fixnum, Hash)>

lists the stock-receipt item

Parameters:

  • korona_account_id

    the account id

  • stock_receipt_id_or_number

    id or number of the related object (important: if a number should match the uuid-format, the system will lookup for an id instead of a number)

  • product_id_or_number

    id or number of the related object (important: if a number should match the uuid-format, the system will lookup for an id instead of a number)

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

    the optional parameters

Returns:

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

    StockReceiptItem data, response status code and response headers



297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
# File 'lib/korona_client/api/stock_receipts_korona_retail_api.rb', line 297

def get_stock_receipt_item_with_http_info(, stock_receipt_id_or_number, product_id_or_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: StockReceiptsKORONARetailApi.get_stock_receipt_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 StockReceiptsKORONARetailApi.get_stock_receipt_item"
  end
  # verify the required parameter 'stock_receipt_id_or_number' is set
  if @api_client.config.client_side_validation && stock_receipt_id_or_number.nil?
    fail ArgumentError, "Missing the required parameter 'stock_receipt_id_or_number' when calling StockReceiptsKORONARetailApi.get_stock_receipt_item"
  end
  # verify the required parameter 'product_id_or_number' is set
  if @api_client.config.client_side_validation && product_id_or_number.nil?
    fail ArgumentError, "Missing the required parameter 'product_id_or_number' when calling StockReceiptsKORONARetailApi.get_stock_receipt_item"
  end
  # resource path
  local_var_path = "/accounts/{koronaAccountId}/stockReceipts/{stockReceiptIdOrNumber}/items/{productIdOrNumber}".sub('{' + 'koronaAccountId' + '}', .to_s).sub('{' + 'stockReceiptIdOrNumber' + '}', stock_receipt_id_or_number.to_s).sub('{' + 'productIdOrNumber' + '}', product_id_or_number.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'StockReceiptItem')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StockReceiptsKORONARetailApi#get_stock_receipt_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_stock_receipt_items(korona_account_id, stock_receipt_id_or_number, opts = {}) ⇒ ResultListStockReceiptItem

lists all stock-receipt items

Parameters:

  • korona_account_id

    the account id

  • stock_receipt_id_or_number

    id or number of the related object (important: if a number should match the uuid-format, the system will lookup for an id instead of a number)

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



355
356
357
358
# File 'lib/korona_client/api/stock_receipts_korona_retail_api.rb', line 355

def get_stock_receipt_items(, stock_receipt_id_or_number, opts = {})
  data, _status_code, _headers = get_stock_receipt_items_with_http_info(, stock_receipt_id_or_number, opts)
  return data
end

#get_stock_receipt_items_with_http_info(korona_account_id, stock_receipt_id_or_number, opts = {}) ⇒ Array<(ResultListStockReceiptItem, Fixnum, Hash)>

lists all stock-receipt items

Parameters:

  • korona_account_id

    the account id

  • stock_receipt_id_or_number

    id or number of the related object (important: if a number should match the uuid-format, the system will lookup for an id instead of a number)

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

    ResultListStockReceiptItem data, response status code and response headers



370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
# File 'lib/korona_client/api/stock_receipts_korona_retail_api.rb', line 370

def get_stock_receipt_items_with_http_info(, stock_receipt_id_or_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: StockReceiptsKORONARetailApi.get_stock_receipt_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 StockReceiptsKORONARetailApi.get_stock_receipt_items"
  end
  # verify the required parameter 'stock_receipt_id_or_number' is set
  if @api_client.config.client_side_validation && stock_receipt_id_or_number.nil?
    fail ArgumentError, "Missing the required parameter 'stock_receipt_id_or_number' when calling StockReceiptsKORONARetailApi.get_stock_receipt_items"
  end
  # resource path
  local_var_path = "/accounts/{koronaAccountId}/stockReceipts/{stockReceiptIdOrNumber}/items".sub('{' + 'koronaAccountId' + '}', .to_s).sub('{' + 'stockReceiptIdOrNumber' + '}', stock_receipt_id_or_number.to_s)

  # query parameters
  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 = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ResultListStockReceiptItem')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StockReceiptsKORONARetailApi#get_stock_receipt_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_stock_receipt_with_http_info(korona_account_id, stock_receipt_id_or_number, opts = {}) ⇒ Array<(StockReceipt, Fixnum, Hash)>

lists the stock-receipt

Parameters:

  • korona_account_id

    the account id

  • stock_receipt_id_or_number

    id or number of the related object (important: if a number should match the uuid-format, the system will lookup for an id instead of a number)

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

    the optional parameters

Returns:

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

    StockReceipt data, response status code and response headers



234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
# File 'lib/korona_client/api/stock_receipts_korona_retail_api.rb', line 234

def get_stock_receipt_with_http_info(, stock_receipt_id_or_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: StockReceiptsKORONARetailApi.get_stock_receipt ..."
  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 StockReceiptsKORONARetailApi.get_stock_receipt"
  end
  # verify the required parameter 'stock_receipt_id_or_number' is set
  if @api_client.config.client_side_validation && stock_receipt_id_or_number.nil?
    fail ArgumentError, "Missing the required parameter 'stock_receipt_id_or_number' when calling StockReceiptsKORONARetailApi.get_stock_receipt"
  end
  # resource path
  local_var_path = "/accounts/{koronaAccountId}/stockReceipts/{stockReceiptIdOrNumber}".sub('{' + 'koronaAccountId' + '}', .to_s).sub('{' + 'stockReceiptIdOrNumber' + '}', stock_receipt_id_or_number.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'StockReceipt')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StockReceiptsKORONARetailApi#get_stock_receipt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_stock_receipts(korona_account_id, opts = {}) ⇒ ResultListStockReceipt

lists all stock-receipts

Parameters:

  • korona_account_id

    the account id

  • 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 (DateTime)

    min (inclusive) create time of the receipt (ISO 8601; date, time and timezone)

  • :max_create_time (DateTime)

    max (inclusive) create time of the receipt (ISO 8601; date, time and timezone)

  • :min_booking_time (DateTime)

    min (inclusive) booking time of the receipt (ISO 8601; date, time and timezone)

  • :max_booking_time (DateTime)

    max (inclusive) booking time of the receipt (ISO 8601; date, time and timezone)

  • :organizational_unit (String)

    organizational unit

  • :source_organizational_unit (String)

    source organizational unit

  • :booking_status (String)

    booking status (possible values: BOOKED, IN_PROGRESS)

Returns:



435
436
437
438
# File 'lib/korona_client/api/stock_receipts_korona_retail_api.rb', line 435

def get_stock_receipts(, opts = {})
  data, _status_code, _headers = get_stock_receipts_with_http_info(, opts)
  return data
end

#get_stock_receipts_with_http_info(korona_account_id, opts = {}) ⇒ Array<(ResultListStockReceipt, Fixnum, Hash)>

lists all stock-receipts

Parameters:

  • korona_account_id

    the account id

  • 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 (DateTime)

    min (inclusive) create time of the receipt (ISO 8601; date, time and timezone)

  • :max_create_time (DateTime)

    max (inclusive) create time of the receipt (ISO 8601; date, time and timezone)

  • :min_booking_time (DateTime)

    min (inclusive) booking time of the receipt (ISO 8601; date, time and timezone)

  • :max_booking_time (DateTime)

    max (inclusive) booking time of the receipt (ISO 8601; date, time and timezone)

  • :organizational_unit (String)

    organizational unit

  • :source_organizational_unit (String)

    source organizational unit

  • :booking_status (String)

    booking status (possible values: BOOKED, IN_PROGRESS)

Returns:

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

    ResultListStockReceipt data, response status code and response headers



457
458
459
460
461
462
463
464
465
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
# File 'lib/korona_client/api/stock_receipts_korona_retail_api.rb', line 457

def get_stock_receipts_with_http_info(, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: StockReceiptsKORONARetailApi.get_stock_receipts ..."
  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 StockReceiptsKORONARetailApi.get_stock_receipts"
  end
  if @api_client.config.client_side_validation && opts[:'booking_status'] && !['BOOKED', 'IN_PROGRESS'].include?(opts[:'booking_status'])
    fail ArgumentError, 'invalid value for "booking_status", must be one of BOOKED, IN_PROGRESS'
  end
  # resource path
  local_var_path = "/accounts/{koronaAccountId}/stockReceipts".sub('{' + 'koronaAccountId' + '}', .to_s)

  # query parameters
  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?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ResultListStockReceipt')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StockReceiptsKORONARetailApi#get_stock_receipts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_stock_receipt(korona_account_id, stock_receipt_id_or_number, body, opts = {}) ⇒ nil

updates the stock-receipt

Parameters:

  • korona_account_id

    the account id

  • stock_receipt_id_or_number

    id or number of the related object (important: if a number should match the uuid-format, the system will lookup for an id instead of a number)

  • body

    data to update

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

    the optional parameters

Returns:

  • (nil)


519
520
521
522
# File 'lib/korona_client/api/stock_receipts_korona_retail_api.rb', line 519

def update_stock_receipt(, stock_receipt_id_or_number, body, opts = {})
  update_stock_receipt_with_http_info(, stock_receipt_id_or_number, body, opts)
  return nil
end

#update_stock_receipt_item(korona_account_id, stock_receipt_id_or_number, product_id_or_number, body, opts = {}) ⇒ nil

updates the stock-receipt item

Parameters:

  • korona_account_id

    the account id

  • stock_receipt_id_or_number

    id or number of the related object (important: if a number should match the uuid-format, the system will lookup for an id instead of a number)

  • product_id_or_number

    id or number of the related object (important: if a number should match the uuid-format, the system will lookup for an id instead of a number)

  • body

    data to update

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

    the optional parameters

Returns:

  • (nil)


586
587
588
589
# File 'lib/korona_client/api/stock_receipts_korona_retail_api.rb', line 586

def update_stock_receipt_item(, stock_receipt_id_or_number, product_id_or_number, body, opts = {})
  update_stock_receipt_item_with_http_info(, stock_receipt_id_or_number, product_id_or_number, body, opts)
  return nil
end

#update_stock_receipt_item_with_http_info(korona_account_id, stock_receipt_id_or_number, product_id_or_number, body, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

updates the stock-receipt item

Parameters:

  • korona_account_id

    the account id

  • stock_receipt_id_or_number

    id or number of the related object (important: if a number should match the uuid-format, the system will lookup for an id instead of a number)

  • product_id_or_number

    id or number of the related object (important: if a number should match the uuid-format, the system will lookup for an id instead of a number)

  • body

    data to update

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
# File 'lib/korona_client/api/stock_receipts_korona_retail_api.rb', line 599

def update_stock_receipt_item_with_http_info(, stock_receipt_id_or_number, product_id_or_number, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: StockReceiptsKORONARetailApi.update_stock_receipt_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 StockReceiptsKORONARetailApi.update_stock_receipt_item"
  end
  # verify the required parameter 'stock_receipt_id_or_number' is set
  if @api_client.config.client_side_validation && stock_receipt_id_or_number.nil?
    fail ArgumentError, "Missing the required parameter 'stock_receipt_id_or_number' when calling StockReceiptsKORONARetailApi.update_stock_receipt_item"
  end
  # verify the required parameter 'product_id_or_number' is set
  if @api_client.config.client_side_validation && product_id_or_number.nil?
    fail ArgumentError, "Missing the required parameter 'product_id_or_number' when calling StockReceiptsKORONARetailApi.update_stock_receipt_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 StockReceiptsKORONARetailApi.update_stock_receipt_item"
  end
  # resource path
  local_var_path = "/accounts/{koronaAccountId}/stockReceipts/{stockReceiptIdOrNumber}/items/{productIdOrNumber}".sub('{' + 'koronaAccountId' + '}', .to_s).sub('{' + 'stockReceiptIdOrNumber' + '}', stock_receipt_id_or_number.to_s).sub('{' + 'productIdOrNumber' + '}', product_id_or_number.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

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

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

updates stock-receipt items

Parameters:

  • korona_account_id

    the account id

  • stock_receipt_id_or_number

    id or number of the related object (important: if a number should match the uuid-format, the system will lookup for an id instead of a number)

  • body

    data to update

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

    the optional parameters

Returns:



657
658
659
660
# File 'lib/korona_client/api/stock_receipts_korona_retail_api.rb', line 657

def update_stock_receipt_items(, stock_receipt_id_or_number, body, opts = {})
  data, _status_code, _headers = update_stock_receipt_items_with_http_info(, stock_receipt_id_or_number, body, opts)
  return data
end

#update_stock_receipt_items_with_http_info(korona_account_id, stock_receipt_id_or_number, body, opts = {}) ⇒ Array<(Array<AddOrUpdateResult>, Fixnum, Hash)>

updates stock-receipt items

Parameters:

  • korona_account_id

    the account id

  • stock_receipt_id_or_number

    id or number of the related object (important: if a number should match the uuid-format, the system will lookup for an id instead of a number)

  • body

    data to update

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

    the optional parameters

Returns:

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

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



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
712
713
714
715
# File 'lib/korona_client/api/stock_receipts_korona_retail_api.rb', line 669

def update_stock_receipt_items_with_http_info(, stock_receipt_id_or_number, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: StockReceiptsKORONARetailApi.update_stock_receipt_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 StockReceiptsKORONARetailApi.update_stock_receipt_items"
  end
  # verify the required parameter 'stock_receipt_id_or_number' is set
  if @api_client.config.client_side_validation && stock_receipt_id_or_number.nil?
    fail ArgumentError, "Missing the required parameter 'stock_receipt_id_or_number' when calling StockReceiptsKORONARetailApi.update_stock_receipt_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 StockReceiptsKORONARetailApi.update_stock_receipt_items"
  end
  # resource path
  local_var_path = "/accounts/{koronaAccountId}/stockReceipts/{stockReceiptIdOrNumber}/items".sub('{' + 'koronaAccountId' + '}', .to_s).sub('{' + 'stockReceiptIdOrNumber' + '}', stock_receipt_id_or_number.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

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

#update_stock_receipt_with_http_info(korona_account_id, stock_receipt_id_or_number, body, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

updates the stock-receipt

Parameters:

  • korona_account_id

    the account id

  • stock_receipt_id_or_number

    id or number of the related object (important: if a number should match the uuid-format, the system will lookup for an id instead of a number)

  • body

    data to update

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



531
532
533
534
535
536
537
538
539
540
541
542
543
544
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
# File 'lib/korona_client/api/stock_receipts_korona_retail_api.rb', line 531

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

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

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