Subversion Repositories SmartDukaan

Rev

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

Rev 7330 Rev 7340
Line 3146... Line 3146...
3146
    result = getVatPercentageForItem_result()
3146
    result = getVatPercentageForItem_result()
3147
    result.read(self._iprot)
3147
    result.read(self._iprot)
3148
    self._iprot.readMessageEnd()
3148
    self._iprot.readMessageEnd()
3149
    if result.success is not None:
3149
    if result.success is not None:
3150
      return result.success
3150
      return result.success
-
 
3151
    if result.cex is not None:
-
 
3152
      raise result.cex
3151
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getVatPercentageForItem failed: unknown result");
3153
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getVatPercentageForItem failed: unknown result");
3152
 
3154
 
3153
  def getVatAmountForItem(self, itemId, price):
3155
  def getVatAmountForItem(self, itemId, price):
3154
    """
3156
    """
3155
    Parameters:
3157
    Parameters:
Line 4798... Line 4800...
4798
  def process_getVatPercentageForItem(self, seqid, iprot, oprot):
4800
  def process_getVatPercentageForItem(self, seqid, iprot, oprot):
4799
    args = getVatPercentageForItem_args()
4801
    args = getVatPercentageForItem_args()
4800
    args.read(iprot)
4802
    args.read(iprot)
4801
    iprot.readMessageEnd()
4803
    iprot.readMessageEnd()
4802
    result = getVatPercentageForItem_result()
4804
    result = getVatPercentageForItem_result()
-
 
4805
    try:
4803
    result.success = self._handler.getVatPercentageForItem(args.itemId, args.stateId, args.price)
4806
      result.success = self._handler.getVatPercentageForItem(args.itemId, args.stateId, args.price)
-
 
4807
    except CatalogServiceException, cex:
-
 
4808
      result.cex = cex
4804
    oprot.writeMessageBegin("getVatPercentageForItem", TMessageType.REPLY, seqid)
4809
    oprot.writeMessageBegin("getVatPercentageForItem", TMessageType.REPLY, seqid)
4805
    result.write(oprot)
4810
    result.write(oprot)
4806
    oprot.writeMessageEnd()
4811
    oprot.writeMessageEnd()
4807
    oprot.trans.flush()
4812
    oprot.trans.flush()
4808
 
4813
 
Line 14960... Line 14965...
14960
 
14965
 
14961
class getVatPercentageForItem_result:
14966
class getVatPercentageForItem_result:
14962
  """
14967
  """
14963
  Attributes:
14968
  Attributes:
14964
   - success
14969
   - success
-
 
14970
   - cex
14965
  """
14971
  """
14966
 
14972
 
14967
  thrift_spec = (
14973
  thrift_spec = (
14968
    (0, TType.DOUBLE, 'success', None, None, ), # 0
14974
    (0, TType.DOUBLE, 'success', None, None, ), # 0
-
 
14975
    (1, TType.STRUCT, 'cex', (CatalogServiceException, CatalogServiceException.thrift_spec), None, ), # 1
14969
  )
14976
  )
14970
 
14977
 
14971
  def __init__(self, success=None,):
14978
  def __init__(self, success=None, cex=None,):
14972
    self.success = success
14979
    self.success = success
-
 
14980
    self.cex = cex
14973
 
14981
 
14974
  def read(self, iprot):
14982
  def read(self, iprot):
14975
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
14983
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
14976
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
14984
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
14977
      return
14985
      return
Line 14983... Line 14991...
14983
      if fid == 0:
14991
      if fid == 0:
14984
        if ftype == TType.DOUBLE:
14992
        if ftype == TType.DOUBLE:
14985
          self.success = iprot.readDouble();
14993
          self.success = iprot.readDouble();
14986
        else:
14994
        else:
14987
          iprot.skip(ftype)
14995
          iprot.skip(ftype)
-
 
14996
      elif fid == 1:
-
 
14997
        if ftype == TType.STRUCT:
-
 
14998
          self.cex = CatalogServiceException()
-
 
14999
          self.cex.read(iprot)
-
 
15000
        else:
-
 
15001
          iprot.skip(ftype)
14988
      else:
15002
      else:
14989
        iprot.skip(ftype)
15003
        iprot.skip(ftype)
14990
      iprot.readFieldEnd()
15004
      iprot.readFieldEnd()
14991
    iprot.readStructEnd()
15005
    iprot.readStructEnd()
14992
 
15006
 
Line 14997... Line 15011...
14997
    oprot.writeStructBegin('getVatPercentageForItem_result')
15011
    oprot.writeStructBegin('getVatPercentageForItem_result')
14998
    if self.success is not None:
15012
    if self.success is not None:
14999
      oprot.writeFieldBegin('success', TType.DOUBLE, 0)
15013
      oprot.writeFieldBegin('success', TType.DOUBLE, 0)
15000
      oprot.writeDouble(self.success)
15014
      oprot.writeDouble(self.success)
15001
      oprot.writeFieldEnd()
15015
      oprot.writeFieldEnd()
-
 
15016
    if self.cex is not None:
-
 
15017
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
-
 
15018
      self.cex.write(oprot)
-
 
15019
      oprot.writeFieldEnd()
15002
    oprot.writeFieldStop()
15020
    oprot.writeFieldStop()
15003
    oprot.writeStructEnd()
15021
    oprot.writeStructEnd()
15004
 
15022
 
15005
  def validate(self):
15023
  def validate(self):
15006
    return
15024
    return