Subversion Repositories SmartDukaan

Rev

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

Rev 19973 Rev 19980
Line 2637... Line 2637...
2637
    Parameters:
2637
    Parameters:
2638
     - sellerId
2638
     - sellerId
2639
    """
2639
    """
2640
    pass
2640
    pass
2641
 
2641
 
-
 
2642
  def getWarehouseAddress(self, address_id):
-
 
2643
    """
-
 
2644
    Parameters:
-
 
2645
     - address_id
-
 
2646
    """
-
 
2647
    pass
-
 
2648
 
2642
 
2649
 
2643
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
2650
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
2644
  def __init__(self, iprot, oprot=None):
2651
  def __init__(self, iprot, oprot=None):
2645
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
2652
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
2646
 
2653
 
Line 12618... Line 12625...
12618
    self._iprot.readMessageEnd()
12625
    self._iprot.readMessageEnd()
12619
    if result.success is not None:
12626
    if result.success is not None:
12620
      return result.success
12627
      return result.success
12621
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getSellerInfo failed: unknown result");
12628
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getSellerInfo failed: unknown result");
12622
 
12629
 
-
 
12630
  def getWarehouseAddress(self, address_id):
-
 
12631
    """
-
 
12632
    Parameters:
-
 
12633
     - address_id
-
 
12634
    """
-
 
12635
    self.send_getWarehouseAddress(address_id)
-
 
12636
    return self.recv_getWarehouseAddress()
-
 
12637
 
-
 
12638
  def send_getWarehouseAddress(self, address_id):
-
 
12639
    self._oprot.writeMessageBegin('getWarehouseAddress', TMessageType.CALL, self._seqid)
-
 
12640
    args = getWarehouseAddress_args()
-
 
12641
    args.address_id = address_id
-
 
12642
    args.write(self._oprot)
-
 
12643
    self._oprot.writeMessageEnd()
-
 
12644
    self._oprot.trans.flush()
-
 
12645
 
-
 
12646
  def recv_getWarehouseAddress(self, ):
-
 
12647
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
12648
    if mtype == TMessageType.EXCEPTION:
-
 
12649
      x = TApplicationException()
-
 
12650
      x.read(self._iprot)
-
 
12651
      self._iprot.readMessageEnd()
-
 
12652
      raise x
-
 
12653
    result = getWarehouseAddress_result()
-
 
12654
    result.read(self._iprot)
-
 
12655
    self._iprot.readMessageEnd()
-
 
12656
    if result.success is not None:
-
 
12657
      return result.success
-
 
12658
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getWarehouseAddress failed: unknown result");
-
 
12659
 
12623
 
12660
 
12624
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
12661
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
12625
  def __init__(self, handler):
12662
  def __init__(self, handler):
12626
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
12663
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
12627
    self._processMap["createTransaction"] = Processor.process_createTransaction
12664
    self._processMap["createTransaction"] = Processor.process_createTransaction
Line 12922... Line 12959...
12922
    self._processMap["validateReturnTransaction"] = Processor.process_validateReturnTransaction
12959
    self._processMap["validateReturnTransaction"] = Processor.process_validateReturnTransaction
12923
    self._processMap["markReturnNotRequiredOrdersProcessed"] = Processor.process_markReturnNotRequiredOrdersProcessed
12960
    self._processMap["markReturnNotRequiredOrdersProcessed"] = Processor.process_markReturnNotRequiredOrdersProcessed
12924
    self._processMap["getReturnPickupRequest"] = Processor.process_getReturnPickupRequest
12961
    self._processMap["getReturnPickupRequest"] = Processor.process_getReturnPickupRequest
12925
    self._processMap["getPendingStoreOrders"] = Processor.process_getPendingStoreOrders
12962
    self._processMap["getPendingStoreOrders"] = Processor.process_getPendingStoreOrders
12926
    self._processMap["getSellerInfo"] = Processor.process_getSellerInfo
12963
    self._processMap["getSellerInfo"] = Processor.process_getSellerInfo
-
 
12964
    self._processMap["getWarehouseAddress"] = Processor.process_getWarehouseAddress
12927
 
12965
 
12928
  def process(self, iprot, oprot):
12966
  def process(self, iprot, oprot):
12929
    (name, type, seqid) = iprot.readMessageBegin()
12967
    (name, type, seqid) = iprot.readMessageBegin()
12930
    if name not in self._processMap:
12968
    if name not in self._processMap:
12931
      iprot.skip(TType.STRUCT)
12969
      iprot.skip(TType.STRUCT)
Line 16655... Line 16693...
16655
    oprot.writeMessageBegin("getSellerInfo", TMessageType.REPLY, seqid)
16693
    oprot.writeMessageBegin("getSellerInfo", TMessageType.REPLY, seqid)
16656
    result.write(oprot)
16694
    result.write(oprot)
16657
    oprot.writeMessageEnd()
16695
    oprot.writeMessageEnd()
16658
    oprot.trans.flush()
16696
    oprot.trans.flush()
16659
 
16697
 
-
 
16698
  def process_getWarehouseAddress(self, seqid, iprot, oprot):
-
 
16699
    args = getWarehouseAddress_args()
-
 
16700
    args.read(iprot)
-
 
16701
    iprot.readMessageEnd()
-
 
16702
    result = getWarehouseAddress_result()
-
 
16703
    result.success = self._handler.getWarehouseAddress(args.address_id)
-
 
16704
    oprot.writeMessageBegin("getWarehouseAddress", TMessageType.REPLY, seqid)
-
 
16705
    result.write(oprot)
