Subversion Repositories SmartDukaan

Rev

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

Rev 19980 Rev 20025
Line 2644... Line 2644...
2644
    Parameters:
2644
    Parameters:
2645
     - address_id
2645
     - address_id
2646
    """
2646
    """
2647
    pass
2647
    pass
2648
 
2648
 
-
 
2649
  def getBuyerByWarehouse(self, warehouse_id):
-
 
2650
    """
-
 
2651
    Parameters:
-
 
2652
     - warehouse_id
-
 
2653
    """
-
 
2654
    pass
-
 
2655
 
2649
 
2656
 
2650
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
2657
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
2651
  def __init__(self, iprot, oprot=None):
2658
  def __init__(self, iprot, oprot=None):
2652
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
2659
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
2653
 
2660
 
Line 12655... Line 12662...
12655
    self._iprot.readMessageEnd()
12662
    self._iprot.readMessageEnd()
12656
    if result.success is not None:
12663
    if result.success is not None:
12657
      return result.success
12664
      return result.success
12658
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getWarehouseAddress failed: unknown result");
12665
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getWarehouseAddress failed: unknown result");
12659
 
12666
 
-
 
12667
  def getBuyerByWarehouse(self, warehouse_id):
-
 
12668
    """
-
 
12669
    Parameters:
-
 
12670
     - warehouse_id
-
 
12671
    """
-
 
12672
    self.send_getBuyerByWarehouse(warehouse_id)
-
 
12673
    return self.recv_getBuyerByWarehouse()
-
 
12674
 
-
 
12675
  def send_getBuyerByWarehouse(self, warehouse_id):
-
 
12676
    self._oprot.writeMessageBegin('getBuyerByWarehouse', TMessageType.CALL, self._seqid)
-
 
12677
    args = getBuyerByWarehouse_args()
-
 
12678
    args.warehouse_id = warehouse_id
-
 
12679
    args.write(self._oprot)
-
 
12680
    self._oprot.writeMessageEnd()
-
 
12681
    self._oprot.trans.flush()
-
 
12682
 
-
 
12683
  def recv_getBuyerByWarehouse(self, ):
-
 
12684
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
12685
    if mtype == TMessageType.EXCEPTION:
-
 
12686
      x = TApplicationException()
-
 
12687
      x.read(self._iprot)
-
 
12688
      self._iprot.readMessageEnd()
-
 
12689
      raise x
-
 
12690
    result = getBuyerByWarehouse_result()
-
 
12691
    result.read(self._iprot)
-
 
12692
    self._iprot.readMessageEnd()
-
 
12693
    if result.success is not None:
-
 
12694
      return result.success
-
 
12695
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getBuyerByWarehouse failed: unknown result");
-
 
12696
 
12660
 
12697
 
12661
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
12698
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
12662
  def __init__(self, handler):
12699
  def __init__(self, handler):
12663
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
12700
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
12664
    self._processMap["createTransaction"] = Processor.process_createTransaction
12701
    self._processMap["createTransaction"] = Processor.process_createTransaction
Line 12960... Line 12997...
12960
    self._processMap["markReturnNotRequiredOrdersProcessed"] = Processor.process_markReturnNotRequiredOrdersProcessed
12997
    self._processMap["markReturnNotRequiredOrdersProcessed"] = Processor.process_markReturnNotRequiredOrdersProcessed
12961
    self._processMap["getReturnPickupRequest"] = Processor.process_getReturnPickupRequest
12998
    self._processMap["getReturnPickupRequest"] = Processor.process_getReturnPickupRequest
12962
    self._processMap["getPendingStoreOrders"] = Processor.process_getPendingStoreOrders
12999
    self._processMap["getPendingStoreOrders"] = Processor.process_getPendingStoreOrders
12963
    self._processMap["getSellerInfo"] = Processor.process_getSellerInfo
13000
    self._processMap["getSellerInfo"] = Processor.process_getSellerInfo
12964
    self._processMap["getWarehouseAddress"] = Processor.process_getWarehouseAddress
13001
    self._processMap["getWarehouseAddress"] = Processor.process_getWarehouseAddress
-
 
13002
    self._processMap["getBuyerByWarehouse"] = Processor.process_getBuyerByWarehouse
12965
 
13003
 
12966
  def process(self, iprot, oprot):
13004
  def process(self, iprot, oprot):
12967
    (name, type, seqid) = iprot.readMessageBegin()
13005
    (name, type, seqid) = iprot.readMessageBegin()
12968
    if name not in self._processMap:
13006
    if name not in self._processMap:
12969
      iprot.skip(TType.STRUCT)
13007
      iprot.skip(TType.STRUCT)
Line 16704... Line 16742...
16704
    oprot.writeMessageBegin("getWarehouseAddress", TMessageType.REPLY, seqid)
16742
    oprot.writeMessageBegin("getWarehouseAddress", TMessageType.REPLY, seqid)
16705
    result.write(oprot)
16743
    result.write(oprot)
16706
    oprot.writeMessageEnd()
16744
    oprot.writeMessageEnd()
16707
    oprot.trans.flush()
16745
    oprot.trans.flush()
16708
 
16746
 
-
 
16747
  def process_getBuyerByWarehouse(self, seqid, iprot, oprot):
-
 
16748
    args = getBuyerByWarehouse_args()
-
 
16749
    args.read(iprot)
-
 
16750
    iprot.readMessageEnd()
-
 
16751
    result = getBuyerByWarehouse_result()
-
 
16752
    result.success = self._handler.getBuyerByWarehouse(args.warehouse_id)
-
 
16753
    oprot.writeMessageBegin("getBuyerByWarehouse", TMessageType.REPLY, seqid)
