Subversion Repositories SmartDukaan

Rev

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

Rev 1891 Rev 1894
Line 152... Line 152...
152
    Parameters:
152
    Parameters:
153
     - userId
153
     - userId
154
    """
154
    """
155
    pass
155
    pass
156
 
156
 
-
 
157
  def getAddressById(self, addressId):
-
 
158
    """
-
 
159
    Parameters:
-
 
160
     - addressId
-
 
161
    """
-
 
162
    pass
-
 
163
 
157
  def getDefaultAddressId(self, userId):
164
  def getDefaultAddressId(self, userId):
158
    """
165
    """
159
    Parameters:
166
    Parameters:
160
     - userId
167
     - userId
161
    """
168
    """
Line 1138... Line 1145...
1138
      return result.success
1145
      return result.success
1139
    if result.ucx != None:
1146
    if result.ucx != None:
1140
      raise result.ucx
1147
      raise result.ucx
1141
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllAddressesForUser failed: unknown result");
1148
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllAddressesForUser failed: unknown result");
1142
 
1149
 
-
 
1150
  def getAddressById(self, addressId):
-
 
1151
    """
-
 
1152
    Parameters:
-
 
1153
     - addressId
-
 
1154
    """
-
 
1155
    self.send_getAddressById(addressId)
-
 
1156
    return self.recv_getAddressById()
-
 
1157
 
-
 
1158
  def send_getAddressById(self, addressId):
-
 
1159
    self._oprot.writeMessageBegin('getAddressById', TMessageType.CALL, self._seqid)
-
 
1160
    args = getAddressById_args()
-
 
1161
    args.addressId = addressId
-
 
1162
    args.write(self._oprot)
-
 
1163
    self._oprot.writeMessageEnd()
-
 
1164
    self._oprot.trans.flush()
-
 
1165
 
-
 
1166
  def recv_getAddressById(self, ):
-
 
1167
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
1168
    if mtype == TMessageType.EXCEPTION:
-
 
1169
      x = TApplicationException()
-
 
1170
      x.read(self._iprot)
-
 
1171
      self._iprot.readMessageEnd()
-
 
1172
      raise x
-
 
1173
    result = getAddressById_result()
-
 
1174
    result.read(self._iprot)
-
 
1175
    self._iprot.readMessageEnd()
-
 
1176
    if result.success != None:
-
 
1177
      return result.success
-
 
1178
    if result.ucx != None:
-
 
1179
      raise result.ucx
-
 
1180
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAddressById failed: unknown result");
-
 
1181
 
1143
  def getDefaultAddressId(self, userId):
1182
  def getDefaultAddressId(self, userId):
1144
    """
1183
    """
1145
    Parameters:
1184
    Parameters:
1146
     - userId
1185
     - userId
1147
    """
1186
    """
Line 2705... Line 2744...
2705
    self._processMap["setUserAsLoggedOut"] = Processor.process_setUserAsLoggedOut
2744
    self._processMap["setUserAsLoggedOut"] = Processor.process_setUserAsLoggedOut
2706
    self._processMap["setDefaultAddress"] = Processor.process_setDefaultAddress
2745
    self._processMap["setDefaultAddress"] = Processor.process_setDefaultAddress
2707
    self._processMap["updatePassword"] = Processor.process_updatePassword
2746
    self._processMap["updatePassword"] = Processor.process_updatePassword
2708
    self._processMap["forgotPassword"] = Processor.process_forgotPassword
2747
    self._processMap["forgotPassword"] = Processor.process_forgotPassword
2709
    self._processMap["getAllAddressesForUser"] = Processor.process_getAllAddressesForUser
2748
    self._processMap["getAllAddressesForUser"] = Processor.process_getAllAddressesForUser
-
 
2749
    self._processMap["getAddressById"] = Processor.process_getAddressById
2710
    self._processMap["getDefaultAddressId"] = Processor.process_getDefaultAddressId
2750
    self._processMap["getDefaultAddressId"] = Processor.process_getDefaultAddressId
2711
    self._processMap["getDefaultPincode"] = Processor.process_getDefaultPincode
2751
    self._processMap["getDefaultPincode"] = Processor.process_getDefaultPincode
