Subversion Repositories SmartDukaan

Rev

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

Rev 7075 Rev 7080
Line 1492... Line 1492...
1492
    Parameters:
1492
    Parameters:
1493
     - thriftRechargeTransaction
1493
     - thriftRechargeTransaction
1494
    """
1494
    """
1495
    pass
1495
    pass
1496
 
1496
 
-
 
1497
  def getRechargeTransaction(self, rechargeId):
-
 
1498
    """
-
 
1499
    Parameters:
-
 
1500
     - rechargeId
-
 
1501
    """
-
 
1502
    pass
-
 
1503
 
-
 
1504
  def getFRCs(self, circleId, operatorId):
-
 
1505
    """
-
 
1506
    Parameters:
-
 
1507
     - circleId
-
 
1508
     - operatorId
-
 
1509
    """
-
 
1510
    pass
-
 
1511
 
1497
 
1512
 
1498
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1513
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1499
  def __init__(self, iprot, oprot=None):
1514
  def __init__(self, iprot, oprot=None):
1500
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1515
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1501
 
1516
 
Line 6790... Line 6805...
6790
    self._iprot.readMessageEnd()
6805
    self._iprot.readMessageEnd()
6791
    if result.success is not None:
6806
    if result.success is not None:
6792
      return result.success
6807
      return result.success
6793
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createRechargeTransaction failed: unknown result");
6808
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createRechargeTransaction failed: unknown result");
6794
 
6809
 
-
 
6810
  def getRechargeTransaction(self, rechargeId):
-
 
6811
    """
-
 
6812
    Parameters:
-
 
6813
     - rechargeId
-
 
6814
    """
-
 
6815
    self.send_getRechargeTransaction(rechargeId)
-
 
6816
    return self.recv_getRechargeTransaction()
-
 
6817
 
-
 
6818
  def send_getRechargeTransaction(self, rechargeId):
-
 
6819
    self._oprot.writeMessageBegin('getRechargeTransaction', TMessageType.CALL, self._seqid)
-
 
6820
    args = getRechargeTransaction_args()
-
 
6821
    args.rechargeId = rechargeId
-
 
6822
    args.write(self._oprot)
-
 
6823
    self._oprot.writeMessageEnd()
-
 
6824
    self._oprot.trans.flush()
-
 
6825
 
-
 
6826
  def recv_getRechargeTransaction(self, ):
-
 
6827
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
6828
    if mtype == TMessageType.EXCEPTION:
-
 
6829
      x = TApplicationException()
-
 
6830
      x.read(self._iprot)
-
 
6831
      self._iprot.readMessageEnd()
-
 
6832
      raise x
-
 
6833
    result = getRechargeTransaction_result()
-
 
6834
    result.read(self._iprot)
-
 
6835
    self._iprot.readMessageEnd()
-
 
6836
    if result.success is not None:
-
 
6837
      return result.success
-
 
6838
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getRechargeTransaction failed: unknown result");
-
 
6839
 
-
 
6840
  def getFRCs(self, circleId, operatorId):
-
 
6841
    """
-
 
6842
    Parameters:
-
 
6843
     - circleId
-
 
6844
     - operatorId
-
 
6845
    """
-
 
6846
    self.send_getFRCs(circleId, operatorId)
-
 
6847
    return self.recv_getFRCs()
-
 
6848
 
-
 
6849
  def send_getFRCs(self, circleId, operatorId):
-
 
6850
    self._oprot.writeMessageBegin('getFRCs', TMessageType.CALL, self._seqid)
-
 
6851
    args = getFRCs_args()
-
 
6852
    args.circleId = circleId
-
 
6853
    args.operatorId = operatorId
-
 
6854
    args.write(self._oprot)
-
 
6855
    self._oprot.writeMessageEnd()
-
 
6856
    self._oprot.trans.flush()
-
 
6857
 
-
 
6858
  def recv_getFRCs(self, ):
-
 
6859
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
6860
    if mtype == TMessageType.EXCEPTION:
-
 
6861
      x = TApplicationException()
-
 
6862
      x.read(self._iprot)
-
 
6863
      self._iprot.readMessageEnd()
-
 
6864
      raise x
-
 
6865
    result = getFRCs_result()
-
 
6866
    result.read(self._iprot)
-
 
6867
    self._iprot.readMessageEnd()
-
 
6868
    if result.success is not None:
-
 
6869
      return result.success
-
 
6870
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getFRCs failed: unknown result");
-
 
6871
 
6795
 
6872
 
6796
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
6873
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
6797
  def __init__(self, handler):
6874
  def __init__(self, handler):
6798
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
6875
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
6799
    self._processMap["createTransaction"] = Processor.process_createTransaction
6876
    self._processMap["createTransaction"] = Processor.process_createTransaction
