Subversion Repositories SmartDukaan

Rev

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

Rev 6821 Rev 6838
Line 583... Line 583...
583
    Parameters:
583
    Parameters:
584
     - insurerId
584
     - insurerId
585
    """
585
    """
586
    pass
586
    pass
587
 
587
 
-
 
588
  def getAllInsurers(self, ):
-
 
589
    pass
-
 
590
 
588
 
591
 
589
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
592
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
590
  def __init__(self, iprot, oprot=None):
593
  def __init__(self, iprot, oprot=None):
591
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
594
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
592
 
595
 
Line 2908... Line 2911...
2908
    self._iprot.readMessageEnd()
2911
    self._iprot.readMessageEnd()
2909
    if result.success is not None:
2912
    if result.success is not None:
2910
      return result.success
2913
      return result.success
2911
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getInsurer failed: unknown result");
2914
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getInsurer failed: unknown result");
2912
 
2915
 
-
 
2916
  def getAllInsurers(self, ):
-
 
2917
    self.send_getAllInsurers()
-
 
2918
    return self.recv_getAllInsurers()
-
 
2919
 
-
 
2920
  def send_getAllInsurers(self, ):
-
 
2921
    self._oprot.writeMessageBegin('getAllInsurers', TMessageType.CALL, self._seqid)
-
 
2922
    args = getAllInsurers_args()
-
 
2923
    args.write(self._oprot)
-
 
2924
    self._oprot.writeMessageEnd()
-
 
2925
    self._oprot.trans.flush()
-
 
2926
 
-
 
2927
  def recv_getAllInsurers(self, ):
-
 
2928
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
2929
    if mtype == TMessageType.EXCEPTION:
-
 
2930
      x = TApplicationException()
-
 
2931
      x.read(self._iprot)
-
 
2932
      self._iprot.readMessageEnd()
-
 
2933
      raise x
-
 
2934
    result = getAllInsurers_result()
-
 
2935
    result.read(self._iprot)
-
 
2936
    self._iprot.readMessageEnd()
-
 
2937
    if result.success is not None:
-
 
2938
      return result.success
-
 
2939
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllInsurers failed: unknown result");
-
 
2940
 
2913
 
2941
 
2914
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
2942
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
2915
  def __init__(self, handler):
2943
  def __init__(self, handler):
2916
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
2944
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
2917
    self._processMap["addItem"] = Processor.process_addItem
2945
    self._processMap["addItem"] = Processor.process_addItem
Line 2984... Line 3012...
2984
    self._processMap["getVatAmountForItem"] = Processor.process_getVatAmountForItem
3012
    self._processMap["getVatAmountForItem"] = Processor.process_getVatAmountForItem
2985
    self._processMap["getAllIgnoredInventoryUpdateItemsList"] = Processor.process_getAllIgnoredInventoryUpdateItemsList
3013
    self._processMap["getAllIgnoredInventoryUpdateItemsList"] = Processor.process_getAllIgnoredInventoryUpdateItemsList
2986
    self._processMap["getAllAliveItems"] = Processor.process_getAllAliveItems
3014
    self._processMap["getAllAliveItems"] = Processor.process_getAllAliveItems
2987
    self._processMap["getInsuranceAmount"] = Processor.process_getInsuranceAmount
3015
    self._processMap["getInsuranceAmount"] = Processor.process_getInsuranceAmount
2988
    self._processMap["getInsurer"] = Processor.process_getInsurer
3016
    self._processMap["getInsurer"] = Processor.process_getInsurer
-
 
3017
    self._processMap["getAllInsurers"] = Processor.process_getAllInsurers
2989
 
3018
 
2990
  def process(self, iprot, oprot):
3019
  def process(self, iprot, oprot):
2991
    (name, type, seqid) = iprot.readMessageBegin()
3020
    (name, type, seqid) = iprot.readMessageBegin()
2992
    if name not in self._processMap:
3021
    if name not in self._processMap:
2993
      iprot.skip(TType.STRUCT)
3022
      iprot.skip(TType.STRUCT)
Line 3903... Line 3932...
3903
    oprot.writeMessageBegin("getInsurer", TMessageType.REPLY, seqid)
3932
    oprot.writeMessageBegin("getInsurer", TMessageType.REPLY, seqid)
3904
    result.write(oprot)
3933
    result.write(oprot)
3905
    oprot.writeMessageEnd()
3934
    oprot.writeMessageEnd()
3906
    oprot.trans.flush()
3935
    oprot.trans.flush()
3907
 
3936
 
-
 
3937
  def process_getAllInsurers(self, seqid, iprot, oprot):
-
 
3938
    args = getAllInsurers_args()
-
 
3939
    args.read(iprot)
-
 
3940
    iprot.readMessageEnd()
-
 
3941
    result = getAllInsurers_result()
-
 
3942
    result.success = self._handler.getAllInsurers()
-
 
3943
    oprot.writeMessageBegin("getAllInsurers", TMessageType.REPLY, seqid)
-
 
3944
    result.write(oprot)
-
 
