Subversion Repositories SmartDukaan

Rev

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

Rev 5978 Rev 6096
Line 356... Line 356...
356
     - warehouseId
356
     - warehouseId
357
     - vendorString
357
     - vendorString
358
    """
358
    """
359
    pass
359
    pass
360
 
360
 
-
 
361
  def clearItemAvailabilityCacheForItem(self, item_id):
-
 
362
    """
-
 
363
    Parameters:
-
 
364
     - item_id
-
 
365
    """
-
 
366
    pass
-
 
367
 
361
 
368
 
362
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
369
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
363
  def __init__(self, iprot, oprot=None):
370
  def __init__(self, iprot, oprot=None):
364
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
371
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
365
 
372
 
Line 1556... Line 1563...
1556
    result = updateVendorString_result()
1563
    result = updateVendorString_result()
1557
    result.read(self._iprot)
1564
    result.read(self._iprot)
1558
    self._iprot.readMessageEnd()
1565
    self._iprot.readMessageEnd()
1559
    return
1566
    return
1560
 
1567
 
-
 
1568
  def clearItemAvailabilityCacheForItem(self, item_id):
-
 
1569
    """
-
 
1570
    Parameters:
-
 
1571
     - item_id
-
 
1572
    """
-
 
1573
    self.send_clearItemAvailabilityCacheForItem(item_id)
-
 
1574
    self.recv_clearItemAvailabilityCacheForItem()
-
 
1575
 
-
 
1576
  def send_clearItemAvailabilityCacheForItem(self, item_id):
-
 
1577
    self._oprot.writeMessageBegin('clearItemAvailabilityCacheForItem', TMessageType.CALL, self._seqid)
-
 
1578
    args = clearItemAvailabilityCacheForItem_args()
-
 
1579
    args.item_id = item_id
-
 
1580
    args.write(self._oprot)
-
 
1581
    self._oprot.writeMessageEnd()
-
 
1582
    self._oprot.trans.flush()
-
 
1583
 
-
 
1584
  def recv_clearItemAvailabilityCacheForItem(self, ):
-
 
1585
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
1586
    if mtype == TMessageType.EXCEPTION:
-
 
1587
      x = TApplicationException()
-
 
1588
      x.read(self._iprot)
-
 
1589
      self._iprot.readMessageEnd()
-
 
1590
      raise x
-
 
1591
    result = clearItemAvailabilityCacheForItem_result()
-
 
1592
    result.read(self._iprot)
-
 
1593
    self._iprot.readMessageEnd()
-
 
1594
    return
-
 
1595
 
1561
 
1596
 
1562
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
1597
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
1563
  def __init__(self, handler):
1598
  def __init__(self, handler):
1564
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
1599
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
1565
    self._processMap["addWarehouse"] = Processor.process_addWarehouse
1600
    self._processMap["addWarehouse"] = Processor.process_addWarehouse
Line 1595... Line 1630...
1595
    self._processMap["getShippingLocations"] = Processor.process_getShippingLocations
1630
    self._processMap["getShippingLocations"] = Processor.process_getShippingLocations
1596
    self._processMap["getAllVendorItemMappings"] = Processor.process_getAllVendorItemMappings
1631
    self._processMap["getAllVendorItemMappings"] = Processor.process_getAllVendorItemMappings
1597
    self._processMap["getInventorySnapshot"] = Processor.process_getInventorySnapshot
1632
    self._processMap["getInventorySnapshot"] = Processor.process_getInventorySnapshot
1598
    self._processMap["clearItemAvailabilityCache"] = Processor.process_clearItemAvailabilityCache
1633
    self._processMap["clearItemAvailabilityCache"] = Processor.process_clearItemAvailabilityCache
1599
    self._processMap["updateVendorString"] = Processor.process_updateVendorString
1634
    self._processMap["updateVendorString"] = Processor.process_updateVendorString
-
 
1635
    self._processMap["clearItemAvailabilityCacheForItem"] = Processor.process_clearItemAvailabilityCacheForItem
1600
 
1636
 
1601
  def process(self, iprot, oprot):
1637
  def process(self, iprot, oprot):
1602
    (name, type, seqid) = iprot.readMessageBegin()
1638
    (name, type, seqid) = iprot.readMessageBegin()
1603
    if name not in self._processMap:
1639
    if name not in self._processMap:
1604
      iprot.skip(TType.STRUCT)
1640
      iprot.skip(TType.STRUCT)
Line 2062... Line 2098...
2062
    oprot.writeMessageBegin("updateVendorString", TMessageType.REPLY, seqid)
2098
    oprot.writeMessageBegin("updateVendorString", TMessageType.REPLY, seqid)
2063
    result.write(oprot)
2099
    result.write(oprot)
2064
    oprot.writeMessageEnd()
2100
    oprot.writeMessageEnd()
2065
    oprot.trans.flush()
2101
    oprot.trans.flush()
2066
 
2102
 
-
 
2103
  def process_clearItemAvailabilityCacheForItem(self, seqid, iprot, oprot):
-
 
2104
    args = clearItemAvailabilityCacheForItem_args()
-
 
2105
    args.read(iprot)
-
 
2106
    iprot.readMessageEnd()
-
 
