| 2850 |
chandransh |
1 |
'''
|
|
|
2 |
Created on 08-Aug-2011
|
|
|
3 |
|
|
|
4 |
@author: Chandranshu
|
|
|
5 |
'''
|
| 5944 |
mandeep.dh |
6 |
from shop2020.clients.CatalogClient import CatalogClient
|
|
|
7 |
from shop2020.clients.InventoryClient import InventoryClient
|
|
|
8 |
from shop2020.clients.LogisticsClient import LogisticsClient
|
|
|
9 |
from shop2020.clients.PurchaseClient import PurchaseClient
|
| 2850 |
chandransh |
10 |
from shop2020.clients.TransactionClient import TransactionClient
|
| 5944 |
mandeep.dh |
11 |
from shop2020.clients.WarehouseClient import WarehouseClient
|
|
|
12 |
from shop2020.thriftpy.logistics.ttypes import DeliveryType
|
|
|
13 |
from shop2020.thriftpy.model.v1.inventory.ttypes import BillingType, \
|
|
|
14 |
InventoryType, WarehouseType
|
|
|
15 |
from shop2020.thriftpy.purchase.ttypes import Invoice
|
|
|
16 |
from shop2020.thriftpy.warehouse.ttypes import ScanType
|
|
|
17 |
from twisted.test.test_factories import In
|
|
|
18 |
inventoryClient = InventoryClient().get_client()
|
|
|
19 |
availability = {}
|
|
|
20 |
availability['auto kit|hip street|hs-ipautokit|na'] = 3
|
|
|
21 |
availability['battery|blackberry|c-s2|na'] = 30
|
|
|
22 |
inventoryClient.updateInventory(1, '20120907-456', availability)
|
|
|
23 |
#catalogClient.addInventory(5, 20, 0)
|
|
|
24 |
#print catalogClient.getItemPricing(5, -1)
|
|
|
25 |
#print catalogClient.getItemAvailabilityAtLocation(0, 5)
|
|
|
26 |
#logisticsClient = LogisticsClient().get_client()
|
|
|
27 |
#print logisticsClient.getLogisticsEstimation(5, '110001', DeliveryType.COD)
|
|
|
28 |
#transactionClient = TransactionClient().get_client()
|
|
|
29 |
#transactionClient.markOrdersAsShippedFromWarehouse(7, 1, 1, [1])
|
|
|
30 |
#transactionClient.acceptOrderForItem(itemId, quantity, fulfilmentWarehouseId, billingWarehouseId)
|
|
|
31 |
#transactionClient.acceptOrder(143155)
|
|
|
32 |
#transactionClient.receiveReturn(76, 0)
|
|
|
33 |
#transactionClient.shiftToWarehouse(1, 8)
|
|
|
34 |
#print catalogClient.getShippingLocations()
|
|
|
35 |
#warehouseClient = WarehouseClient().get_client()p
|
|
|
36 |
#print warehouseClient.getInventoryItemsFromLastScanType(ScanType.DOA_OUT)
|
|
|
37 |
#purchaseClient = PurchaseClient().get_client()
|
|
|
38 |
#invoice = Invoice()
|
|
|
39 |
#invoice.invoiceNumber = 'T-344'
|
|
|
40 |
#invoice.date = 12345
|
|
|
41 |
#invoice.supplierId = 3
|
|
|
42 |
#purchaseClient.createInvoice(invoice)
|