| Line 39... |
Line 39... |
| 39 |
update_insurance_declared_amount, get_freebie_for_item, \
|
39 |
update_insurance_declared_amount, get_freebie_for_item, \
|
| 40 |
add_or_update_freebie_for_item, get_all_amazon_listed_items, get_store_pricing, \
|
40 |
add_or_update_freebie_for_item, get_all_amazon_listed_items, get_store_pricing, \
|
| 41 |
update_store_pricing, get_amazon_item_details, update_amazon_item_details, \
|
41 |
update_store_pricing, get_amazon_item_details, update_amazon_item_details, \
|
| 42 |
add_amazon_item, get_asin_items, get_all_fba_listed_items, \
|
42 |
add_amazon_item, get_asin_items, get_all_fba_listed_items, \
|
| 43 |
get_all_nonfba_listed_items, add_or_update_brand_info, get_brand_info, \
|
43 |
get_all_nonfba_listed_items, add_or_update_brand_info, get_brand_info, \
|
| 44 |
get_items_status, update_item_inventory
|
44 |
get_items_status, update_item_inventory, update_timestamp_for_amazon_feeds
|
| 45 |
from shop2020.thriftpy.model.v1.catalog.ttypes import status
|
45 |
from shop2020.thriftpy.model.v1.catalog.ttypes import status
|
| 46 |
from shop2020.utils.Utils import log_entry, to_py_date
|
46 |
from shop2020.utils.Utils import log_entry, to_py_date
|
| 47 |
import datetime
|
47 |
import datetime
|
| 48 |
|
48 |
|
| 49 |
class CatalogServiceHandler:
|
49 |
class CatalogServiceHandler:
|
| Line 1140... |
Line 1140... |
| 1140 |
update_item_inventory(itemId,holdInventory,defaultInventory)
|
1140 |
update_item_inventory(itemId,holdInventory,defaultInventory)
|
| 1141 |
return True
|
1141 |
return True
|
| 1142 |
finally:
|
1142 |
finally:
|
| 1143 |
close_session()
|
1143 |
close_session()
|
| 1144 |
|
1144 |
|
| - |
|
1145 |
def updateTimestampForAmazonFeeds(self,feedType,skuList,timestamp):
|
| - |
|
1146 |
try:
|
| - |
|
1147 |
return update_timestamp_for_amazon_feeds(feedType,skuList,timestamp)
|
| - |
|
1148 |
finally:
|
| - |
|
1149 |
close_session()
|
| - |
|
1150 |
|
| 1145 |
def is_valid(item):
|
1151 |
def is_valid(item):
|
| 1146 |
if item.status in [status.ACTIVE, status.PAUSED, status.PAUSED_BY_RISK]:
|
1152 |
if item.status in [status.ACTIVE, status.PAUSED, status.PAUSED_BY_RISK]:
|
| 1147 |
if item.startDate:
|
1153 |
if item.startDate:
|
| 1148 |
return not(datetime.datetime.now() < item.startDate or item.sellingPrice == 0)
|
1154 |
return not(datetime.datetime.now() < item.startDate or item.sellingPrice == 0)
|
| 1149 |
else:
|
1155 |
else:
|