2107
    result = clearItemAvailabilityCacheForItem_result()
-
 
2108
    self._handler.clearItemAvailabilityCacheForItem(args.item_id)
-
 
2109
    oprot.writeMessageBegin("clearItemAvailabilityCacheForItem", TMessageType.REPLY, seqid)
-
 
2110
    result.write(oprot)
-
 
2111
    oprot.writeMessageEnd()
-
 
2112
    oprot.trans.flush()
-
 
2113
 
2067
 
2114
 
2068
# HELPER FUNCTIONS AND STRUCTURES
2115
# HELPER FUNCTIONS AND STRUCTURES
2069
 
2116
 
2070
class addWarehouse_args:
2117
class addWarehouse_args:
2071
  """
2118
  """
Line 6826... Line 6873...
6826
    oprot.writeFieldStop()
6873
    oprot.writeFieldStop()
6827
    oprot.writeStructEnd()
6874
    oprot.writeStructEnd()
6828
 
6875
 
6829
  def validate(self):
6876
  def validate(self):
6830
    return
6877
    return
-
 
6878
 
-
 
6879
 
-
 
6880
  def __repr__(self):
-
 
6881
    L = ['%s=%r' % (key, value)
-
 
6882
      for key, value in self.__dict__.iteritems()]
-
 
6883
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
6884
 
-
 
6885
  def __eq__(self, other):
-
 
6886
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
6887
 
-
 
6888
  def __ne__(self, other):
-
 
6889
    return not (self == other)
-
 
6890
 
-
 
6891
class clearItemAvailabilityCacheForItem_args:
-
 
6892
  """
-
 
6893
  Attributes:
-
 
6894
   - item_id
-
 
6895
  """
-
 
6896
 
-
 
6897
  thrift_spec = (
-
 
6898
    None, # 0
-
 
6899
    (1, TType.I64, 'item_id', None, None, ), # 1
-
 
6900
  )
-
 
6901
 
-
 
6902
  def __init__(self, item_id=None,):
-
 
6903
    self.item_id = item_id
-
 
6904
 
-
 
6905
  def read(self, iprot):
-
 
6906
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
6907
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
6908
      return
-
 
6909
    iprot.readStructBegin()
-
 
6910
    while True:
-
 
6911
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
6912
      if ftype == TType.STOP:
-
 
6913
        break
-
 
6914
      if fid == 1:
-
 
6915
        if ftype == TType.I64:
-
 
6916
          self.item_id = iprot.readI64();
-
 
6917
        else:
-
 
6918
          iprot.skip(ftype)
-
 
6919
      else:
-
 
6920
        iprot.skip(ftype)
-
 
6921
      iprot.readFieldEnd()
-
 
6922
    iprot.readStructEnd()
-
 
6923
 
-
 
6924
  def write(self, oprot):
-
 
6925
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
6926
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
6927
      return
-
 
6928
    oprot.writeStructBegin('clearItemAvailabilityCacheForItem_args')
-
 
6929
    if self.item_id is not None:
-
 
6930
      oprot.writeFieldBegin('item_id', TType.I64, 1)
-
 
6931
      oprot.writeI64(self.item_id)
-
 
6932
      oprot.writeFieldEnd()
-
 
6933
    oprot.writeFieldStop()
-
 
6934
    oprot.writeStructEnd()
-
 
6935
 
-
 
6936
  def validate(self):
-
 
6937
    return
-
 
6938
 
-
 
6939
 
-
 
6940
  def __repr__(self):
-
 
6941
    L = ['%s=%r' % (key, value)
-
 
6942
      for key, value in self.__dict__.iteritems()]
-
 
6943
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
6944
 
-
 
6945
  def __eq__(self, other):
-
 
6946
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
6947
 
-
 
6948
  def __ne__(self, other):
-
 
6949
    return not (self == other)
-
 
6950
 
-
 
6951
class clearItemAvailabilityCacheForItem_result:
-
 
6952
 
-
 
6953
  thrift_spec = (
-
 
6954
  )
-
 
6955
 
-
 
6956
  def read(self, iprot):
-
 
6957
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
6958
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
6959
      return
-
 
6960
    iprot.readStructBegin()
-
 
6961
    while True:
-
 
6962
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
6963
      if ftype == TType.STOP:
-
 
6964
        break
-
 
6965
      else:
-
 
6966
        iprot.skip(ftype)
-
 
6967
      iprot.readFieldEnd()
-
 
6968
    iprot.readStructEnd()
-
 
6969
 
-
 
6970
  def write(self, oprot):
-
 
6971
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
6972
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
6973
      return
-
 
6974
    oprot.writeStructBegin('clearItemAvailabilityCacheForItem_result')
-
 
6975
    oprot.writeFieldStop()
-
 
6976
    oprot.writeStructEnd()
-
 
6977
 
-
 
6978
  def validate(self):
-
 
6979
    return
6831
 
6980
 
6832
 
6981
 
6833
  def __repr__(self):
6982
  def __repr__(self):
6834
    L = ['%s=%r' % (key, value)
6983
    L = ['%s=%r' % (key, value)
6835
      for key, value in self.__dict__.iteritems()]
6984
      for key, value in self.__dict__.iteritems()]