Subversion Repositories SmartDukaan

Rev

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

Rev 7026 Rev 7073
Line 1484... Line 1484...
1484
    Parameters:
1484
    Parameters:
1485
     - awbNumber
1485
     - awbNumber
1486
    """
1486
    """
1487
    pass
1487
    pass
1488
 
1488
 
-
 
1489
  def createRechargeTransaction(self, thriftRechargeTransaction):
-
 
1490
    """
-
 
1491
    Parameters:
-
 
1492
     - thriftRechargeTransaction
-
 
1493
    """
-
 
1494
    pass
-
 
1495
 
1489
 
1496
 
1490
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1497
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1491
  def __init__(self, iprot, oprot=None):
1498
  def __init__(self, iprot, oprot=None):
1492
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1499
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1493
 
1500
 
Line 6750... Line 6757...
6750
    self._iprot.readMessageEnd()
6757
    self._iprot.readMessageEnd()
6751
    if result.success is not None:
6758
    if result.success is not None:
6752
      return result.success
6759
      return result.success
6753
    raise TApplicationException(TApplicationException.MISSING_RESULT, "receiveUpdatesForRedExpress failed: unknown result");
6760
    raise TApplicationException(TApplicationException.MISSING_RESULT, "receiveUpdatesForRedExpress failed: unknown result");
6754
 
6761
 
-
 
6762
  def createRechargeTransaction(self, thriftRechargeTransaction):
-
 
6763
    """
-
 
6764
    Parameters:
-
 
6765
     - thriftRechargeTransaction
-
 
6766
    """
-
 
6767
    self.send_createRechargeTransaction(thriftRechargeTransaction)
-
 
6768
    return self.recv_createRechargeTransaction()
-
 
6769
 
-
 
6770
  def send_createRechargeTransaction(self, thriftRechargeTransaction):
-
 
6771
    self._oprot.writeMessageBegin('createRechargeTransaction', TMessageType.CALL, self._seqid)
-
 
6772
    args = createRechargeTransaction_args()
-
 
6773
    args.thriftRechargeTransaction = thriftRechargeTransaction
-
 
6774
    args.write(self._oprot)
-
 
6775
    self._oprot.writeMessageEnd()
-
 
6776
    self._oprot.trans.flush()
-
 
6777
 
-
 
6778
  def recv_createRechargeTransaction(self, ):
-
 
6779
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
6780
    if mtype == TMessageType.EXCEPTION:
-
 
6781
      x = TApplicationException()
-
 
6782
      x.read(self._iprot)
-
 
6783
      self._iprot.readMessageEnd()
-
 
6784
      raise x
-
 
6785
    result = createRechargeTransaction_result()
-
 
6786
    result.read(self._iprot)
-
 
6787
    self._iprot.readMessageEnd()
-
 
6788
    if result.success is not None:
-
 
6789
      return result.success
-
 
6790
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createRechargeTransaction failed: unknown result");
-
 
6791
 
6755
 
6792
 
6756
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
6793
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
6757
  def __init__(self, handler):
6794
  def __init__(self, handler):
6758
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
6795
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
6759
    self._processMap["createTransaction"] = Processor.process_createTransaction
6796
    self._processMap["createTransaction"] = Processor.process_createTransaction
Line 6907... Line 6944...
6907
    self._processMap["getPhysicalOrders"] = Processor.process_getPhysicalOrders
6944
    self._processMap["getPhysicalOrders"] = Processor.process_getPhysicalOrders
6908
    self._processMap["getDocument"] = Processor.process_getDocument
6945
    self._processMap["getDocument"] = Processor.process_getDocument
6909
    self._processMap["changeShippingAddress"] = Processor.process_changeShippingAddress
6946
    self._processMap["changeShippingAddress"] = Processor.process_changeShippingAddress
6910
    self._processMap["retrieveInvoice"] = Processor.process_retrieveInvoice
6947
    self._processMap["retrieveInvoice"] = Processor.process_retrieveInvoice
