dear-inventory-ruby 0.2.3 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1222,6 +1222,72 @@ module DearInventoryRuby
1222
1222
  return data, status_code, headers
1223
1223
  end
1224
1224
 
1225
+ # Allows you to retrieve the Sale
1226
+ # @param [Hash] opts the optional parameters
1227
+ # @option opts [String] :id Default is nil
1228
+ # @option opts [Boolean] :combine_additional_charges Show additional charges in 'Lines' array (default to false)
1229
+ # @option opts [Boolean] :hide_inventory_movements Hide inventory movements (Default = false) (default to false)
1230
+ # @option opts [Boolean] :include_transactions Show related transactions (Default = false) (default to false)
1231
+ # @return [Sale]
1232
+ def get_sale(opts = {})
1233
+ data, _status_code, _headers = get_sale_with_http_info(opts)
1234
+ data
1235
+ end
1236
+
1237
+ # Allows you to retrieve the Sale
1238
+ # @param [Hash] opts the optional parameters
1239
+ # @option opts [String] :id Default is nil
1240
+ # @option opts [Boolean] :combine_additional_charges Show additional charges in 'Lines' array
1241
+ # @option opts [Boolean] :hide_inventory_movements Hide inventory movements (Default = false)
1242
+ # @option opts [Boolean] :include_transactions Show related transactions (Default = false)
1243
+ # @return [Array<(Sale, Integer, Hash)>] Sale data, response status code and response headers
1244
+ def get_sale_with_http_info(opts = {})
1245
+ if @api_client.config.debugging
1246
+ @api_client.config.logger.debug 'Calling API: InventoryApi.get_sale ...'
1247
+ end
1248
+ # resource path
1249
+ local_var_path = '/sale'
1250
+
1251
+ # query parameters
1252
+ query_params = opts[:query_params] || {}
1253
+ query_params[:'ID'] = opts[:'id'] if !opts[:'id'].nil?
1254
+ query_params[:'CombineAdditionalCharges'] = opts[:'combine_additional_charges'] if !opts[:'combine_additional_charges'].nil?
1255
+ query_params[:'HideInventoryMovements'] = opts[:'hide_inventory_movements'] if !opts[:'hide_inventory_movements'].nil?
1256
+ query_params[:'IncludeTransactions'] = opts[:'include_transactions'] if !opts[:'include_transactions'].nil?
1257
+
1258
+ # header parameters
1259
+ header_params = opts[:header_params] || {}
1260
+ # HTTP header 'Accept' (if needed)
1261
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1262
+
1263
+ # form parameters
1264
+ form_params = opts[:form_params] || {}
1265
+
1266
+ # http body (model)
1267
+ post_body = opts[:body]
1268
+
1269
+ # return_type
1270
+ return_type = opts[:return_type] || 'Sale'
1271
+
1272
+ # auth_names
1273
+ auth_names = opts[:auth_names] || ['accountID', 'appKey']
1274
+
1275
+ new_options = opts.merge(
1276
+ :header_params => header_params,
1277
+ :query_params => query_params,
1278
+ :form_params => form_params,
1279
+ :body => post_body,
1280
+ :auth_names => auth_names,
1281
+ :return_type => return_type
1282
+ )
1283
+
1284
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1285
+ if @api_client.config.debugging
1286
+ @api_client.config.logger.debug "API called: InventoryApi#get_sale\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1287
+ end
1288
+ return data, status_code, headers
1289
+ end
1290
+
1225
1291
  # Allows you to retrieve the sale invoices
1226
1292
  # @param [Hash] opts the optional parameters
1227
1293
  # @option opts [String] :sale_id Unique DEAR Sale ID
@@ -1285,6 +1351,111 @@ module DearInventoryRuby
1285
1351
  return data, status_code, headers
1286
1352
  end
1287
1353
 
