Subversion Repositories SmartDukaan

Rev

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

Rev 5553 Rev 5623
Line 594... Line 594...
594
     - sourceId
594
     - sourceId
595
     - pincode
595
     - pincode
596
    """
596
    """
597
    pass
597
    pass
598
 
598
 
-
 
599
  def getUserEmails(self, startDate, endDate):
-
 
600
    """
-
 
601
    Get email addresses for users activated within a given date range
-
 
602
 
-
 
603
    Parameters:
-
 
604
     - startDate
-
 
605
     - endDate
-
 
606
    """
-
 
607
    pass
-
 
608
 
599
 
609
 
600
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
610
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
601
  """
611
  """
602
  service
612
  service
603
  """
613
  """
Line 2877... Line 2887...
2877
    self._iprot.readMessageEnd()
2887
    self._iprot.readMessageEnd()
2878
    if result.success is not None:
2888
    if result.success is not None:
2879
      return result.success
2889
      return result.success
2880
    raise TApplicationException(TApplicationException.MISSING_RESULT, "showCODOption failed: unknown result");
2890
    raise TApplicationException(TApplicationException.MISSING_RESULT, "showCODOption failed: unknown result");
2881
 
2891
 
-
 
2892
  def getUserEmails(self, startDate, endDate):
-
 
2893
    """
-
 
2894
    Get email addresses for users activated within a given date range
-
 
2895
 
-
 
2896
    Parameters:
-
 
2897
     - startDate
-
 
2898
     - endDate
-
 
2899
    """
-
 
2900
    self.send_getUserEmails(startDate, endDate)
-
 
2901
    return self.recv_getUserEmails()
-
 
2902
 
-
 
2903
  def send_getUserEmails(self, startDate, endDate):
-
 
2904
    self._oprot.writeMessageBegin('getUserEmails', TMessageType.CALL, self._seqid)
-
 
2905
    args = getUserEmails_args()
-
 
2906
    args.startDate = startDate
-
 
2907
    args.endDate = endDate
-
 
2908
    args.write(self._oprot)
-
 
2909
    self._oprot.writeMessageEnd()
-
 
2910
    self._oprot.trans.flush()
-
 
2911
 
-
 
2912
  def recv_getUserEmails(self, ):
-
 
2913
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
2914
    if mtype == TMessageType.EXCEPTION:
-
 
2915
      x = TApplicationException()
-
 
2916
      x.read(self._iprot)
-
 
2917
      self._iprot.readMessageEnd()
-
 
2918
      raise x
-
 
2919
    result = getUserEmails_result()
-
 
2920
    result.read(self._iprot)
-
 
2921
    self._iprot.readMessageEnd()
-
 
2922
    if result.success is not None:
-
 
2923
      return result.success
-
 
2924
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getUserEmails failed: unknown result");
-
 
2925
 
2882
 
2926
 
2883
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
2927
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
2884
  def __init__(self, handler):
2928
  def __init__(self, handler):
2885
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
2929
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
2886
    self._processMap["createAnonymousUser"] = Processor.process_createAnonymousUser
2930
    self._processMap["createAnonymousUser"] = Processor.process_createAnonymousUser
Line 2949... Line 2993...
2949
    self._processMap["updateBrowseHistory"] = Processor.process_updateBrowseHistory
2993
    self._processMap["updateBrowseHistory"] = Processor.process_updateBrowseHistory
2950
    self._processMap["getCartsWithCouponCount"] = Processor.process_getCartsWithCouponCount
2994
    self._processMap["getCartsWithCouponCount"] = Processor.process_getCartsWithCouponCount
2951
    self._processMap["increaseTrustLevel"] = Processor.process_increaseTrustLevel
2995
    self._processMap["increaseTrustLevel"] = Processor.process_increaseTrustLevel
2952
    self._processMap["getTrustLevel"] = Processor.process_getTrustLevel
2996
    self._processMap["getTrustLevel"] = Processor.process_getTrustLevel
2953
    self._processMap["showCODOption"] = Processor.process_showCODOption