6911
    self._processMap["receiveUpdatesForRedExpress"] = Processor.process_receiveUpdatesForRedExpress
6948
    self._processMap["receiveUpdatesForRedExpress"] = Processor.process_receiveUpdatesForRedExpress
-
 
6949
    self._processMap["createRechargeTransaction"] = Processor.process_createRechargeTransaction
6912
 
6950
 
6913
  def process(self, iprot, oprot):
6951
  def process(self, iprot, oprot):
6914
    (name, type, seqid) = iprot.readMessageBegin()
6952
    (name, type, seqid) = iprot.readMessageBegin()
6915
    if name not in self._processMap:
6953
    if name not in self._processMap:
6916
      iprot.skip(TType.STRUCT)
6954
      iprot.skip(TType.STRUCT)
Line 8900... Line 8938...
8900
    oprot.writeMessageBegin("receiveUpdatesForRedExpress", TMessageType.REPLY, seqid)
8938
    oprot.writeMessageBegin("receiveUpdatesForRedExpress", TMessageType.REPLY, seqid)
8901
    result.write(oprot)
8939
    result.write(oprot)
8902
    oprot.writeMessageEnd()
8940
    oprot.writeMessageEnd()
8903
    oprot.trans.flush()
8941
    oprot.trans.flush()
8904
 
8942
 
-
 
8943
  def process_createRechargeTransaction(self, seqid, iprot, oprot):
-
 
8944
    args = createRechargeTransaction_args()
-
 
8945
    args.read(iprot)
-
 
8946
    iprot.readMessageEnd()
-
 
8947
    result = createRechargeTransaction_result()
-
 
8948
    result.success = self._handler.createRechargeTransaction(args.thriftRechargeTransaction)
-
 
8949
    oprot.writeMessageBegin("createRechargeTransaction", TMessageType.REPLY, seqid)
-
 
8950
    result.write(oprot)
-
 
8951
    oprot.writeMessageEnd()
-
 
8952
    oprot.trans.flush()
-
 
8953
 
8905
 
8954
 
8906
# HELPER FUNCTIONS AND STRUCTURES
8955
# HELPER FUNCTIONS AND STRUCTURES
8907
 
8956
 
8908
class createTransaction_args:
8957
class createTransaction_args:
8909
  """
8958
  """
Line 30417... Line 30466...
30417
      oprot.writeFieldEnd()
30466
      oprot.writeFieldEnd()
30418
    oprot.writeFieldStop()
30467
    oprot.writeFieldStop()
30419
    oprot.writeStructEnd()
30468
    oprot.writeStructEnd()
30420
 
30469
 
30421
  def validate(self):
30470
  def validate(self):
-
 
30471
    return
-
 
30472
 
-
 
30473
 
-
 
30474
  def __repr__(self):
-
 
30475
    L = ['%s=%r' % (key, value)
-
 
30476
      for key, value in self.__dict__.iteritems()]
-
 
30477
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
30478
 
-
 
30479
  def __eq__(self, other):
-
 
30480
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
30481
 
-
 
30482
  def __ne__(self, other):
-
 
30483
    return not (self == other)
-
 
30484
 
-
 
30485
class createRechargeTransaction_args:
-
 
30486
  """
-
 
30487
  Attributes:
-
 
30488
   - thriftRechargeTransaction
-
 
30489
  """
-
 
30490
 
-
 
30491
  thrift_spec = (
-
 
30492
    None, # 0
-
 
30493
    (1, TType.STRUCT, 'thriftRechargeTransaction', (RechargeTransaction, RechargeTransaction.thrift_spec), None, ), # 1
-
 
30494
  )
-
 
30495
 
-
 
30496
  def __init__(self, thriftRechargeTransaction=None,):
-
 
30497
    self.thriftRechargeTransaction = thriftRechargeTransaction
-
 
30498
 
-
 
30499
  def read(self, iprot):
-
 
