Subversion Repositories SmartDukaan

Rev

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

Rev 17782 Rev 18530
Line 748... Line 748...
748
     - pinCode
748
     - pinCode
749
     - sourceId
749
     - sourceId
750
    """
750
    """
751
    pass
751
    pass
752
 
752
 
-
 
753
  def isTaxInvoiceCounter(self, userId):
-
 
754
    """
-
 
755
    Parameters:
-
 
756
     - userId
-
 
757
    """
-
 
758
    pass
-
 
759
 
-
 
760
  def getBillingAddressForUser(self, userId):
-
 
761
    """
-
 
762
    Parameters:
-
 
763
     - userId
-
 
764
    """
-
 
765
    pass
-
 
766
 
753
 
767
 
754
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
768
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
755
  """
769
  """
756
  service
770
  service
757
  """
771
  """
Line 3597... Line 3611...
3597
    self._iprot.readMessageEnd()
3611
    self._iprot.readMessageEnd()
3598
    if result.success is not None:
3612
    if result.success is not None:
3599
      return result.success
3613
      return result.success
3600
    raise TApplicationException(TApplicationException.MISSING_RESULT, "validateCartNew failed: unknown result");
3614
    raise TApplicationException(TApplicationException.MISSING_RESULT, "validateCartNew failed: unknown result");
3601
 
3615
 
-
 
3616
  def isTaxInvoiceCounter(self, userId):
-
 
3617
    """
-
 
3618
    Parameters:
-
 
3619
     - userId
-
 
3620
    """
-
 
3621
    self.send_isTaxInvoiceCounter(userId)
-
 
3622
    return self.recv_isTaxInvoiceCounter()
-
 
3623
 
-
 
3624
  def send_isTaxInvoiceCounter(self, userId):
-
 
3625
    self._oprot.writeMessageBegin('isTaxInvoiceCounter', TMessageType.CALL, self._seqid)
-
 
3626
    args = isTaxInvoiceCounter_args()
-
 
3627
    args.userId = userId
-
 
3628
    args.write(self._oprot)
-
 
3629
    self._oprot.writeMessageEnd()
-
 
3630
    self._oprot.trans.flush()
-
 
3631
 
-
 
3632
  def recv_isTaxInvoiceCounter(self, ):
-
 
3633
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
3634
    if mtype == TMessageType.EXCEPTION:
-
 
3635
      x = TApplicationException()
-
 
3636
      x.read(self._iprot)
-
 
3637
      self._iprot.readMessageEnd()
-
 
3638
      raise x
-
 
3639
    result = isTaxInvoiceCounter_result()
-
 
3640
    result.read(self._iprot)
-
 
3641
    self._iprot.readMessageEnd()
-
 
3642
    if result.success is not None:
-
 
3643
      return result.success
-
 
3644
    raise TApplicationException(TApplicationException.MISSING_RESULT, "isTaxInvoiceCounter failed: unknown result");
-
 
3645
 
-
 
3646
  def getBillingAddressForUser(self, userId):
-
 
3647
    """
-
 
3648
    Parameters:
-
 
3649
     - userId
-
 
3650
    """
-
 
3651
    self.send_getBillingAddressForUser(userId)
-
 
3652
    return self.recv_getBillingAddressForUser()
-
 
3653
 
-
 
3654
  def send_getBillingAddressForUser(self, userId):
-
 
3655
    self._oprot.writeMessageBegin('getBillingAddressForUser', TMessageType.CALL, self._seqid)
-
 
3656
    args = getBillingAddressForUser_args()
-
 
3657
    args.userId = userId
-
 
3658
    args.write(self._oprot)
-
 
3659
    self._oprot.writeMessageEnd()
-
 
3660
    self._oprot.trans.flush()
-
 
3661
 
-
 
3662
  def recv_getBillingAddressForUser(self, ):
-
 
3663
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
3664
    if mtype == TMessageType.EXCEPTION:
-
 
3665
      x = TApplicationException()
-
 
3666
      x.read(self._iprot)
-
 
3667
      self._iprot.readMessageEnd()
-
 
3668
      raise x
-
 
3669
    result = getBillingAddressForUser_result()
-
 
3670
    result.read(self._iprot)
-
 
3671
    self._iprot.readMessageEnd()
-
 
3672
    if result.success is not None:
-
 
3673
      return result.success
-
 
3674
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getBillingAddressForUser failed: unknown result");
-
 
3675
 
3602
 
3676
 
3603
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
3677
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
3604
  def __init__(self, handler):
