Subversion Repositories SmartDukaan

Rev

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

Rev 884 Rev 1274
Line 159... Line 159...
159
    Parameters:
159
    Parameters:
160
     - userId
160
     - userId
161
    """
161
    """
162
    pass
162
    pass
163
 
163
 
-
 
164
  def saveUserCommunication(self, userId, replyTo, communicationType, orderId, airwaybillNo, productName, subject, message):
-
 
165
    """
-
 
166
    Parameters:
-
 
167
     - userId
-
 
168
     - replyTo
-
 
169
     - communicationType
-
 
170
     - orderId
-
 
171
     - airwaybillNo
-
 
172
     - productName
-
 
173
     - subject
-
 
174
     - message
-
 
175
    """
-
 
176
    pass
-
 
177
 
164
  def createCart(self, userId):
178
  def createCart(self, userId):
165
    """
179
    """
166
    Parameters:
180
    Parameters:
167
     - userId
181
     - userId
168
    """
182
    """
Line 988... Line 1002...
988
      return result.success
1002
      return result.success
989
    if result.ucx != None:
1003
    if result.ucx != None:
990
      raise result.ucx
1004
      raise result.ucx
991
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getDefaultPincode failed: unknown result");
1005
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getDefaultPincode failed: unknown result");
992
 
1006
 
-
 
1007
  def saveUserCommunication(self, userId, replyTo, communicationType, orderId, airwaybillNo, productName, subject, message):
-
 
1008
    """
-
 
1009
    Parameters:
-
 
1010
     - userId
-
 
1011
     - replyTo
-
 
1012
     - communicationType
-
 
1013
     - orderId
-
 
1014
     - airwaybillNo
-
 
1015
     - productName
-
 
1016
     - subject
-
 
1017
     - message
-
 
1018
    """
-
 
1019
    self.send_saveUserCommunication(userId, replyTo, communicationType, orderId, airwaybillNo, productName, subject, message)
-
 
1020
    return self.recv_saveUserCommunication()
-
 
1021
 
-
 
1022
  def send_saveUserCommunication(self, userId, replyTo, communicationType, orderId, airwaybillNo, productName, subject, message):
-
 
1023
    self._oprot.writeMessageBegin('saveUserCommunication', TMessageType.CALL, self._seqid)
-
 
1024
    args = saveUserCommunication_args()
-
 
1025
    args.userId = userId
-
 
1026
    args.replyTo = replyTo
-
 
1027
    args.communicationType = communicationType
-
 
1028
    args.orderId = orderId
-
 
1029
    args.airwaybillNo = airwaybillNo
-
 
1030
    args.productName = productName
-
 
1031
    args.subject = subject
-
 
1032
    args.message = message
-
 
1033
    args.write(self._oprot)
-
 
1034
    self._oprot.writeMessageEnd()
-
 
1035
    self._oprot.trans.flush()
-
 
1036
 
-
 
1037
  def recv_saveUserCommunication(self, ):
-
 
1038
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
1039
    if mtype == TMessageType.EXCEPTION:
-
 
1040
      x = TApplicationException()
-
 
1041
      x.read(self._iprot)
-
 
1042
      self._iprot.readMessageEnd()
-
 
1043
      raise x
-
 
1044
    result = saveUserCommunication_result()
-
 
1045
    result.read(self._iprot)
-
 
1046
    self._iprot.readMessageEnd()
-
 
1047
    if result.success != None:
-
 
1048
      return result.success
-
 
1049
    if result.ucx != None:
-
 
1050
      raise result.ucx
-
 
1051
    raise TApplicationException(TApplicationException.MISSING_RESULT, "saveUserCommunication failed: unknown result");
-
 
1052
 
993
  def createCart(self, userId):
1053
  def createCart(self, userId):
994
    """
1054
    """
995
    Parameters:
1055
    Parameters:
996
     - userId
1056
     - userId
997
    """
1057
    """
Line 1775... Line 1835...
1775
    self._processMap["updatePassword"] = Processor.process_updatePassword
1835
    self._processMap["updatePassword"] = Processor.process_updatePassword
1776
    self._processMap["forgotPassword"] = Processor.process_forgotPassword
1836
    self._processMap["forgotPassword"] = Processor.process_forgotPassword
1777
    self._processMap["getAllAddressesForUser"] = Processor.process_getAllAddressesForUser
1837
    self._processMap["getAllAddressesForUser"] = Processor.process_getAllAddressesForUser
1778
    self._processMap["getDefaultAddressId"] = Processor.process_getDefaultAddressId
