Subversion Repositories SmartDukaan

Rev

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

Rev 772 Rev 785
Line 151... Line 151...
151
    Parameters:
151
    Parameters:
152
     - userId
152
     - userId
153
    """
153
    """
154
    pass
154
    pass
155
 
155
 
-
 
156
  def getDefaultPincode(self, userId):
-
 
157
    """
-
 
158
    Parameters:
-
 
159
     - userId
-
 
160
    """
-
 
161
    pass
-
 
162
 
156
  def createCart(self, userId):
163
  def createCart(self, userId):
157
    """
164
    """
158
    Parameters:
165
    Parameters:
159
     - userId
166
     - userId
160
    """
167
    """
Line 946... Line 953...
946
      return result.success
953
      return result.success
947
    if result.ucx != None:
954
    if result.ucx != None:
948
      raise result.ucx
955
      raise result.ucx
949
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getDefaultAddressId failed: unknown result");
956
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getDefaultAddressId failed: unknown result");
950
 
957
 
-
 
958
  def getDefaultPincode(self, userId):
-
 
959
    """
-
 
960
    Parameters:
-
 
961
     - userId
-
 
962
    """
-
 
963
    self.send_getDefaultPincode(userId)
-
 
964
    return self.recv_getDefaultPincode()
-
 
965
 
-
 
966
  def send_getDefaultPincode(self, userId):
-
 
967
    self._oprot.writeMessageBegin('getDefaultPincode', TMessageType.CALL, self._seqid)
-
 
968
    args = getDefaultPincode_args()
-
 
969
    args.userId = userId
-
 
970
    args.write(self._oprot)
-
 
971
    self._oprot.writeMessageEnd()
-
 
972
    self._oprot.trans.flush()
-
 
973
 
-
 
974
  def recv_getDefaultPincode(self, ):
-
 
975
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
976
    if mtype == TMessageType.EXCEPTION:
-
 
977
      x = TApplicationException()
-
 
978
      x.read(self._iprot)
-
 
979
      self._iprot.readMessageEnd()
-
 
980
      raise x
-
 
981
    result = getDefaultPincode_result()
-
 
982
    result.read(self._iprot)
-
 
983
    self._iprot.readMessageEnd()
-
 
984
    if result.success != None:
-
 
985
      return result.success
-
 
986
    if result.ucx != None:
-
 
987
      raise result.ucx
-
 
988
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getDefaultPincode failed: unknown result");
-
 
989
 
951
  def createCart(self, userId):
990
  def createCart(self, userId):
952
    """
991
    """
953
    Parameters:
992
    Parameters:
954
     - userId
993
     - userId
955
    """
994
    """
Line 1732... Line 1771...
1732
    self._processMap["setDefaultAddress"] = Processor.process_setDefaultAddress
1771
    self._processMap["setDefaultAddress"] = Processor.process_setDefaultAddress
1733
    self._processMap["updatePassword"] = Processor.process_updatePassword
1772
    self._processMap["updatePassword"] = Processor.process_updatePassword
1734
    self._processMap["forgotPassword"] = Processor.process_forgotPassword
1773
    self._processMap["forgotPassword"] = Processor.process_forgotPassword
1735
    self._processMap["getAllAddressesForUser"] = Processor.process_getAllAddressesForUser
1774
    self._processMap["getAllAddressesForUser"] = Processor.process_getAllAddressesForUser
1736
    self._processMap["getDefaultAddressId"] = Processor.process_getDefaultAddressId
1775
    self._processMap["getDefaultAddressId"] = Processor.process_getDefaultAddressId
-
 
1776
    self._processMap["getDefaultPincode"] = Processor.process_getDefaultPincode
1737
    self._processMap["createCart"] = Processor.process_createCart
1777
    self._processMap["createCart"] = Processor.process_createCart
1738
    self._processMap["getCurrentCart"] = Processor.process_getCurrentCart
1778
    self._processMap["getCurrentCart"] = Processor.process_getCurrentCart
1739
    self._processMap["getCart"] = Processor.process_getCart
