Subversion Repositories SmartDukaan

Rev

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

Rev 6154 Rev 6159
Line 1382... Line 1382...
1382
    Parameters:
1382
    Parameters:
1383
     - status
1383
     - status
1384
    """
1384
    """
1385
    pass
1385
    pass
1386
 
1386
 
-
 
1387
  def getPlansForOperator(self, operatorId):
-
 
1388
    """
-
 
1389
    Parameters:
-
 
1390
     - operatorId
-
 
1391
    """
-
 
1392
    pass
-
 
1393
 
1387
 
1394
 
1388
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1395
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1389
  def __init__(self, iprot, oprot=None):
1396
  def __init__(self, iprot, oprot=None):
1390
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1397
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1391
 
1398
 
Line 6230... Line 6237...
6230
    self._iprot.readMessageEnd()
6237
    self._iprot.readMessageEnd()
6231
    if result.success is not None:
6238
    if result.success is not None:
6232
      return result.success
6239
      return result.success
6233
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getRechargeOrdersForStatus failed: unknown result");
6240
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getRechargeOrdersForStatus failed: unknown result");
6234
 
6241
 
-
 
6242
  def getPlansForOperator(self, operatorId):
-
 
6243
    """
-
 
6244
    Parameters:
-
 
6245
     - operatorId
-
 
6246
    """
-
 
6247
    self.send_getPlansForOperator(operatorId)
-
 
6248
    return self.recv_getPlansForOperator()
-
 
6249
 
-
 
6250
  def send_getPlansForOperator(self, operatorId):
-
 
6251
    self._oprot.writeMessageBegin('getPlansForOperator', TMessageType.CALL, self._seqid)
-
 
6252
    args = getPlansForOperator_args()
-
 
6253
    args.operatorId = operatorId
-
 
6254
    args.write(self._oprot)
-
 
6255
    self._oprot.writeMessageEnd()
-
 
6256
    self._oprot.trans.flush()
-
 
6257
 
-
 
6258
  def recv_getPlansForOperator(self, ):
-
 
6259
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
6260
    if mtype == TMessageType.EXCEPTION:
-
 
6261
      x = TApplicationException()
-
 
6262
      x.read(self._iprot)
-
 
6263
      self._iprot.readMessageEnd()
-
 
6264
      raise x
-
 
6265
    result = getPlansForOperator_result()
-
 
6266
    result.read(self._iprot)
-
 
6267
    self._iprot.readMessageEnd()
-
 
6268
    if result.success is not None:
-
 
6269
      return result.success
-
 
6270
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPlansForOperator failed: unknown result");
-
 
6271
 
6235
 
6272
 
6236
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
6273
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
6237
  def __init__(self, handler):
6274
  def __init__(self, handler):
6238
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
6275
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
6239
    self._processMap["createTransaction"] = Processor.process_createTransaction
6276
    self._processMap["createTransaction"] = Processor.process_createTransaction
Line 6374... Line 6411...
6374
    self._processMap["getServiceProviders"] = Processor.process_getServiceProviders
6411
    self._processMap["getServiceProviders"] = Processor.process_getServiceProviders
6375
    self._processMap["getServiceProviderForDevice"] = Processor.process_getServiceProviderForDevice
6412
    self._processMap["getServiceProviderForDevice"] = Processor.process_getServiceProviderForDevice
6376
    self._processMap["getRechargeOrdersForDevice"] = Processor.process_getRechargeOrdersForDevice
6413
    self._processMap["getRechargeOrdersForDevice"] = Processor.process_getRechargeOrdersForDevice
6377
    self._processMap["addAmountToWallet"] = Processor.process_addAmountToWallet
6414
    self._processMap["addAmountToWallet"] = Processor.process_addAmountToWallet
6378
    self._processMap["getRechargeOrdersForStatus"] = Processor.process_getRechargeOrdersForStatus
6415
    self._processMap["getRechargeOrdersForStatus"] = Processor.process_getRechargeOrdersForStatus
-
 
6416
    self._processMap["getPlansForOperator"] = Processor.process_getPlansForOperator
6379
 
6417
 
6380
  def process(self, iprot, oprot):
6418
  def process(self, iprot, oprot):
6381
    (name, type, seqid) = iprot.readMessageBegin()
6419
    (name, type, seqid) = iprot.readMessageBegin()
6382
    if name not in self._processMap:
6420
    if name not in self._processMap:
6383
      iprot.skip(TType.STRUCT)
6421
      iprot.skip(TType.STRUCT)
Line 8218... Line 8256...
8218
    oprot.writeMessageBegin("getRechargeOrdersForStatus", TMessageType.REPLY, seqid)
8256
    oprot.writeMessageBegin("getRechargeOrdersForStatus", TMessageType.REPLY, seqid)
8219
    result.write(oprot)
8257
    result.write(oprot)
8220
    oprot.writeMessageEnd()
8258
    oprot.writeMessageEnd()
8221
    oprot.trans.flush()
8259
    oprot.trans.flush()
8222
 
8260
 
-
 
8261
  def process_getPlansForOperator(self, seqid, iprot, oprot):
-
 
8262
    args = getPlansForOperator_args()
-
 
8263
    args.read(iprot)
-
 
8264
    iprot.readMessageEnd()
-
 
8265
    result = getPlansForOperator_result()
-
 
8266
    result.success = self._handler.getPlansForOperator(args.operatorId)
-
 
8267
    oprot.writeMessageBegin("getPlansForOperator", TMessageType.REPLY, seqid)
-
 
8268
    result.write(oprot)
-
 
8269
    oprot.writeMessageEnd()
-
 
8270
    oprot.trans.flush()
-
 
8271
 
8223
 
8272
 