2997
    self._processMap["showCODOption"] = Processor.process_showCODOption
-
 
2998
    self._processMap["getUserEmails"] = Processor.process_getUserEmails
2954
 
2999
 
2955
  def process(self, iprot, oprot):
3000
  def process(self, iprot, oprot):
2956
    (name, type, seqid) = iprot.readMessageBegin()
3001
    (name, type, seqid) = iprot.readMessageBegin()
2957
    if name not in self._processMap:
3002
    if name not in self._processMap:
2958
      iprot.skip(TType.STRUCT)
3003
      iprot.skip(TType.STRUCT)
Line 3883... Line 3928...
3883
    oprot.writeMessageBegin("showCODOption", TMessageType.REPLY, seqid)
3928
    oprot.writeMessageBegin("showCODOption", TMessageType.REPLY, seqid)
3884
    result.write(oprot)
3929
    result.write(oprot)
3885
    oprot.writeMessageEnd()
3930
    oprot.writeMessageEnd()
3886
    oprot.trans.flush()
3931
    oprot.trans.flush()
3887
 
3932
 
-
 
3933
  def process_getUserEmails(self, seqid, iprot, oprot):
-
 
3934
    args = getUserEmails_args()
-
 
3935
    args.read(iprot)
-
 
3936
    iprot.readMessageEnd()
-
 
3937
    result = getUserEmails_result()
-
 
3938
    result.success = self._handler.getUserEmails(args.startDate, args.endDate)
-
 
3939
    oprot.writeMessageBegin("getUserEmails", TMessageType.REPLY, seqid)
-
 
3940
    result.write(oprot)
-
 
3941
    oprot.writeMessageEnd()
-
 
3942
    oprot.trans.flush()
-
 
3943
 
3888
 
3944
 
3889
# HELPER FUNCTIONS AND STRUCTURES
3945
# HELPER FUNCTIONS AND STRUCTURES
3890
 
3946
 
3891
class createAnonymousUser_args:
3947
class createAnonymousUser_args:
3892
  """
3948
  """
Line 13362... Line 13418...
13362
      oprot.writeFieldEnd()
13418
      oprot.writeFieldEnd()
13363
    oprot.writeFieldStop()
13419
    oprot.writeFieldStop()
13364
    oprot.writeStructEnd()
13420
    oprot.writeStructEnd()
13365
 
13421
 
13366
  def validate(self):
13422
  def validate(self):
-
 
13423
    return
-
 
13424
 
-
 
13425
 
-
 
13426
  def __repr__(self):
-
 
13427
    L = ['%s=%r' % (key, value)
-
 
13428
      for key, value in self.__dict__.iteritems()]
-
 
13429
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
13430
 
-
 
13431
  def __eq__(self, other):
-
 
13432
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
13433
 
-
 
13434
  def __ne__(self, other):
-
 
13435
    return not (self == other)
-
 
13436
 
-
 
13437
class getUserEmails_args:
-
 
13438
  """
-
 
13439
  Attributes:
-
 
13440
   - startDate
-
 
13441
   - endDate
-
 
13442
  """
-
 
13443
 
-
 
13444
  thrift_spec = (
-
 
13445
    None, # 0
-
 
13446
    (1, TType.I64, 'startDate', None, None, ), # 1
-
 
13447
    (2, TType.I64, 'endDate', None, None, ), # 2
-
 
13448
  )
-
 
13449
 
-
 
13450
  def __init__(self, startDate=None, endDate=None,):
-
 
13451
    self.startDate = startDate
-
 
13452
    self.endDate = endDate
-
 
13453
 
-
 
13454
  def read(self, iprot):
-
 
13455
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
13456
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
13457
      return
-
 
13458
    iprot.readStructBegin()
-
 
13459
    while True:
-
 
13460
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
13461
      if ftype == TType.STOP:
-
 
13462
        break
-
 
13463
      if fid == 1:
-
 
13464
        if ftype == TType.I64:
-
 
13465
          self.startDate = iprot.readI64();
-
 
13466
        else:
-
 
13467
          iprot.skip(ftype)
-
 
