Subversion Repositories SmartDukaan

Rev

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

Rev 19182 Rev 19889
Line 797... Line 797...
797
    Parameters:
797
    Parameters:
798
     - cartIds
798
     - cartIds
799
    """
799
    """
800
    pass
800
    pass
801
 
801
 
-
 
802
  def getCounterName(self, userIds):
-
 
803
    """
-
 
804
    Parameters:
-
 
805
     - userIds
-
 
806
    """
-
 
807
    pass
-
 
808
 
802
 
809
 
803
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
810
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
804
  """
811
  """
805
  service
812
  service
806
  """
813
  """
Line 3856... Line 3863...
3856
    self._iprot.readMessageEnd()
3863
    self._iprot.readMessageEnd()
3857
    if result.success is not None:
3864
    if result.success is not None:
3858
      return result.success
3865
      return result.success
3859
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getCartByValue failed: unknown result");
3866
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getCartByValue failed: unknown result");
3860
 
3867
 
-
 
3868
  def getCounterName(self, userIds):
-
 
3869
    """
-
 
3870
    Parameters:
-
 
3871
     - userIds
-
 
3872
    """
-
 
3873
    self.send_getCounterName(userIds)
-
 
3874
    return self.recv_getCounterName()
-
 
3875
 
-
 
3876
  def send_getCounterName(self, userIds):
-
 
3877
    self._oprot.writeMessageBegin('getCounterName', TMessageType.CALL, self._seqid)
-
 
3878
    args = getCounterName_args()
-
 
3879
    args.userIds = userIds
-
 
3880
    args.write(self._oprot)
-
 
3881
    self._oprot.writeMessageEnd()
-
 
3882
    self._oprot.trans.flush()
-
 
3883
 
-
 
3884
  def recv_getCounterName(self, ):
-
 
3885
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
3886
    if mtype == TMessageType.EXCEPTION:
-
 
3887
      x = TApplicationException()
-
 
3888
      x.read(self._iprot)
-
 
3889
      self._iprot.readMessageEnd()
-
 
3890
      raise x
-
 
3891
    result = getCounterName_result()
-
 
3892
    result.read(self._iprot)
-
 
3893
    self._iprot.readMessageEnd()
-
 
3894
    if result.success is not None:
-
 
3895
      return result.success
-
 
3896
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getCounterName failed: unknown result");
-
 
3897
 
3861
 
3898
 
3862
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
3899
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
3863
  def __init__(self, handler):
3900
  def __init__(self, handler):
3864
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
3901
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
3865
    self._processMap["createAnonymousUser"] = Processor.process_createAnonymousUser
3902
    self._processMap["createAnonymousUser"] = Processor.process_createAnonymousUser
Line 3952... Line 3989...
3952
    self._processMap["getBillingAddressForUser"] = Processor.process_getBillingAddressForUser
3989
    self._processMap["getBillingAddressForUser"] = Processor.process_getBillingAddressForUser
3953
    self._processMap["isCreditorAssigned"] = Processor.process_isCreditorAssigned
3990
    self._processMap["isCreditorAssigned"] = Processor.process_isCreditorAssigned
3954
    self._processMap["isTaxInvoiceEnabledUser"] = Processor.process_isTaxInvoiceEnabledUser
3991
    self._processMap["isTaxInvoiceEnabledUser"] = Processor.process_isTaxInvoiceEnabledUser
3955
    self._processMap["taxInvoiceAvailable"] = Processor.process_taxInvoiceAvailable
3992
    self._processMap["taxInvoiceAvailable"] = Processor.process_taxInvoiceAvailable
3956
    self._processMap["getCartByValue"] = Processor.process_getCartByValue
3993
    self._processMap["getCartByValue"] = Processor.process_getCartByValue
-
 
3994
    self._processMap["getCounterName"] = Processor.process_getCounterName
3957
 
3995
 
3958
  def process(self, iprot, oprot):
3996
  def process(self, iprot, oprot):