-
 
16754
    result.write(oprot)
-
 
16755
    oprot.writeMessageEnd()
-
 
16756
    oprot.trans.flush()
-
 
16757
 
16709
 
16758
 
16710
# HELPER FUNCTIONS AND STRUCTURES
16759
# HELPER FUNCTIONS AND STRUCTURES
16711
 
16760
 
16712
class createTransaction_args:
16761
class createTransaction_args:
16713
  """
16762
  """
Line 58580... Line 58629...
58580
    if self.success is not None:
58629
    if self.success is not None:
58581
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
58630
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
58582
      self.success.write(oprot)
58631
      self.success.write(oprot)
58583
      oprot.writeFieldEnd()
58632
      oprot.writeFieldEnd()
58584
    oprot.writeFieldStop()
58633
    oprot.writeFieldStop()
-
 
58634
    oprot.writeStructEnd()
-
 
58635
 
-
 
58636
  def validate(self):
-
 
58637
    return
-
 
58638
 
-
 
58639
 
-
 
58640
  def __repr__(self):
-
 
58641
    L = ['%s=%r' % (key, value)
-
 
58642
      for key, value in self.__dict__.iteritems()]
-
 
58643
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
58644
 
-
 
58645
  def __eq__(self, other):
-
 
58646
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
58647
 
-
 
58648
  def __ne__(self, other):
-
 
58649
    return not (self == other)
-
 
58650
 
-
 
58651
class getBuyerByWarehouse_args:
-
 
58652
  """
-
 
58653
  Attributes:
-
 
58654
   - warehouse_id
-
 
58655
  """
-
 
58656
 
-
 
58657
  thrift_spec = (
-
 
58658
    None, # 0
-
 
58659
    (1, TType.I64, 'warehouse_id', None, None, ), # 1
-
 
58660
  )
-
 
58661
 
-
 
58662
  def __init__(self, warehouse_id=None,):
-
 
58663
    self.warehouse_id = warehouse_id
-
 
58664
 
-
 
58665
  def read(self, iprot):
-
 
58666
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
58667
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
58668
      return
-
 
58669
    iprot.readStructBegin()
-
 
58670
    while True:
-
 
58671
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
58672
      if ftype == TType.STOP:
-
 
58673
        break
-
 
58674
      if fid == 1:
-
 
58675
        if ftype == TType.I64:
-
 
58676
          self.warehouse_id = iprot.readI64();
-
 
58677
        else:
-
 
58678
          iprot.skip(ftype)
-
 
58679
      else:
-
 
58680
        iprot.skip(ftype)
-
 
58681
      iprot.readFieldEnd()
-
 
58682
    iprot.readStructEnd()
-
 
58683
 
-
 
58684
  def write(self, oprot):
-
 
58685
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
58686
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
58687
      return
-
 
58688
    oprot.writeStructBegin('getBuyerByWarehouse_args')
-
 
58689
    if self.warehouse_id is not None:
-
 
58690
      oprot.writeFieldBegin('warehouse_id', TType.I64, 1)
-
 
58691
      oprot.writeI64(self.warehouse_id)
-
 
58692
      oprot.writeFieldEnd()
-
 
58693
    oprot.writeFieldStop()
-
 
58694
    oprot.writeStructEnd()
-
 
58695
 
-
 
58696
  def validate(self):
-
 
58697
    return
-
 
58698
 
-
 
58699
 
-
 
58700
  def __repr__(self):
-
 
58701
    L = ['%s=%r' % (key, value)
-
 
58702
      for key, value in self.__dict__.iteritems()]
-
 
58703
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
58704
 
-
 
58705
  def __eq__(self, other):
-
 
58706
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
58707
 
-
 
58708
  def __ne__(self, other):
-
 
58709
    return not (self == other)
-
 
58710
 
-
 
58711
class getBuyerByWarehouse_result:
-
 
58712
  """
-
 
58713
  Attributes:
-
 
58714
   - success
-
 
58715
  """
-
 
58716
 
-
 
58717
  thrift_spec = (
-
 
58718
    (0, TType.STRUCT, 'success', (BuyerInfo, BuyerInfo.thrift_spec), None, ), # 0
-
 
58719
  )
-
 
58720
 
-
 
58721
  def __init__(self, success=None,):
-
 
58722
    self.success = success
-
 
58723
 
-
 
58724
  def read(self, iprot):
-
 
58725
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
58726
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
58727
      return
-
 
58728
    iprot.readStructBegin()
-
 
58729
    while True:
-
 
58730
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
58731
      if ftype == TType.STOP:
-
 
58732
        break
-
 
58733
      if fid == 0:
-
 
58734
        if ftype == TType.STRUCT:
-
 
58735
          self.success = BuyerInfo()
-
 
58736
          self.success.read(iprot)
-
 
58737
        else:
-
 
58738
          iprot.skip(ftype)
-
 
58739
      else:
-
 
58740
        iprot.skip(ftype)
-
 
58741
      iprot.readFieldEnd()
-
 
58742
    iprot.readStructEnd()
-
 
58743
 
-
 
58744
  def write(self, oprot):
-
 
58745
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
58746
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
58747
      return
-
 
58748
    oprot.writeStructBegin('getBuyerByWarehouse_result')
-
 
58749
    if self.success is not None:
-
 
58750
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
-
 
58751
      self.success.write(oprot)
-
 
58752
      oprot.writeFieldEnd()
-
 
58753
    oprot.writeFieldStop()
58585
    oprot.writeStructEnd()
58754
    oprot.writeStructEnd()
58586
 
58755
 
58587
  def validate(self):
58756
  def validate(self):
58588
    return
58757
    return
58589
 
58758