2712
    self._processMap["saveUserCommunication"] = Processor.process_saveUserCommunication
2752
    self._processMap["saveUserCommunication"] = Processor.process_saveUserCommunication
2713
    self._processMap["getUserCommunicationById"] = Processor.process_getUserCommunicationById
2753
    self._processMap["getUserCommunicationById"] = Processor.process_getUserCommunicationById
2714
    self._processMap["getUserCommunicationByUser"] = Processor.process_getUserCommunicationByUser
2754
    self._processMap["getUserCommunicationByUser"] = Processor.process_getUserCommunicationByUser
Line 3016... Line 3056...
3016
    oprot.writeMessageBegin("getAllAddressesForUser", TMessageType.REPLY, seqid)
3056
    oprot.writeMessageBegin("getAllAddressesForUser", TMessageType.REPLY, seqid)
3017
    result.write(oprot)
3057
    result.write(oprot)
3018
    oprot.writeMessageEnd()
3058
    oprot.writeMessageEnd()
3019
    oprot.trans.flush()
3059
    oprot.trans.flush()
3020
 
3060
 
-
 
3061
  def process_getAddressById(self, seqid, iprot, oprot):
-
 
3062
    args = getAddressById_args()
-
 
3063
    args.read(iprot)
-
 
3064
    iprot.readMessageEnd()
-
 
3065
    result = getAddressById_result()
-
 
3066
    try:
-
 
3067
      result.success = self._handler.getAddressById(args.addressId)
-
 
3068
    except UserContextException, ucx:
-
 
3069
      result.ucx = ucx
-
 
3070
    oprot.writeMessageBegin("getAddressById", TMessageType.REPLY, seqid)
-
 
3071
    result.write(oprot)
-
 
3072
    oprot.writeMessageEnd()
-
 
3073
    oprot.trans.flush()
-
 
3074
 
3021
  def process_getDefaultAddressId(self, seqid, iprot, oprot):
3075
  def process_getDefaultAddressId(self, seqid, iprot, oprot):
3022
    args = getDefaultAddressId_args()
3076
    args = getDefaultAddressId_args()
3023
    args.read(iprot)
3077
    args.read(iprot)
3024
    iprot.readMessageEnd()
3078
    iprot.readMessageEnd()
3025
    result = getDefaultAddressId_result()
3079
    result = getDefaultAddressId_result()
Line 5957... Line 6011...
5957
      oprot.writeFieldEnd()
6011
      oprot.writeFieldEnd()
5958
    if self.ucx != None:
6012
    if self.ucx != None:
5959
      oprot.writeFieldBegin('ucx', TType.STRUCT, 1)
6013
      oprot.writeFieldBegin('ucx', TType.STRUCT, 1)
5960
      self.ucx.write(oprot)
6014
      self.ucx.write(oprot)
5961
      oprot.writeFieldEnd()
6015
      oprot.writeFieldEnd()
-
 
6016
    oprot.writeFieldStop()
-
 
6017
    oprot.writeStructEnd()
-
 
6018
 
-
 
6019
  def __repr__(self):
-
 
6020
    L = ['%s=%r' % (key, value)
-
 
6021
      for key, value in self.__dict__.iteritems()]
-
 
6022
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
6023
 
-
 
6024
  def __eq__(self, other):
-
 
6025
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
6026
 
-
 
6027
  def __ne__(self, other):
-
 
6028
    return not (self == other)
-
 
6029
 
-
 
6030
class getAddressById_args:
-
 
6031
  """
-
 
6032
  Attributes:
-
 
6033
   - addressId
-
 
6034
  """
-
 
6035
 
-
 
6036
  thrift_spec = (
-
 
6037
    None, # 0
-
 
6038
    (1, TType.I64, 'addressId', None, None, ), # 1
-
 
6039
  )
-
 
6040
 
-
 
6041
  def __init__(self, addressId=None,):
-
 
6042
    self.addressId = addressId
-
 
6043
 
-
 
6044
  def read(self, iprot):
-
 
6045
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
6046
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
6047
      return
-
 
6048
    iprot.readStructBegin()
-
 
6049
    while True:
-
 
