| Line 5... |
Line 5... |
| 5 |
'''
|
5 |
'''
|
| 6 |
|
6 |
|
| 7 |
from shop2020.thriftpy.model.v1.order.ttypes import Transaction as T_Transaction,\
|
7 |
from shop2020.thriftpy.model.v1.order.ttypes import Transaction as T_Transaction,\
|
| 8 |
LineItem as T_LineItem, Order as T_Order, Alert as T_Alert, OrderStatus, DelayReason, \
|
8 |
LineItem as T_LineItem, Order as T_Order, Alert as T_Alert, OrderStatus, DelayReason, \
|
| 9 |
PaymentSettlement as T_PaymentSettlement, CODVerificationAgent as T_CODVerificationAgent, \
|
9 |
PaymentSettlement as T_PaymentSettlement, CODVerificationAgent as T_CODVerificationAgent, \
|
| 10 |
Attribute as T_Attribute
|
10 |
Attribute as T_Attribute, EmiScheme as T_EmiScheme
|
| 11 |
from shop2020.utils.Utils import to_java_date
|
11 |
from shop2020.utils.Utils import to_java_date
|
| 12 |
from shop2020.model.v1.order.impl.DataService import Alert, Transaction
|
12 |
from shop2020.model.v1.order.impl.DataService import Alert, Transaction
|
| 13 |
|
13 |
|
| 14 |
def to_t_transaction(transaction):
|
14 |
def to_t_transaction(transaction):
|
| 15 |
t_transaction = T_Transaction()
|
15 |
t_transaction = T_Transaction()
|
| Line 163... |
Line 163... |
| 163 |
t_verification_agent.orderId = codVerificationAgent.orderId
|
163 |
t_verification_agent.orderId = codVerificationAgent.orderId
|
| 164 |
t_verification_agent.agentEmailId = codVerificationAgent.verificationAgent
|
164 |
t_verification_agent.agentEmailId = codVerificationAgent.verificationAgent
|
| 165 |
return t_verification_agent
|
165 |
return t_verification_agent
|
| 166 |
|
166 |
|
| 167 |
def to_t_attribute(attribute):
|
167 |
def to_t_attribute(attribute):
|
| 168 |
t_attribute = T_Attribute()
|
168 |
t_attribute = T_Attribute()
|
| 169 |
|
- |
|
| 170 |
if attribute:
|
169 |
if attribute:
|
| 171 |
t_attribute.name = attribute.name
|
170 |
t_attribute.name = attribute.name
|
| 172 |
t_attribute.value = attribute.value
|
171 |
t_attribute.value = attribute.value
|
| 173 |
return t_attribute
|
- |
|
| 174 |
|
172 |
return t_attribute
|
| - |
|
173 |
|
| - |
|
174 |
def to_t_emi_scheme(emi_scheme):
|
| - |
|
175 |
t_emi_scheme = T_EmiScheme()
|
| - |
|
176 |
if emi_scheme:
|
| - |
|
177 |
t_emi_scheme.id = emi_scheme.id
|
| - |
|
178 |
t_emi_scheme.bankId = emi_scheme.bankId
|
| - |
|
179 |
t_emi_scheme.bankName = emi_scheme.bankName
|
| - |
|
180 |
t_emi_scheme.gatewayId = emi_scheme.gatewayId
|
| - |
|
181 |
t_emi_scheme.tenure = emi_scheme.tenure
|
| - |
|
182 |
t_emi_scheme.tenureDescription = emi_scheme.tenureDescription
|
| - |
|
183 |
t_emi_scheme.minAmount = emi_scheme.minAmount
|
| - |
|
184 |
t_emi_scheme.chargeType = emi_scheme.chargeType
|
| - |
|
185 |
t_emi_scheme.chargeValue = emi_scheme.chargeValue
|
| - |
|
186 |
return t_emi_scheme
|
| - |
|
187 |
|
| 175 |
|
188 |
|