1838
    self._processMap["getDefaultAddressId"] = Processor.process_getDefaultAddressId
1779
    self._processMap["getDefaultPincode"] = Processor.process_getDefaultPincode
1839
    self._processMap["getDefaultPincode"] = Processor.process_getDefaultPincode
-
 
1840
    self._processMap["saveUserCommunication"] = Processor.process_saveUserCommunication
1780
    self._processMap["createCart"] = Processor.process_createCart
1841
    self._processMap["createCart"] = Processor.process_createCart
1781
    self._processMap["getCurrentCart"] = Processor.process_getCurrentCart
1842
    self._processMap["getCurrentCart"] = Processor.process_getCurrentCart
1782
    self._processMap["getCart"] = Processor.process_getCart
1843
    self._processMap["getCart"] = Processor.process_getCart
1783
    self._processMap["getCartsForUser"] = Processor.process_getCartsForUser
1844
    self._processMap["getCartsForUser"] = Processor.process_getCartsForUser
1784
    self._processMap["getCartsByStatus"] = Processor.process_getCartsByStatus
1845
    self._processMap["getCartsByStatus"] = Processor.process_getCartsByStatus
Line 2077... Line 2138...
2077
    oprot.writeMessageBegin("getDefaultPincode", TMessageType.REPLY, seqid)
2138
    oprot.writeMessageBegin("getDefaultPincode", TMessageType.REPLY, seqid)
2078
    result.write(oprot)
2139
    result.write(oprot)
2079
    oprot.writeMessageEnd()
2140
    oprot.writeMessageEnd()
2080
    oprot.trans.flush()
2141
    oprot.trans.flush()
2081
 
2142
 
-
 
2143
  def process_saveUserCommunication(self, seqid, iprot, oprot):
-
 
2144
    args = saveUserCommunication_args()
-
 
2145
    args.read(iprot)
-
 
2146
    iprot.readMessageEnd()
-
 
2147
    result = saveUserCommunication_result()
-
 
2148
    try:
-
 
2149
      result.success = self._handler.saveUserCommunication(args.userId, args.replyTo, args.communicationType, args.orderId, args.airwaybillNo, args.productName, args.subject, args.message)
-
 
2150
    except UserCommunicationException, ucx:
-
 
2151
      result.ucx = ucx
-
 
2152
    oprot.writeMessageBegin("saveUserCommunication", TMessageType.REPLY, seqid)
-
 
2153
    result.write(oprot)
-
 
2154
    oprot.writeMessageEnd()
-
 
2155
    oprot.trans.flush()
-
 
2156
 
2082
  def process_createCart(self, seqid, iprot, oprot):
2157
  def process_createCart(self, seqid, iprot, oprot):
2083
    args = createCart_args()
2158
    args = createCart_args()
2084
    args.read(iprot)
2159
    args.read(iprot)
2085
    iprot.readMessageEnd()
2160
    iprot.readMessageEnd()
2086
    result = createCart_result()
2161
    result = createCart_result()
Line 4825... Line 4900...
4825
      oprot.writeFieldEnd()
4900
      oprot.writeFieldEnd()
4826
    if self.ucx != None:
4901
    if self.ucx != None:
4827
      oprot.writeFieldBegin('ucx', TType.STRUCT, 1)
4902
      oprot.writeFieldBegin('ucx', TType.STRUCT, 1)
4828
      self.ucx.write(oprot)
4903
      self.ucx.write(oprot)
4829
      oprot.writeFieldEnd()
4904
      oprot.writeFieldEnd()
-
 
4905
    oprot.writeFieldStop()
-
 
4906
    oprot.writeStructEnd()
-
 
4907
 
-
 
4908
  def __repr__(self):
-
 
4909
    L = ['%s=%r' % (key, value)
-
 
4910
      for key, value in self.__dict__.iteritems()]
-
 
4911
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
4912
 
-
 
4913
  def __eq__(self, other):
-
 
4914
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
4915
 
-
 
4916
  def __ne__(self, other):
-
 
4917
    return not (self == other)
-
 
4918
 
-
 
4919
class saveUserCommunication_args:
-
 
4920
  """
-
 
4921
  Attributes:
-
 
4922
   - userId
-
 
4923
   - replyTo
-
 
4924
   - communicationType
-
 
4925
   - orderId
-
 
4926
   - airwaybillNo
-
 
4927
   - productName
-
 
4928
   - subject
-
 
4929
   - message
-
 
4930
  """