3959
    (name, type, seqid) = iprot.readMessageBegin()
3997
    (name, type, seqid) = iprot.readMessageBegin()
3960
    if name not in self._processMap:
3998
    if name not in self._processMap:
3961
      iprot.skip(TType.STRUCT)
3999
      iprot.skip(TType.STRUCT)
Line 5156... Line 5194...
5156
    oprot.writeMessageBegin("getCartByValue", TMessageType.REPLY, seqid)
5194
    oprot.writeMessageBegin("getCartByValue", TMessageType.REPLY, seqid)
5157
    result.write(oprot)
5195
    result.write(oprot)
5158
    oprot.writeMessageEnd()
5196
    oprot.writeMessageEnd()
5159
    oprot.trans.flush()
5197
    oprot.trans.flush()
5160
 
5198
 
-
 
5199
  def process_getCounterName(self, seqid, iprot, oprot):
-
 
5200
    args = getCounterName_args()
-
 
5201
    args.read(iprot)
-
 
5202
    iprot.readMessageEnd()
-
 
5203
    result = getCounterName_result()
-
 
5204
    result.success = self._handler.getCounterName(args.userIds)
-
 
5205
    oprot.writeMessageBegin("getCounterName", TMessageType.REPLY, seqid)
-
 
5206
    result.write(oprot)
-
 
5207
    oprot.writeMessageEnd()
-
 
5208
    oprot.trans.flush()
-
 
5209
 
5161
 
5210
 
5162
# HELPER FUNCTIONS AND STRUCTURES
5211
# HELPER FUNCTIONS AND STRUCTURES
5163
 
5212
 
5164
class createAnonymousUser_args:
5213
class createAnonymousUser_args:
5165
  """
5214
  """
Line 17806... Line 17855...
17806
      oprot.writeMapEnd()
17855
      oprot.writeMapEnd()
17807
      oprot.writeFieldEnd()
17856
      oprot.writeFieldEnd()
17808
    oprot.writeFieldStop()
17857
    oprot.writeFieldStop()
17809
    oprot.writeStructEnd()
17858
    oprot.writeStructEnd()
17810
 
17859
 
-
 
17860
  def validate(self):
-
 
17861
    return
-
 
17862
 
-
 
17863
 
-
 
17864
  def __repr__(self):
-
 
17865
    L = ['%s=%r' % (key, value)
-
 
17866
      for key, value in self.__dict__.iteritems()]
-
 
17867
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
17868
 
-
 
17869
  def __eq__(self, other):
-
 
17870
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
17871
 
-
 
17872
  def __ne__(self, other):
-
 
17873
    return not (self == other)
-
 
17874
 
-
 
17875
class getCounterName_args:
-
 
17876
  """
-
 
17877
  Attributes:
-
 
17878
   - userIds
-
 
17879
  """
-
 
17880
 
-
 
17881
  thrift_spec = (
-
 
17882
    None, # 0
-
 
17883
    (1, TType.LIST, 'userIds', (TType.I64,None), None, ), # 1
-
 
17884
  )
-
 
17885
 
-
 
17886
  def __init__(self, userIds=None,):
-
 
17887
    self.userIds = userIds
-
 
17888
 
-
 
17889
  def read(self, iprot):
-
 
17890
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
17891
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
17892
      return
-
 
17893
    iprot.readStructBegin()
-
 
17894
    while True:
-
 
17895
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
17896
      if ftype == TType.STOP:
-
 
17897
        break
-
 
17898
      if fid == 1:
-
 
17899
        if ftype == TType.LIST:
-
 
17900
          self.userIds = []
-
 
17901
          (_etype281, _size278) = iprot.readListBegin()
-
 
17902
          for _i282 in xrange(_size278):
-
 
17903
            _elem283 = iprot.readI64();
-
 
17904
            self.userIds.append(_elem283)
-
 
17905
          iprot.readListEnd()
-
 
17906
        else:
-
 
17907
          iprot.skip(ftype)
-
 
17908
      else:
-
 
