Subversion Repositories SmartDukaan

Rev

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

Rev 11592 Rev 11679
Line 647... Line 647...
647
     - cartId
647
     - cartId
648
     - sourceId
648
     - sourceId
649
    """
649
    """
650
    pass
650
    pass
651
 
651
 
-
 
652
  def isPrivateDealUser(self, userId):
-
 
653
    """
-
 
654
    Parameters:
-
 
655
     - userId
-
 
656
    """
-
 
657
    pass
-
 
658
 
652
 
659
 
653
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
660
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
654
  """
661
  """
655
  service
662
  service
656
  """
663
  """
Line 3106... Line 3113...
3106
      return result.success
3113
      return result.success
3107
    if result.scex is not None:
3114
    if result.scex is not None:
3108
      raise result.scex
3115
      raise result.scex
3109
    raise TApplicationException(TApplicationException.MISSING_RESULT, "validateCartPlus failed: unknown result");
3116
    raise TApplicationException(TApplicationException.MISSING_RESULT, "validateCartPlus failed: unknown result");
3110
 
3117
 
-
 
3118
  def isPrivateDealUser(self, userId):
-
 
3119
    """
-
 
3120
    Parameters:
-
 
3121
     - userId
-
 
3122
    """
-
 
3123
    self.send_isPrivateDealUser(userId)
-
 
3124
    return self.recv_isPrivateDealUser()
-
 
3125
 
-
 
3126
  def send_isPrivateDealUser(self, userId):
-
 
3127
    self._oprot.writeMessageBegin('isPrivateDealUser', TMessageType.CALL, self._seqid)
-
 
3128
    args = isPrivateDealUser_args()
-
 
3129
    args.userId = userId
-
 
3130
    args.write(self._oprot)
-
 
3131
    self._oprot.writeMessageEnd()
-
 
3132
    self._oprot.trans.flush()
-
 
3133
 
-
 
3134
  def recv_isPrivateDealUser(self, ):
-
 
3135
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
3136
    if mtype == TMessageType.EXCEPTION:
-
 
3137
      x = TApplicationException()
-
 
3138
      x.read(self._iprot)
-
 
3139
      self._iprot.readMessageEnd()
-
 
3140
      raise x
-
 
3141
    result = isPrivateDealUser_result()
-
 
3142
    result.read(self._iprot)
-
 
3143
    self._iprot.readMessageEnd()
-
 
3144
    if result.success is not None:
-
 
3145
      return result.success
-
 
3146
    raise TApplicationException(TApplicationException.MISSING_RESULT, "isPrivateDealUser failed: unknown result");
-
 
3147
 
3111
 
3148
 
3112
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
3149
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
3113
  def __init__(self, handler):
3150
  def __init__(self, handler):
3114
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
3151
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
3115
    self._processMap["createAnonymousUser"] = Processor.process_createAnonymousUser
3152
    self._processMap["createAnonymousUser"] = Processor.process_createAnonymousUser
Line 3183... Line 3220...
3183
    self._processMap["cancelInsurance"] = Processor.process_cancelInsurance
3220
    self._processMap["cancelInsurance"] = Processor.process_cancelInsurance
3184
    self._processMap["storeInsuranceSpecificDetails"] = Processor.process_storeInsuranceSpecificDetails
3221
    self._processMap["storeInsuranceSpecificDetails"] = Processor.process_storeInsuranceSpecificDetails
3185
    self._processMap["isInsuranceDetailPresent"] = Processor.process_isInsuranceDetailPresent
3222
    self._processMap["isInsuranceDetailPresent"] = Processor.process_isInsuranceDetailPresent
3186
    self._processMap["getProductsAddedToCart"] = Processor.process_getProductsAddedToCart
3223
    self._processMap["getProductsAddedToCart"] = Processor.process_getProductsAddedToCart
3187
    self._processMap["validateCartPlus"] = Processor.process_validateCartPlus
3224
    self._processMap["validateCartPlus"] = Processor.process_validateCartPlus
-
 
3225
    self._processMap["isPrivateDealUser"] = Processor.process_isPrivateDealUser
3188
 
3226
 
3189
  def process(self, iprot, oprot):
3227
  def process(self, iprot, oprot):
3190
    (name, type, seqid) = iprot.readMessageBegin()
3228
    (name, type, seqid) = iprot.readMessageBegin()
3191
    if name not in self._processMap:
3229
    if name not in self._processMap:
3192
      iprot.skip(TType.STRUCT)
3230
      iprot.skip(TType.STRUCT)
Line 4175... Line 4213...
4175
    oprot.writeMessageBegin("validateCartPlus", TMessageType.REPLY, seqid)
4213
    oprot.writeMessageBegin("validateCartPlus", TMessageType.REPLY, seqid)
4176
    result.write(oprot)
4214
    result.write(oprot)
4177
    oprot.writeMessageEnd()
4215
    oprot.writeMessageEnd()
4178
    oprot.trans.flush()
4216
    oprot.trans.flush()
4179
 
4217
 
-
 
4218
  def process_isPrivateDealUser(self, seqid, iprot, oprot):
-
 
4219
    args = isPrivateDealUser_args()
-
 
4220
    args.read(iprot)
-
 
4221
    iprot.readMessageEnd()
-
 
4222
    result = isPrivateDealUser_result()
-
 
4223
    result.success = self._handler.isPrivateDealUser(args.userId)
-
 
4224
    oprot.writeMessageBegin("isPrivateDealUser", TMessageType.REPLY, seqid)
