Subversion Repositories SmartDukaan

Rev

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

Rev 6049 Rev 6050
Line 1335... Line 1335...
1335
    Parameters:
1335
    Parameters:
1336
     - userId
1336
     - userId
1337
    """
1337
    """
1338
    pass
1338
    pass
1339
 
1339
 
-
 
1340
  def getRechargeOrdersForTransaction(self, txnId):
-
 
1341
    """
-
 
1342
    Returns a recharge order for a given transactionId
-
 
1343
 
-
 
1344
    Parameters:
-
 
1345
     - txnId
-
 
1346
    """
-
 
1347
    pass
-
 
1348
 
1340
  def getServiceProviders(self, rechargeType):
1349
  def getServiceProviders(self, rechargeType):
1341
    """
1350
    """
1342
    Parameters:
1351
    Parameters:
1343
     - rechargeType
1352
     - rechargeType
1344
    """
1353
    """
Line 6010... Line 6019...
6010
    self._iprot.readMessageEnd()
6019
    self._iprot.readMessageEnd()
6011
    if result.success is not None:
6020
    if result.success is not None:
6012
      return result.success
6021
      return result.success
6013
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getUserWalletHistory failed: unknown result");
6022
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getUserWalletHistory failed: unknown result");
6014
 
6023
 
-
 
6024
  def getRechargeOrdersForTransaction(self, txnId):
-
 
6025
    """
-
 
6026
    Returns a recharge order for a given transactionId
-
 
6027
 
-
 
6028
    Parameters:
-
 
6029
     - txnId
-
 
6030
    """
-
 
6031
    self.send_getRechargeOrdersForTransaction(txnId)
-
 
6032
    return self.recv_getRechargeOrdersForTransaction()
-
 
6033
 
-
 
6034
  def send_getRechargeOrdersForTransaction(self, txnId):
-
 
6035
    self._oprot.writeMessageBegin('getRechargeOrdersForTransaction', TMessageType.CALL, self._seqid)
-
 
6036
    args = getRechargeOrdersForTransaction_args()
-
 
6037
    args.txnId = txnId
-
 
6038
    args.write(self._oprot)
-
 
6039
    self._oprot.writeMessageEnd()
-
 
6040
    self._oprot.trans.flush()
-
 
6041
 
-
 
6042
  def recv_getRechargeOrdersForTransaction(self, ):
-
 
6043
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
6044
    if mtype == TMessageType.EXCEPTION:
-
 
6045
      x = TApplicationException()
-
 
6046
      x.read(self._iprot)
-
 
6047
      self._iprot.readMessageEnd()
-
 
6048
      raise x
-
 
6049
    result = getRechargeOrdersForTransaction_result()
-
 
6050
    result.read(self._iprot)
-
 
6051
    self._iprot.readMessageEnd()
-
 
6052
    if result.success is not None:
-
 
6053
      return result.success
-
 
6054
    if result.ex is not None:
-
 
6055
      raise result.ex
-
 
6056
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getRechargeOrdersForTransaction failed: unknown result");
-
 
6057
 
6015
  def getServiceProviders(self, rechargeType):
6058
  def getServiceProviders(self, rechargeType):
6016
    """
6059
    """
6017
    Parameters:
6060
    Parameters:
6018
     - rechargeType
6061
     - rechargeType
6019
    """
6062
    """
Line 6210... Line 6253...
6210
    self._processMap["getRechargeOrders"] = Processor.process_getRechargeOrders
6253
    self._processMap["getRechargeOrders"] = Processor.process_getRechargeOrders
6211
    self._processMap["updateRechargeOrderStatus"] = Processor.process_updateRechargeOrderStatus
6254
    self._processMap["updateRechargeOrderStatus"] = Processor.process_updateRechargeOrderStatus
6212
    self._processMap["activateRechargeTxn"] = Processor.process_activateRechargeTxn
6255
    self._processMap["activateRechargeTxn"] = Processor.process_activateRechargeTxn
6213
    self._processMap["getUserWallet"] = Processor.process_getUserWallet
6256
    self._processMap["getUserWallet"] = Processor.process_getUserWallet
6214
    self._processMap["getUserWalletHistory"] = Processor.process_getUserWalletHistory