17909
        iprot.skip(ftype)
-
 
17910
      iprot.readFieldEnd()
-
 
17911
    iprot.readStructEnd()
-
 
17912
 
-
 
17913
  def write(self, oprot):
-
 
17914
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
17915
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
17916
      return
-
 
17917
    oprot.writeStructBegin('getCounterName_args')
-
 
17918
    if self.userIds is not None:
-
 
17919
      oprot.writeFieldBegin('userIds', TType.LIST, 1)
-
 
17920
      oprot.writeListBegin(TType.I64, len(self.userIds))
-
 
17921
      for iter284 in self.userIds:
-
 
17922
        oprot.writeI64(iter284)
-
 
17923
      oprot.writeListEnd()
-
 
17924
      oprot.writeFieldEnd()
-
 
17925
    oprot.writeFieldStop()
-
 
17926
    oprot.writeStructEnd()
-
 
17927
 
-
 
17928
  def validate(self):
-
 
17929
    return
-
 
17930
 
-
 
17931
 
-
 
17932
  def __repr__(self):
-
 
17933
    L = ['%s=%r' % (key, value)
-
 
17934
      for key, value in self.__dict__.iteritems()]
-
 
17935
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
17936
 
-
 
17937
  def __eq__(self, other):
-
 
17938
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
17939
 
-
 
17940
  def __ne__(self, other):
-
 
17941
    return not (self == other)
-
 
17942
 
-
 
17943
class getCounterName_result:
-
 
17944
  """
-
 
17945
  Attributes:
-
 
17946
   - success
-
 
17947
  """
-
 
17948
 
-
 
17949
  thrift_spec = (
-
 
17950
    (0, TType.MAP, 'success', (TType.I64,None,TType.STRING,None), None, ), # 0
-
 
17951
  )
-
 
17952
 
-
 
17953
  def __init__(self, success=None,):
-
 
17954
    self.success = success
-
 
17955
 
-
 
17956
  def read(self, iprot):
-
 
17957
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
17958
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
17959
      return
-
 
17960
    iprot.readStructBegin()
-
 
17961
    while True:
-
 
17962
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
17963
      if ftype == TType.STOP:
-
 
17964
        break
-
 
17965
      if fid == 0:
-
 
17966
        if ftype == TType.MAP:
-
 
17967
          self.success = {}
-
 
17968
          (_ktype286, _vtype287, _size285 ) = iprot.readMapBegin() 
-
 
17969
          for _i289 in xrange(_size285):
-
 
17970
            _key290 = iprot.readI64();
-
 
17971
            _val291 = iprot.readString();
-
 
17972
            self.success[_key290] = _val291
-
 
17973
          iprot.readMapEnd()
-
 
17974
        else:
-
 
17975
          iprot.skip(ftype)
-
 
17976
      else:
-
 
17977
        iprot.skip(ftype)
-
 
17978
      iprot.readFieldEnd()
-
 
17979
    iprot.readStructEnd()
-
 
17980
 
-
 
17981
  def write(self, oprot):
-
 
17982
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
17983
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
17984
      return
-
 
17985
    oprot.writeStructBegin('getCounterName_result')
-
 
17986
    if self.success is not None:
-
 
17987
      oprot.writeFieldBegin('success', TType.MAP, 0)
-
 
17988
      oprot.writeMapBegin(TType.I64, TType.STRING, len(self.success))
-
 
17989
      for kiter292,viter293 in self.success.items():
-
 
17990
        oprot.writeI64(kiter292)
-
 
17991
        oprot.writeString(viter293)
-
 
17992
      oprot.writeMapEnd()
-
 
17993
      oprot.writeFieldEnd()
-
 
17994
    oprot.writeFieldStop()
-
 
17995
    oprot.writeStructEnd()
-
 
17996
 
17811
  def validate(self):
17997
  def validate(self):
17812
    return
17998
    return
17813
 
17999
 
17814
 
18000
 
17815
  def __repr__(self):
18001
  def __repr__(self):