Subversion Repositories SmartDukaan

Rev

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

Rev 5354 Rev 5447
Line 4... Line 4...
4
@author: ashish
4
@author: ashish
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
9
    PaymentSettlement as T_PaymentSettlement, CODVerificationAgent as T_CODVerificationAgent
10
from shop2020.utils.Utils import to_java_date
10
from shop2020.utils.Utils import to_java_date
11
from shop2020.model.v1.order.impl.DataService import Alert, Transaction
11
from shop2020.model.v1.order.impl.DataService import Alert, Transaction
12
 
12
 
13
def to_t_transaction(transaction):
13
def to_t_transaction(transaction):
14
    t_transaction = T_Transaction()
14
    t_transaction = T_Transaction()
Line 147... Line 147...
147
        t_payment_settlement.paymentGatewayId = payment_settlement.paymentGatewayId
147
        t_payment_settlement.paymentGatewayId = payment_settlement.paymentGatewayId
148
        t_payment_settlement.settlementDate = to_java_date(payment_settlement.settlementDate)
148
        t_payment_settlement.settlementDate = to_java_date(payment_settlement.settlementDate)
149
        t_payment_settlement.serviceTax = payment_settlement.serviceTax
149
        t_payment_settlement.serviceTax = payment_settlement.serviceTax
150
        t_payment_settlement.otherCharges = payment_settlement.otherCharges
150
        t_payment_settlement.otherCharges = payment_settlement.otherCharges
151
        t_payment_settlement.netCollection = payment_settlement.netCollection
151
        t_payment_settlement.netCollection = payment_settlement.netCollection
152
    return t_payment_settlement
-
 
153
152
    return t_payment_settlement
-
 
153
 
-
 
154
def to_t_verification_agent(codVerificationAgent):
-
 
155
    t_verification_agent = T_CODVerificationAgent()
-
 
156
    
-
 
157
    if codVerificationAgent:
-
 
158
        t_verification_agent.orderId = codVerificationAgent.orderId
-
 
159
        t_verification_agent.agentEmailId = codVerificationAgent.verificationAgent
-
 
160
    return t_verification_agent    
-
 
161
154
162