Subversion Repositories SmartDukaan

Rev

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

Rev 18530 Rev 18590
Line 762... Line 762...
762
    Parameters:
762
    Parameters:
763
     - userId
763
     - userId
764
    """
764
    """
765
    pass
765
    pass
766
 
766
 
-
 
767
  def isCreditorAssigned(self, userId):
-
 
768
    """
-
 
769
    Parameters:
-
 
770
     - userId
-
 
771
    """
-
 
772
    pass
-
 
773
 
767
 
774
 
768
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
775
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
769
  """
776
  """
770
  service
777
  service
771
  """
778
  """
Line 3671... Line 3678...
3671
    self._iprot.readMessageEnd()
3678
    self._iprot.readMessageEnd()
3672
    if result.success is not None:
3679
    if result.success is not None:
3673
      return result.success
3680
      return result.success
3674
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getBillingAddressForUser failed: unknown result");
3681
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getBillingAddressForUser failed: unknown result");
3675
 
3682
 
-
 
3683
  def isCreditorAssigned(self, userId):
-
 
3684
    """
-
 
3685
    Parameters:
-
 
3686
     - userId
-
 
3687
    """
-
 
3688
    self.send_isCreditorAssigned(userId)
-
 
3689
    return self.recv_isCreditorAssigned()
-
 
3690
 
-
 
3691
  def send_isCreditorAssigned(self, userId):
-
 
3692
    self._oprot.writeMessageBegin('isCreditorAssigned', TMessageType.CALL, self._seqid)
-
 
3693
    args = isCreditorAssigned_args()
-
 
3694
    args.userId = userId
-
 
3695
    args.write(self._oprot)
-
 
3696
    self._oprot.writeMessageEnd()
-
 
3697
    self._oprot.trans.flush()
-
 
3698
 
-
 
3699
  def recv_isCreditorAssigned(self, ):
-
 
3700
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
3701
    if mtype == TMessageType.EXCEPTION:
-
 
3702
      x = TApplicationException()
-
 
3703
      x.read(self._iprot)
-
 
3704
      self._iprot.readMessageEnd()
-
 
3705
      raise x
-
 
3706
    result = isCreditorAssigned_result()
-
 
3707
    result.read(self._iprot)
-
 
3708
    self._iprot.readMessageEnd()
-
 
3709
    if result.success is not None:
-
 
3710
      return result.success
-
 
3711
    raise TApplicationException(TApplicationException.MISSING_RESULT, "isCreditorAssigned failed: unknown result");
-
 
3712
 
3676
 
3713
 
3677
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
3714
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
3678
  def __init__(self, handler):
3715
  def __init__(self, handler):
3679
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
3716
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
3680
    self._processMap["createAnonymousUser"] = Processor.process_createAnonymousUser
3717
    self._processMap["createAnonymousUser"] = Processor.process_createAnonymousUser
Line 3762... Line 3799...
3762
    self._processMap["validateAccessToken"] = Processor.process_validateAccessToken
3799
    self._processMap["validateAccessToken"] = Processor.process_validateAccessToken
3763
    self._processMap["addItemsToCart"] = Processor.process_addItemsToCart
3800
    self._processMap["addItemsToCart"] = Processor.process_addItemsToCart
3764
    self._processMap["validateCartNew"] = Processor.process_validateCartNew
3801
    self._processMap["validateCartNew"] = Processor.process_validateCartNew
3765
    self._processMap["isTaxInvoiceCounter"] = Processor.process_isTaxInvoiceCounter
3802
    self._processMap["isTaxInvoiceCounter"] = Processor.process_isTaxInvoiceCounter
3766
    self._processMap["getBillingAddressForUser"] = Processor.process_getBillingAddressForUser
3803
    self._processMap["getBillingAddressForUser"] = Processor.process_getBillingAddressForUser
-
 
3804
    self._processMap["isCreditorAssigned"] = Processor.process_isCreditorAssigned
3767
 
3805
 
3768
  def process(self, iprot, oprot):
3806
  def process(self, iprot, oprot):
3769
    (name, type, seqid) = iprot.readMessageBegin()
3807
    (name, type, seqid) = iprot.readMessageBegin()
3770
    if name not in self._processMap:
3808
    if name not in self._processMap:
3771
      iprot.skip(TType.STRUCT)
3809
      iprot.skip(TType.STRUCT)
Line 4911... Line 4949...
4911
    oprot.writeMessageBegin("getBillingAddressForUser", TMessageType.REPLY, seqid)
4949
    oprot.writeMessageBegin("getBillingAddressForUser", TMessageType.REPLY, seqid)
4912
    result.write(oprot)
4950
    result.write(oprot)
4913
    oprot.writeMessageEnd()
4951
    oprot.writeMessageEnd()
4914
    oprot.trans.flush()
4952
    oprot.trans.flush()
4915
 
4953
 
-
 
4954
  def process_isCreditorAssigned(self, seqid, iprot, oprot):
-
 
4955
    args = isCreditorAssigned_args()
-
 
4956
    args.read(iprot)
-
 
4957
    iprot.readMessageEnd()
-
 
4958
    result = isCreditorAssigned_result()
-
 
4959
    result.success = self._handler.isCreditorAssigned(args.userId)
-
 
4960
    oprot.writeMessageBegin("isCreditorAssigned", TMessageType.REPLY, seqid)
-
 
4961
    result.write(oprot)