3678
  def __init__(self, handler):
3605
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
3679
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
3606
    self._processMap["createAnonymousUser"] = Processor.process_createAnonymousUser
3680
    self._processMap["createAnonymousUser"] = Processor.process_createAnonymousUser
Line 3686... Line 3760...
3686
    self._processMap["getAllUsersByCounter"] = Processor.process_getAllUsersByCounter
3760
    self._processMap["getAllUsersByCounter"] = Processor.process_getAllUsersByCounter
3687
    self._processMap["getActiveAccessTokenForUser"] = Processor.process_getActiveAccessTokenForUser
3761
    self._processMap["getActiveAccessTokenForUser"] = Processor.process_getActiveAccessTokenForUser
3688
    self._processMap["validateAccessToken"] = Processor.process_validateAccessToken
3762
    self._processMap["validateAccessToken"] = Processor.process_validateAccessToken
3689
    self._processMap["addItemsToCart"] = Processor.process_addItemsToCart
3763
    self._processMap["addItemsToCart"] = Processor.process_addItemsToCart
3690
    self._processMap["validateCartNew"] = Processor.process_validateCartNew
3764
    self._processMap["validateCartNew"] = Processor.process_validateCartNew
-
 
3765
    self._processMap["isTaxInvoiceCounter"] = Processor.process_isTaxInvoiceCounter
-
 
3766
    self._processMap["getBillingAddressForUser"] = Processor.process_getBillingAddressForUser
3691
 
3767
 
3692
  def process(self, iprot, oprot):
3768
  def process(self, iprot, oprot):
3693
    (name, type, seqid) = iprot.readMessageBegin()
3769
    (name, type, seqid) = iprot.readMessageBegin()
3694
    if name not in self._processMap:
3770
    if name not in self._processMap:
3695
      iprot.skip(TType.STRUCT)
3771
      iprot.skip(TType.STRUCT)
Line 4813... Line 4889...
4813
    oprot.writeMessageBegin("validateCartNew", TMessageType.REPLY, seqid)
4889
    oprot.writeMessageBegin("validateCartNew", TMessageType.REPLY, seqid)
4814
    result.write(oprot)
4890
    result.write(oprot)
4815
    oprot.writeMessageEnd()
4891
    oprot.writeMessageEnd()
4816
    oprot.trans.flush()
4892
    oprot.trans.flush()
4817
 
4893
 
-
 
4894
  def process_isTaxInvoiceCounter(self, seqid, iprot, oprot):
-
 
4895
    args = isTaxInvoiceCounter_args()
-
 
4896
    args.read(iprot)
-
 
4897
    iprot.readMessageEnd()
-
 
4898
    result = isTaxInvoiceCounter_result()
-
 
4899
    result.success = self._handler.isTaxInvoiceCounter(args.userId)
-
 
4900
    oprot.writeMessageBegin("isTaxInvoiceCounter", TMessageType.REPLY, seqid)
-
 
4901
    result.write(oprot)
-
 
4902
    oprot.writeMessageEnd()
-
 
4903
    oprot.trans.flush()
-
 
4904
 
-
 
4905
  def process_getBillingAddressForUser(self, seqid, iprot, oprot):
-
 
4906
    args = getBillingAddressForUser_args()
-
 
4907
    args.read(iprot)
-
 
4908
    iprot.readMessageEnd()
-
 
4909
    result = getBillingAddressForUser_result()
-
 
4910
    result.success = self._handler.getBillingAddressForUser(args.userId)
-
 
4911
    oprot.writeMessageBegin("getBillingAddressForUser", TMessageType.REPLY, seqid)
-
 
4912
    result.write(oprot)
-
 
4913
    oprot.writeMessageEnd()
-
 
4914
    oprot.trans.flush()
-
 
4915
 
4818
 
4916
 
4819
# HELPER FUNCTIONS AND STRUCTURES
4917
# HELPER FUNCTIONS AND STRUCTURES
4820
 
4918
 
4821
class createAnonymousUser_args:
4919
class createAnonymousUser_args:
4822
  """
4920
  """
Line 16602... Line 16700...
16602
      oprot.writeFieldEnd()
16700
      oprot.writeFieldEnd()
16603
    oprot.writeFieldStop()
16701
    oprot.writeFieldStop()
16604
    oprot.writeStructEnd()
16702
    oprot.writeStructEnd()
16605
 
16703
 
16606
  def validate(self):
16704
  def validate(self):
-
 
16705
    return
-
 
16706
 
-
 
16707
 
-
 
16708
  def __repr__(self):