-
 
4931
 
-
 
4932
  thrift_spec = (
-
 
4933
    None, # 0
-
 
4934
    (1, TType.I64, 'userId', None, None, ), # 1
-
 
4935
    (2, TType.STRING, 'replyTo', None, None, ), # 2
-
 
4936
    (3, TType.I64, 'communicationType', None, None, ), # 3
-
 
4937
    (4, TType.I64, 'orderId', None, None, ), # 4
-
 
4938
    (5, TType.STRING, 'airwaybillNo', None, None, ), # 5
-
 
4939
    (6, TType.STRING, 'productName', None, None, ), # 6
-
 
4940
    (7, TType.STRING, 'subject', None, None, ), # 7
-
 
4941
    (8, TType.STRING, 'message', None, None, ), # 8
-
 
4942
  )
-
 
4943
 
-
 
4944
  def __init__(self, userId=None, replyTo=None, communicationType=None, orderId=None, airwaybillNo=None, productName=None, subject=None, message=None,):
-
 
4945
    self.userId = userId
-
 
4946
    self.replyTo = replyTo
-
 
4947
    self.communicationType = communicationType
-
 
4948
    self.orderId = orderId
-
 
4949
    self.airwaybillNo = airwaybillNo
-
 
4950
    self.productName = productName
-
 
4951
    self.subject = subject
-
 
4952
    self.message = message
-
 
4953
 
-
 
4954
  def read(self, iprot):
-
 
4955
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
4956
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
4957
      return
-
 
4958
    iprot.readStructBegin()
-
 
4959
    while True:
-
 
4960
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
4961
      if ftype == TType.STOP:
-
 
4962
        break
-
 
4963
      if fid == 1:
-
 
4964
        if ftype == TType.I64:
-
 
4965
          self.userId = iprot.readI64();
-
 
4966
        else:
-
 
4967
          iprot.skip(ftype)
-
 
4968
      elif fid == 2:
-
 
4969
        if ftype == TType.STRING:
-
 
4970
          self.replyTo = iprot.readString();
-
 
4971
        else:
-
 
4972
          iprot.skip(ftype)
-
 
4973
      elif fid == 3:
-
 
4974
        if ftype == TType.I64:
-
 
4975
          self.communicationType = iprot.readI64();
-
 
4976
        else:
-
 
4977
          iprot.skip(ftype)
-
 
4978
      elif fid == 4:
-
 
4979
        if ftype == TType.I64:
-
 
4980
          self.orderId = iprot.readI64();
-
 
4981
        else:
-
 
4982
          iprot.skip(ftype)
-
 
4983
      elif fid == 5:
-
 
4984
        if ftype == TType.STRING:
-
 
4985
          self.airwaybillNo = iprot.readString();
-
 
4986
        else:
-
 
4987
          iprot.skip(ftype)
-
 
4988
      elif fid == 6:
-
 
4989
        if ftype == TType.STRING:
-
 
4990
          self.productName = iprot.readString();
-
 
4991
        else:
-
 
4992
          iprot.skip(ftype)
-
 
4993
      elif fid == 7:
-
 
4994
        if ftype == TType.STRING:
-
 
4995
          self.subject = iprot.readString();
-
 
4996
        else:
-
 
4997
          iprot.skip(ftype)
-
 
4998
      elif fid == 8:
-
 
4999
        if ftype == TType.STRING:
-
 
5000
          self.message = iprot.readString();
-
 
5001
        else:
-
 
5002
          iprot.skip(ftype)
-
 
5003
      else:
-
 
5004
        iprot.skip(ftype)
-
 
5005
      iprot.readFieldEnd()
-
 
5006
    iprot.readStructEnd()
-
 
5007
 
-
 
5008
  def write(self, oprot):
-
 
5009
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
5010
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
5011
      return
-
 
5012
    oprot.writeStructBegin('saveUserCommunication_args')
-
 
5013
    if self.userId != None:
-
 
5014
      oprot.writeFieldBegin('userId', TType.I64, 1)
-
 
5015
      oprot.writeI64(self.userId)
-
 
5016
      oprot.writeFieldEnd()
-
 
5017
    if self.replyTo != None:
-
 
5018
      oprot.writeFieldBegin('replyTo', TType.STRING, 2)
-
 
5019
      oprot.writeString(self.replyTo)
-
 
5020
      oprot.writeFieldEnd()
-
 
5021
    if self.communicationType != None:
-
 
5022
      oprot.writeFieldBegin('communicationType', TType.I64, 3)
