Subversion Repositories SmartDukaan

Rev

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

Rev 130 Rev 504
Line 131... Line 131...
131
     - userid
131
     - userid
132
     - timestamp
132
     - timestamp
133
    """
133
    """
134
    pass
134
    pass
135
 
135
 
-
 
136
  def setDefaultAddress(self, userid, addressId):
-
 
137
    """
-
 
138
    Parameters:
-
 
139
     - userid
-
 
140
     - addressId
-
 
141
    """
-
 
142
    pass
-
 
143
 
136
  def updatePassword(self, userid, password):
144
  def updatePassword(self, userid, password):
137
    """
145
    """
138
    Parameters:
146
    Parameters:
139
     - userid
147
     - userid
140
     - password
148
     - password
Line 690... Line 698...
690
      return result.success
698
      return result.success
691
    if result.ucx != None:
699
    if result.ucx != None:
692
      raise result.ucx
700
      raise result.ucx
693
    raise TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedOut failed: unknown result");
701
    raise TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedOut failed: unknown result");
694
 
702
 
-
 
703
  def setDefaultAddress(self, userid, addressId):
-
 
704
    """
-
 
705
    Parameters:
-
 
706
     - userid
-
 
707
     - addressId
-
 
708
    """
-
 
709
    self.send_setDefaultAddress(userid, addressId)
-
 
710
    return self.recv_setDefaultAddress()
-
 
711
 
-
 
712
  def send_setDefaultAddress(self, userid, addressId):
-
 
713
    self._oprot.writeMessageBegin('setDefaultAddress', TMessageType.CALL, self._seqid)
-
 
714
    args = setDefaultAddress_args()
-
 
715
    args.userid = userid
-
 
716
    args.addressId = addressId
-
 
717
    args.write(self._oprot)
-
 
718
    self._oprot.writeMessageEnd()
-
 
719
    self._oprot.trans.flush()
-
 
720
 
-
 
721
  def recv_setDefaultAddress(self, ):
-
 
722
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
723
    if mtype == TMessageType.EXCEPTION:
-
 
724
      x = TApplicationException()
-
 
725
      x.read(self._iprot)
-
 
726
      self._iprot.readMessageEnd()
-
 
727
      raise x
-
 
728
    result = setDefaultAddress_result()
-
 
729
    result.read(self._iprot)
-
 
730
    self._iprot.readMessageEnd()
-
 
731
    if result.success != None:
-
 
732
      return result.success
-
 
733
    if result.ucx != None:
-
 
734
      raise result.ucx
-
 
735
    raise TApplicationException(TApplicationException.MISSING_RESULT, "setDefaultAddress failed: unknown result");
-
 
736
 
695
  def updatePassword(self, userid, password):
737
  def updatePassword(self, userid, password):
696
    """
738
    """
697
    Parameters:
739
    Parameters:
698
     - userid
740
     - userid
699
     - password
741
     - password
Line 1007... Line 1049...
1007
    self._processMap["addIpAdressForUser"] = Processor.process_addIpAdressForUser
1049
    self._processMap["addIpAdressForUser"] = Processor.process_addIpAdressForUser
1008
    self._processMap["addAddressForUser"] = Processor.process_addAddressForUser
1050
    self._processMap["addAddressForUser"] = Processor.process_addAddressForUser
1009
    self._processMap["removeAddressForUser"] = Processor.process_removeAddressForUser
1051
    self._processMap["removeAddressForUser"] = Processor.process_removeAddressForUser
1010
    self._processMap["setUserAsLoggedIn"] = Processor.process_setUserAsLoggedIn
1052
    self._processMap["setUserAsLoggedIn"] = Processor.process_setUserAsLoggedIn
1011
    self._processMap["setUserAsLoggedOut"] = Processor.process_setUserAsLoggedOut
1053
    self._processMap["setUserAsLoggedOut"] = Processor.process_setUserAsLoggedOut
-
 
1054
    self._processMap["setDefaultAddress"] = Processor.process_setDefaultAddress
1012
    self._processMap["updatePassword"] = Processor.process_updatePassword
1055
    self._processMap["updatePassword"] = Processor.process_updatePassword
1013
    self._processMap["deleteUser"] = Processor.process_deleteUser
1056
    self._processMap["deleteUser"] = Processor.process_deleteUser
1014
    self._processMap["sendEmailVerification"] = Processor.process_sendEmailVerification