-
 
16709
    L = ['%s=%r' % (key, value)
-
 
16710
      for key, value in self.__dict__.iteritems()]
-
 
16711
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
16712
 
-
 
16713
  def __eq__(self, other):
-
 
16714
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
16715
 
-
 
16716
  def __ne__(self, other):
-
 
16717
    return not (self == other)
-
 
16718
 
-
 
16719
class isTaxInvoiceCounter_args:
-
 
16720
  """
-
 
16721
  Attributes:
-
 
16722
   - userId
-
 
16723
  """
-
 
16724
 
-
 
16725
  thrift_spec = (
-
 
16726
    None, # 0
-
 
16727
    (1, TType.I64, 'userId', None, None, ), # 1
-
 
16728
  )
-
 
16729
 
-
 
16730
  def __init__(self, userId=None,):
-
 
16731
    self.userId = userId
-
 
16732
 
-
 
16733
  def read(self, iprot):
-
 
16734
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
16735
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
16736
      return
-
 
16737
    iprot.readStructBegin()
-
 
16738
    while True:
-
 
16739
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
16740
      if ftype == TType.STOP:
-
 
16741
        break
-
 
16742
      if fid == 1:
-
 
16743
        if ftype == TType.I64:
-
 
16744
          self.userId = iprot.readI64();
-
 
16745
        else:
-
 
16746
          iprot.skip(ftype)
-
 
16747
      else:
-
 
16748
        iprot.skip(ftype)
-
 
16749
      iprot.readFieldEnd()
-
 
16750
    iprot.readStructEnd()
-
 
16751
 
-
 
16752
  def write(self, oprot):
-
 
16753
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
16754
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
16755
      return
-
 
16756
    oprot.writeStructBegin('isTaxInvoiceCounter_args')
-
 
16757
    if self.userId is not None:
-
 
16758
      oprot.writeFieldBegin('userId', TType.I64, 1)
-
 
16759
      oprot.writeI64(self.userId)
-
 
16760
      oprot.writeFieldEnd()
-
 
16761
    oprot.writeFieldStop()
-
 
16762
    oprot.writeStructEnd()
-
 
16763
 
-
 
16764
  def validate(self):
-
 
16765
    return
-
 
16766
 
-
 
16767
 
-
 
16768
  def __repr__(self):
-
 
16769
    L = ['%s=%r' % (key, value)
-
 
16770
      for key, value in self.__dict__.iteritems()]
-
 
16771
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
16772
 
-
 
16773
  def __eq__(self, other):
-
 
16774
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
16775
 
-
 
16776
  def __ne__(self, other):
-
 
16777
    return not (self == other)
-
 
16778
 
-
 
16779
class isTaxInvoiceCounter_result:
-
 
16780
  """
-
 
16781
  Attributes:
-
 
16782
   - success
-
 
16783
  """
-
 
16784
 
-
 
16785
  thrift_spec = (
-
 
16786
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
16787
  )
-
 
16788
 
-
 
16789
  def __init__(self, success=None,):
-
 
16790
    self.success = success
-
 
16791
 
-
 
16792
  def read(self, iprot):
-
 
16793
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
16794
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
16795
      return
-
 
16796
    iprot.readStructBegin()
-
 
16797
    while True:
-
 
16798
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
16799
      if ftype == TType.STOP:
-
 
16800
        break
-
 
16801
      if fid == 0:
-
 
16802
        if ftype == TType.BOOL:
-
 
16803
          self.success = iprot.readBool();
-
 
16804
        else:
-
 
16805
          iprot.skip(ftype)
-
 
16806
      else:
-
 
16807
        iprot.skip(ftype)
-
 
16808
      iprot.readFieldEnd()
-
 
16809
    iprot.readStructEnd()
-
 
16810
 
-
 
16811
  def write(self, oprot):
-
 
16812
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
16813
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
16814
      return
-
 
16815
    oprot.writeStructBegin('isTaxInvoiceCounter_result')
-
 
16816
    if self.success is not None:
-
 
16817
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
16818
      oprot.writeBool(self.success)
-
 
16819
      oprot.writeFieldEnd()
-
 
16820
    oprot.writeFieldStop()
-
 
16821
    oprot.writeStructEnd()
-
 
16822
 
-
 
16823
  def validate(self):
-
 
16824
    return
-
 
16825
 
-
 
16826
 
-
 
16827
  def __repr__(self):
-
 
16828
    L = ['%s=%r' % (key, value)
-
 
16829
      for key, value in self.__dict__.iteritems()]