1779
    self._processMap["getCart"] = Processor.process_getCart
1740
    self._processMap["getCartsForUser"] = Processor.process_getCartsForUser
1780
    self._processMap["getCartsForUser"] = Processor.process_getCartsForUser
1741
    self._processMap["getCartsByStatus"] = Processor.process_getCartsByStatus
1781
    self._processMap["getCartsByStatus"] = Processor.process_getCartsByStatus
Line 2020... Line 2060...
2020
    oprot.writeMessageBegin("getDefaultAddressId", TMessageType.REPLY, seqid)
2060
    oprot.writeMessageBegin("getDefaultAddressId", TMessageType.REPLY, seqid)
2021
    result.write(oprot)
2061
    result.write(oprot)
2022
    oprot.writeMessageEnd()
2062
    oprot.writeMessageEnd()
2023
    oprot.trans.flush()
2063
    oprot.trans.flush()
2024
 
2064
 
-
 
2065
  def process_getDefaultPincode(self, seqid, iprot, oprot):
-
 
2066
    args = getDefaultPincode_args()
-
 
2067
    args.read(iprot)
-
 
2068
    iprot.readMessageEnd()
-
 
2069
    result = getDefaultPincode_result()
-
 
2070
    try:
-
 
2071
      result.success = self._handler.getDefaultPincode(args.userId)
-
 
2072
    except UserContextException, ucx:
-
 
2073
      result.ucx = ucx
-
 
2074
    oprot.writeMessageBegin("getDefaultPincode", TMessageType.REPLY, seqid)
-
 
2075
    result.write(oprot)
-
 
2076
    oprot.writeMessageEnd()
-
 
2077
    oprot.trans.flush()
-
 
2078
 
2025
  def process_createCart(self, seqid, iprot, oprot):
2079
  def process_createCart(self, seqid, iprot, oprot):
2026
    args = createCart_args()
2080
    args = createCart_args()
2027
    args.read(iprot)
2081
    args.read(iprot)
2028
    iprot.readMessageEnd()
2082
    iprot.readMessageEnd()
2029
    result = createCart_result()
2083
    result = createCart_result()
Line 4632... Line 4686...
4632
      oprot.writeFieldEnd()
4686
      oprot.writeFieldEnd()
4633
    if self.ucx != None:
4687
    if self.ucx != None:
4634
      oprot.writeFieldBegin('ucx', TType.STRUCT, 1)
4688
      oprot.writeFieldBegin('ucx', TType.STRUCT, 1)
4635
      self.ucx.write(oprot)
4689
      self.ucx.write(oprot)
4636
      oprot.writeFieldEnd()
4690
      oprot.writeFieldEnd()
-
 
4691
    oprot.writeFieldStop()
-
 
4692
    oprot.writeStructEnd()
-
 
4693
 
-
 
4694
  def __repr__(self):
-
 
4695
    L = ['%s=%r' % (key, value)
-
 
4696
      for key, value in self.__dict__.iteritems()]
-
 
4697
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
4698
 
-
 
4699
  def __eq__(self, other):
-
 
4700
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
4701
 
-
 
4702
  def __ne__(self, other):
-
 
4703
    return not (self == other)
-
 
4704
 
-
 
4705
class getDefaultPincode_args:
-
 
4706
  """
-
 
4707
  Attributes:
-
 
4708
   - userId
-
 
4709
  """
-
 
4710
 
-
 
4711
  thrift_spec = (
-
 
4712
    None, # 0
-
 
4713
    (1, TType.I64, 'userId', None, None, ), # 1
-
 
4714
  )
-
 
4715
 
-
 
4716
  def __init__(self, userId=None,):
-
 
4717
    self.userId = userId
-
 
4718
 
-
 
4719
  def read(self, iprot):
-
 
4720
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
4721
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
4722
      return
-
 
4723
    iprot.readStructBegin()
-
 
4724
    while True:
-
 
4725
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
4726
      if ftype == TType.STOP:
-
 
4727
        break
-
 
4728
      if fid == 1:
-
 