6257
    self._processMap["getUserWalletHistory"] = Processor.process_getUserWalletHistory
-
 
6258
    self._processMap["getRechargeOrdersForTransaction"] = Processor.process_getRechargeOrdersForTransaction
6215
    self._processMap["getServiceProviders"] = Processor.process_getServiceProviders
6259
    self._processMap["getServiceProviders"] = Processor.process_getServiceProviders
6216
    self._processMap["getServiceProviderForDevice"] = Processor.process_getServiceProviderForDevice
6260
    self._processMap["getServiceProviderForDevice"] = Processor.process_getServiceProviderForDevice
6217
 
6261
 
6218
  def process(self, iprot, oprot):
6262
  def process(self, iprot, oprot):
6219
    (name, type, seqid) = iprot.readMessageBegin()
6263
    (name, type, seqid) = iprot.readMessageBegin()
Line 7987... Line 8031...
7987
    oprot.writeMessageBegin("getUserWalletHistory", TMessageType.REPLY, seqid)
8031
    oprot.writeMessageBegin("getUserWalletHistory", TMessageType.REPLY, seqid)
7988
    result.write(oprot)
8032
    result.write(oprot)
7989
    oprot.writeMessageEnd()
8033
    oprot.writeMessageEnd()
7990
    oprot.trans.flush()
8034
    oprot.trans.flush()
7991
 
8035
 
-
 
8036
  def process_getRechargeOrdersForTransaction(self, seqid, iprot, oprot):
-
 
8037
    args = getRechargeOrdersForTransaction_args()
-
 
8038
    args.read(iprot)
-
 
8039
    iprot.readMessageEnd()
-
 
8040
    result = getRechargeOrdersForTransaction_result()
-
 
8041
    try:
-
 
8042
      result.success = self._handler.getRechargeOrdersForTransaction(args.txnId)
-
 
8043
    except TransactionServiceException, ex:
-
 
8044
      result.ex = ex
-
 
8045
    oprot.writeMessageBegin("getRechargeOrdersForTransaction", TMessageType.REPLY, seqid)
-
 
8046
    result.write(oprot)
-
 
8047
    oprot.writeMessageEnd()
-
 
8048
    oprot.trans.flush()
-
 
8049
 
7992
  def process_getServiceProviders(self, seqid, iprot, oprot):
8050
  def process_getServiceProviders(self, seqid, iprot, oprot):
7993
    args = getServiceProviders_args()
8051
    args = getServiceProviders_args()
7994
    args.read(iprot)
8052
    args.read(iprot)
7995
    iprot.readMessageEnd()
8053
    iprot.readMessageEnd()
7996
    result = getServiceProviders_result()
8054
    result = getServiceProviders_result()
Line 26971... Line 27029...
26971
      oprot.writeFieldEnd()
27029
      oprot.writeFieldEnd()
26972
    oprot.writeFieldStop()
27030
    oprot.writeFieldStop()
26973
    oprot.writeStructEnd()
27031
    oprot.writeStructEnd()
26974
 
27032
 
26975
  def validate(self):
27033
  def validate(self):
-
 
27034
    return
-
 
27035
 
-
 
27036
 
-
 
27037
  def __repr__(self):
-
 
27038
    L = ['%s=%r' % (key, value)
-
 
27039
      for key, value in self.__dict__.iteritems()]
-
 
27040
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
27041
 
-
 
27042
  def __eq__(self, other):
-
 
27043
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
27044
 
-
 
27045
  def __ne__(self, other):
-
 
27046
    return not (self == other)
-
 
27047
 
-
 
27048
class getRechargeOrdersForTransaction_args:
-
 
27049
  """
-
 
27050
  Attributes:
-
 
27051
   - txnId
-
 
27052
  """
-
 
27053
 
-
 
27054
  thrift_spec = (
-
 
27055
    None, # 0
-
 
27056
    (1, TType.I64, 'txnId', None, None, ), # 1
-
 
27057
  )
-
 
27058
 
-
 
27059
  def __init__(self, txnId=None,):
-
 
27060
    self.txnId = txnId
-
 
27061
 
-
 
27062
  def read(self, iprot):
-
 
27063
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
27064
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
27065
      return
-
 
27066
    iprot.readStructBegin()
-
 
27067
    while True:
-
 
27068
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
27069
      if ftype == TType.STOP:
-
 
27070
        break
-
 
27071
      if fid == 1:
-
 
27072
        if ftype == TType.I64:
-
 
27073
          self.txnId = iprot.readI64();
-
 
27074
        else:
-
 
27075
          iprot.skip(ftype)
-
 
27076
      else:
-
 
27077
        iprot.skip(ftype)
-
 
27078
      iprot.readFieldEnd()
-
 
27079
    iprot.readStructEnd()
-
 
27080
 
-
 
27081
  def write(self, oprot):
-
 
27082
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
27083
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
27084
      return
-
 
27085
    oprot.writeStructBegin('getRechargeOrdersForTransaction_args')
-
 
27086
    if self.txnId is not None:
-
 
27087
      oprot.writeFieldBegin('txnId', TType.I64, 1)
-
 
27088
      oprot.writeI64(self.txnId)
-
 
27089
      oprot.writeFieldEnd()
-
 
27090
    oprot.writeFieldStop()
-
 
27091
    oprot.writeStructEnd()
-
 
27092
 
-
 
27093
  def validate(self):
-
 
27094
    return
-
 
27095
 
-
 
27096
 
-
 
27097
  def __repr__(self):
-
 
27098
    L = ['%s=%r' % (key, value)
-
 
27099
      for key, value in self.__dict__.iteritems()]
-
 
27100
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
27101
 
-
 
27102
  def __eq__(self, other):
-
 
27103
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
27104
 
-
 
27105
  def __ne__(self, other):
-
 
27106
    return not (self == other)
-
 
27107
 
-
 
27108
class getRechargeOrdersForTransaction_result:
-
 
27109
  """
-
 
27110
  Attributes:
-
 
27111
   - success
-
 
27112
   - ex
-
 
27113
  """
-
 
27114
 
-
 
27115
  thrift_spec = (
-
 
27116
    (0, TType.STRUCT, 'success', (RechargeOrder, RechargeOrder.thrift_spec), None, ), # 0
-
 
27117
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
-
 
27118
  )
-
 
27119
 
-
 
27120
  def __init__(self, success=None, ex=None,):
-
 
27121
    self.success = success
-
 
27122
    self.ex = ex
-
 
27123
 
-
 
27124
  def read(self, iprot):
-
 
27125
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
27126
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
27127
      return
-
 
27128
    iprot.readStructBegin()
-
 
27129
    while True:
-
 
27130
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
27131
      if ftype == TType.STOP:
-
 
27132
        break
-
 
27133
      if fid == 0:
-
 
27134
        if ftype == TType.STRUCT:
-
 
27135
          self.success = RechargeOrder()
-
 
27136
          self.success.read(iprot)
-
 
27137
        else:
-
 
27138
          iprot.skip(ftype)
-
 
27139
      elif fid == 1:
-
 
27140
        if ftype == TType.STRUCT:
-
 
27141
          self.ex = TransactionServiceException()
-
 
27142
          self.ex.read(iprot)
-
 
27143
        else:
-
 
27144
          iprot.skip(ftype)
-
 
27145
      else:
-
 
27146
        iprot.skip(ftype)
-
 
27147
      iprot.readFieldEnd()
-
 
27148
    iprot.readStructEnd()
-
 
27149
 
-
 
27150
  def write(self, oprot):
-
 
27151
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
27152
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
27153
      return
-
 
27154
    oprot.writeStructBegin('getRechargeOrdersForTransaction_result')
-
 
27155
    if self.success is not None:
-
 
27156
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
-
 
27157
      self.success.write(oprot)
-
 
27158
      oprot.writeFieldEnd()
-
 
27159
    if self.ex is not None:
-
 
27160
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
-
 
27161
      self.ex.write(oprot)
-
 
27162
      oprot.writeFieldEnd()
-
 
27163
    oprot.writeFieldStop()
-
 
27164
    oprot.writeStructEnd()
-
 
27165
 
-
 
27166
  def validate(self):
26976
    return
27167
    return
26977
 
27168
 
26978
 
27169
 
26979
  def __repr__(self):
27170
  def __repr__(self):
26980
    L = ['%s=%r' % (key, value)
27171
    L = ['%s=%r' % (key, value)