-
 
4225
    result.write(oprot)
-
 
4226
    oprot.writeMessageEnd()
-
 
4227
    oprot.trans.flush()
-
 
4228
 
4180
 
4229
 
4181
# HELPER FUNCTIONS AND STRUCTURES
4230
# HELPER FUNCTIONS AND STRUCTURES
4182
 
4231
 
4183
class createAnonymousUser_args:
4232
class createAnonymousUser_args:
4184
  """
4233
  """
Line 14344... Line 14393...
14344
      oprot.writeFieldEnd()
14393
      oprot.writeFieldEnd()
14345
    oprot.writeFieldStop()
14394
    oprot.writeFieldStop()
14346
    oprot.writeStructEnd()
14395
    oprot.writeStructEnd()
14347
 
14396
 
14348
  def validate(self):
14397
  def validate(self):
-
 
14398
    return
-
 
14399
 
-
 
14400
 
-
 
14401
  def __repr__(self):
-
 
14402
    L = ['%s=%r' % (key, value)
-
 
14403
      for key, value in self.__dict__.iteritems()]
-
 
14404
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
14405
 
-
 
14406
  def __eq__(self, other):
-
 
14407
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
14408
 
-
 
14409
  def __ne__(self, other):
-
 
14410
    return not (self == other)
-
 
14411
 
-
 
14412
class isPrivateDealUser_args:
-
 
14413
  """
-
 
14414
  Attributes:
-
 
14415
   - userId
-
 
14416
  """
-
 
14417
 
-
 
14418
  thrift_spec = (
-
 
14419
    None, # 0
-
 
14420
    (1, TType.I64, 'userId', None, None, ), # 1
-
 
14421
  )
-
 
14422
 
-
 
14423
  def __init__(self, userId=None,):
-
 
14424
    self.userId = userId
-
 
14425
 
-
 
14426
  def read(self, iprot):
-
 
14427
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
14428
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
14429
      return
-
 
14430
    iprot.readStructBegin()
-
 
14431
    while True:
-
 
14432
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
14433
      if ftype == TType.STOP:
-
 
14434
        break
-
 
14435
      if fid == 1:
-
 
14436
        if ftype == TType.I64:
-
 
14437
          self.userId = iprot.readI64();
-
 
14438
        else:
-
 
14439
          iprot.skip(ftype)
-
 
14440
      else:
-
 
14441
        iprot.skip(ftype)
-
 
14442
      iprot.readFieldEnd()
-
 
14443
    iprot.readStructEnd()
-
 
14444
 
-
 
14445
  def write(self, oprot):
-
 
14446
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
14447
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
14448
      return
-
 
14449
    oprot.writeStructBegin('isPrivateDealUser_args')
-
 
14450
    if self.userId is not None:
-
 
14451
      oprot.writeFieldBegin('userId', TType.I64, 1)
-
 
14452
      oprot.writeI64(self.userId)
-
 
14453
      oprot.writeFieldEnd()
-
 
14454
    oprot.writeFieldStop()
-
 
14455
    oprot.writeStructEnd()
-
 
14456
 
-
 
14457
  def validate(self):
-
 
14458
    return
-
 
14459
 
-
 
14460
 
-
 
14461
  def __repr__(self):
-
 
14462
    L = ['%s=%r' % (key, value)
-
 
14463
      for key, value in self.__dict__.iteritems()]
-
 
14464
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
14465
 
-
 
14466
  def __eq__(self, other):
-
 
14467
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
14468
 
-
 
14469
  def __ne__(self, other):
-
 
14470
    return not (self == other)
-
 
14471
 
-
 
14472
class isPrivateDealUser_result:
-
 
14473
  """
-
 
14474
  Attributes:
-
 
14475
   - success
-
 
14476
  """
-
 
14477
 
-
 
14478
  thrift_spec = (
-
 
14479
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
14480
  )
-
 
14481
 
-
 
14482
  def __init__(self, success=None,):
-
 
14483
    self.success = success
-
 
14484
 
-
 
14485
  def read(self, iprot):
-
 
14486
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
14487
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
14488
      return
-
 
14489
    iprot.readStructBegin()
-
 
14490
    while True:
-
 
14491
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
14492
      if ftype == TType.STOP:
-
 
14493
        break
-
 
14494
      if fid == 0:
-
 
14495
        if ftype == TType.BOOL:
-
 
14496
          self.success = iprot.readBool();
-
 
14497
        else:
-
 
14498
          iprot.skip(ftype)
-
 
14499
      else:
-
 
14500
        iprot.skip(ftype)
-
 
14501
      iprot.readFieldEnd()
-
 
14502
    iprot.readStructEnd()
-
 
14503
 
-
 
14504
  def write(self, oprot):
-
 
14505
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
14506
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
14507
      return
-
 
14508
    oprot.writeStructBegin('isPrivateDealUser_result')
-
 
14509
    if self.success is not None:
-
 
14510
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
14511
      oprot.writeBool(self.success)
-
 
14512
      oprot.writeFieldEnd()
-
 
14513
    oprot.writeFieldStop()
-
 
14514
    oprot.writeStructEnd()
-
 
14515
 
-
 
14516
  def validate(self):
14349
    return
14517
    return
14350
 
14518
 
14351
 
14519
 
14352
  def __repr__(self):
14520
  def __repr__(self):
14353
    L = ['%s=%r' % (key, value)
14521
    L = ['%s=%r' % (key, value)