Class: KoronaClient::StockReceiptsApi
- Inherits:
-
Object
- Object
- KoronaClient::StockReceiptsApi
- Defined in:
- lib/korona_client/api/stock_receipts_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#add_stock_receipt_items(korona_account_id, stock_receipt_id, body, opts = {}) ⇒ Array<AddOrUpdateResult>
adds stock-receipt items.
-
#add_stock_receipt_items_with_http_info(korona_account_id, stock_receipt_id, body, opts = {}) ⇒ Array<(Array<AddOrUpdateResult>, Fixnum, Hash)>
adds stock-receipt items.
-
#add_stock_receipts(korona_account_id, body, opts = {}) ⇒ Array<AddOrUpdateResult>
adds stock-receipts.
-
#add_stock_receipts_with_http_info(korona_account_id, body, opts = {}) ⇒ Array<(Array<AddOrUpdateResult>, Fixnum, Hash)>
adds stock-receipts.
-
#book_stock_receipt(korona_account_id, stock_receipt_id, opts = {}) ⇒ nil
book the single stock-receipt.
-
#book_stock_receipt_with_http_info(korona_account_id, stock_receipt_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
book the single stock-receipt.
-
#delete_stock_receipt_item(korona_account_id, stock_receipt_id, product_id, opts = {}) ⇒ nil
deletes the single stock-receipt item.
-
#delete_stock_receipt_item_with_http_info(korona_account_id, stock_receipt_id, product_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
deletes the single stock-receipt item.
-
#get_stock_receipt(korona_account_id, stock_receipt_id, opts = {}) ⇒ StockReceipt
returns the single stock-receipt.
-
#get_stock_receipt_item(korona_account_id, stock_receipt_id, product_id, opts = {}) ⇒ StockReceiptItem
returns the single stock-receipt item.
-
#get_stock_receipt_item_with_http_info(korona_account_id, stock_receipt_id, product_id, opts = {}) ⇒ Array<(StockReceiptItem, Fixnum, Hash)>
returns the single stock-receipt item.
-
#get_stock_receipt_items(korona_account_id, stock_receipt_id, opts = {}) ⇒ ResultListStockReceiptItem
lists all stock-receipt items.
-
#get_stock_receipt_items_with_http_info(korona_account_id, stock_receipt_id, opts = {}) ⇒ Array<(ResultListStockReceiptItem, Fixnum, Hash)>
lists all stock-receipt items.
-
#get_stock_receipt_with_http_info(korona_account_id, stock_receipt_id, opts = {}) ⇒ Array<(StockReceipt, Fixnum, Hash)>
returns the single stock-receipt.
-
#get_stock_receipts(korona_account_id, opts = {}) ⇒ ResultListStockReceipt
lists all stock-receipts.
-
#get_stock_receipts_with_http_info(korona_account_id, opts = {}) ⇒ Array<(ResultListStockReceipt, Fixnum, Hash)>
lists all stock-receipts.
-
#initialize(api_client = ApiClient.default) ⇒ StockReceiptsApi
constructor
A new instance of StockReceiptsApi.
-
#update_stock_receipt(korona_account_id, stock_receipt_id, body, opts = {}) ⇒ nil
updates the single stock-receipt.
-
#update_stock_receipt_item(korona_account_id, stock_receipt_id, product_id, body, opts = {}) ⇒ nil
updates the single stock-receipt item.
-
#update_stock_receipt_item_with_http_info(korona_account_id, stock_receipt_id, product_id, body, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
updates the single stock-receipt item.
-
#update_stock_receipt_items(korona_account_id, stock_receipt_id, body, opts = {}) ⇒ Array<AddOrUpdateResult>
updates stock-receipt items.
-
#update_stock_receipt_items_with_http_info(korona_account_id, stock_receipt_id, body, opts = {}) ⇒ Array<(Array<AddOrUpdateResult>, Fixnum, Hash)>
updates stock-receipt items.
-
#update_stock_receipt_with_http_info(korona_account_id, stock_receipt_id, body, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
updates the single stock-receipt.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ StockReceiptsApi
Returns a new instance of StockReceiptsApi.
19 20 21 |
# File 'lib/korona_client/api/stock_receipts_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/korona_client/api/stock_receipts_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#add_stock_receipt_items(korona_account_id, stock_receipt_id, body, opts = {}) ⇒ Array<AddOrUpdateResult>
adds stock-receipt items
29 30 31 32 |
# File 'lib/korona_client/api/stock_receipts_api.rb', line 29 def add_stock_receipt_items(korona_account_id, stock_receipt_id, body, opts = {}) data, _status_code, _headers = add_stock_receipt_items_with_http_info(korona_account_id, stock_receipt_id, body, opts) data end |
#add_stock_receipt_items_with_http_info(korona_account_id, stock_receipt_id, body, opts = {}) ⇒ Array<(Array<AddOrUpdateResult>, Fixnum, Hash)>
adds stock-receipt items
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 |
# File 'lib/korona_client/api/stock_receipts_api.rb', line 41 def add_stock_receipt_items_with_http_info(korona_account_id, stock_receipt_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: StockReceiptsApi.add_stock_receipt_items ...' end # verify the required parameter 'korona_account_id' is set if @api_client.config.client_side_validation && korona_account_id.nil? fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling StockReceiptsApi.add_stock_receipt_items" end # verify the required parameter 'stock_receipt_id' is set if @api_client.config.client_side_validation && stock_receipt_id.nil? fail ArgumentError, "Missing the required parameter 'stock_receipt_id' when calling StockReceiptsApi.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 StockReceiptsApi.add_stock_receipt_items" end # resource path local_var_path = '/accounts/{koronaAccountId}/stockReceipts/{stockReceiptId}/items'.sub('{' + 'koronaAccountId' + '}', korona_account_id.to_s).sub('{' + 'stockReceiptId' + '}', stock_receipt_id.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: StockReceiptsApi#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
94 95 96 97 |
# File 'lib/korona_client/api/stock_receipts_api.rb', line 94 def add_stock_receipts(korona_account_id, body, opts = {}) data, _status_code, _headers = add_stock_receipts_with_http_info(korona_account_id, body, opts) data end |
#add_stock_receipts_with_http_info(korona_account_id, body, opts = {}) ⇒ Array<(Array<AddOrUpdateResult>, Fixnum, Hash)>
adds stock-receipts
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/korona_client/api/stock_receipts_api.rb', line 105 def add_stock_receipts_with_http_info(korona_account_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: StockReceiptsApi.add_stock_receipts ...' end # verify the required parameter 'korona_account_id' is set if @api_client.config.client_side_validation && korona_account_id.nil? fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling StockReceiptsApi.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 StockReceiptsApi.add_stock_receipts" end # resource path local_var_path = '/accounts/{koronaAccountId}/stockReceipts'.sub('{' + 'koronaAccountId' + '}', korona_account_id.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: StockReceiptsApi#add_stock_receipts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#book_stock_receipt(korona_account_id, stock_receipt_id, opts = {}) ⇒ nil
book the single stock-receipt
154 155 156 157 |
# File 'lib/korona_client/api/stock_receipts_api.rb', line 154 def book_stock_receipt(korona_account_id, stock_receipt_id, opts = {}) book_stock_receipt_with_http_info(korona_account_id, stock_receipt_id, opts) nil end |
#book_stock_receipt_with_http_info(korona_account_id, stock_receipt_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
book the single stock-receipt
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 |
# File 'lib/korona_client/api/stock_receipts_api.rb', line 165 def book_stock_receipt_with_http_info(korona_account_id, stock_receipt_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: StockReceiptsApi.book_stock_receipt ...' end # verify the required parameter 'korona_account_id' is set if @api_client.config.client_side_validation && korona_account_id.nil? fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling StockReceiptsApi.book_stock_receipt" end # verify the required parameter 'stock_receipt_id' is set if @api_client.config.client_side_validation && stock_receipt_id.nil? fail ArgumentError, "Missing the required parameter 'stock_receipt_id' when calling StockReceiptsApi.book_stock_receipt" end # resource path local_var_path = '/accounts/{koronaAccountId}/stockReceipts/{stockReceiptId}/book'.sub('{' + 'koronaAccountId' + '}', korona_account_id.to_s).sub('{' + 'stockReceiptId' + '}', stock_receipt_id.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(: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: StockReceiptsApi#book_stock_receipt\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, product_id, opts = {}) ⇒ nil
deletes the single stock-receipt item
214 215 216 217 |
# File 'lib/korona_client/api/stock_receipts_api.rb', line 214 def delete_stock_receipt_item(korona_account_id, stock_receipt_id, product_id, opts = {}) delete_stock_receipt_item_with_http_info(korona_account_id, stock_receipt_id, product_id, opts) nil end |
#delete_stock_receipt_item_with_http_info(korona_account_id, stock_receipt_id, product_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
deletes the single stock-receipt item
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 |
# File 'lib/korona_client/api/stock_receipts_api.rb', line 226 def delete_stock_receipt_item_with_http_info(korona_account_id, stock_receipt_id, product_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: StockReceiptsApi.delete_stock_receipt_item ...' end # verify the required parameter 'korona_account_id' is set if @api_client.config.client_side_validation && korona_account_id.nil? fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling StockReceiptsApi.delete_stock_receipt_item" end # verify the required parameter 'stock_receipt_id' is set if @api_client.config.client_side_validation && stock_receipt_id.nil? fail ArgumentError, "Missing the required parameter 'stock_receipt_id' when calling StockReceiptsApi.delete_stock_receipt_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 StockReceiptsApi.delete_stock_receipt_item" end # resource path local_var_path = '/accounts/{koronaAccountId}/stockReceipts/{stockReceiptId}/items/{productId}'.sub('{' + 'koronaAccountId' + '}', korona_account_id.to_s).sub('{' + 'stockReceiptId' + '}', stock_receipt_id.to_s).sub('{' + 'productId' + '}', product_id.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: StockReceiptsApi#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, opts = {}) ⇒ StockReceipt
returns the single stock-receipt
278 279 280 281 |
# File 'lib/korona_client/api/stock_receipts_api.rb', line 278 def get_stock_receipt(korona_account_id, stock_receipt_id, opts = {}) data, _status_code, _headers = get_stock_receipt_with_http_info(korona_account_id, stock_receipt_id, opts) data end |
#get_stock_receipt_item(korona_account_id, stock_receipt_id, product_id, opts = {}) ⇒ StockReceiptItem
returns the single stock-receipt item
339 340 341 342 |
# File 'lib/korona_client/api/stock_receipts_api.rb', line 339 def get_stock_receipt_item(korona_account_id, stock_receipt_id, product_id, opts = {}) data, _status_code, _headers = get_stock_receipt_item_with_http_info(korona_account_id, stock_receipt_id, product_id, opts) data end |
#get_stock_receipt_item_with_http_info(korona_account_id, stock_receipt_id, product_id, opts = {}) ⇒ Array<(StockReceiptItem, Fixnum, Hash)>
returns the single stock-receipt item
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 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 |
# File 'lib/korona_client/api/stock_receipts_api.rb', line 351 def get_stock_receipt_item_with_http_info(korona_account_id, stock_receipt_id, product_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: StockReceiptsApi.get_stock_receipt_item ...' end # verify the required parameter 'korona_account_id' is set if @api_client.config.client_side_validation && korona_account_id.nil? fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling StockReceiptsApi.get_stock_receipt_item" end # verify the required parameter 'stock_receipt_id' is set if @api_client.config.client_side_validation && stock_receipt_id.nil? fail ArgumentError, "Missing the required parameter 'stock_receipt_id' when calling StockReceiptsApi.get_stock_receipt_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 StockReceiptsApi.get_stock_receipt_item" end # resource path local_var_path = '/accounts/{koronaAccountId}/stockReceipts/{stockReceiptId}/items/{productId}'.sub('{' + 'koronaAccountId' + '}', korona_account_id.to_s).sub('{' + 'stockReceiptId' + '}', stock_receipt_id.to_s).sub('{' + 'productId' + '}', product_id.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: StockReceiptsApi#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, opts = {}) ⇒ ResultListStockReceiptItem
lists all stock-receipt items
408 409 410 411 |
# File 'lib/korona_client/api/stock_receipts_api.rb', line 408 def get_stock_receipt_items(korona_account_id, stock_receipt_id, opts = {}) data, _status_code, _headers = get_stock_receipt_items_with_http_info(korona_account_id, stock_receipt_id, opts) data end |
#get_stock_receipt_items_with_http_info(korona_account_id, stock_receipt_id, opts = {}) ⇒ Array<(ResultListStockReceiptItem, Fixnum, Hash)>
lists all stock-receipt items
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 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 |
# File 'lib/korona_client/api/stock_receipts_api.rb', line 423 def get_stock_receipt_items_with_http_info(korona_account_id, stock_receipt_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: StockReceiptsApi.get_stock_receipt_items ...' end # verify the required parameter 'korona_account_id' is set if @api_client.config.client_side_validation && korona_account_id.nil? fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling StockReceiptsApi.get_stock_receipt_items" end # verify the required parameter 'stock_receipt_id' is set if @api_client.config.client_side_validation && stock_receipt_id.nil? fail ArgumentError, "Missing the required parameter 'stock_receipt_id' when calling StockReceiptsApi.get_stock_receipt_items" end # resource path local_var_path = '/accounts/{koronaAccountId}/stockReceipts/{stockReceiptId}/items'.sub('{' + 'koronaAccountId' + '}', korona_account_id.to_s).sub('{' + 'stockReceiptId' + '}', stock_receipt_id.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: StockReceiptsApi#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, opts = {}) ⇒ Array<(StockReceipt, Fixnum, Hash)>
returns the single stock-receipt
289 290 291 292 293 294 295 296 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 |
# File 'lib/korona_client/api/stock_receipts_api.rb', line 289 def get_stock_receipt_with_http_info(korona_account_id, stock_receipt_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: StockReceiptsApi.get_stock_receipt ...' end # verify the required parameter 'korona_account_id' is set if @api_client.config.client_side_validation && korona_account_id.nil? fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling StockReceiptsApi.get_stock_receipt" end # verify the required parameter 'stock_receipt_id' is set if @api_client.config.client_side_validation && stock_receipt_id.nil? fail ArgumentError, "Missing the required parameter 'stock_receipt_id' when calling StockReceiptsApi.get_stock_receipt" end # resource path local_var_path = '/accounts/{koronaAccountId}/stockReceipts/{stockReceiptId}'.sub('{' + 'koronaAccountId' + '}', korona_account_id.to_s).sub('{' + 'stockReceiptId' + '}', stock_receipt_id.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: StockReceiptsApi#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
488 489 490 491 |
# File 'lib/korona_client/api/stock_receipts_api.rb', line 488 def get_stock_receipts(korona_account_id, opts = {}) data, _status_code, _headers = get_stock_receipts_with_http_info(korona_account_id, opts) data end |
#get_stock_receipts_with_http_info(korona_account_id, opts = {}) ⇒ Array<(ResultListStockReceipt, Fixnum, Hash)>
lists all stock-receipts
511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 |
# File 'lib/korona_client/api/stock_receipts_api.rb', line 511 def get_stock_receipts_with_http_info(korona_account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: StockReceiptsApi.get_stock_receipts ...' end # verify the required parameter 'korona_account_id' is set if @api_client.config.client_side_validation && korona_account_id.nil? fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling StockReceiptsApi.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' + '}', korona_account_id.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? query_params[:'number'] = opts[:'number'] if !opts[:'number'].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: StockReceiptsApi#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, body, opts = {}) ⇒ nil
updates the single stock-receipt
573 574 575 576 |
# File 'lib/korona_client/api/stock_receipts_api.rb', line 573 def update_stock_receipt(korona_account_id, stock_receipt_id, body, opts = {}) update_stock_receipt_with_http_info(korona_account_id, stock_receipt_id, body, opts) nil end |
#update_stock_receipt_item(korona_account_id, stock_receipt_id, product_id, body, opts = {}) ⇒ nil
updates the single stock-receipt item
639 640 641 642 |
# File 'lib/korona_client/api/stock_receipts_api.rb', line 639 def update_stock_receipt_item(korona_account_id, stock_receipt_id, product_id, body, opts = {}) update_stock_receipt_item_with_http_info(korona_account_id, stock_receipt_id, product_id, body, opts) nil end |
#update_stock_receipt_item_with_http_info(korona_account_id, stock_receipt_id, product_id, body, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
updates the single stock-receipt item
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 |
# File 'lib/korona_client/api/stock_receipts_api.rb', line 652 def update_stock_receipt_item_with_http_info(korona_account_id, stock_receipt_id, product_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: StockReceiptsApi.update_stock_receipt_item ...' end # verify the required parameter 'korona_account_id' is set if @api_client.config.client_side_validation && korona_account_id.nil? fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling StockReceiptsApi.update_stock_receipt_item" end # verify the required parameter 'stock_receipt_id' is set if @api_client.config.client_side_validation && stock_receipt_id.nil? fail ArgumentError, "Missing the required parameter 'stock_receipt_id' when calling StockReceiptsApi.update_stock_receipt_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 StockReceiptsApi.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 StockReceiptsApi.update_stock_receipt_item" end # resource path local_var_path = '/accounts/{koronaAccountId}/stockReceipts/{stockReceiptId}/items/{productId}'.sub('{' + 'koronaAccountId' + '}', korona_account_id.to_s).sub('{' + 'stockReceiptId' + '}', stock_receipt_id.to_s).sub('{' + 'productId' + '}', product_id.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: StockReceiptsApi#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, body, opts = {}) ⇒ Array<AddOrUpdateResult>
updates stock-receipt items
709 710 711 712 |
# File 'lib/korona_client/api/stock_receipts_api.rb', line 709 def update_stock_receipt_items(korona_account_id, stock_receipt_id, body, opts = {}) data, _status_code, _headers = update_stock_receipt_items_with_http_info(korona_account_id, stock_receipt_id, body, opts) data end |
#update_stock_receipt_items_with_http_info(korona_account_id, stock_receipt_id, body, opts = {}) ⇒ Array<(Array<AddOrUpdateResult>, Fixnum, Hash)>
updates stock-receipt items
721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 |
# File 'lib/korona_client/api/stock_receipts_api.rb', line 721 def update_stock_receipt_items_with_http_info(korona_account_id, stock_receipt_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: StockReceiptsApi.update_stock_receipt_items ...' end # verify the required parameter 'korona_account_id' is set if @api_client.config.client_side_validation && korona_account_id.nil? fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling StockReceiptsApi.update_stock_receipt_items" end # verify the required parameter 'stock_receipt_id' is set if @api_client.config.client_side_validation && stock_receipt_id.nil? fail ArgumentError, "Missing the required parameter 'stock_receipt_id' when calling StockReceiptsApi.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 StockReceiptsApi.update_stock_receipt_items" end # resource path local_var_path = '/accounts/{koronaAccountId}/stockReceipts/{stockReceiptId}/items'.sub('{' + 'koronaAccountId' + '}', korona_account_id.to_s).sub('{' + 'stockReceiptId' + '}', stock_receipt_id.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: StockReceiptsApi#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, body, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
updates the single stock-receipt
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 |
# File 'lib/korona_client/api/stock_receipts_api.rb', line 585 def update_stock_receipt_with_http_info(korona_account_id, stock_receipt_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: StockReceiptsApi.update_stock_receipt ...' end # verify the required parameter 'korona_account_id' is set if @api_client.config.client_side_validation && korona_account_id.nil? fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling StockReceiptsApi.update_stock_receipt" end # verify the required parameter 'stock_receipt_id' is set if @api_client.config.client_side_validation && stock_receipt_id.nil? fail ArgumentError, "Missing the required parameter 'stock_receipt_id' when calling StockReceiptsApi.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 StockReceiptsApi.update_stock_receipt" end # resource path local_var_path = '/accounts/{koronaAccountId}/stockReceipts/{stockReceiptId}'.sub('{' + 'koronaAccountId' + '}', korona_account_id.to_s).sub('{' + 'stockReceiptId' + '}', stock_receipt_id.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: StockReceiptsApi#update_stock_receipt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |