Subversion Repositories SmartDukaan

Rev

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

Rev 21092 Rev 21101
Line 2779... Line 2779...
2779
    Parameters:
2779
    Parameters:
2780
     - associateEmail
2780
     - associateEmail
2781
    """
2781
    """
2782
    pass
2782
    pass
2783
 
2783
 
-
 
2784
  def creditUserWallet(self, userId, amount):
-
 
2785
    """
-
 
2786
    Parameters:
-
 
2787
     - userId
-
 
2788
     - amount
-
 
2789
    """
-
 
2790
    pass
-
 
2791
 
2784
 
2792
 
2785
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
2793
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
2786
  def __init__(self, iprot, oprot=None):
2794
  def __init__(self, iprot, oprot=None):
2787
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
2795
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
2788
 
2796
 
Line 13348... Line 13356...
13348
    self._iprot.readMessageEnd()
13356
    self._iprot.readMessageEnd()
13349
    if result.success is not None:
13357
    if result.success is not None:
13350
      return result.success
13358
      return result.success
13351
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getmypmsaprofile failed: unknown result");
13359
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getmypmsaprofile failed: unknown result");
13352
 
13360
 
-
 
13361
  def creditUserWallet(self, userId, amount):
-
 
13362
    """
-
 
13363
    Parameters:
-
 
13364
     - userId
-
 
13365
     - amount
-
 
13366
    """
-
 
13367
    self.send_creditUserWallet(userId, amount)
-
 
13368
    return self.recv_creditUserWallet()
-
 
13369
 
-
 
13370
  def send_creditUserWallet(self, userId, amount):
-
 
13371
    self._oprot.writeMessageBegin('creditUserWallet', TMessageType.CALL, self._seqid)
-
 
13372
    args = creditUserWallet_args()
-
 
13373
    args.userId = userId
-
 
13374
    args.amount = amount
-
 
13375
    args.write(self._oprot)
-
 
13376
    self._oprot.writeMessageEnd()
-
 
13377
    self._oprot.trans.flush()
-
 
13378
 
-
 
13379
  def recv_creditUserWallet(self, ):
-
 
13380
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
13381
    if mtype == TMessageType.EXCEPTION:
-
 
13382
      x = TApplicationException()
-
 
13383
      x.read(self._iprot)
-
 
13384
      self._iprot.readMessageEnd()
-
 
13385
      raise x
-
 
13386
    result = creditUserWallet_result()
-
 
13387
    result.read(self._iprot)
-
 
13388
    self._iprot.readMessageEnd()
-
 
13389
    if result.success is not None:
-
 
13390
      return result.success
-
 
13391
    raise TApplicationException(TApplicationException.MISSING_RESULT, "creditUserWallet failed: unknown result");
-
 
13392
 
13353
 
13393
 
13354
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
13394
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
13355
  def __init__(self, handler):
13395
  def __init__(self, handler):
13356
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
13396
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
13357
    self._processMap["createTransaction"] = Processor.process_createTransaction
13397
    self._processMap["createTransaction"] = Processor.process_createTransaction
Line 13671... Line 13711...
13671
    self._processMap["updatePmsaUser"] = Processor.process_updatePmsaUser
13711
    self._processMap["updatePmsaUser"] = Processor.process_updatePmsaUser
13672
    self._processMap["getPmsaUsers"] = Processor.process_getPmsaUsers
13712
    self._processMap["getPmsaUsers"] = Processor.process_getPmsaUsers
13673
    self._processMap["getPendingAssociates"] = Processor.process_getPendingAssociates
13713
    self._processMap["getPendingAssociates"] = Processor.process_getPendingAssociates
13674
    self._processMap["getStatsForAssociates"] = Processor.process_getStatsForAssociates
13714
    self._processMap["getStatsForAssociates"] = Processor.process_getStatsForAssociates
13675
    self._processMap["getmypmsaprofile"] = Processor.process_getmypmsaprofile
13715
    self._processMap["getmypmsaprofile"] = Processor.process_getmypmsaprofile
-
 
13716
    self._processMap["creditUserWallet"] = Processor.process_creditUserWallet
13676
 
13717
 
13677
  def process(self, iprot, oprot):
13718
  def process(self, iprot, oprot):
13678
    (name, type, seqid) = iprot.readMessageBegin()
13719
    (name, type, seqid) = iprot.readMessageBegin()
13679
    if name not in self._processMap:
13720
    if name not in self._processMap:
13680
      iprot.skip(TType.STRUCT)
13721
      iprot.skip(TType.STRUCT)
Line 17613... Line 17654...
17613
    oprot.writeMessageBegin("getmypmsaprofile", TMessageType.REPLY, seqid)
17654
    oprot.writeMessageBegin("getmypmsaprofile", TMessageType.REPLY, seqid)
17614
    result.write(oprot)
17655
    result.write(oprot)
17615
    oprot.writeMessageEnd()
17656
    oprot.writeMessageEnd()
17616
    oprot.trans.flush()
17657
    oprot.trans.flush()
17617
 
17658
 
-
 
17659
  def process_creditUserWallet(self, seqid, iprot, oprot):
-
 
17660
    args = creditUserWallet_args()
-
 
17661
    args.read(iprot)
-
 
17662
    iprot.readMessageEnd()
-
 
17663
    result = creditUserWallet_result()
-
 
17664
    result.success = self._handler.creditUserWallet(args.userId, args.amount)
-
 
17665
    oprot.writeMessageBegin("creditUserWallet", TMessageType.REPLY, seqid)
-
 
17666
    result.write(oprot)
-
 
17667
    oprot.writeMessageEnd()
-
 
17668
    oprot.trans.flush()
-
 
17669
 
17618
 
17670
 
