| Line 5... |
Line 5... |
| 5 |
'''
|
5 |
'''
|
| 6 |
from shop2020.thriftpy.model.v1.inventory.ttypes import ItemInventory, \
|
6 |
from shop2020.thriftpy.model.v1.inventory.ttypes import ItemInventory, \
|
| 7 |
Warehouse, VendorItemPricing, Vendor, VendorItemMapping, \
|
7 |
Warehouse, VendorItemPricing, Vendor, VendorItemMapping, \
|
| 8 |
InventoryType, WarehouseType, IgnoredInventoryUpdateItems as TIgnoredinventoryupdateitems ,\
|
8 |
InventoryType, WarehouseType, IgnoredInventoryUpdateItems as TIgnoredinventoryupdateitems ,\
|
| 9 |
ItemStockPurchaseParams, OOSStatus, AmazonInventorySnapshot as TAmazonInventorySnapshot,\
|
9 |
ItemStockPurchaseParams, OOSStatus, AmazonInventorySnapshot as TAmazonInventorySnapshot,\
|
| 10 |
WarehouseLocation,AmazonFbaInventorySnapshot as TAmazonFbaInventorySnapshot
|
10 |
WarehouseLocation,AmazonFbaInventorySnapshot as TAmazonFbaInventorySnapshot,\
|
| - |
|
11 |
SnapdealInventoryItem as TSnapdealInventoryItem
|
| 11 |
from shop2020.utils.Utils import to_java_date
|
12 |
from shop2020.utils.Utils import to_java_date
|
| 12 |
|
13 |
|
| 13 |
def to_t_item_inventory(item_inventory_list, item_id):
|
14 |
def to_t_item_inventory(item_inventory_list, item_id):
|
| 14 |
t_item_inventory = ItemInventory()
|
15 |
t_item_inventory = ItemInventory()
|
| 15 |
t_item_inventory.id = item_id
|
16 |
t_item_inventory.id = item_id
|
| Line 104... |
Line 105... |
| 104 |
|
105 |
|
| 105 |
def to_t_amazon_fba_inventory_snapshot(AmazonFbaInventorySnapshot):
|
106 |
def to_t_amazon_fba_inventory_snapshot(AmazonFbaInventorySnapshot):
|
| 106 |
t_amazon_inventory_snapshot = TAmazonFbaInventorySnapshot()
|
107 |
t_amazon_inventory_snapshot = TAmazonFbaInventorySnapshot()
|
| 107 |
t_amazon_inventory_snapshot.item_id = AmazonFbaInventorySnapshot.item_id
|
108 |
t_amazon_inventory_snapshot.item_id = AmazonFbaInventorySnapshot.item_id
|
| 108 |
t_amazon_inventory_snapshot.availability = AmazonFbaInventorySnapshot.availability
|
109 |
t_amazon_inventory_snapshot.availability = AmazonFbaInventorySnapshot.availability
|
| 109 |
return t_amazon_inventory_snapshot
|
- |
|
| 110 |
|
110 |
return t_amazon_inventory_snapshot
|
| - |
|
111 |
|
| - |
|
112 |
def to_t_snapdeal_inventory_snapshot(snapdealInventoryItem):
|
| - |
|
113 |
t_snapdeal_inventory_snapshot = TSnapdealInventoryItem()
|
| - |
|
114 |
if snapdealInventoryItem is None:
|
| - |
|
115 |
return t_snapdeal_inventory_snapshot
|
| - |
|
116 |
t_snapdeal_inventory_snapshot.item_id = snapdealInventoryItem.item_id
|
| - |
|
117 |
t_snapdeal_inventory_snapshot.availability = snapdealInventoryItem.availability
|
| - |
|
118 |
t_snapdeal_inventory_snapshot.lastUpdatedOnSnapdeal = to_java_date(snapdealInventoryItem.lastUpdatedOnSnapdeal)
|
| - |
|
119 |
return t_snapdeal_inventory_snapshot
|
| - |
|
120 |
|
| 111 |
|
121 |
|