8224
# HELPER FUNCTIONS AND STRUCTURES
8273
# HELPER FUNCTIONS AND STRUCTURES
8225
 
8274
 
8226
class createTransaction_args:
8275
class createTransaction_args:
8227
  """
8276
  """
Line 27954... Line 28003...
27954
      oprot.writeListEnd()
28003
      oprot.writeListEnd()
27955
      oprot.writeFieldEnd()
28004
      oprot.writeFieldEnd()
27956
    oprot.writeFieldStop()
28005
    oprot.writeFieldStop()
27957
    oprot.writeStructEnd()
28006
    oprot.writeStructEnd()
27958
 
28007
 
-
 
28008
  def validate(self):
-
 
28009
    return
-
 
28010
 
-
 
28011
 
-
 
28012
  def __repr__(self):
-
 
28013
    L = ['%s=%r' % (key, value)
-
 
28014
      for key, value in self.__dict__.iteritems()]
-
 
28015
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
28016
 
-
 
28017
  def __eq__(self, other):
-
 
28018
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
28019
 
-
 
28020
  def __ne__(self, other):
-
 
28021
    return not (self == other)
-
 
28022
 
-
 
28023
class getPlansForOperator_args:
-
 
28024
  """
-
 
28025
  Attributes:
-
 
28026
   - operatorId
-
 
28027
  """
-
 
28028
 
-
 
28029
  thrift_spec = (
-
 
28030
    None, # 0
-
 
28031
    (1, TType.I64, 'operatorId', None, None, ), # 1
-
 
28032
  )
-
 
28033
 
-
 
28034
  def __init__(self, operatorId=None,):
-
 
28035
    self.operatorId = operatorId
-
 
28036
 
-
 
28037
  def read(self, iprot):
-
 
28038
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
28039
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
28040
      return
-
 
28041
    iprot.readStructBegin()
-
 
28042
    while True:
-
 
28043
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
28044
      if ftype == TType.STOP:
-
 
28045
        break
-
 
28046
      if fid == 1:
-
 
28047
        if ftype == TType.I64:
-
 
28048
          self.operatorId = iprot.readI64();
-
 
28049
        else:
-
 
28050
          iprot.skip(ftype)
-
 
28051
      else:
-
 
28052
        iprot.skip(ftype)
-
 
28053
      iprot.readFieldEnd()
-
 
28054
    iprot.readStructEnd()
-
 
28055
 
-
 
28056
  def write(self, oprot):
-
 
28057
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
28058
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
28059
      return
-
 
28060
    oprot.writeStructBegin('getPlansForOperator_args')
-
 
28061
    if self.operatorId is not None:
-
 
28062
      oprot.writeFieldBegin('operatorId', TType.I64, 1)
-
 
28063
      oprot.writeI64(self.operatorId)
-
 
28064
      oprot.writeFieldEnd()
-
 
28065
    oprot.writeFieldStop()
-
 
28066
    oprot.writeStructEnd()
-
 
28067
 
-
 
28068
  def validate(self):
-
 
28069
    return
-
 
28070
 
-
 
28071
 
-
 
28072
  def __repr__(self):
-
 
28073
    L = ['%s=%r' % (key, value)
-
 
28074
      for key, value in self.__dict__.iteritems()]
-
 
28075
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
28076
 
-
 
28077
  def __eq__(self, other):
-
 
28078
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
28079
 
-
 
28080
  def __ne__(self, other):
-
 
28081
    return not (self == other)
-
 
28082
 
-
 
28083
class getPlansForOperator_result:
-
 
28084
  """
-
 
28085
  Attributes:
-
 
28086
   - success
-
 
28087
  """
-
 
28088
 
-
 
28089
  thrift_spec = (
-
 
28090
    (0, TType.LIST, 'success', (TType.STRUCT,(RechargePlan, RechargePlan.thrift_spec)), None, ), # 0
-
 
28091
  )
-
 
28092
 
-
 
28093
  def __init__(self, success=None,):
-
 
28094
    self.success = success
-
 
28095
 
-
 
28096
  def read(self, iprot):
-
 
28097
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
28098
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
28099
      return
-
 
28100
    iprot.readStructBegin()
-
 
28101
    while True:
-
 
28102
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
28103
      if ftype == TType.STOP:
-
 
28104
        break
-
 
28105
      if fid == 0:
-
 
28106
        if ftype == TType.LIST:
-
 
28107
          self.success = []
-
 
28108
          (_etype653, _size650) = iprot.readListBegin()
-
 
28109
          for _i654 in xrange(_size650):
-
 
28110
            _elem655 = RechargePlan()
-
 
28111
            _elem655.read(iprot)
-
 
28112
            self.success.append(_elem655)
-
 
28113
          iprot.readListEnd()
-
 
28114
        else:
-
 
28115
          iprot.skip(ftype)
-
 
28116
      else:
-
 
28117
        iprot.skip(ftype)
-
 
28118
      iprot.readFieldEnd()
-
 
28119
    iprot.readStructEnd()
-
 
28120
 
-
 
28121
  def write(self, oprot):
-
 
28122
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
28123
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
28124
      return
-
 
28125
    oprot.writeStructBegin('getPlansForOperator_result')
-
 
28126
    if self.success is not None:
-
 
28127
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
28128
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
28129
      for iter656 in self.success:
-
 
28130
        iter656.write(oprot)
-
 
28131
      oprot.writeListEnd()
-
 
28132
      oprot.writeFieldEnd()
-
 
28133
    oprot.writeFieldStop()
-
 
28134
    oprot.writeStructEnd()
-
 
28135
 
27959
  def validate(self):
28136
  def validate(self):
27960
    return
28137
    return
27961
 
28138
 
27962
 
28139
 
27963
  def __repr__(self):
28140
  def __repr__(self):