-
 
16706
    oprot.writeMessageEnd()
-
 
16707
    oprot.trans.flush()
-
 
16708
 
16660
 
16709
 
16661
# HELPER FUNCTIONS AND STRUCTURES
16710
# HELPER FUNCTIONS AND STRUCTURES
16662
 
16711
 
16663
class createTransaction_args:
16712
class createTransaction_args:
16664
  """
16713
  """
Line 58411... Line 58460...
58411
    if self.success is not None:
58460
    if self.success is not None:
58412
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
58461
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
58413
      self.success.write(oprot)
58462
      self.success.write(oprot)
58414
      oprot.writeFieldEnd()
58463
      oprot.writeFieldEnd()
58415
    oprot.writeFieldStop()
58464
    oprot.writeFieldStop()
-
 
58465
    oprot.writeStructEnd()
-
 
58466
 
-
 
58467
  def validate(self):
-
 
58468
    return
-
 
58469
 
-
 
58470
 
-
 
58471
  def __repr__(self):
-
 
58472
    L = ['%s=%r' % (key, value)
-
 
58473
      for key, value in self.__dict__.iteritems()]
-
 
58474
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
58475
 
-
 
58476
  def __eq__(self, other):
-
 
58477
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
58478
 
-
 
58479
  def __ne__(self, other):
-
 
58480
    return not (self == other)
-
 
58481
 
-
 
58482
class getWarehouseAddress_args:
-
 
58483
  """
-
 
58484
  Attributes:
-
 
58485
   - address_id
-
 
58486
  """
-
 
58487
 
-
 
58488
  thrift_spec = (
-
 
58489
    None, # 0
-
 
58490
    (1, TType.I64, 'address_id', None, None, ), # 1
-
 
58491
  )
-
 
58492
 
-
 
58493
  def __init__(self, address_id=None,):
-
 
58494
    self.address_id = address_id
-
 
58495
 
-
 
58496
  def read(self, iprot):
-
 
58497
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
58498
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
58499
      return
-
 
58500
    iprot.readStructBegin()
-
 
58501
    while True:
-
 
58502
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
58503
      if ftype == TType.STOP:
-
 
58504
        break
-
 
58505
      if fid == 1:
-
 
58506
        if ftype == TType.I64:
-
 
58507
          self.address_id = iprot.readI64();
-
 
58508
        else:
-
 
58509
          iprot.skip(ftype)
-
 
58510
      else:
-
 
58511
        iprot.skip(ftype)
-
 
58512
      iprot.readFieldEnd()
-
 
58513
    iprot.readStructEnd()
-
 
58514
 
-
 
58515
  def write(self, oprot):
-
 
58516
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
58517
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
58518
      return
-
 
58519
    oprot.writeStructBegin('getWarehouseAddress_args')
-
 
58520
    if self.address_id is not None:
-
 
58521
      oprot.writeFieldBegin('address_id', TType.I64, 1)
-
 
58522
      oprot.writeI64(self.address_id)
-
 
58523
      oprot.writeFieldEnd()
-
 
58524
    oprot.writeFieldStop()
-
 
58525
    oprot.writeStructEnd()
-
 
58526
 
-
 
58527
  def validate(self):
-
 
58528
    return
-
 
58529
 
-
 
58530
 
-
 
58531
  def __repr__(self):
-
 
58532
    L = ['%s=%r' % (key, value)
-
 
58533
      for key, value in self.__dict__.iteritems()]
-
 
58534
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
58535
 
-
 
58536
  def __eq__(self, other):
-
 
58537
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
58538
 
-
 
58539
  def __ne__(self, other):
-
 
58540
    return not (self == other)
-
 
58541
 
-
 
58542
class getWarehouseAddress_result:
-
 
58543
  """
-
 
58544
  Attributes:
-
 
58545
   - success
-
 
58546
  """
-
 
58547
 
-
 
58548
  thrift_spec = (
-
 
58549
    (0, TType.STRUCT, 'success', (WarehouseAddress, WarehouseAddress.thrift_spec), None, ), # 0
-
 
58550
  )
-
 
58551
 
-
 
58552
  def __init__(self, success=None,):
-
 
58553
    self.success = success
-
 
58554
 
-
 
58555
  def read(self, iprot):
-
 
58556
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
58557
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
58558
      return
-
 
58559
    iprot.readStructBegin()
-
 
58560
    while True:
-
 
58561
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
58562
      if ftype == TType.STOP:
-
 
58563
        break
-
 
58564
      if fid == 0:
-
 
58565
        if ftype == TType.STRUCT:
-
 
58566
          self.success = WarehouseAddress()
-
 
58567
          self.success.read(iprot)
-
 
58568
        else:
-
 
58569
          iprot.skip(ftype)
-
 
58570
      else:
-
 
58571
        iprot.skip(ftype)
-
 
58572
      iprot.readFieldEnd()
-
 
58573
    iprot.readStructEnd()
-
 
58574
 
-
 
58575
  def write(self, oprot):
-
 
58576
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
58577
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
58578
      return
-
 
58579
    oprot.writeStructBegin('getWarehouseAddress_result')
-
 
58580
    if self.success is not None:
-
 
58581
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
-
 
58582
      self.success.write(oprot)
-
 
58583
      oprot.writeFieldEnd()
-
 
58584
    oprot.writeFieldStop()
58416
    oprot.writeStructEnd()
58585
    oprot.writeStructEnd()
58417
 
58586
 
58418
  def validate(self):
58587
  def validate(self):
58419
    return
58588
    return
58420
 
58589