Subversion Repositories SmartDukaan

Rev

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

Rev 18644 Rev 18735
Line 769... Line 769...
769
    Parameters:
769
    Parameters:
770
     - userId
770
     - userId
771
    """
771
    """
772
    pass
772
    pass
773
 
773
 
-
 
774
  def isTaxInvoiceEnabledUser(self, userId):
-
 
775
    """
-
 
776
    Parameters:
-
 
777
     - userId
-
 
778
    """
-
 
779
    pass
-
 
780
 
774
 
781
 
775
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
782
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
776
  """
783
  """
777
  service
784
  service
778
  """
785
  """
Line 3708... Line 3715...
3708
    self._iprot.readMessageEnd()
3715
    self._iprot.readMessageEnd()
3709
    if result.success is not None:
3716
    if result.success is not None:
3710
      return result.success
3717
      return result.success
3711
    raise TApplicationException(TApplicationException.MISSING_RESULT, "isCreditorAssigned failed: unknown result");
3718
    raise TApplicationException(TApplicationException.MISSING_RESULT, "isCreditorAssigned failed: unknown result");
3712
 
3719
 
-
 
3720
  def isTaxInvoiceEnabledUser(self, userId):
-
 
3721
    """
-
 
3722
    Parameters:
-
 
3723
     - userId
-
 
3724
    """
-
 
3725
    self.send_isTaxInvoiceEnabledUser(userId)
-
 
3726
    return self.recv_isTaxInvoiceEnabledUser()
-
 
3727
 
-
 
3728
  def send_isTaxInvoiceEnabledUser(self, userId):
-
 
3729
    self._oprot.writeMessageBegin('isTaxInvoiceEnabledUser', TMessageType.CALL, self._seqid)
-
 
3730
    args = isTaxInvoiceEnabledUser_args()
-
 
3731
    args.userId = userId
-
 
3732
    args.write(self._oprot)
-
 
3733
    self._oprot.writeMessageEnd()
-
 
3734
    self._oprot.trans.flush()
-
 
3735
 
-
 
3736
  def recv_isTaxInvoiceEnabledUser(self, ):
-
 
3737
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
3738
    if mtype == TMessageType.EXCEPTION:
-
 
3739
      x = TApplicationException()
-
 
3740
      x.read(self._iprot)
-
 
3741
      self._iprot.readMessageEnd()
-
 
3742
      raise x
-
 
3743
    result = isTaxInvoiceEnabledUser_result()
-
 
3744
    result.read(self._iprot)
-
 
3745
    self._iprot.readMessageEnd()
-
 
3746
    if result.success is not None:
-
 
3747
      return result.success
-
 
3748
    raise TApplicationException(TApplicationException.MISSING_RESULT, "isTaxInvoiceEnabledUser failed: unknown result");
-
 
3749
 
3713
 
3750
 
3714
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
3751
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
3715
  def __init__(self, handler):
3752
  def __init__(self, handler):
3716
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
3753
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
3717
    self._processMap["createAnonymousUser"] = Processor.process_createAnonymousUser
3754
    self._processMap["createAnonymousUser"] = Processor.process_createAnonymousUser
Line 3800... Line 3837...
3800
    self._processMap["addItemsToCart"] = Processor.process_addItemsToCart
3837
    self._processMap["addItemsToCart"] = Processor.process_addItemsToCart
3801
    self._processMap["validateCartNew"] = Processor.process_validateCartNew
3838
    self._processMap["validateCartNew"] = Processor.process_validateCartNew
3802
    self._processMap["isAddressEditableForCounter"] = Processor.process_isAddressEditableForCounter
3839
    self._processMap["isAddressEditableForCounter"] = Processor.process_isAddressEditableForCounter
3803
    self._processMap["getBillingAddressForUser"] = Processor.process_getBillingAddressForUser
3840
    self._processMap["getBillingAddressForUser"] = Processor.process_getBillingAddressForUser
3804
    self._processMap["isCreditorAssigned"] = Processor.process_isCreditorAssigned
3841
    self._processMap["isCreditorAssigned"] = Processor.process_isCreditorAssigned
-
 
3842
    self._processMap["isTaxInvoiceEnabledUser"] = Processor.process_isTaxInvoiceEnabledUser
3805
 
3843
 
3806
  def process(self, iprot, oprot):
3844
  def process(self, iprot, oprot):
3807
    (name, type, seqid) = iprot.readMessageBegin()
3845
    (name, type, seqid) = iprot.readMessageBegin()
3808
    if name not in self._processMap:
3846
    if name not in self._processMap:
3809
      iprot.skip(TType.STRUCT)
3847
      iprot.skip(TType.STRUCT)
Line 4960... Line 4998...
4960
    oprot.writeMessageBegin("isCreditorAssigned", TMessageType.REPLY, seqid)
4998
    oprot.writeMessageBegin("isCreditorAssigned", TMessageType.REPLY, seqid)
4961
    result.write(oprot)
4999
    result.write(oprot)
4962
    oprot.writeMessageEnd()
5000
    oprot.writeMessageEnd()
4963
    oprot.trans.flush()
5001
    oprot.trans.flush()
4964
 
5002
 
-
 
5003
  def process_isTaxInvoiceEnabledUser(self, seqid, iprot, oprot):
-
 
5004
    args = isTaxInvoiceEnabledUser_args()
-
 
5005
    args.read(iprot)
-
 
5006
    iprot.readMessageEnd()
-
 
5007
    result = isTaxInvoiceEnabledUser_result()
-
 
5008
    result.success = self._handler.isTaxInvoiceEnabledUser(args.userId)
-
 