17619
# HELPER FUNCTIONS AND STRUCTURES
17671
# HELPER FUNCTIONS AND STRUCTURES
17620
 
17672
 
17621
class createTransaction_args:
17673
class createTransaction_args:
17622
  """
17674
  """
Line 61823... Line 61875...
61823
      oprot.writeFieldEnd()
61875
      oprot.writeFieldEnd()
61824
    oprot.writeFieldStop()
61876
    oprot.writeFieldStop()
61825
    oprot.writeStructEnd()
61877
    oprot.writeStructEnd()
61826
 
61878
 
61827
  def validate(self):
61879
  def validate(self):
-
 
61880
    return
-
 
61881
 
-
 
61882
 
-
 
61883
  def __repr__(self):
-
 
61884
    L = ['%s=%r' % (key, value)
-
 
61885
      for key, value in self.__dict__.iteritems()]
-
 
61886
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
61887
 
-
 
61888
  def __eq__(self, other):
-
 
61889
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
61890
 
-
 
61891
  def __ne__(self, other):
-
 
61892
    return not (self == other)
-
 
61893
 
-
 
61894
class creditUserWallet_args:
-
 
61895
  """
-
 
61896
  Attributes:
-
 
61897
   - userId
-
 
61898
   - amount
-
 
61899
  """
-
 
61900
 
-
 
61901
  thrift_spec = (
-
 
61902
    None, # 0
-
 
61903
    (1, TType.I64, 'userId', None, None, ), # 1
-
 
61904
    (2, TType.I64, 'amount', None, None, ), # 2
-
 
61905
  )
-
 
61906
 
-
 
61907
  def __init__(self, userId=None, amount=None,):
-
 
61908
    self.userId = userId
-
 
61909
    self.amount = amount
-
 
61910
 
-
 
61911
  def read(self, iprot):
-
 
61912
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
61913
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
61914
      return
-
 
61915
    iprot.readStructBegin()
-
 
61916
    while True:
-
 
61917
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
61918
      if ftype == TType.STOP:
-
 
61919
        break
-
 
61920
      if fid == 1:
-
 
61921
        if ftype == TType.I64:
-
 
61922
          self.userId = iprot.readI64();
-
 
61923
        else:
-
 
61924
          iprot.skip(ftype)
-
 
61925
      elif fid == 2:
-
 
61926
        if ftype == TType.I64:
-
 
61927
          self.amount = iprot.readI64();
-
 
61928
        else:
-
 
61929
          iprot.skip(ftype)
-
 
61930
      else:
-
 
61931
        iprot.skip(ftype)
-
 
61932
      iprot.readFieldEnd()
-
 
61933
    iprot.readStructEnd()
-
 
61934
 
-
 
61935
  def write(self, oprot):
-
 
61936
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
61937
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
61938
      return
-
 
61939
    oprot.writeStructBegin('creditUserWallet_args')
-
 
61940
    if self.userId is not None:
-
 
61941
      oprot.writeFieldBegin('userId', TType.I64, 1)
-
 
61942
      oprot.writeI64(self.userId)
-
 
61943
      oprot.writeFieldEnd()
-
 
61944
    if self.amount is not None:
-
 
61945
      oprot.writeFieldBegin('amount', TType.I64, 2)
-
 
61946
      oprot.writeI64(self.amount)
-
 
61947
      oprot.writeFieldEnd()
-
 
61948
    oprot.writeFieldStop()
-
 
61949
    oprot.writeStructEnd()
-
 
61950
 
-
 
61951
  def validate(self):
-
 
61952
    return
-
 
61953
 
-
 
61954
 
-
 
61955
  def __repr__(self):
-
 
61956
    L = ['%s=%r' % (key, value)
-
 
61957
      for key, value in self.__dict__.iteritems()]
-
 
61958
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
61959
 
-
 
61960
  def __eq__(self, other):
-
 
61961
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
61962
 
-
 
61963
  def __ne__(self, other):
-
 
61964
    return not (self == other)
-
 
61965
 
-
 
61966
class creditUserWallet_result:
-
 
61967
  """
-
 
61968
  Attributes:
-
 
61969
   - success
-
 
61970
  """
-
 
61971
 
-
 
61972
  thrift_spec = (
-
 
61973
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
61974
  )
-
 
61975
 
-
 
61976
  def __init__(self, success=None,):
-
 
61977
    self.success = success
-
 
61978
 
-
 
61979
  def read(self, iprot):
-
 
61980
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
61981
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
61982
      return
-
 
61983
    iprot.readStructBegin()
-
 
61984
    while True:
-
 
61985
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
61986
      if ftype == TType.STOP:
-
 
61987
        break
-
 
61988
      if fid == 0:
-
 
61989
        if ftype == TType.BOOL:
-
 
61990
          self.success = iprot.readBool();
-
 
61991
        else:
-
 
61992
          iprot.skip(ftype)
-
 
61993
      else:
-
 
61994
        iprot.skip(ftype)
-
 
61995
      iprot.readFieldEnd()
-
 
61996
    iprot.readStructEnd()
-
 
61997
 
-
 
61998
  def write(self, oprot):
-
 
61999
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
62000
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
62001
      return
-
 
62002
    oprot.writeStructBegin('creditUserWallet_result')
-
 
62003
    if self.success is not None:
-
 
62004
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
62005
      oprot.writeBool(self.success)
-
 
62006
      oprot.writeFieldEnd()
-
 
62007
    oprot.writeFieldStop()
-
 
62008
    oprot.writeStructEnd()
-
 
62009
 
-
 
62010
  def validate(self):
61828
    return
62011
    return
61829
 
62012
 
61830
 
62013
 
61831
  def __repr__(self):
62014
  def __repr__(self):
61832
    L = ['%s=%r' % (key, value)
62015
    L = ['%s=%r' % (key, value)