13468
      elif fid == 2:
-
 
13469
        if ftype == TType.I64:
-
 
13470
          self.endDate = iprot.readI64();
-
 
13471
        else:
-
 
13472
          iprot.skip(ftype)
-
 
13473
      else:
-
 
13474
        iprot.skip(ftype)
-
 
13475
      iprot.readFieldEnd()
-
 
13476
    iprot.readStructEnd()
-
 
13477
 
-
 
13478
  def write(self, oprot):
-
 
13479
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
13480
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
13481
      return
-
 
13482
    oprot.writeStructBegin('getUserEmails_args')
-
 
13483
    if self.startDate is not None:
-
 
13484
      oprot.writeFieldBegin('startDate', TType.I64, 1)
-
 
13485
      oprot.writeI64(self.startDate)
-
 
13486
      oprot.writeFieldEnd()
-
 
13487
    if self.endDate is not None:
-
 
13488
      oprot.writeFieldBegin('endDate', TType.I64, 2)
-
 
13489
      oprot.writeI64(self.endDate)
-
 
13490
      oprot.writeFieldEnd()
-
 
13491
    oprot.writeFieldStop()
-
 
13492
    oprot.writeStructEnd()
-
 
13493
 
-
 
13494
  def validate(self):
-
 
13495
    return
-
 
13496
 
-
 
13497
 
-
 
13498
  def __repr__(self):
-
 
13499
    L = ['%s=%r' % (key, value)
-
 
13500
      for key, value in self.__dict__.iteritems()]
-
 
13501
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
13502
 
-
 
13503
  def __eq__(self, other):
-
 
13504
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
13505
 
-
 
13506
  def __ne__(self, other):
-
 
13507
    return not (self == other)
-
 
13508
 
-
 
13509
class getUserEmails_result:
-
 
13510
  """
-
 
13511
  Attributes:
-
 
13512
   - success
-
 
13513
  """
-
 
13514
 
-
 
13515
  thrift_spec = (
-
 
13516
    (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0
-
 
13517
  )
-
 
13518
 
-
 
13519
  def __init__(self, success=None,):
-
 
13520
    self.success = success
-
 
13521
 
-
 
13522
  def read(self, iprot):
-
 
13523
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
13524
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
13525
      return
-
 
13526
    iprot.readStructBegin()
-
 
13527
    while True:
-
 
13528
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
13529
      if ftype == TType.STOP:
-
 
13530
        break
-
 
13531
      if fid == 0:
-
 
13532
        if ftype == TType.LIST:
-
 
13533
          self.success = []
-
 
13534
          (_etype168, _size165) = iprot.readListBegin()
-
 
13535
          for _i169 in xrange(_size165):
-
 
13536
            _elem170 = iprot.readString();
-
 
13537
            self.success.append(_elem170)
-
 
13538
          iprot.readListEnd()
-
 
13539
        else:
-
 
13540
          iprot.skip(ftype)
-
 
13541
      else:
-
 
13542
        iprot.skip(ftype)
-
 
13543
      iprot.readFieldEnd()
-
 
13544
    iprot.readStructEnd()
-
 
13545
 
-
 
13546
  def write(self, oprot):
-
 
13547
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
13548
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
13549
      return
-
 
13550
    oprot.writeStructBegin('getUserEmails_result')
-
 
13551
    if self.success is not None:
-
 
13552
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
13553
      oprot.writeListBegin(TType.STRING, len(self.success))
-
 
13554
      for iter171 in self.success:
-
 
13555
        oprot.writeString(iter171)
-
 
13556
      oprot.writeListEnd()
-
 
13557
      oprot.writeFieldEnd()
-
 
13558
    oprot.writeFieldStop()
-
 
13559
    oprot.writeStructEnd()
-
 
13560
 
-
 
13561
  def validate(self):
13367
    return
13562
    return
13368
 
13563
 
13369
 
13564
 
13370
  def __repr__(self):
13565
  def __repr__(self):
13371
    L = ['%s=%r' % (key, value)
13566
    L = ['%s=%r' % (key, value)