Line 6948... Line 7025...
6948
    self._processMap["getDocument"] = Processor.process_getDocument
7025
    self._processMap["getDocument"] = Processor.process_getDocument
6949
    self._processMap["changeShippingAddress"] = Processor.process_changeShippingAddress
7026
    self._processMap["changeShippingAddress"] = Processor.process_changeShippingAddress
6950
    self._processMap["retrieveInvoice"] = Processor.process_retrieveInvoice
7027
    self._processMap["retrieveInvoice"] = Processor.process_retrieveInvoice
6951
    self._processMap["receiveUpdatesForRedExpress"] = Processor.process_receiveUpdatesForRedExpress
7028
    self._processMap["receiveUpdatesForRedExpress"] = Processor.process_receiveUpdatesForRedExpress
6952
    self._processMap["createRechargeTransaction"] = Processor.process_createRechargeTransaction
7029
    self._processMap["createRechargeTransaction"] = Processor.process_createRechargeTransaction
-
 
7030
    self._processMap["getRechargeTransaction"] = Processor.process_getRechargeTransaction
-
 
7031
    self._processMap["getFRCs"] = Processor.process_getFRCs
6953
 
7032
 
6954
  def process(self, iprot, oprot):
7033
  def process(self, iprot, oprot):
6955
    (name, type, seqid) = iprot.readMessageBegin()
7034
    (name, type, seqid) = iprot.readMessageBegin()
6956
    if name not in self._processMap:
7035
    if name not in self._processMap:
6957
      iprot.skip(TType.STRUCT)
7036
      iprot.skip(TType.STRUCT)
Line 8952... Line 9031...
8952
    oprot.writeMessageBegin("createRechargeTransaction", TMessageType.REPLY, seqid)
9031
    oprot.writeMessageBegin("createRechargeTransaction", TMessageType.REPLY, seqid)
8953
    result.write(oprot)
9032
    result.write(oprot)
8954
    oprot.writeMessageEnd()
9033
    oprot.writeMessageEnd()
8955
    oprot.trans.flush()
9034
    oprot.trans.flush()
8956
 
9035
 
-
 
9036
  def process_getRechargeTransaction(self, seqid, iprot, oprot):
-
 
9037
    args = getRechargeTransaction_args()
-
 
9038
    args.read(iprot)
-
 
9039
    iprot.readMessageEnd()
-
 
9040
    result = getRechargeTransaction_result()
-
 
9041
    result.success = self._handler.getRechargeTransaction(args.rechargeId)
-
 
9042
    oprot.writeMessageBegin("getRechargeTransaction", TMessageType.REPLY, seqid)
-
 
9043
    result.write(oprot)
-
 
9044
    oprot.writeMessageEnd()
-
 
9045
    oprot.trans.flush()
-
 
9046
 
-
 
9047
  def process_getFRCs(self, seqid, iprot, oprot):
-
 
9048
    args = getFRCs_args()
-
 
9049
    args.read(iprot)
-
 
9050
    iprot.readMessageEnd()
-
 
9051
    result = getFRCs_result()
-
 
9052
    result.success = self._handler.getFRCs(args.circleId, args.operatorId)
-
 
9053
    oprot.writeMessageBegin("getFRCs", TMessageType.REPLY, seqid)
-
 
9054
    result.write(oprot)
-
 
9055
    oprot.writeMessageEnd()
-
 
9056
    oprot.trans.flush()
-
 
9057
 
8957
 
9058
 
8958
# HELPER FUNCTIONS AND STRUCTURES
9059
# HELPER FUNCTIONS AND STRUCTURES
8959
 
9060
 
8960
class createTransaction_args:
9061
class createTransaction_args:
8961
  """
9062
  """
Line 30602... Line 30703...
30602
      oprot.writeFieldEnd()
30703
      oprot.writeFieldEnd()
30603
    oprot.writeFieldStop()
30704
    oprot.writeFieldStop()
30604
    oprot.writeStructEnd()
30705
    oprot.writeStructEnd()
30605
 
30706
 
30606
  def validate(self):
30707
  def validate(self):
-
 
30708
    return
-
 
30709
 
-
 
30710
 
-
 
30711
  def __repr__(self):
-
 
30712
    L = ['%s=%r' % (key, value)
-
 
30713
      for key, value in self.__dict__.iteritems()]
-
 
30714
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
30715
 
-
 
30716
  def __eq__(self, other):
-
 
30717
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
30718
 
-
 
30719
  def __ne__(self, other):
-
 
30720
    return not (self == other)
-
 
30721
 
-
 
30722
class getRechargeTransaction_args:
-
 
30723
  """
-
 
30724
  Attributes:
-
 
30725
   - rechargeId
-
 
30726
  """
-
 
30727
 
-
 
30728
  thrift_spec = (
-
 
30729
    None, # 0
-
 
30730
    (1, TType.I64, 'rechargeId', None, None, ), # 1
-
 
30731
  )