-
 
4962
    oprot.writeMessageEnd()
-
 
4963
    oprot.trans.flush()
-
 
4964
 
4916
 
4965
 
4917
# HELPER FUNCTIONS AND STRUCTURES
4966
# HELPER FUNCTIONS AND STRUCTURES
4918
 
4967
 
4919
class createAnonymousUser_args:
4968
class createAnonymousUser_args:
4920
  """
4969
  """
Line 16939... Line 16988...
16939
      oprot.writeFieldEnd()
16988
      oprot.writeFieldEnd()
16940
    oprot.writeFieldStop()
16989
    oprot.writeFieldStop()
16941
    oprot.writeStructEnd()
16990
    oprot.writeStructEnd()
16942
 
16991
 
16943
  def validate(self):
16992
  def validate(self):
-
 
16993
    return
-
 
16994
 
-
 
16995
 
-
 
16996
  def __repr__(self):
-
 
16997
    L = ['%s=%r' % (key, value)
-
 
16998
      for key, value in self.__dict__.iteritems()]
-
 
16999
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
17000
 
-
 
17001
  def __eq__(self, other):
-
 
17002
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
17003
 
-
 
17004
  def __ne__(self, other):
-
 
17005
    return not (self == other)
-
 
17006
 
-
 
17007
class isCreditorAssigned_args:
-
 
17008
  """
-
 
17009
  Attributes:
-
 
17010
   - userId
-
 
17011
  """
-
 
17012
 
-
 
17013
  thrift_spec = (
-
 
17014
    None, # 0
-
 
17015
    (1, TType.I64, 'userId', None, None, ), # 1
-
 
17016
  )
-
 
17017
 
-
 
17018
  def __init__(self, userId=None,):
-
 
17019
    self.userId = userId
-
 
17020
 
-
 
17021
  def read(self, iprot):
-
 
17022
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
17023
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
17024
      return
-
 
17025
    iprot.readStructBegin()
-
 
17026
    while True:
-
 
17027
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
17028
      if ftype == TType.STOP:
-
 
17029
        break
-
 
17030
      if fid == 1:
-
 
17031
        if ftype == TType.I64:
-
 
17032
          self.userId = iprot.readI64();
-
 
17033
        else:
-
 
17034
          iprot.skip(ftype)
-
 
17035
      else:
-
 
17036
        iprot.skip(ftype)
-
 
17037
      iprot.readFieldEnd()
-
 
17038
    iprot.readStructEnd()
-
 
17039
 
-
 
17040
  def write(self, oprot):
-
 
17041
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
17042
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
17043
      return
-
 
17044
    oprot.writeStructBegin('isCreditorAssigned_args')
-
 
17045
    if self.userId is not None:
-
 
17046
      oprot.writeFieldBegin('userId', TType.I64, 1)
-
 
17047
      oprot.writeI64(self.userId)
-
 
17048
      oprot.writeFieldEnd()
-
 
17049
    oprot.writeFieldStop()
-
 
17050
    oprot.writeStructEnd()
-
 
17051
 
-
 
17052
  def validate(self):
-
 
17053
    return
-
 
17054
 
-
 
17055
 
-
 
17056
  def __repr__(self):
-
 
17057
    L = ['%s=%r' % (key, value)
-
 
17058
      for key, value in self.__dict__.iteritems()]
-
 
17059
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
17060
 
-
 
17061
  def __eq__(self, other):
-
 
17062
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
17063
 
-
 
17064
  def __ne__(self, other):
-
 
17065
    return not (self == other)
-
 
17066
 
-
 
17067
class isCreditorAssigned_result:
-
 
17068
  """
-
 
17069
  Attributes:
-
 
17070
   - success
-
 
17071
  """
-
 
17072
 
-
 
17073
  thrift_spec = (
-
 
17074
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
17075
  )
-
 
17076
 
-
 
17077
  def __init__(self, success=None,):
-
 
17078
    self.success = success
-
 
17079
 
-
 
17080
  def read(self, iprot):
-
 
17081
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
17082
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
17083
      return
-
 
17084
    iprot.readStructBegin()
-
 
17085
    while True:
-
 
17086
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
17087
      if ftype == TType.STOP:
-
 
17088
        break
-
 
17089
      if fid == 0:
-
 
17090
        if ftype == TType.BOOL:
-
 
17091
          self.success = iprot.readBool();
-
 
17092
        else:
-
 
17093
          iprot.skip(ftype)
-
 
17094
      else:
-
 
17095
        iprot.skip(ftype)
-
 
17096
      iprot.readFieldEnd()
-
 
17097
    iprot.readStructEnd()
-
 
17098
 
-
 
17099
  def write(self, oprot):
-
 
17100
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
17101
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
17102
      return
-
 
17103
    oprot.writeStructBegin('isCreditorAssigned_result')
-
 
17104
    if self.success is not None:
-
 
17105
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
17106
      oprot.writeBool(self.success)
-
 
17107
      oprot.writeFieldEnd()
-
 
17108
    oprot.writeFieldStop()
-
 
17109
    oprot.writeStructEnd()
-
 
17110
 
-
 
17111
  def validate(self):
16944
    return
17112
    return
16945
 
17113
 
16946
 
17114
 
16947
  def __repr__(self):
17115
  def __repr__(self):
16948
    L = ['%s=%r' % (key, value)
17116
    L = ['%s=%r' % (key, value)