Subversion Repositories SmartDukaan

Rev

Rev 8746 | Rev 9155 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8746 Rev 8754
Line 1... Line 1...
1
'''
1
'''
2
Created on 23-Mar-2010
2
Created on 23-Mar-2010
3
 
3
 
4
@author: ashish
4
@author: ashish
5
'''
5
'''
6
from shop2020.model.v1.catalog.impl.DataService import Insurer
6
from shop2020.model.v1.catalog.impl.DataService import Insurer, SnapdealItem, Item
7
from shop2020.thriftpy.model.v1.catalog.ttypes import Item, Category, \
7
from shop2020.thriftpy.model.v1.catalog.ttypes import Item, Category, \
8
    SourceItemPricing, Source, ItemType, \
8
    SourceItemPricing, Source, ItemType, \
9
    ProductNotificationRequest as TProductNotificationRequest, \
9
    ProductNotificationRequest as TProductNotificationRequest, \
10
    ProductNotificationRequestCount as TProductNotificationRequestCount, \
10
    ProductNotificationRequestCount as TProductNotificationRequestCount, \
11
    VoucherItemMapping, EntityTag as TEntityTag, Banner as TBanner, BannerMap as TBannerMap, \
11
    VoucherItemMapping, EntityTag as TEntityTag, Banner as TBanner, BannerMap as TBannerMap, \
Line 231... Line 231...
231
    t_brand_info.name = brand_info.name
231
    t_brand_info.name = brand_info.name
232
    t_brand_info.serviceCenterLocatorUrl = brand_info.serviceCenterLocatorUrl
232
    t_brand_info.serviceCenterLocatorUrl = brand_info.serviceCenterLocatorUrl
233
    return t_brand_info
233
    return t_brand_info
234
 
234
 
235
def to_t_snapdeal_item(snapdealitem):
235
def to_t_snapdeal_item(snapdealitem):
236
    if len(snapdealitem)==0:
236
    if snapdealitem is None:
237
        t_snapdeal_item = TSnapdealItem()
237
        t_snapdeal_item = TSnapdealItem()
238
        return t_snapdeal_item
238
        return t_snapdeal_item
239
    t_snapdeal_item = TSnapdealItem()
239
    t_snapdeal_item = TSnapdealItem()
240
    t_snapdeal_item.item_id = snapdealitem[0].item_id  
240
    t_snapdeal_item.item_id = snapdealitem[0].item_id
241
    t_snapdeal_item.warehouseId = snapdealitem[0].warehouseId
241
    t_snapdeal_item.warehouseId = snapdealitem[0].warehouseId
242
    t_snapdeal_item.exceptionPrice = snapdealitem[0].exceptionPrice
242
    t_snapdeal_item.exceptionPrice = snapdealitem[0].exceptionPrice
243
    t_snapdeal_item.isListedOnSnapdeal = snapdealitem[1]
243
    t_snapdeal_item.isListedOnSnapdeal = snapdealitem[1].isListedOnSnapdeal
244
    return t_snapdeal_item
244
    return t_snapdeal_item
245
245