-
 
30732
 
-
 
30733
  def __init__(self, rechargeId=None,):
-
 
30734
    self.rechargeId = rechargeId
-
 
30735
 
-
 
30736
  def read(self, iprot):
-
 
30737
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
30738
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
30739
      return
-
 
30740
    iprot.readStructBegin()
-
 
30741
    while True:
-
 
30742
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
30743
      if ftype == TType.STOP:
-
 
30744
        break
-
 
30745
      if fid == 1:
-
 
30746
        if ftype == TType.I64:
-
 
30747
          self.rechargeId = iprot.readI64();
-
 
30748
        else:
-
 
30749
          iprot.skip(ftype)
-
 
30750
      else:
-
 
30751
        iprot.skip(ftype)
-
 
30752
      iprot.readFieldEnd()
-
 
30753
    iprot.readStructEnd()
-
 
30754
 
-
 
30755
  def write(self, oprot):
-
 
30756
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
30757
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
30758
      return
-
 
30759
    oprot.writeStructBegin('getRechargeTransaction_args')
-
 
30760
    if self.rechargeId is not None:
-
 
30761
      oprot.writeFieldBegin('rechargeId', TType.I64, 1)
-
 
30762
      oprot.writeI64(self.rechargeId)
-
 
30763
      oprot.writeFieldEnd()
-
 
30764
    oprot.writeFieldStop()
-
 
30765
    oprot.writeStructEnd()
-
 
30766
 
-
 
30767
  def validate(self):
-
 
30768
    return
-
 
30769
 
-
 
30770
 
-
 
30771
  def __repr__(self):
-
 
30772
    L = ['%s=%r' % (key, value)
-
 
30773
      for key, value in self.__dict__.iteritems()]
-
 
30774
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
30775
 
-
 
30776
  def __eq__(self, other):
-
 
30777
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
30778
 
-
 
30779
  def __ne__(self, other):
-
 
30780
    return not (self == other)
-
 
30781
 
-
 
30782
class getRechargeTransaction_result:
-
 
30783
  """
-
 
30784
  Attributes:
-
 
30785
   - success
-
 
30786
  """
-
 
30787
 
-
 
30788
  thrift_spec = (
-
 
30789
    (0, TType.STRUCT, 'success', (RechargeTransaction, RechargeTransaction.thrift_spec), None, ), # 0
-
 
30790
  )
-
 
30791
 
-
 
30792
  def __init__(self, success=None,):
-
 
30793
    self.success = success
-
 
30794
 
-
 
30795
  def read(self, iprot):
-
 
30796
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
30797
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
30798
      return
-
 
30799
    iprot.readStructBegin()
-
 
30800
    while True:
-
 
30801
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
30802
      if ftype == TType.STOP:
-
 
30803
        break
-
 
30804
      if fid == 0:
-
 
30805
        if ftype == TType.STRUCT:
-
 
30806
          self.success = RechargeTransaction()
-
 
30807
          self.success.read(iprot)
-
 
30808
        else:
-
 
30809
          iprot.skip(ftype)
-
 
30810
      else:
-
 
30811
        iprot.skip(ftype)
-
 
30812
      iprot.readFieldEnd()
-
 
30813
    iprot.readStructEnd()
-
 
30814
 
-
 
30815
  def write(self, oprot):
-
 
30816
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
30817
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
30818
      return
-
 
30819
    oprot.writeStructBegin('getRechargeTransaction_result')
-
 
30820
    if self.success is not None:
-
 
30821
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
-
 
30822
      self.success.write(oprot)
-
 
30823
      oprot.writeFieldEnd()
-
 
30824
    oprot.writeFieldStop()
-
 
30825
    oprot.writeStructEnd()
-
 
30826
 
-
 
30827
  def validate(self):
-
 
30828
    return
-
 
30829
 
-
 
30830
 
-
 
30831
  def __repr__(self):
-
 
30832
    L = ['%s=%r' % (key, value)
-
 
30833
      for key, value in self.__dict__.iteritems()]
-
 
30834
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
30835
 
-
 
30836
  def __eq__(self, other):
-
 
30837
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
30838
 
-
 
30839
  def __ne__(self, other):
-
 
30840
    return not (self == other)
-
 
30841
 
-
 
30842
class getFRCs_args:
-
 
30843
  """
-
 
30844
  Attributes:
-
 
30845
   - circleId
-
 
30846
   - operatorId
-
 
30847
  """
-
 
30848
 
-
 
30849
  thrift_spec = (
-
 
30850
    None, # 0
-
 
30851
    (1, TType.I64, 'circleId', None, None, ), # 1
-
 
30852
    (2, TType.I64, 'operatorId', None, None, ), # 2
-
 
30853
  )
-
 
30854
 
-
 