4729
        if ftype == TType.I64:
-
 
4730
          self.userId = iprot.readI64();
-
 
4731
        else:
-
 
4732
          iprot.skip(ftype)
-
 
4733
      else:
-
 
4734
        iprot.skip(ftype)
-
 
4735
      iprot.readFieldEnd()
-
 
4736
    iprot.readStructEnd()
-
 
4737
 
-
 
4738
  def write(self, oprot):
-
 
4739
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
4740
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
4741
      return
-
 
4742
    oprot.writeStructBegin('getDefaultPincode_args')
-
 
4743
    if self.userId != None:
-
 
4744
      oprot.writeFieldBegin('userId', TType.I64, 1)
-
 
4745
      oprot.writeI64(self.userId)
-
 
4746
      oprot.writeFieldEnd()
-
 
4747
    oprot.writeFieldStop()
-
 
4748
    oprot.writeStructEnd()
-
 
4749
 
-
 
4750
  def __repr__(self):
-
 
4751
    L = ['%s=%r' % (key, value)
-
 
4752
      for key, value in self.__dict__.iteritems()]
-
 
4753
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
4754
 
-
 
4755
  def __eq__(self, other):
-
 
4756
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
4757
 
-
 
4758
  def __ne__(self, other):
-
 
4759
    return not (self == other)
-
 
4760
 
-
 
4761
class getDefaultPincode_result:
-
 
4762
  """
-
 
4763
  Attributes:
-
 
4764
   - success
-
 
4765
   - ucx
-
 
4766
  """
-
 
4767
 
-
 
4768
  thrift_spec = (
-
 
4769
    (0, TType.STRING, 'success', None, None, ), # 0
-
 
4770
    (1, TType.STRUCT, 'ucx', (UserContextException, UserContextException.thrift_spec), None, ), # 1
-
 
4771
  )
-
 
4772
 
-
 
4773
  def __init__(self, success=None, ucx=None,):
-
 
4774
    self.success = success
-
 
4775
    self.ucx = ucx
-
 
4776
 
-
 
4777
  def read(self, iprot):
-
 
4778
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
4779
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
4780
      return
-
 
4781
    iprot.readStructBegin()
-
 
4782
    while True:
-
 
4783
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
4784
      if ftype == TType.STOP:
-
 
4785
        break
-
 
4786
      if fid == 0:
-
 
4787
        if ftype == TType.STRING:
-
 
4788
          self.success = iprot.readString();
-
 
4789
        else:
-
 
4790
          iprot.skip(ftype)
-
 
4791
      elif fid == 1:
-
 
4792
        if ftype == TType.STRUCT:
-
 
4793
          self.ucx = UserContextException()
-
 
4794
          self.ucx.read(iprot)
-
 
4795
        else:
-
 
4796
          iprot.skip(ftype)
-
 
4797
      else:
-
 
4798
        iprot.skip(ftype)
-
 
4799
      iprot.readFieldEnd()
-
 
4800
    iprot.readStructEnd()
-
 
4801
 
-
 
4802
  def write(self, oprot):
-
 
4803
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
4804
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
4805
      return
-
 
4806
    oprot.writeStructBegin('getDefaultPincode_result')
-
 
4807
    if self.success != None:
-
 
4808
      oprot.writeFieldBegin('success', TType.STRING, 0)
-
 
4809
      oprot.writeString(self.success)
-
 
4810
      oprot.writeFieldEnd()
-
 
4811
    if self.ucx != None:
-
 
4812
      oprot.writeFieldBegin('ucx', TType.STRUCT, 1)
-
 
4813
      self.ucx.write(oprot)
-
 
4814
      oprot.writeFieldEnd()
4637
    oprot.writeFieldStop()
4815
    oprot.writeFieldStop()
4638
    oprot.writeStructEnd()
4816
    oprot.writeStructEnd()
4639
 
4817
 
4640
  def __repr__(self):
4818
  def __repr__(self):
4641
    L = ['%s=%r' % (key, value)
4819
    L = ['%s=%r' % (key, value)