| Line 20... |
Line 20... |
| 20 |
print ''
|
20 |
print ''
|
| 21 |
print 'Usage: ' + sys.argv[0] + ' [-h host:port] [-u url] [-f[ramed]] function [arg1 [arg2...]]'
|
21 |
print 'Usage: ' + sys.argv[0] + ' [-h host:port] [-u url] [-f[ramed]] function [arg1 [arg2...]]'
|
| 22 |
print ''
|
22 |
print ''
|
| 23 |
print 'Functions:'
|
23 |
print 'Functions:'
|
| 24 |
print ' InventoryItem getInventoryItem(string serialNumber)'
|
24 |
print ' InventoryItem getInventoryItem(string serialNumber)'
|
| 25 |
print ' InventoryItem getNonSeralizedInventoryItem(string itemNumber, i64 itemId, i64 fulfilmentWarehouseId)'
|
25 |
print ' InventoryItem getNonSeralizedInventoryItem(string itemNumber, i64 itemId, i64 fulfilmentWarehouseId, i64 billingWarehouseId)'
|
| 26 |
print ' void scan(InventoryItem inventoryItem, ScanType type, i64 quantity, i64 billingWarehouseId, i64 transferLotId)'
|
26 |
print ' void scan(InventoryItem inventoryItem, ScanType type, i64 quantity, i64 billingWarehouseId, i64 transferLotId)'
|
| 27 |
print ' InventoryItem scanSerializedItemForOrder(string serialNumber, ScanType type, i64 orderId, i64 fulfilmentWarehouseId, double quantity, i64 billingWarehouseId)'
|
27 |
print ' InventoryItem scanSerializedItemForOrder(string serialNumber, ScanType type, i64 orderId, i64 fulfilmentWarehouseId, double quantity, i64 billingWarehouseId)'
|
| 28 |
print ' InventoryItem scanForOrder(InventoryItem inventoryItem, ScanType type, i64 quantity, i64 orderId, i64 fulfilmentWarehouseId, i64 billingWarehouseId)'
|
28 |
print ' InventoryItem scanForOrder(InventoryItem inventoryItem, ScanType type, i64 quantity, i64 orderId, i64 fulfilmentWarehouseId, i64 billingWarehouseId)'
|
| 29 |
print ' void createItemNumberMapping(string itemNumber, i64 itemId)'
|
29 |
print ' void createItemNumberMapping(string itemNumber, i64 itemId)'
|
| 30 |
print ' getItemNumbers(i64 itemId)'
|
30 |
print ' getItemNumbers(i64 itemId)'
|
| Line 36... |
Line 36... |
| 36 |
print ' fetchScansPerInvoiceNumber(i64 date)'
|
36 |
print ' fetchScansPerInvoiceNumber(i64 date)'
|
| 37 |
print ' InventoryItem getInventoryItemFromOrder(i64 orderId)'
|
37 |
print ' InventoryItem getInventoryItemFromOrder(i64 orderId)'
|
| 38 |
print ' getInventoryAge()'
|
38 |
print ' getInventoryAge()'
|
| 39 |
print ' getInventoryScansForItem(i64 itemId, i64 fromDate, i64 toDate)'
|
39 |
print ' getInventoryScansForItem(i64 itemId, i64 fromDate, i64 toDate)'
|
| 40 |
print ' getScanRecordsForSerialNumber(string serialNumber)'
|
40 |
print ' getScanRecordsForSerialNumber(string serialNumber)'
|
| 41 |
print ' void scanForPurchaseReturn( saleReturnItems, i64 vendorId)'
|
41 |
print ' void scanForPurchaseReturn( saleReturnItems, i64 vendorId, i64 billingWarehouseId)'
|
| 42 |
print ' void scanForLostItem( lostItems, i64 vendorId)'
|
42 |
print ' void scanForLostItem( lostItems, i64 vendorId, i64 billingWarehouseId)'
|
| 43 |
print ' getCurrentSerializedInventoryByScans(i64 physicalWarehouseId)'
|
43 |
print ' getCurrentSerializedInventoryByScans(i64 physicalWarehouseId)'
|
| 44 |
print ' getCurrentNonSerializedInventoryByScans(i64 physicalWarehouseId)'
|
44 |
print ' getCurrentNonSerializedInventoryByScans(i64 physicalWarehouseId)'
|
| 45 |
print ' getHistoricSerializedInventoryByScans(i64 date)'
|
45 |
print ' getHistoricSerializedInventoryByScans(i64 date)'
|
| 46 |
print ' getHistoricNonSerializedInventoryByScans(i64 date)'
|
46 |
print ' getHistoricNonSerializedInventoryByScans(i64 date)'
|
| 47 |
print ' InventoryItem scanForOursExternalSale(i64 itemId, string serialNumber, string itemNumber, string invoiceNumber, i64 warehouseId, double unitPrice, double nlc, i64 orderId)'
|
47 |
print ' InventoryItem scanForOursExternalSale(i64 itemId, string serialNumber, string itemNumber, string invoiceNumber, i64 warehouseId, double unitPrice, double nlc, i64 orderId)'
|
| Line 64... |
Line 64... |
| 64 |
print ' void scanForTransferOut( inventoryItems, ScanType type, i64 transferLotId)'
|
64 |
print ' void scanForTransferOut( inventoryItems, ScanType type, i64 transferLotId)'
|
| 65 |
print ' void scanForTransferIn( inventoryItems, ScanType type, i64 transferLotId)'
|
65 |
print ' void scanForTransferIn( inventoryItems, ScanType type, i64 transferLotId)'
|
| 66 |
print ' void scanForOursThirdPartyReceive( inventoryItems, i64 id)'
|
66 |
print ' void scanForOursThirdPartyReceive( inventoryItems, i64 id)'
|
| 67 |
print ' i64 getCurrentQuantityForNonSerializedInTransitItemInPhysicalWarehouse(i64 itemId, i64 physicalWarehouseId)'
|
67 |
print ' i64 getCurrentQuantityForNonSerializedInTransitItemInPhysicalWarehouse(i64 itemId, i64 physicalWarehouseId)'
|
| 68 |
print ' getInTransitInventory(i64 originWarehouseId)'
|
68 |
print ' getInTransitInventory(i64 originWarehouseId)'
|
| - |
|
69 |
print ' bool isItemAvailableForSale(i64 itemId, string serialNumber, i64 warehouseId)'
|
| - |
|
70 |
print ' getHistoricBadInventoryByScans(i64 date)'
|
| - |
|
71 |
print ' InventoryItem scanForBadSale(string serialNumber, string itemNumber, i64 itemId, i64 orderId, i64 fulfilmentWarehouseId, i64 quantity, i64 billingWarehouseId)'
|
| - |
|
72 |
print ' getTransferLotItemsForMarkReceive(i64 transferLotId, ScanType scanType)'
|
| - |
|
73 |
print ' void markItemsAsReceivedForTransferLotPartial( inventoryItems, i64 transferLotId)'
|
| - |
|
74 |
print ' void markTransferLotAsReceivedPartial(i64 id, string remoteTransferRefNumber)'
|
| 69 |
print ''
|
75 |
print ''
|
| 70 |
sys.exit(0)
|
76 |
sys.exit(0)
|
| 71 |
|
77 |
|
| 72 |
pp = pprint.PrettyPrinter(indent = 2)
|
78 |
pp = pprint.PrettyPrinter(indent = 2)
|
| 73 |
host = 'localhost'
|
79 |
host = 'localhost'
|
| Line 121... |
Line 127... |
| 121 |
print 'getInventoryItem requires 1 args'
|
127 |
print 'getInventoryItem requires 1 args'
|
| 122 |
sys.exit(1)
|
128 |
sys.exit(1)
|
| 123 |
pp.pprint(client.getInventoryItem(args[0],))
|
129 |
pp.pprint(client.getInventoryItem(args[0],))
|
| 124 |
|
130 |
|
| 125 |
elif cmd == 'getNonSeralizedInventoryItem':
|
131 |
elif cmd == 'getNonSeralizedInventoryItem':
|
| 126 |
if len(args) != 3:
|
132 |
if len(args) != 4:
|
| 127 |
print 'getNonSeralizedInventoryItem requires 3 args'
|
133 |
print 'getNonSeralizedInventoryItem requires 4 args'
|
| 128 |
sys.exit(1)
|
134 |
sys.exit(1)
|
| 129 |
pp.pprint(client.getNonSeralizedInventoryItem(args[0],eval(args[1]),eval(args[2]),))
|
135 |
pp.pprint(client.getNonSeralizedInventoryItem(args[0],eval(args[1]),eval(args[2]),eval(args[3]),))
|
| 130 |
|
136 |
|
| 131 |
elif cmd == 'scan':
|
137 |
elif cmd == 'scan':
|
| 132 |
if len(args) != 5:
|
138 |
if len(args) != 5:
|
| 133 |
print 'scan requires 5 args'
|
139 |
print 'scan requires 5 args'
|
| 134 |
sys.exit(1)
|
140 |
sys.exit(1)
|
| Line 217... |
Line 223... |
| 217 |
print 'getScanRecordsForSerialNumber requires 1 args'
|
223 |
print 'getScanRecordsForSerialNumber requires 1 args'
|
| 218 |
sys.exit(1)
|
224 |
sys.exit(1)
|
| 219 |
pp.pprint(client.getScanRecordsForSerialNumber(args[0],))
|
225 |
pp.pprint(client.getScanRecordsForSerialNumber(args[0],))
|
| 220 |
|
226 |
|
| 221 |
elif cmd == 'scanForPurchaseReturn':
|
227 |
elif cmd == 'scanForPurchaseReturn':
|
| 222 |
if len(args) != 2:
|
228 |
if len(args) != 3:
|
| 223 |
print 'scanForPurchaseReturn requires 2 args'
|
229 |
print 'scanForPurchaseReturn requires 3 args'
|
| 224 |
sys.exit(1)
|
230 |
sys.exit(1)
|
| 225 |
pp.pprint(client.scanForPurchaseReturn(eval(args[0]),eval(args[1]),))
|
231 |
pp.pprint(client.scanForPurchaseReturn(eval(args[0]),eval(args[1]),eval(args[2]),))
|
| 226 |
|
232 |
|
| 227 |
elif cmd == 'scanForLostItem':
|
233 |
elif cmd == 'scanForLostItem':
|
| 228 |
if len(args) != 2:
|
234 |
if len(args) != 3:
|
| 229 |
print 'scanForLostItem requires 2 args'
|
235 |
print 'scanForLostItem requires 3 args'
|
| 230 |
sys.exit(1)
|
236 |
sys.exit(1)
|
| 231 |
pp.pprint(client.scanForLostItem(eval(args[0]),eval(args[1]),))
|
237 |
pp.pprint(client.scanForLostItem(eval(args[0]),eval(args[1]),eval(args[2]),))
|
| 232 |
|
238 |
|
| 233 |
elif cmd == 'getCurrentSerializedInventoryByScans':
|
239 |
elif cmd == 'getCurrentSerializedInventoryByScans':
|
| 234 |
if len(args) != 1:
|
240 |
if len(args) != 1:
|
| 235 |
print 'getCurrentSerializedInventoryByScans requires 1 args'
|
241 |
print 'getCurrentSerializedInventoryByScans requires 1 args'
|
| 236 |
sys.exit(1)
|
242 |
sys.exit(1)
|
| Line 384... |
Line 390... |
| 384 |
if len(args) != 1:
|
390 |
if len(args) != 1:
|
| 385 |
print 'getInTransitInventory requires 1 args'
|
391 |
print 'getInTransitInventory requires 1 args'
|
| 386 |
sys.exit(1)
|
392 |
sys.exit(1)
|
| 387 |
pp.pprint(client.getInTransitInventory(eval(args[0]),))
|
393 |
pp.pprint(client.getInTransitInventory(eval(args[0]),))
|
| 388 |
|
394 |
|
| - |
|
395 |
elif cmd == 'isItemAvailableForSale':
|
| - |
|
396 |
if len(args) != 3:
|
| - |
|
397 |
print 'isItemAvailableForSale requires 3 args'
|
| - |
|
398 |
sys.exit(1)
|
| - |
|
399 |
pp.pprint(client.isItemAvailableForSale(eval(args[0]),args[1],eval(args[2]),))
|
| - |
|
400 |
|
| - |
|
401 |
elif cmd == 'getHistoricBadInventoryByScans':
|
| - |
|
402 |
if len(args) != 1:
|
| - |
|
403 |
print 'getHistoricBadInventoryByScans requires 1 args'
|
| - |
|
404 |
sys.exit(1)
|
| - |
|
405 |
pp.pprint(client.getHistoricBadInventoryByScans(eval(args[0]),))
|
| - |
|
406 |
|
| - |
|
407 |
elif cmd == 'scanForBadSale':
|
| - |
|
408 |
if len(args) != 7:
|
| - |
|
409 |
print 'scanForBadSale requires 7 args'
|
| - |
|
410 |
sys.exit(1)
|
| - |
|
411 |
pp.pprint(client.scanForBadSale(args[0],args[1],eval(args[2]),eval(args[3]),eval(args[4]),eval(args[5]),eval(args[6]),))
|
| - |
|
412 |
|
| - |
|
413 |
elif cmd == 'getTransferLotItemsForMarkReceive':
|
| - |
|
414 |
if len(args) != 2:
|
| - |
|
415 |
print 'getTransferLotItemsForMarkReceive requires 2 args'
|
| - |
|
416 |
sys.exit(1)
|
| - |
|
417 |
pp.pprint(client.getTransferLotItemsForMarkReceive(eval(args[0]),eval(args[1]),))
|
| - |
|
418 |
|
| - |
|
419 |
elif cmd == 'markItemsAsReceivedForTransferLotPartial':
|
| - |
|
420 |
if len(args) != 2:
|
| - |
|
421 |
print 'markItemsAsReceivedForTransferLotPartial requires 2 args'
|
| - |
|
422 |
sys.exit(1)
|
| - |
|
423 |
pp.pprint(client.markItemsAsReceivedForTransferLotPartial(eval(args[0]),eval(args[1]),))
|
| - |
|
424 |
|
| - |
|
425 |
elif cmd == 'markTransferLotAsReceivedPartial':
|
| - |
|
426 |
if len(args) != 2:
|
| - |
|
427 |
print 'markTransferLotAsReceivedPartial requires 2 args'
|
| - |
|
428 |
sys.exit(1)
|
| - |
|
429 |
pp.pprint(client.markTransferLotAsReceivedPartial(eval(args[0]),args[1],))
|
| - |
|
430 |
|
| 389 |
else:
|
431 |
else:
|
| 390 |
print 'Unrecognized method %s' % cmd
|
432 |
print 'Unrecognized method %s' % cmd
|
| 391 |
sys.exit(1)
|
433 |
sys.exit(1)
|
| 392 |
|
434 |
|
| 393 |
transport.close()
|
435 |
transport.close()
|