3945
    oprot.writeMessageEnd()
-
 
3946
    oprot.trans.flush()
-
 
3947
 
3908
 
3948
 
3909
# HELPER FUNCTIONS AND STRUCTURES
3949
# HELPER FUNCTIONS AND STRUCTURES
3910
 
3950
 
3911
class addItem_args:
3951
class addItem_args:
3912
  """
3952
  """
Line 13477... Line 13517...
13477
      oprot.writeFieldEnd()
13517
      oprot.writeFieldEnd()
13478
    oprot.writeFieldStop()
13518
    oprot.writeFieldStop()
13479
    oprot.writeStructEnd()
13519
    oprot.writeStructEnd()
13480
 
13520
 
13481
  def validate(self):
13521
  def validate(self):
-
 
13522
    return
-
 
13523
 
-
 
13524
 
-
 
13525
  def __repr__(self):
-
 
13526
    L = ['%s=%r' % (key, value)
-
 
13527
      for key, value in self.__dict__.iteritems()]
-
 
13528
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
13529
 
-
 
13530
  def __eq__(self, other):
-
 
13531
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
13532
 
-
 
13533
  def __ne__(self, other):
-
 
13534
    return not (self == other)
-
 
13535
 
-
 
13536
class getAllInsurers_args:
-
 
13537
 
-
 
13538
  thrift_spec = (
-
 
13539
  )
-
 
13540
 
-
 
13541
  def read(self, iprot):
-
 
13542
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
13543
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
13544
      return
-
 
13545
    iprot.readStructBegin()
-
 
13546
    while True:
-
 
13547
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
13548
      if ftype == TType.STOP:
-
 
13549
        break
-
 
13550
      else:
-
 
13551
        iprot.skip(ftype)
-
 
13552
      iprot.readFieldEnd()
-
 
13553
    iprot.readStructEnd()
-
 
13554
 
-
 
13555
  def write(self, oprot):
-
 
13556
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
13557
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
13558
      return
-
 
13559
    oprot.writeStructBegin('getAllInsurers_args')
-
 
13560
    oprot.writeFieldStop()
-
 
13561
    oprot.writeStructEnd()
-
 
13562
 
-
 
13563
  def validate(self):
-
 
13564
    return
-
 
13565
 
-
 
13566
 
-
 
13567
  def __repr__(self):
-
 
13568
    L = ['%s=%r' % (key, value)
-
 
13569
      for key, value in self.__dict__.iteritems()]
-
 
13570
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
13571
 
-
 
13572
  def __eq__(self, other):
-
 
13573
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
13574
 
-
 
13575
  def __ne__(self, other):
-
 
13576
    return not (self == other)
-
 
13577
 
-
 
13578
class getAllInsurers_result:
-
 
13579
  """
-
 
13580
  Attributes:
-
 
13581
   - success
-
 
13582
  """
-
 
13583
 
-
 
13584
  thrift_spec = (
-
 
13585
    (0, TType.LIST, 'success', (TType.STRUCT,(Insurer, Insurer.thrift_spec)), None, ), # 0
-
 
13586
  )
-
 
13587
 
-
 
13588
  def __init__(self, success=None,):
-
 
13589
    self.success = success
-
 
13590
 
-
 
13591
  def read(self, iprot):
-
 
13592
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
13593
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
13594
      return
-
 
13595
    iprot.readStructBegin()
-
 
13596
    while True:
-
 
13597
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
13598
      if ftype == TType.STOP:
-
 
13599
        break
-
 
13600
      if fid == 0:
-
 
13601
        if ftype == TType.LIST:
-
 
13602
          self.success = []
-
 
13603
          (_etype264, _size261) = iprot.readListBegin()
-
 
13604
          for _i265 in xrange(_size261):
-
 
13605
            _elem266 = Insurer()
-
 
13606
            _elem266.read(iprot)
-
 
13607
            self.success.append(_elem266)
-
 
13608
          iprot.readListEnd()
-
 
13609
        else:
-
 
13610
          iprot.skip(ftype)
-
 
13611
      else:
-
 
13612
        iprot.skip(ftype)
-
 
13613
      iprot.readFieldEnd()
-
 
13614
    iprot.readStructEnd()
-
 
13615
 
-
 
13616
  def write(self, oprot):
-
 
13617
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
13618
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
13619
      return
-
 
13620
    oprot.writeStructBegin('getAllInsurers_result')
-
 
13621
    if self.success is not None:
-
 
13622
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
13623
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
13624
      for iter267 in self.success:
-
 
13625
        iter267.write(oprot)
-
 
13626
      oprot.writeListEnd()
-
 
13627
      oprot.writeFieldEnd()
-
 
13628
    oprot.writeFieldStop()
-
 
13629
    oprot.writeStructEnd()
-
 
13630
 
-
 
13631
  def validate(self):
13482
    return
13632
    return
13483
 
13633
 
13484
 
13634
 
13485
  def __repr__(self):
13635
  def __repr__(self):
13486
    L = ['%s=%r' % (key, value)
13636
    L = ['%s=%r' % (key, value)