-
 
16830
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
16831
 
-
 
16832
  def __eq__(self, other):
-
 
16833
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
16834
 
-
 
16835
  def __ne__(self, other):
-
 
16836
    return not (self == other)
-
 
16837
 
-
 
16838
class getBillingAddressForUser_args:
-
 
16839
  """
-
 
16840
  Attributes:
-
 
16841
   - userId
-
 
16842
  """
-
 
16843
 
-
 
16844
  thrift_spec = (
-
 
16845
    None, # 0
-
 
16846
    (1, TType.I64, 'userId', None, None, ), # 1
-
 
16847
  )
-
 
16848
 
-
 
16849
  def __init__(self, userId=None,):
-
 
16850
    self.userId = userId
-
 
16851
 
-
 
16852
  def read(self, iprot):
-
 
16853
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
16854
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
16855
      return
-
 
16856
    iprot.readStructBegin()
-
 
16857
    while True:
-
 
16858
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
16859
      if ftype == TType.STOP:
-
 
16860
        break
-
 
16861
      if fid == 1:
-
 
16862
        if ftype == TType.I64:
-
 
16863
          self.userId = iprot.readI64();
-
 
16864
        else:
-
 
16865
          iprot.skip(ftype)
-
 
16866
      else:
-
 
16867
        iprot.skip(ftype)
-
 
16868
      iprot.readFieldEnd()
-
 
16869
    iprot.readStructEnd()
-
 
16870
 
-
 
16871
  def write(self, oprot):
-
 
16872
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
16873
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
16874
      return
-
 
16875
    oprot.writeStructBegin('getBillingAddressForUser_args')
-
 
16876
    if self.userId is not None:
-
 
16877
      oprot.writeFieldBegin('userId', TType.I64, 1)
-
 
16878
      oprot.writeI64(self.userId)
-
 
16879
      oprot.writeFieldEnd()
-
 
16880
    oprot.writeFieldStop()
-
 
16881
    oprot.writeStructEnd()
-
 
16882
 
-
 
16883
  def validate(self):
-
 
16884
    return
-
 
16885
 
-
 
16886
 
-
 
16887
  def __repr__(self):
-
 
16888
    L = ['%s=%r' % (key, value)
-
 
16889
      for key, value in self.__dict__.iteritems()]
-
 
16890
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
16891
 
-
 
16892
  def __eq__(self, other):
-
 
16893
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
16894
 
-
 
16895
  def __ne__(self, other):
-
 
16896
    return not (self == other)
-
 
16897
 
-
 
16898
class getBillingAddressForUser_result:
-
 
16899
  """
-
 
16900
  Attributes:
-
 
16901
   - success
-
 
16902
  """
-
 
16903
 
-
 
16904
  thrift_spec = (
-
 
16905
    (0, TType.STRUCT, 'success', (Address, Address.thrift_spec), None, ), # 0
-
 
16906
  )
-
 
16907
 
-
 
16908
  def __init__(self, success=None,):
-
 
16909
    self.success = success
-
 
16910
 
-
 
16911
  def read(self, iprot):
-
 
16912
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
16913
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
16914
      return
-
 
16915
    iprot.readStructBegin()
-
 
16916
    while True:
-
 
16917
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
16918
      if ftype == TType.STOP:
-
 
16919
        break
-
 
16920
      if fid == 0:
-
 
16921
        if ftype == TType.STRUCT:
-
 
16922
          self.success = Address()
-
 
16923
          self.success.read(iprot)
-
 
16924
        else:
-
 
16925
          iprot.skip(ftype)
-
 
16926
      else:
-
 
16927
        iprot.skip(ftype)
-
 
16928
      iprot.readFieldEnd()
-
 
16929
    iprot.readStructEnd()
-
 
16930
 
-
 
16931
  def write(self, oprot):
-
 
16932
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
16933
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
16934
      return
-
 
16935
    oprot.writeStructBegin('getBillingAddressForUser_result')
-
 
16936
    if self.success is not None:
-
 
16937
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
-
 
16938
      self.success.write(oprot)
-
 
16939
      oprot.writeFieldEnd()
-
 
16940
    oprot.writeFieldStop()
-
 
16941
    oprot.writeStructEnd()
-
 
16942
 
-
 
16943
  def validate(self):
16607
    return
16944
    return
16608
 
16945
 
16609
 
16946
 
16610
  def __repr__(self):
16947
  def __repr__(self):
16611
    L = ['%s=%r' % (key, value)
16948
    L = ['%s=%r' % (key, value)