30500
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
30501
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
30502
      return
-
 
30503
    iprot.readStructBegin()
-
 
30504
    while True:
-
 
30505
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
30506
      if ftype == TType.STOP:
-
 
30507
        break
-
 
30508
      if fid == 1:
-
 
30509
        if ftype == TType.STRUCT:
-
 
30510
          self.thriftRechargeTransaction = RechargeTransaction()
-
 
30511
          self.thriftRechargeTransaction.read(iprot)
-
 
30512
        else:
-
 
30513
          iprot.skip(ftype)
-
 
30514
      else:
-
 
30515
        iprot.skip(ftype)
-
 
30516
      iprot.readFieldEnd()
-
 
30517
    iprot.readStructEnd()
-
 
30518
 
-
 
30519
  def write(self, oprot):
-
 
30520
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
30521
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
30522
      return
-
 
30523
    oprot.writeStructBegin('createRechargeTransaction_args')
-
 
30524
    if self.thriftRechargeTransaction is not None:
-
 
30525
      oprot.writeFieldBegin('thriftRechargeTransaction', TType.STRUCT, 1)
-
 
30526
      self.thriftRechargeTransaction.write(oprot)
-
 
30527
      oprot.writeFieldEnd()
-
 
30528
    oprot.writeFieldStop()
-
 
30529
    oprot.writeStructEnd()
-
 
30530
 
-
 
30531
  def validate(self):
-
 
30532
    return
-
 
30533
 
-
 
30534
 
-
 
30535
  def __repr__(self):
-
 
30536
    L = ['%s=%r' % (key, value)
-
 
30537
      for key, value in self.__dict__.iteritems()]
-
 
30538
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
30539
 
-
 
30540
  def __eq__(self, other):
-
 
30541
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
30542
 
-
 
30543
  def __ne__(self, other):
-
 
30544
    return not (self == other)
-
 
30545
 
-
 
30546
class createRechargeTransaction_result:
-
 
30547
  """
-
 
30548
  Attributes:
-
 
30549
   - success
-
 
30550
  """
-
 
30551
 
-
 
30552
  thrift_spec = (
-
 
30553
    (0, TType.STRUCT, 'success', (RechargeTransaction, RechargeTransaction.thrift_spec), None, ), # 0
-
 
30554
  )
-
 
30555
 
-
 
30556
  def __init__(self, success=None,):
-
 
30557
    self.success = success
-
 
30558
 
-
 
30559
  def read(self, iprot):
-
 
30560
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
30561
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
30562
      return
-
 
30563
    iprot.readStructBegin()
-
 
30564
    while True:
-
 
30565
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
30566
      if ftype == TType.STOP:
-
 
30567
        break
-
 
30568
      if fid == 0:
-
 
30569
        if ftype == TType.STRUCT:
-
 
30570
          self.success = RechargeTransaction()
-
 
30571
          self.success.read(iprot)
-
 
30572
        else:
-
 
30573
          iprot.skip(ftype)
-
 
30574
      else:
-
 
30575
        iprot.skip(ftype)
-
 
30576
      iprot.readFieldEnd()
-
 
30577
    iprot.readStructEnd()
-
 
30578
 
-
 
30579
  def write(self, oprot):
-
 
30580
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
30581
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
30582
      return
-
 
30583
    oprot.writeStructBegin('createRechargeTransaction_result')
-
 
30584
    if self.success is not None:
-
 
30585
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
-
 
30586
      self.success.write(oprot)
-
 
30587
      oprot.writeFieldEnd()
-
 
30588
    oprot.writeFieldStop()
-
 
30589
    oprot.writeStructEnd()
-
 
30590
 
-
 
30591
  def validate(self):
30422
    return
30592
    return
30423
 
30593
 
30424
 
30594
 
30425
  def __repr__(self):
30595
  def __repr__(self):
30426
    L = ['%s=%r' % (key, value)
30596
    L = ['%s=%r' % (key, value)