1057
    self._processMap["sendEmailVerification"] = Processor.process_sendEmailVerification
1015
    self._processMap["sendSMSVerification"] = Processor.process_sendSMSVerification
1058
    self._processMap["sendSMSVerification"] = Processor.process_sendSMSVerification
1016
    self._processMap["confirmEmailVerification"] = Processor.process_confirmEmailVerification
1059
    self._processMap["confirmEmailVerification"] = Processor.process_confirmEmailVerification
Line 1228... Line 1271...
1228
    oprot.writeMessageBegin("setUserAsLoggedOut", TMessageType.REPLY, seqid)
1271
    oprot.writeMessageBegin("setUserAsLoggedOut", TMessageType.REPLY, seqid)
1229
    result.write(oprot)
1272
    result.write(oprot)
1230
    oprot.writeMessageEnd()
1273
    oprot.writeMessageEnd()
1231
    oprot.trans.flush()
1274
    oprot.trans.flush()
1232
 
1275
 
-
 
1276
  def process_setDefaultAddress(self, seqid, iprot, oprot):
-
 
1277
    args = setDefaultAddress_args()
-
 
1278
    args.read(iprot)
-
 
1279
    iprot.readMessageEnd()
-
 
1280
    result = setDefaultAddress_result()
-
 
1281
    try:
-
 
1282
      result.success = self._handler.setDefaultAddress(args.userid, args.addressId)
-
 
1283
    except UserContextException, ucx:
-
 
1284
      result.ucx = ucx
-
 
1285
    oprot.writeMessageBegin("setDefaultAddress", TMessageType.REPLY, seqid)
-
 
1286
    result.write(oprot)
-
 
1287
    oprot.writeMessageEnd()
-
 
1288
    oprot.trans.flush()
-
 
1289
 
1233
  def process_updatePassword(self, seqid, iprot, oprot):
1290
  def process_updatePassword(self, seqid, iprot, oprot):
1234
    args = updatePassword_args()
1291
    args = updatePassword_args()
1235
    args.read(iprot)
1292
    args.read(iprot)
1236
    iprot.readMessageEnd()
1293
    iprot.readMessageEnd()
1237
    result = updatePassword_result()
1294
    result = updatePassword_result()
Line 3277... Line 3334...
3277
    if self.success != None:
3334
    if self.success != None:
3278
      oprot.writeFieldBegin('success', TType.BOOL, 0)
3335
      oprot.writeFieldBegin('success', TType.BOOL, 0)
3279
      oprot.writeBool(self.success)
3336
      oprot.writeBool(self.success)
3280
      oprot.writeFieldEnd()
3337
      oprot.writeFieldEnd()
3281
    if self.ucx != None:
3338
    if self.ucx != None:
-
 
3339
      oprot.writeFieldBegin('ucx', TType.STRUCT, 1)
-
 
3340
      self.ucx.write(oprot)
-
 
3341
      oprot.writeFieldEnd()
-
 
3342
    oprot.writeFieldStop()
-
 
3343
    oprot.writeStructEnd()
-
 
3344
 
-
 
3345
  def __repr__(self):
-
 
3346
    L = ['%s=%r' % (key, value)
-
 
3347
      for key, value in self.__dict__.iteritems()]
-
 
3348
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
3349
 
-
 
3350
  def __eq__(self, other):
-
 
3351
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
3352
 
-
 
3353
  def __ne__(self, other):
-
 
3354
    return not (self == other)
-
 
3355
 
-
 
3356
class setDefaultAddress_args:
-
 
3357
  """
-
 
3358
  Attributes:
-
 
3359
   - userid
-
 
3360
   - addressId
-
 
3361
  """
-
 
3362
 
-
 
3363
  thrift_spec = (
-
 
3364
    None, # 0
-
 
3365
    (1, TType.I64, 'userid', None, None, ), # 1
-
 
3366
    (2, TType.I64, 'addressId', None, None, ), # 2
-
 
3367
  )
-
 
3368
 
-
 
3369
  def __init__(self, userid=None, addressId=None,):
-
 
3370
    self.userid = userid
-
 
3371
    self.addressId = addressId
-
 
3372
 
-
 
3373
  def read(self, iprot):
-
 
3374
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
3375
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
3376
      return
-
 
3377
    iprot.readStructBegin()
-
 
3378
    while True:
-
 
3379
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
3380
      if ftype == TType.STOP:
-
 
3381
        break
-
 
3382
      if fid == 1:
-
 
3383
        if ftype == TType.I64:
-
 
3384
          self.userid = iprot.readI64();
-
 
3385
        else:
-
 
3386
          iprot.skip(ftype)
-
 
3387
      elif fid == 2:
-
 
3388
        if ftype == TType.I64:
-
 
3389
          self.addressId = iprot.readI64();
-
 
3390
        else:
-
 
3391
          iprot.skip(ftype)
-
 
3392
      else:
-
 
3393
        iprot.skip(ftype)
-
 
3394
      iprot.readFieldEnd()
-
 
3395
    iprot.readStructEnd()
-
 
3396
 
-
 
3397
  def write(self, oprot):
-
 
3398
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
3399
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
3400
      return
-
 
3401
    oprot.writeStructBegin('setDefaultAddress_args')
-
 
3402
    if self.userid != None:
-
 
3403
      oprot.writeFieldBegin('userid', TType.I64, 1)
-
 
3404
      oprot.writeI64(self.userid)
-
 
3405
      oprot.writeFieldEnd()
-
 
3406
    if self.addressId != None:
-
 
3407
      oprot.writeFieldBegin('addressId', TType.I64, 2)
-
 
3408
      oprot.writeI64(self.addressId)
-
 
3409
      oprot.writeFieldEnd()
-
 
3410
    oprot.writeFieldStop()
-
 
3411
    oprot.writeStructEnd()
-
 
3412
 
-
 
3413
  def __repr__(self):
-
 
3414
    L = ['%s=%r' % (key, value)
-
 
3415
      for key, value in self.__dict__.iteritems()]
-
 
3416
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
3417
 
-
 
3418
  def __eq__(self, other):
-
 
3419
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
3420
 
-
 
3421
  def __ne__(self, other):
-
 
3422
    return not (self == other)
-
 
3423
 
-
 
3424
class setDefaultAddress_result:
-
 
3425
  """
-
 
3426
  Attributes:
-
 
3427
   - success
-
 
3428
   - ucx
-
 
3429
  """
-
 
3430
 
-
 
3431
  thrift_spec = (
-
 
3432
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
3433
    (1, TType.STRUCT, 'ucx', (UserContextException, UserContextException.thrift_spec), None, ), # 1
-
 
3434
  )
-
 
3435
 
-
 
3436
  def __init__(self, success=None, ucx=None,):
-
 
3437
    self.success = success
-
 
3438
    self.ucx = ucx
-
 
3439
 
-
 
3440
  def read(self, iprot):
-
 
3441
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
3442
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
3443
      return
-
 
3444
    iprot.readStructBegin()
-
 
3445
    while True:
-
 
3446
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
3447
      if ftype == TType.STOP:
-
 
3448
        break
-
 
3449
      if fid == 0:
-
 
3450
        if ftype == TType.BOOL:
-
 
3451
          self.success = iprot.readBool();
-
 
3452
        else:
-
 
3453
          iprot.skip(ftype)
-
 
3454
      elif fid == 1:
-
 
3455
        if ftype == TType.STRUCT:
-
 
3456
          self.ucx = UserContextException()
-
 
3457
          self.ucx.read(iprot)
-
 
3458
        else:
-
 
3459
          iprot.skip(ftype)
-
 
3460
      else:
-
 
3461
        iprot.skip(ftype)
-
 
3462
      iprot.readFieldEnd()
-
 
3463
    iprot.readStructEnd()
-
 
3464
 
-
 
3465
  def write(self, oprot):
-
 
3466
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
3467
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
3468
      return
-
 
3469
    oprot.writeStructBegin('setDefaultAddress_result')
-
 
3470
    if self.success != None:
-
 
3471
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
3472
      oprot.writeBool(self.success)
-
 
3473
      oprot.writeFieldEnd()
-
 
3474
    if self.ucx != None:
3282
      oprot.writeFieldBegin('ucx', TType.STRUCT, 1)
3475
      oprot.writeFieldBegin('ucx', TType.STRUCT, 1)
3283
      self.ucx.write(oprot)
3476
      self.ucx.write(oprot)
3284
      oprot.writeFieldEnd()
3477
      oprot.writeFieldEnd()
3285
    oprot.writeFieldStop()
3478
    oprot.writeFieldStop()
3286
    oprot.writeStructEnd()
3479
    oprot.writeStructEnd()