30855
  def __init__(self, circleId=None, operatorId=None,):
-
 
30856
    self.circleId = circleId
-
 
30857
    self.operatorId = operatorId
-
 
30858
 
-
 
30859
  def read(self, iprot):
-
 
30860
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
30861
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
30862
      return
-
 
30863
    iprot.readStructBegin()
-
 
30864
    while True:
-
 
30865
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
30866
      if ftype == TType.STOP:
-
 
30867
        break
-
 
30868
      if fid == 1:
-
 
30869
        if ftype == TType.I64:
-
 
30870
          self.circleId = iprot.readI64();
-
 
30871
        else:
-
 
30872
          iprot.skip(ftype)
-
 
30873
      elif fid == 2:
-
 
30874
        if ftype == TType.I64:
-
 
30875
          self.operatorId = iprot.readI64();
-
 
30876
        else:
-
 
30877
          iprot.skip(ftype)
-
 
30878
      else:
-
 
30879
        iprot.skip(ftype)
-
 
30880
      iprot.readFieldEnd()
-
 
30881
    iprot.readStructEnd()
-
 
30882
 
-
 
30883
  def write(self, oprot):
-
 
30884
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
30885
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
30886
      return
-
 
30887
    oprot.writeStructBegin('getFRCs_args')
-
 
30888
    if self.circleId is not None:
-
 
30889
      oprot.writeFieldBegin('circleId', TType.I64, 1)
-
 
30890
      oprot.writeI64(self.circleId)
-
 
30891
      oprot.writeFieldEnd()
-
 
30892
    if self.operatorId is not None:
-
 
30893
      oprot.writeFieldBegin('operatorId', TType.I64, 2)
-
 
30894
      oprot.writeI64(self.operatorId)
-
 
30895
      oprot.writeFieldEnd()
-
 
30896
    oprot.writeFieldStop()
-
 
30897
    oprot.writeStructEnd()
-
 
30898
 
-
 
30899
  def validate(self):
-
 
30900
    return
-
 
30901
 
-
 
30902
 
-
 
30903
  def __repr__(self):
-
 
30904
    L = ['%s=%r' % (key, value)
-
 
30905
      for key, value in self.__dict__.iteritems()]
-
 
30906
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
30907
 
-
 
30908
  def __eq__(self, other):
-
 
30909
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
30910
 
-
 
30911
  def __ne__(self, other):
-
 
30912
    return not (self == other)
-
 
30913
 
-
 
30914
class getFRCs_result:
-
 
30915
  """
-
 
30916
  Attributes:
-
 
30917
   - success
-
 
30918
  """
-
 
30919
 
-
 
30920
  thrift_spec = (
-
 
30921
    (0, TType.LIST, 'success', (TType.STRUCT,(FRC, FRC.thrift_spec)), None, ), # 0
-
 
30922
  )
-
 
30923
 
-
 
30924
  def __init__(self, success=None,):
-
 
30925
    self.success = success
-
 
30926
 
-
 
30927
  def read(self, iprot):
-
 
30928
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
30929
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
30930
      return
-
 
30931
    iprot.readStructBegin()
-
 
30932
    while True:
-
 
30933
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
30934
      if ftype == TType.STOP:
-
 
30935
        break
-
 
30936
      if fid == 0:
-
 
30937
        if ftype == TType.LIST:
-
 
30938
          self.success = []
-
 
30939
          (_etype740, _size737) = iprot.readListBegin()
-
 
30940
          for _i741 in xrange(_size737):
-
 
30941
            _elem742 = FRC()
-
 
30942
            _elem742.read(iprot)
-
 
30943
            self.success.append(_elem742)
-
 
30944
          iprot.readListEnd()
-
 
30945
        else:
-
 
30946
          iprot.skip(ftype)
-
 
30947
      else:
-
 
30948
        iprot.skip(ftype)
-
 
30949
      iprot.readFieldEnd()
-
 
30950
    iprot.readStructEnd()
-
 
30951
 
-
 
30952
  def write(self, oprot):
-
 
30953
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
30954
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
30955
      return
-
 
30956
    oprot.writeStructBegin('getFRCs_result')
-
 
30957
    if self.success is not None:
-
 
30958
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
30959
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
30960
      for iter743 in self.success:
-
 
30961
        iter743.write(oprot)
-
 
30962
      oprot.writeListEnd()
-
 
30963
      oprot.writeFieldEnd()
-
 
30964
    oprot.writeFieldStop()
-
 
30965
    oprot.writeStructEnd()
-
 
30966
 
-
 
30967
  def validate(self):
30607
    return
30968
    return
30608
 
30969
 
30609
 
30970
 
30610
  def __repr__(self):
30971
  def __repr__(self):
30611
    L = ['%s=%r' % (key, value)
30972
    L = ['%s=%r' % (key, value)