| Line 7... |
Line 7... |
| 7 |
from shop2020.model.v1.order.impl import DataService, RedExpressUpdateService,\
|
7 |
from shop2020.model.v1.order.impl import DataService, RedExpressUpdateService,\
|
| 8 |
RechargeService
|
8 |
RechargeService
|
| 9 |
from shop2020.model.v1.order.impl.Convertors import to_t_transaction, to_t_alert, \
|
9 |
from shop2020.model.v1.order.impl.Convertors import to_t_transaction, to_t_alert, \
|
| 10 |
to_t_order, to_t_lineitem, to_t_payment_settlement, to_t_verification_agent, \
|
10 |
to_t_order, to_t_lineitem, to_t_payment_settlement, to_t_verification_agent, \
|
| 11 |
to_t_attribute, to_t_rechargeTransaction, to_t_frc, to_t_hotspot, to_t_sourcedetail, \
|
11 |
to_t_attribute, to_t_rechargeTransaction, to_t_frc, to_t_hotspot, to_t_sourcedetail, \
|
| 12 |
to_t_amazonorder
|
12 |
to_t_amazonorder, to_t_storeOrderDetail
|
| 13 |
from shop2020.model.v1.order.impl.DataAccessors import create_transaction, \
|
13 |
from shop2020.model.v1.order.impl.DataAccessors import create_transaction, \
|
| 14 |
get_transactions_for_customer, get_transaction_status, get_line_items_for_order, \
|
14 |
get_transactions_for_customer, get_transaction_status, get_line_items_for_order, \
|
| 15 |
get_transaction, get_transactions_for_shopping_cart_id, \
|
15 |
get_transaction, get_transactions_for_shopping_cart_id, \
|
| 16 |
change_transaction_status, get_orders_for_customer, get_orders_for_transaction, \
|
16 |
change_transaction_status, get_orders_for_customer, get_orders_for_transaction, \
|
| 17 |
get_order, get_returnable_orders_for_customer, \
|
17 |
get_order, get_returnable_orders_for_customer, \
|
| Line 72... |
Line 72... |
| 72 |
get_recharge_trans, split_freebie_order, get_recharge_transactions_by_number, \
|
72 |
get_recharge_trans, split_freebie_order, get_recharge_transactions_by_number, \
|
| 73 |
update_hotspot_store_password, get_source_detail, get_all_circles, delete_frcs,\
|
73 |
update_hotspot_store_password, get_source_detail, get_all_circles, delete_frcs,\
|
| 74 |
topup_company_wallet, get_wallet_balance_for_company, \
|
74 |
topup_company_wallet, get_wallet_balance_for_company, \
|
| 75 |
add_amazon_order, update_amazon_order_status,get_amazon_order, get_amazon_orders_shipped, \
|
75 |
add_amazon_order, update_amazon_order_status,get_amazon_order, get_amazon_orders_shipped, \
|
| 76 |
get_amazon_orders_cancelled, get_orders_for_store, get_store_order_advance_invoice, add_frc, \
|
76 |
get_amazon_orders_cancelled, get_orders_for_store, get_store_order_advance_invoice, add_frc, \
|
| 77 |
add_series
|
77 |
add_series, get_store_order_detail, save_store_order_detail, get_all_edc_banks
|
| 78 |
|
78 |
|
| 79 |
from shop2020.model.v1.order.impl.model.DTHRechargeOrder import DTHRechargeOrder
|
79 |
from shop2020.model.v1.order.impl.model.DTHRechargeOrder import DTHRechargeOrder
|
| 80 |
from shop2020.model.v1.order.impl.model.DigitalTransaction import \
|
80 |
from shop2020.model.v1.order.impl.model.DigitalTransaction import \
|
| 81 |
DigitalTransaction
|
81 |
DigitalTransaction
|
| 82 |
from shop2020.model.v1.order.impl.model.MobileRechargeOrder import \
|
82 |
from shop2020.model.v1.order.impl.model.MobileRechargeOrder import \
|
| Line 2068... |
Line 2068... |
| 2068 |
try:
|
2068 |
try:
|
| 2069 |
return [to_t_order(order) for order in get_orders_for_store(id, storeId, to_py_date(startDate), to_py_date(endDate), statuses)]
|
2069 |
return [to_t_order(order) for order in get_orders_for_store(id, storeId, to_py_date(startDate), to_py_date(endDate), statuses)]
|
| 2070 |
finally:
|
2070 |
finally:
|
| 2071 |
self.closeSession()
|
2071 |
self.closeSession()
|
| 2072 |
|
2072 |
|
| 2073 |
def getStoreOrderAdvanceInvoice(self, orderId):
|
2073 |
def getStoreOrderAdvanceInvoice(self, orderId, storeId):
|
| 2074 |
try:
|
2074 |
try:
|
| 2075 |
return get_store_order_advance_invoice(orderId)
|
2075 |
return get_store_order_advance_invoice(orderId, storeId)
|
| 2076 |
finally:
|
2076 |
finally:
|
| 2077 |
self.closeSession()
|
2077 |
self.closeSession()
|
| 2078 |
|
2078 |
|
| 2079 |
def getSaholicRechargeBalance(self):
|
2079 |
def getSaholicRechargeBalance(self):
|
| 2080 |
try:
|
2080 |
try:
|
| Line 2096... |
Line 2096... |
| 2096 |
except:
|
2096 |
except:
|
| 2097 |
return "Error Occured. Try Again."
|
2097 |
return "Error Occured. Try Again."
|
| 2098 |
finally:
|
2098 |
finally:
|
| 2099 |
self.closeSession()
|
2099 |
self.closeSession()
|
| 2100 |
|
2100 |
|
| - |
|
2101 |
def saveStoreOrderDetail(self, storeOrderDetail):
|
| - |
|
2102 |
try:
|
| - |
|
2103 |
return save_store_order_detail(storeOrderDetail)
|
| - |
|
2104 |
except:
|
| - |
|
2105 |
return False
|
| - |
|
2106 |
finally:
|
| - |
|
2107 |
self.closeSession()
|
| - |
|
2108 |
|
| - |
|
2109 |
|
| - |
|
2110 |
def getStoreOrderDetail(self, orderId, storeId):
|
| - |
|
2111 |
try:
|
| - |
|
2112 |
return to_t_storeOrderDetail(get_store_order_detail(orderId, storeId))
|
| - |
|
2113 |
finally:
|
| - |
|
2114 |
self.closeSession()
|
| - |
|
2115 |
|
| - |
|
2116 |
def getAllEdcBanks(self):
|
| - |
|
2117 |
try:
|
| - |
|
2118 |
return get_all_edc_banks()
|
| - |
|
2119 |
finally:
|
| - |
|
2120 |
self.closeSession()
|
| - |
|
2121 |
|
| 2101 |
def closeSession(self, ):
|
2122 |
def closeSession(self, ):
|
| 2102 |
close_session()
|
2123 |
close_session()
|
| 2103 |
|
2124 |
|
| 2104 |
def isAlive(self, ):
|
2125 |
def isAlive(self, ):
|
| 2105 |
"""
|
2126 |
"""
|