1354
+ # Allows you to retrieve the Sales based on conditions
1355
+ # @param [Hash] opts the optional parameters
1356
+ # @option opts [String] :page Default is 1 (default to '1')
1357
+ # @option opts [String] :limit Default is 100 (default to '100')
1358
+ # @option opts [String] :search Only return sales with search value contained in one of these fields: OrderNumber, Status, Customer, invoiceNumber, CustomerReference, CreditNoteNumber
1359
+ # @option opts [DateTime] :created_since Only return sales created after specified date. Date must follow ISO 8601 format.
1360
+ # @option opts [DateTime] :updated_since Only return sales changed after specified date. Date must follow ISO 8601 format.
1361
+ # @option opts [DateTime] :ship_by Only return sales with Ship By date on or before specified date, with not authorised Shipment. Date must follow ISO 8601 format.
1362
+ # @option opts [String] :quote_status Only return sales with specified quote status
1363
+ # @option opts [String] :order_status Only return sales with specified order status
1364
+ # @option opts [String] :combined_pick_status Only return sales with specified CombinedPickingStatus
1365
+ # @option opts [String] :combined_pack_status Only return sales with specified CombinedPackingStatus
1366
+ # @option opts [String] :combined_shipping_status Only return sales with specified CombinedShippingStatus
1367
+ # @option opts [String] :combined_invoice_status Only return sales with specified CombinedInvoiceStatus
1368
+ # @option opts [String] :credit_note_status Only return sales with specified credit note status
1369
+ # @option opts [String] :external_id Only return sales with specified External ID
1370
+ # @option opts [String] :status Default is nil
1371
+ # @option opts [Boolean] :ready_for_shipping Only return sales with &#39;Authorised&#39; pack and not &#39;Authorised&#39; shipping
1372
+ # @option opts [String] :order_location_id Only return sales with specified Order Location ID
1373
+ # @return [SaleList]
1374
+ def get_sale_list(opts = {})
1375
+ data, _status_code, _headers = get_sale_list_with_http_info(opts)
1376
+ data
1377
+ end
1378
+
1379
+ # Allows you to retrieve the Sales based on conditions
1380
+ # @param [Hash] opts the optional parameters
1381
+ # @option opts [String] :page Default is 1
1382
+ # @option opts [String] :limit Default is 100
1383
+ # @option opts [String] :search Only return sales with search value contained in one of these fields: OrderNumber, Status, Customer, invoiceNumber, CustomerReference, CreditNoteNumber
1384
+ # @option opts [DateTime] :created_since Only return sales created after specified date. Date must follow ISO 8601 format.
1385
+ # @option opts [DateTime] :updated_since Only return sales changed after specified date. Date must follow ISO 8601 format.
1386
+ # @option opts [DateTime] :ship_by Only return sales with Ship By date on or before specified date, with not authorised Shipment. Date must follow ISO 8601 format.
1387
+ # @option opts [String] :quote_status Only return sales with specified quote status
1388
+ # @option opts [String] :order_status Only return sales with specified order status
1389
+ # @option opts [String] :combined_pick_status Only return sales with specified CombinedPickingStatus
1390
+ # @option opts [String] :combined_pack_status Only return sales with specified CombinedPackingStatus
1391
+ # @option opts [String] :combined_shipping_status Only return sales with specified CombinedShippingStatus
1392
+ # @option opts [String] :combined_invoice_status Only return sales with specified CombinedInvoiceStatus
1393
+ # @option opts [String] :credit_note_status Only return sales with specified credit note status
1394
+ # @option opts [String] :external_id Only return sales with specified External ID
1395
+ # @option opts [String] :status Default is nil
1396
+ # @option opts [Boolean] :ready_for_shipping Only return sales with &#39;Authorised&#39; pack and not &#39;Authorised&#39; shipping
1397
+ # @option opts [String] :order_location_id Only return sales with specified Order Location ID
1398
+ # @return [Array<(SaleList, Integer, Hash)>] SaleList data, response status code and response headers
1399
+ def get_sale_list_with_http_info(opts = {})
1400
+ if @api_client.config.debugging
1401
+ @api_client.config.logger.debug 'Calling API: InventoryApi.get_sale_list ...'
1402
+ end
1403
+ # resource path
1404
+ local_var_path = '/saleList'
1405
+
1406
+ # query parameters
1407
+ query_params = opts[:query_params] || {}
1408
+ query_params[:'Page'] = opts[:'page'] if !opts[:'page'].nil?
1409
+ query_params[:'Limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1410
+ query_params[:'Search'] = opts[:'search'] if !opts[:'search'].nil?
1411
+ query_params[:'CreatedSince'] = opts[:'created_since'] if !opts[:'created_since'].nil?
1412
+ query_params[:'UpdatedSince'] = opts[:'updated_since'] if !opts[:'updated_since'].nil?
1413
+ query_params[:'ShipBy'] = opts[:'ship_by'] if !opts[:'ship_by'].nil?
1414
+ query_params[:'QuoteStatus'] = opts[:'quote_status'] if !opts[:'quote_status'].nil?
1415
+ query_params[:'OrderStatus'] = opts[:'order_status'] if !opts[:'order_status'].nil?
1416
+ query_params[:'CombinedPickStatus'] = opts[:'combined_pick_status'] if !opts[:'combined_pick_status'].nil?
1417
+ query_params[:'CombinedPackStatus'] = opts[:'combined_pack_status'] if !opts[:'combined_pack_status'].nil?
1418
+ query_params[:'CombinedShippingStatus'] = opts[:'combined_shipping_status'] if !opts[:'combined_shipping_status'].nil?
1419
+ query_params[:'CombinedInvoiceStatus'] = opts[:'combined_invoice_status'] if !opts[:'combined_invoice_status'].nil?
1420
+ query_params[:'CreditNoteStatus'] = opts[:'credit_note_status'] if !opts[:'credit_note_status'].nil?
1421
+ query_params[:'ExternalID'] = opts[:'external_id'] if !opts[:'external_id'].nil?
1422
+ query_params[:'Status'] = opts[:'status'] if !opts[:'status'].nil?
1423
+ query_params[:'ReadyForShipping'] = opts[:'ready_for_shipping'] if !opts[:'ready_for_shipping'].nil?
1424
+ query_params[:'OrderLocationID'] = opts[:'order_location_id'] if !opts[:'order_location_id'].nil?
1425
+
1426
+ # header parameters
1427
+ header_params = opts[:header_params] || {}
1428
+ # HTTP header 'Accept' (if needed)
1429
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1430
+
1431
+ # form parameters
1432
+ form_params = opts[:form_params] || {}
1433
+
1434
+ # http body (model)
1435
+ post_body = opts[:body]
1436
+
1437
+ # return_type
1438
+ return_type = opts[:return_type] || 'SaleList'
1439
+
1440
+ # auth_names
1441
+ auth_names = opts[:auth_names] || ['accountID', 'appKey']
1442
+
1443
+ new_options = opts.merge(
1444
+ :header_params => header_params,
1445
+ :query_params => query_params,
1446
+ :form_params => form_params,
1447
+ :body => post_body,
1448
+ :auth_names => auth_names,
1449
+ :return_type => return_type
1450
+ )
1451
+
1452
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1453
+ if @api_client.config.debugging
1454
+ @api_client.config.logger.debug "API called: InventoryApi#get_sale_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1455
+ end
1456
+ return data, status_code, headers
1457
+ end
1458
+
1288
1459
  # Allows you to retrieve the Sale Order
1289
1460
  # @param [Hash] opts the optional parameters
1290
1461
  # @option opts [String] :sale_id Unique DEAR Sale ID