5009
    oprot.writeMessageBegin("isTaxInvoiceEnabledUser", TMessageType.REPLY, seqid)
-
 
5010
    result.write(oprot)
-
 
5011
    oprot.writeMessageEnd()
-
 
5012
    oprot.trans.flush()
-
 
5013
 
4965
 
5014
 
4966
# HELPER FUNCTIONS AND STRUCTURES
5015
# HELPER FUNCTIONS AND STRUCTURES
4967
 
5016
 
4968
class createAnonymousUser_args:
5017
class createAnonymousUser_args:
4969
  """
5018
  """
Line 17104... Line 17153...
17104
    if self.success is not None:
17153
    if self.success is not None:
17105
      oprot.writeFieldBegin('success', TType.BOOL, 0)
17154
      oprot.writeFieldBegin('success', TType.BOOL, 0)
17106
      oprot.writeBool(self.success)
17155
      oprot.writeBool(self.success)
17107
      oprot.writeFieldEnd()
17156
      oprot.writeFieldEnd()
17108
    oprot.writeFieldStop()
17157
    oprot.writeFieldStop()
-
 
17158
    oprot.writeStructEnd()
-
 
17159
 
-
 
17160
  def validate(self):
-
 
17161
    return
-
 
17162
 
-
 
17163
 
-
 
17164
  def __repr__(self):
-
 
17165
    L = ['%s=%r' % (key, value)
-
 
17166
      for key, value in self.__dict__.iteritems()]
-
 
17167
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
17168
 
-
 
17169
  def __eq__(self, other):
-
 
17170
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
17171
 
-
 
17172
  def __ne__(self, other):
-
 
17173
    return not (self == other)
-
 
17174
 
-
 
17175
class isTaxInvoiceEnabledUser_args:
-
 
17176
  """
-
 
17177
  Attributes:
-
 
17178
   - userId
-
 
17179
  """
-
 
17180
 
-
 
17181
  thrift_spec = (
-
 
17182
    None, # 0
-
 
17183
    (1, TType.I64, 'userId', None, None, ), # 1
-
 
17184
  )
-
 
17185
 
-
 
17186
  def __init__(self, userId=None,):
-
 
17187
    self.userId = userId
-
 
17188
 
-
 
17189
  def read(self, iprot):
-
 
17190
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
17191
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
17192
      return
-
 
17193
    iprot.readStructBegin()
-
 
17194
    while True:
-
 
17195
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
17196
      if ftype == TType.STOP:
-
 
17197
        break
-
 
17198
      if fid == 1:
-
 
17199
        if ftype == TType.I64:
-
 
17200
          self.userId = iprot.readI64();
-
 
17201
        else:
-
 
17202
          iprot.skip(ftype)
-
 
17203
      else:
-
 
17204
        iprot.skip(ftype)
-
 
17205
      iprot.readFieldEnd()
-
 
17206
    iprot.readStructEnd()
-
 
17207
 
-
 
17208
  def write(self, oprot):
-
 
17209
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
17210
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
17211
      return
-
 
17212
    oprot.writeStructBegin('isTaxInvoiceEnabledUser_args')
-
 
17213
    if self.userId is not None:
-
 
17214
      oprot.writeFieldBegin('userId', TType.I64, 1)
-
 
17215
      oprot.writeI64(self.userId)
-
 
17216
      oprot.writeFieldEnd()
-
 
17217
    oprot.writeFieldStop()
-
 
17218
    oprot.writeStructEnd()
-
 
17219
 
-
 
17220
  def validate(self):
-
 
17221
    return
-
 
17222
 
-
 
17223
 
-
 
17224
  def __repr__(self):
-
 
17225
    L = ['%s=%r' % (key, value)
-
 
17226
      for key, value in self.__dict__.iteritems()]
-
 
17227
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
17228
 
-
 
17229
  def __eq__(self, other):
-
 
17230
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
17231
 
-
 
17232
  def __ne__(self, other):
-
 
17233
    return not (self == other)
-
 
17234
 
-
 
17235
class isTaxInvoiceEnabledUser_result:
-
 
17236
  """
-
 
17237
  Attributes:
-
 
17238
   - success
-
 
17239
  """
-
 
17240
 
-
 
17241
  thrift_spec = (
-
 
17242
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
17243
  )
-
 
17244
 
-
 
17245
  def __init__(self, success=None,):
-
 
17246
    self.success = success
-
 
17247
 
-
 
17248
  def read(self, iprot):
-
 
17249
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
17250
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
17251
      return
-
 
17252
    iprot.readStructBegin()
-
 
17253
    while True:
-
 
17254
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
17255
      if ftype == TType.STOP:
-
 
17256
        break
-
 
17257
      if fid == 0:
-
 
17258
        if ftype == TType.BOOL:
-
 
17259
          self.success = iprot.readBool();
-
 
17260
        else:
-
 
17261
          iprot.skip(ftype)
-
 
17262
      else:
-
 
17263
        iprot.skip(ftype)
-
 
17264
      iprot.readFieldEnd()
-
 
17265
    iprot.readStructEnd()
-
 
17266
 
-
 
17267
  def write(self, oprot):
-
 
17268
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
17269
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
17270
      return
-
 
17271
    oprot.writeStructBegin('isTaxInvoiceEnabledUser_result')
-
 
17272
    if self.success is not None:
-
 
17273
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
17274
      oprot.writeBool(self.success)
-
 
17275
      oprot.writeFieldEnd()
-
 
17276
    oprot.writeFieldStop()
17109
    oprot.writeStructEnd()
17277
    oprot.writeStructEnd()
17110
 
17278
 
17111
  def validate(self):
17279
  def validate(self):
17112
    return
17280
    return
17113
 
17281