-
 
5023
      oprot.writeI64(self.communicationType)
-
 
5024
      oprot.writeFieldEnd()
-
 
5025
    if self.orderId != None:
-
 
5026
      oprot.writeFieldBegin('orderId', TType.I64, 4)
-
 
5027
      oprot.writeI64(self.orderId)
-
 
5028
      oprot.writeFieldEnd()
-
 
5029
    if self.airwaybillNo != None:
-
 
5030
      oprot.writeFieldBegin('airwaybillNo', TType.STRING, 5)
-
 
5031
      oprot.writeString(self.airwaybillNo)
-
 
5032
      oprot.writeFieldEnd()
-
 
5033
    if self.productName != None:
-
 
5034
      oprot.writeFieldBegin('productName', TType.STRING, 6)
-
 
5035
      oprot.writeString(self.productName)
-
 
5036
      oprot.writeFieldEnd()
-
 
5037
    if self.subject != None:
-
 
5038
      oprot.writeFieldBegin('subject', TType.STRING, 7)
-
 
5039
      oprot.writeString(self.subject)
-
 
5040
      oprot.writeFieldEnd()
-
 
5041
    if self.message != None:
-
 
5042
      oprot.writeFieldBegin('message', TType.STRING, 8)
-
 
5043
      oprot.writeString(self.message)
-
 
5044
      oprot.writeFieldEnd()
-
 
5045
    oprot.writeFieldStop()
-
 
5046
    oprot.writeStructEnd()
-
 
5047
 
-
 
5048
  def __repr__(self):
-
 
5049
    L = ['%s=%r' % (key, value)
-
 
5050
      for key, value in self.__dict__.iteritems()]
-
 
5051
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
5052
 
-
 
5053
  def __eq__(self, other):
-
 
5054
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
5055
 
-
 
5056
  def __ne__(self, other):
-
 
5057
    return not (self == other)
-
 
5058
 
-
 
5059
class saveUserCommunication_result:
-
 
5060
  """
-
 
5061
  Attributes:
-
 
5062
   - success
-
 
5063
   - ucx
-
 
5064
  """
-
 
5065
 
-
 
5066
  thrift_spec = (
-
 
5067
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
5068
    (1, TType.STRUCT, 'ucx', (UserCommunicationException, UserCommunicationException.thrift_spec), None, ), # 1
-
 
5069
  )
-
 
5070
 
-
 
5071
  def __init__(self, success=None, ucx=None,):
-
 
5072
    self.success = success
-
 
5073
    self.ucx = ucx
-
 
5074
 
-
 
5075
  def read(self, iprot):
-
 
5076
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
5077
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
5078
      return
-
 
5079
    iprot.readStructBegin()
-
 
5080
    while True:
-
 
5081
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
5082
      if ftype == TType.STOP:
-
 
5083
        break
-
 
5084
      if fid == 0:
-
 
5085
        if ftype == TType.BOOL:
-
 
5086
          self.success = iprot.readBool();
-
 
5087
        else:
-
 
5088
          iprot.skip(ftype)
-
 
5089
      elif fid == 1:
-
 
5090
        if ftype == TType.STRUCT:
-
 
5091
          self.ucx = UserCommunicationException()
-
 
5092
          self.ucx.read(iprot)
-
 
5093
        else:
-
 
5094
          iprot.skip(ftype)
-
 
5095
      else:
-
 
5096
        iprot.skip(ftype)
-
 
5097
      iprot.readFieldEnd()
-
 
5098
    iprot.readStructEnd()
-
 
5099
 
-
 
5100
  def write(self, oprot):
-
 
5101
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
5102
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
5103
      return
-
 
5104
    oprot.writeStructBegin('saveUserCommunication_result')
-
 
5105
    if self.success != None:
-
 
5106
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
5107
      oprot.writeBool(self.success)
-
 
5108
      oprot.writeFieldEnd()
-
 
5109
    if self.ucx != None:
-
 
5110
      oprot.writeFieldBegin('ucx', TType.STRUCT, 1)
-
 
5111
      self.ucx.write(oprot)
-
 
5112
      oprot.writeFieldEnd()
4830
    oprot.writeFieldStop()
5113
    oprot.writeFieldStop()
4831
    oprot.writeStructEnd()
5114
    oprot.writeStructEnd()
4832
 
5115
 
4833
  def __repr__(self):
5116
  def __repr__(self):
4834
    L = ['%s=%r' % (key, value)
5117
    L = ['%s=%r' % (key, value)