6050
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
6051
      if ftype == TType.STOP:
-
 
6052
        break
-
 
6053
      if fid == 1:
-
 
6054
        if ftype == TType.I64:
-
 
6055
          self.addressId = iprot.readI64();
-
 
6056
        else:
-
 
6057
          iprot.skip(ftype)
-
 
6058
      else:
-
 
6059
        iprot.skip(ftype)
-
 
6060
      iprot.readFieldEnd()
-
 
6061
    iprot.readStructEnd()
-
 
6062
 
-
 
6063
  def write(self, oprot):
-
 
6064
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
6065
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
6066
      return
-
 
6067
    oprot.writeStructBegin('getAddressById_args')
-
 
6068
    if self.addressId != None:
-
 
6069
      oprot.writeFieldBegin('addressId', TType.I64, 1)
-
 
6070
      oprot.writeI64(self.addressId)
-
 
6071
      oprot.writeFieldEnd()
-
 
6072
    oprot.writeFieldStop()
-
 
6073
    oprot.writeStructEnd()
-
 
6074
 
-
 
6075
  def __repr__(self):
-
 
6076
    L = ['%s=%r' % (key, value)
-
 
6077
      for key, value in self.__dict__.iteritems()]
-
 
6078
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
6079
 
-
 
6080
  def __eq__(self, other):
-
 
6081
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
6082
 
-
 
6083
  def __ne__(self, other):
-
 
6084
    return not (self == other)
-
 
6085
 
-
 
6086
class getAddressById_result:
-
 
6087
  """
-
 
6088
  Attributes:
-
 
6089
   - success
-
 
6090
   - ucx
-
 
6091
  """
-
 
6092
 
-
 
6093
  thrift_spec = (
-
 
6094
    (0, TType.STRUCT, 'success', (Address, Address.thrift_spec), None, ), # 0
-
 
6095
    (1, TType.STRUCT, 'ucx', (UserContextException, UserContextException.thrift_spec), None, ), # 1
-
 
6096
  )
-
 
6097
 
-
 
6098
  def __init__(self, success=None, ucx=None,):
-
 
6099
    self.success = success
-
 
6100
    self.ucx = ucx
-
 
6101
 
-
 
6102
  def read(self, iprot):
-
 
6103
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
6104
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
6105
      return
-
 
6106
    iprot.readStructBegin()
-
 
6107
    while True:
-
 
6108
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
6109
      if ftype == TType.STOP:
-
 
6110
        break
-
 
6111
      if fid == 0:
-
 
6112
        if ftype == TType.STRUCT:
-
 
6113
          self.success = Address()
-
 
6114
          self.success.read(iprot)
-
 
6115
        else:
-
 
6116
          iprot.skip(ftype)
-
 
6117
      elif fid == 1:
-
 
6118
        if ftype == TType.STRUCT:
-
 
6119
          self.ucx = UserContextException()
-
 
6120
          self.ucx.read(iprot)
-
 
6121
        else:
-
 
6122
          iprot.skip(ftype)
-
 
6123
      else:
-
 
6124
        iprot.skip(ftype)
-
 
6125
      iprot.readFieldEnd()
-
 
6126
    iprot.readStructEnd()
-
 
6127
 
-
 
6128
  def write(self, oprot):
-
 
6129
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
6130
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
6131
      return
-
 
6132
    oprot.writeStructBegin('getAddressById_result')
-
 
6133
    if self.success != None:
-
 
6134
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
-
 
6135
      self.success.write(oprot)
-
 
6136
      oprot.writeFieldEnd()
-
 
6137
    if self.ucx != None:
-
 
6138
      oprot.writeFieldBegin('ucx', TType.STRUCT, 1)
-
 
6139
      self.ucx.write(oprot)
-
 
6140
      oprot.writeFieldEnd()
5962
    oprot.writeFieldStop()
6141
    oprot.writeFieldStop()
5963
    oprot.writeStructEnd()
6142
    oprot.writeStructEnd()
5964
 
6143
 
5965
  def __repr__(self):
6144
  def __repr__(self):
5966
    L = ['%s=%r' % (key, value)
6145
    L = ['%s=%r' % (key, value)