Subversion Repositories SmartDukaan

Rev

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

Rev 6094 Rev 6154
Line 1375... Line 1375...
1375
     - orderId
1375
     - orderId
1376
     - amount
1376
     - amount
1377
    """
1377
    """
1378
    pass
1378
    pass
1379
 
1379
 
-
 
1380
  def getRechargeOrdersForStatus(self, status):
-
 
1381
    """
-
 
1382
    Parameters:
-
 
1383
     - status
-
 
1384
    """
-
 
1385
    pass
-
 
1386
 
1380
 
1387
 
1381
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1388
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1382
  def __init__(self, iprot, oprot=None):
1389
  def __init__(self, iprot, oprot=None):
1383
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1390
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1384
 
1391
 
Line 6193... Line 6200...
6193
    result = addAmountToWallet_result()
6200
    result = addAmountToWallet_result()
6194
    result.read(self._iprot)
6201
    result.read(self._iprot)
6195
    self._iprot.readMessageEnd()
6202
    self._iprot.readMessageEnd()
6196
    return
6203
    return
6197
 
6204
 
-
 
6205
  def getRechargeOrdersForStatus(self, status):
-
 
6206
    """
-
 
6207
    Parameters:
-
 
6208
     - status
-
 
6209
    """
-
 
6210
    self.send_getRechargeOrdersForStatus(status)
-
 
6211
    return self.recv_getRechargeOrdersForStatus()
-
 
6212
 
-
 
6213
  def send_getRechargeOrdersForStatus(self, status):
-
 
6214
    self._oprot.writeMessageBegin('getRechargeOrdersForStatus', TMessageType.CALL, self._seqid)
-
 
6215
    args = getRechargeOrdersForStatus_args()
-
 
6216
    args.status = status
-
 
6217
    args.write(self._oprot)
-
 
6218
    self._oprot.writeMessageEnd()
-
 
6219
    self._oprot.trans.flush()
-
 
6220
 
-
 
6221
  def recv_getRechargeOrdersForStatus(self, ):
-
 
6222
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
6223
    if mtype == TMessageType.EXCEPTION:
-
 
6224
      x = TApplicationException()
-
 
6225
      x.read(self._iprot)
-
 
6226
      self._iprot.readMessageEnd()
-
 
6227
      raise x
-
 
6228
    result = getRechargeOrdersForStatus_result()
-
 
6229
    result.read(self._iprot)
-
 
6230
    self._iprot.readMessageEnd()
-
 
6231
    if result.success is not None:
-
 
6232
      return result.success
-
 
6233
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getRechargeOrdersForStatus failed: unknown result");
-
 
6234
 
6198
 
6235
 
6199
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
6236
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
6200
  def __init__(self, handler):
6237
  def __init__(self, handler):
6201
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
6238
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
6202
    self._processMap["createTransaction"] = Processor.process_createTransaction
6239
    self._processMap["createTransaction"] = Processor.process_createTransaction
Line 6336... Line 6373...
6336
    self._processMap["getRechargeOrdersForTransaction"] = Processor.process_getRechargeOrdersForTransaction
6373
    self._processMap["getRechargeOrdersForTransaction"] = Processor.process_getRechargeOrdersForTransaction
6337
    self._processMap["getServiceProviders"] = Processor.process_getServiceProviders
6374
    self._processMap["getServiceProviders"] = Processor.process_getServiceProviders
6338
    self._processMap["getServiceProviderForDevice"] = Processor.process_getServiceProviderForDevice
6375
    self._processMap["getServiceProviderForDevice"] = Processor.process_getServiceProviderForDevice
6339
    self._processMap["getRechargeOrdersForDevice"] = Processor.process_getRechargeOrdersForDevice
6376
    self._processMap["getRechargeOrdersForDevice"] = Processor.process_getRechargeOrdersForDevice
6340
    self._processMap["addAmountToWallet"] = Processor.process_addAmountToWallet
6377
    self._processMap["addAmountToWallet"] = Processor.process_addAmountToWallet
-
 
6378
    self._processMap["getRechargeOrdersForStatus"] = Processor.process_getRechargeOrdersForStatus
6341
 
6379
 
6342
  def process(self, iprot, oprot):
6380
  def process(self, iprot, oprot):
6343
    (name, type, seqid) = iprot.readMessageBegin()
6381
    (name, type, seqid) = iprot.readMessageBegin()
6344
    if name not in self._processMap:
6382
    if name not in self._processMap:
6345
      iprot.skip(TType.STRUCT)
6383
      iprot.skip(TType.STRUCT)
Line 8169... Line 8207...
8169
    oprot.writeMessageBegin("addAmountToWallet", TMessageType.REPLY, seqid)
8207
    oprot.writeMessageBegin("addAmountToWallet", TMessageType.REPLY, seqid)
8170
    result.write(oprot)
8208
    result.write(oprot)
8171
    oprot.writeMessageEnd()
8209
    oprot.writeMessageEnd()
8172
    oprot.trans.flush()
8210
    oprot.trans.flush()
8173
 
8211
 
-
 
8212
  def process_getRechargeOrdersForStatus(self, seqid, iprot, oprot):
-
 
8213
    args = getRechargeOrdersForStatus_args()
-
 
8214
    args.read(iprot)
-
 
8215
    iprot.readMessageEnd()
-
 
8216
    result = getRechargeOrdersForStatus_result()
-
 
8217
    result.success = self._handler.getRechargeOrdersForStatus(args.status)
-
 
8218
    oprot.writeMessageBegin("getRechargeOrdersForStatus", TMessageType.REPLY, seqid)
-
 
8219
    result.write(oprot)
-
 
8220
    oprot.writeMessageEnd()
-
 
8221
    oprot.trans.flush()
-
 
8222
 
8174
 
8223
 
8175
# HELPER FUNCTIONS AND STRUCTURES
8224
# HELPER FUNCTIONS AND STRUCTURES
8176
 
8225
 
8177
class createTransaction_args:
8226
class createTransaction_args:
8178
  """
8227
  """
Line 27779... Line 27828...
27779
    oprot.writeFieldStop()
27828
    oprot.writeFieldStop()
27780
    oprot.writeStructEnd()
27829
    oprot.writeStructEnd()
27781
 
27830
 
27782
  def validate(self):
27831
  def validate(self):
27783
    return
27832
    return
-
 
27833
 
-
 
27834
 
-
 
27835
  def __repr__(self):
-
 
27836
    L = ['%s=%r' % (key, value)
-
 
27837
      for key, value in self.__dict__.iteritems()]
-
 
27838
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
27839
 
-
 
27840
  def __eq__(self, other):
-
 
27841
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
27842
 
-
 
27843
  def __ne__(self, other):
-
 
27844
    return not (self == other)
-
 
27845
 
-
 
27846
class getRechargeOrdersForStatus_args:
-
 
27847
  """
-
 
27848
  Attributes:
-
 
27849
   - status
-
 
27850
  """
-
 
27851
 
-
 
27852
  thrift_spec = (
-
 
27853
    None, # 0
-
 
27854
    (1, TType.I64, 'status', None, None, ), # 1
-
 
27855
  )
-
 
27856
 
-
 
27857
  def __init__(self, status=None,):
-
 
27858
    self.status = status
-
 
27859
 
-
 
27860
  def read(self, iprot):
-
 
27861
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
27862
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
27863
      return
-
 
27864
    iprot.readStructBegin()
-
 
27865
    while True:
-
 
27866
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
27867
      if ftype == TType.STOP:
-
 
27868
        break
-
 
27869
      if fid == 1:
-
 
27870
        if ftype == TType.I64:
-
 
27871
          self.status = iprot.readI64();
-
 
27872
        else:
-
 
27873
          iprot.skip(ftype)
-
 
27874
      else:
-
 
27875
        iprot.skip(ftype)
-
 
27876
      iprot.readFieldEnd()
-
 
27877
    iprot.readStructEnd()
-
 
27878
 
-
 
27879
  def write(self, oprot):
-
 
27880
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
27881
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
27882
      return
-
 
27883
    oprot.writeStructBegin('getRechargeOrdersForStatus_args')
-
 
27884
    if self.status is not None:
-
 
27885
      oprot.writeFieldBegin('status', TType.I64, 1)
-
 
27886
      oprot.writeI64(self.status)
-
 
27887
      oprot.writeFieldEnd()
-
 
27888
    oprot.writeFieldStop()
-
 
27889
    oprot.writeStructEnd()
-
 
27890
 
-
 
27891
  def validate(self):
-
 
27892
    return
-
 
27893
 
-
 
27894
 
-
 
27895
  def __repr__(self):
-
 
27896
    L = ['%s=%r' % (key, value)
-
 
27897
      for key, value in self.__dict__.iteritems()]
-
 
27898
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
27899
 
-
 
27900
  def __eq__(self, other):
-
 
27901
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
27902
 
-
 
27903
  def __ne__(self, other):
-
 
27904
    return not (self == other)
-
 
27905
 
-
 
27906
class getRechargeOrdersForStatus_result:
-
 
27907
  """
-
 
27908
  Attributes:
-
 
27909
   - success
-
 
27910
  """
-
 
27911
 
-
 
27912
  thrift_spec = (
-
 
27913
    (0, TType.LIST, 'success', (TType.STRUCT,(RechargeOrder, RechargeOrder.thrift_spec)), None, ), # 0
-
 
27914
  )
-
 
27915
 
-
 
27916
  def __init__(self, success=None,):
-
 
27917
    self.success = success
-
 
27918
 
-
 
27919
  def read(self, iprot):
-
 
27920
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
27921
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
27922
      return
-
 
27923
    iprot.readStructBegin()
-
 
27924
    while True:
-
 
27925
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
27926
      if ftype == TType.STOP:
-
 
27927
        break
-
 
27928
      if fid == 0:
-
 
27929
        if ftype == TType.LIST:
-
 
27930
          self.success = []
-
 
27931
          (_etype646, _size643) = iprot.readListBegin()
-
 
27932
          for _i647 in xrange(_size643):
-
 
27933
            _elem648 = RechargeOrder()
-
 
27934
            _elem648.read(iprot)
-
 
27935
            self.success.append(_elem648)
-
 
27936
          iprot.readListEnd()
-
 
27937
        else:
-
 
27938
          iprot.skip(ftype)
-
 
27939
      else:
-
 
27940
        iprot.skip(ftype)
-
 
27941
      iprot.readFieldEnd()
-
 
27942
    iprot.readStructEnd()
-
 
27943
 
-
 
27944
  def write(self, oprot):
-
 
27945
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
27946
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
27947
      return
-
 
27948
    oprot.writeStructBegin('getRechargeOrdersForStatus_result')
-
 
27949
    if self.success is not None:
-
 
27950
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
27951
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
27952
      for iter649 in self.success:
-
 
27953
        iter649.write(oprot)
-
 
27954
      oprot.writeListEnd()
-
 
27955
      oprot.writeFieldEnd()
-
 
27956
    oprot.writeFieldStop()
-
 
27957
    oprot.writeStructEnd()
-
 
27958
 
-
 
27959
  def validate(self):
-
 
27960
    return
27784
 
27961
 
27785
 
27962
 
27786
  def __repr__(self):
27963
  def __repr__(self):
27787
    L = ['%s=%r' % (key, value)
27964
    L = ['%s=%r' % (key, value)
27788
      for key, value in self.__dict__.iteritems()]
27965
      for key, value in self.__dict__.iteritems()]