Subversion Repositories SmartDukaan

Rev

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

Rev 2613 Rev 2616
Line 389... Line 389...
389
     - orderId
389
     - orderId
390
     - pickupNumber
390
     - pickupNumber
391
    """
391
    """
392
    pass
392
    pass
393
 
393
 
394
  def acceptDoa(self, orderId):
394
  def receiveReturn(self, orderId):
395
    """
395
    """
396
    If the order status is DOA_RETURN_AUTHORIZED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED and returns true.
396
    If the order status is DOA_RETURN_AUTHORIZED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED and returns true.
-
 
397
    If the order status is SALES_RETURN_IN_TRANSIT, marks the order status as SALES_RET_RECEIVED and returns true.
397
    If the order is in any other state, it returns false.
398
    If the order is in any other state, it returns false.
398
    Throws an exception if the order with the given id couldn't be found.
399
    Throws an exception if the order with the given id couldn't be found.
399
    
400
    
400
    Parameters:
401
    Parameters:
401
     - orderId
402
     - orderId
Line 403... Line 404...
403
    pass
404
    pass
404
 
405
 
405
  def validateDoa(self, orderId, isValid):
406
  def validateDoa(self, orderId, isValid):
406
    """
407
    """
407
    Used to validate the DOA certificate for an order in the DOA_RECEIVED state. If the certificate is valid,
408
    Used to validate the DOA certificate for an order in the DOA_RECEIVED state. If the certificate is valid,
408
    the order state is changed to DOA_CERT_VALID.
-
 
409
    If the certificate is invalid, the order state is changed to DOA_CERT_INVALID.
409
    the order state is changed to DOA_CERT_VALID. If the certificate is invalid, the order state is changed to DOA_CERT_INVALID.
410
    If the order is in any other state, it returns false.
410
    If the order is in any other state, it returns false.
411
    Throws an exception if the order with the given id couldn't be found.
411
    Throws an exception if the order with the given id couldn't be found.
412
    
412
    
413
    Parameters:
413
    Parameters:
414
     - orderId
414
     - orderId
415
     - isValid
415
     - isValid
416
    """
416
    """
417
    pass
417
    pass
418
 
418
 
-
 
419
  def reshipOrder(self, orderId):
-
 
420
    """
-
 
421
    If the order is in SALES_RET_RECEIVED or DOA_CERT_INVALID state, it does the following:
-
 
422
    	1. Creates a new order for processing in the BILLED state. All billing information is saved.
-
 
423
    	2. Marks the current order as one of the final states SALES_RET_RESHIPPED and DOA_INVALID_RESHIPPED depending on what state the order started in.
-
 
424
    	
-
 
425
    If the order is in DOA_CERT_VALID state, it does the following:
-
 
426
    	1. Creates a new order for processing in the SUBMITTED_FOR_PROCESSING state.
-
 
427
    	2. Creates a return order for the warehouse executive to return the DOA material.
-
 
428
    	3. Marks the current order as the final DOA_RESHIPPED state.
-
 
429
    
-
 
430
    Returns the id of the newly created order.
-
 
431
    
-
 
432
    Throws an exception if the order with the given id couldn't be found.
-
 
433
    
-
 
434
    Parameters:
-
 
435
     - orderId
-
 
436
    """
-
 
437
    pass
-
 
438
 
-
 
439
  def refundOrder(self, orderId):
-
 
440
    """
-
 
441
    If the order is in SALES_RET_RECEIVED, DOA_CERT_VALID or DOA_CERT_INVALID state, it does the following:
-
 
442
    	1. Creates a refund request for batch processing.
-
 
443
    	2. Creates a return order for the warehouse executive to return the shipped material.
-
 
444
    	3. Marks the current order as SALES_RET_REFUNDED, DOA_VALID_REFUNDED or DOA_INVALID_REFUNDED final states.
-
 
445
    
-
 
446
    If the order is in SUBMITTED_FOR_PROCESSING or INVENTORY_LOW state, it does the following:
-
 
447
    	1. Creates a refund request for batch processing.
-
 
448
    	2. Marks the current order as the REFUNDED final state.
-
 
449
    
-
 
450
    Returns True if it is successful, False otherwise.
-
 
451
    
-
 
452
    Throws an exception if the order with the given id couldn't be found.
-
 
453
    
-
 
454
    Parameters:
-
 
455
     - orderId
-
 
456
    """
-
 
457
    pass
-
 
458
 
419
 
459
 
420
class Client(Iface):
460
class Client(Iface):
421
  def __init__(self, iprot, oprot=None):
461
  def __init__(self, iprot, oprot=None):
422
    self._iprot = self._oprot = iprot
462
    self._iprot = self._oprot = iprot
423
    if oprot != None:
463
    if oprot != None:
Line 1801... Line 1841...
1801
      return result.success
1841
      return result.success
1802
    if result.ex != None:
1842
    if result.ex != None:
1803
      raise result.ex
1843
      raise result.ex
1804
    raise TApplicationException(TApplicationException.MISSING_RESULT, "authorizePickup failed: unknown result");
1844
    raise TApplicationException(TApplicationException.MISSING_RESULT, "authorizePickup failed: unknown result");
1805
 
1845
 
1806
  def acceptDoa(self, orderId):
1846
  def receiveReturn(self, orderId):
1807
    """
1847
    """
1808
    If the order status is DOA_RETURN_AUTHORIZED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED and returns true.
1848
    If the order status is DOA_RETURN_AUTHORIZED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED and returns true.
-
 
1849
    If the order status is SALES_RETURN_IN_TRANSIT, marks the order status as SALES_RET_RECEIVED and returns true.
1809
    If the order is in any other state, it returns false.
1850
    If the order is in any other state, it returns false.
1810
    Throws an exception if the order with the given id couldn't be found.
1851
    Throws an exception if the order with the given id couldn't be found.
1811
    
1852
    
1812
    Parameters:
1853
    Parameters:
1813
     - orderId
1854
     - orderId
1814
    """
1855
    """
1815
    self.send_acceptDoa(orderId)
1856
    self.send_receiveReturn(orderId)
1816
    return self.recv_acceptDoa()
1857
    return self.recv_receiveReturn()
1817
 
1858
 
1818
  def send_acceptDoa(self, orderId):
1859
  def send_receiveReturn(self, orderId):
1819
    self._oprot.writeMessageBegin('acceptDoa', TMessageType.CALL, self._seqid)
1860
    self._oprot.writeMessageBegin('receiveReturn', TMessageType.CALL, self._seqid)
1820
    args = acceptDoa_args()
1861
    args = receiveReturn_args()
1821
    args.orderId = orderId
1862
    args.orderId = orderId
1822
    args.write(self._oprot)
1863
    args.write(self._oprot)
1823
    self._oprot.writeMessageEnd()
1864
    self._oprot.writeMessageEnd()
1824
    self._oprot.trans.flush()
1865
    self._oprot.trans.flush()
1825
 
1866
 
1826
  def recv_acceptDoa(self, ):
1867
  def recv_receiveReturn(self, ):
1827
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1868
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1828
    if mtype == TMessageType.EXCEPTION:
1869
    if mtype == TMessageType.EXCEPTION:
1829
      x = TApplicationException()
1870
      x = TApplicationException()
1830
      x.read(self._iprot)
1871
      x.read(self._iprot)
1831
      self._iprot.readMessageEnd()
1872
      self._iprot.readMessageEnd()
1832
      raise x
1873
      raise x
1833
    result = acceptDoa_result()
1874
    result = receiveReturn_result()
1834
    result.read(self._iprot)
1875
    result.read(self._iprot)
1835
    self._iprot.readMessageEnd()
1876
    self._iprot.readMessageEnd()
1836
    if result.success != None:
1877
    if result.success != None:
1837
      return result.success
1878
      return result.success
1838
    if result.ex != None:
1879
    if result.ex != None:
1839
      raise result.ex
1880
      raise result.ex
1840
    raise TApplicationException(TApplicationException.MISSING_RESULT, "acceptDoa failed: unknown result");
1881
    raise TApplicationException(TApplicationException.MISSING_RESULT, "receiveReturn failed: unknown result");
1841
 
1882
 
1842
  def validateDoa(self, orderId, isValid):
1883
  def validateDoa(self, orderId, isValid):
1843
    """
1884
    """
1844
    Used to validate the DOA certificate for an order in the DOA_RECEIVED state. If the certificate is valid,
1885
    Used to validate the DOA certificate for an order in the DOA_RECEIVED state. If the certificate is valid,
1845
    the order state is changed to DOA_CERT_VALID.
-
 
1846
    If the certificate is invalid, the order state is changed to DOA_CERT_INVALID.
1886
    the order state is changed to DOA_CERT_VALID. If the certificate is invalid, the order state is changed to DOA_CERT_INVALID.
1847
    If the order is in any other state, it returns false.
1887
    If the order is in any other state, it returns false.
1848
    Throws an exception if the order with the given id couldn't be found.
1888
    Throws an exception if the order with the given id couldn't be found.
1849
    
1889
    
1850
    Parameters:
1890
    Parameters:
1851
     - orderId
1891
     - orderId
Line 1877... Line 1917...
1877
      return result.success
1917
      return result.success
1878
    if result.ex != None:
1918
    if result.ex != None:
1879
      raise result.ex
1919
      raise result.ex
1880
    raise TApplicationException(TApplicationException.MISSING_RESULT, "validateDoa failed: unknown result");
1920
    raise TApplicationException(TApplicationException.MISSING_RESULT, "validateDoa failed: unknown result");
1881
 
1921
 
-
 
1922
  def reshipOrder(self, orderId):
-
 
1923
    """
-
 
1924
    If the order is in SALES_RET_RECEIVED or DOA_CERT_INVALID state, it does the following:
-
 
1925
    	1. Creates a new order for processing in the BILLED state. All billing information is saved.
-
 
1926
    	2. Marks the current order as one of the final states SALES_RET_RESHIPPED and DOA_INVALID_RESHIPPED depending on what state the order started in.
-
 
1927
    	
-
 
1928
    If the order is in DOA_CERT_VALID state, it does the following:
-
 
1929
    	1. Creates a new order for processing in the SUBMITTED_FOR_PROCESSING state.
-
 
1930
    	2. Creates a return order for the warehouse executive to return the DOA material.
-
 
1931
    	3. Marks the current order as the final DOA_RESHIPPED state.
-
 
1932
    
-
 
1933
    Returns the id of the newly created order.
-
 
1934
    
-
 
1935
    Throws an exception if the order with the given id couldn't be found.
-
 
1936
    
-
 
1937
    Parameters:
-
 
1938
     - orderId
-
 
1939
    """
-
 
1940
    self.send_reshipOrder(orderId)
-
 
1941
    return self.recv_reshipOrder()
-
 
1942
 
-
 
1943
  def send_reshipOrder(self, orderId):
-
 
1944
    self._oprot.writeMessageBegin('reshipOrder', TMessageType.CALL, self._seqid)
-
 
1945
    args = reshipOrder_args()
-
 
1946
    args.orderId = orderId
-
 
1947
    args.write(self._oprot)
-
 
1948
    self._oprot.writeMessageEnd()
-
 
1949
    self._oprot.trans.flush()
-
 
1950
 
-
 
1951
  def recv_reshipOrder(self, ):
-
 
1952
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
1953
    if mtype == TMessageType.EXCEPTION:
-
 
1954
      x = TApplicationException()
-
 
1955
      x.read(self._iprot)
-
 
1956
      self._iprot.readMessageEnd()
-
 
1957
      raise x
-
 
1958
    result = reshipOrder_result()
-
 
1959
    result.read(self._iprot)
-
 
1960
    self._iprot.readMessageEnd()
-
 
1961
    if result.success != None:
-
 
1962
      return result.success
-
 
1963
    if result.ex != None:
-
 
1964
      raise result.ex
-
 
1965
    raise TApplicationException(TApplicationException.MISSING_RESULT, "reshipOrder failed: unknown result");
-
 
1966
 
-
 
1967
  def refundOrder(self, orderId):
-
 
1968
    """
-
 
1969
    If the order is in SALES_RET_RECEIVED, DOA_CERT_VALID or DOA_CERT_INVALID state, it does the following:
-
 
1970
    	1. Creates a refund request for batch processing.
-
 
1971
    	2. Creates a return order for the warehouse executive to return the shipped material.
-
 
1972
    	3. Marks the current order as SALES_RET_REFUNDED, DOA_VALID_REFUNDED or DOA_INVALID_REFUNDED final states.
-
 
1973
    
-
 
1974
    If the order is in SUBMITTED_FOR_PROCESSING or INVENTORY_LOW state, it does the following:
-
 
1975
    	1. Creates a refund request for batch processing.
-
 
1976
    	2. Marks the current order as the REFUNDED final state.
-
 
1977
    
-
 
1978
    Returns True if it is successful, False otherwise.
-
 
1979
    
-
 
1980
    Throws an exception if the order with the given id couldn't be found.
-
 
1981
    
-
 
1982
    Parameters:
-
 
1983
     - orderId
-
 
1984
    """
-
 
1985
    self.send_refundOrder(orderId)
-
 
1986
    return self.recv_refundOrder()
-
 
1987
 
-
 
1988
  def send_refundOrder(self, orderId):
-
 
1989
    self._oprot.writeMessageBegin('refundOrder', TMessageType.CALL, self._seqid)
-
 
1990
    args = refundOrder_args()
-
 
1991
    args.orderId = orderId
-
 
1992
    args.write(self._oprot)
-
 
1993
    self._oprot.writeMessageEnd()
-
 
1994
    self._oprot.trans.flush()
-
 
1995
 
-
 
1996
  def recv_refundOrder(self, ):
-
 
1997
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
1998
    if mtype == TMessageType.EXCEPTION:
-
 
1999
      x = TApplicationException()
-
 
2000
      x.read(self._iprot)
-
 
2001
      self._iprot.readMessageEnd()
-
 
2002
      raise x
-
 
2003
    result = refundOrder_result()
-
 
2004
    result.read(self._iprot)
-
 
2005
    self._iprot.readMessageEnd()
-
 
2006
    if result.success != None:
-
 
2007
      return result.success
-
 
2008
    if result.ex != None:
-
 
2009
      raise result.ex
-
 
2010
    raise TApplicationException(TApplicationException.MISSING_RESULT, "refundOrder failed: unknown result");
-
 
2011
 
1882
 
2012
 
1883
class Processor(Iface, TProcessor):
2013
class Processor(Iface, TProcessor):
1884
  def __init__(self, handler):
2014
  def __init__(self, handler):
1885
    self._handler = handler
2015
    self._handler = handler
1886
    self._processMap = {}
2016
    self._processMap = {}
Line 1922... Line 2052...
1922
    self._processMap["getValidOrdersAmountRange"] = Processor.process_getValidOrdersAmountRange
2052
    self._processMap["getValidOrdersAmountRange"] = Processor.process_getValidOrdersAmountRange
1923
    self._processMap["getValidOrders"] = Processor.process_getValidOrders
2053
    self._processMap["getValidOrders"] = Processor.process_getValidOrders
1924
    self._processMap["toggleDOAFlag"] = Processor.process_toggleDOAFlag
2054
    self._processMap["toggleDOAFlag"] = Processor.process_toggleDOAFlag
1925
    self._processMap["requestPickupNumber"] = Processor.process_requestPickupNumber
2055
    self._processMap["requestPickupNumber"] = Processor.process_requestPickupNumber
1926
    self._processMap["authorizePickup"] = Processor.process_authorizePickup
2056
    self._processMap["authorizePickup"] = Processor.process_authorizePickup
1927
    self._processMap["acceptDoa"] = Processor.process_acceptDoa
2057
    self._processMap["receiveReturn"] = Processor.process_receiveReturn
1928
    self._processMap["validateDoa"] = Processor.process_validateDoa
2058
    self._processMap["validateDoa"] = Processor.process_validateDoa
-
 
2059
    self._processMap["reshipOrder"] = Processor.process_reshipOrder
-
 
2060
    self._processMap["refundOrder"] = Processor.process_refundOrder
1929
 
2061
 
1930
  def process(self, iprot, oprot):
2062
  def process(self, iprot, oprot):
1931
    (name, type, seqid) = iprot.readMessageBegin()
2063
    (name, type, seqid) = iprot.readMessageBegin()
1932
    if name not in self._processMap:
2064
    if name not in self._processMap:
1933
      iprot.skip(TType.STRUCT)
2065
      iprot.skip(TType.STRUCT)
Line 2476... Line 2608...
2476
    oprot.writeMessageBegin("authorizePickup", TMessageType.REPLY, seqid)
2608
    oprot.writeMessageBegin("authorizePickup", TMessageType.REPLY, seqid)
2477
    result.write(oprot)
2609
    result.write(oprot)
2478
    oprot.writeMessageEnd()
2610
    oprot.writeMessageEnd()
2479
    oprot.trans.flush()
2611
    oprot.trans.flush()
2480
 
2612
 
2481
  def process_acceptDoa(self, seqid, iprot, oprot):
2613
  def process_receiveReturn(self, seqid, iprot, oprot):
2482
    args = acceptDoa_args()
2614
    args = receiveReturn_args()
2483
    args.read(iprot)
2615
    args.read(iprot)
2484
    iprot.readMessageEnd()
2616
    iprot.readMessageEnd()
2485
    result = acceptDoa_result()
2617
    result = receiveReturn_result()
2486
    try:
2618
    try:
2487
      result.success = self._handler.acceptDoa(args.orderId)
2619
      result.success = self._handler.receiveReturn(args.orderId)
2488
    except TransactionServiceException, ex:
2620
    except TransactionServiceException, ex:
2489
      result.ex = ex
2621
      result.ex = ex
2490
    oprot.writeMessageBegin("acceptDoa", TMessageType.REPLY, seqid)
2622
    oprot.writeMessageBegin("receiveReturn", TMessageType.REPLY, seqid)
2491
    result.write(oprot)
2623
    result.write(oprot)
2492
    oprot.writeMessageEnd()
2624
    oprot.writeMessageEnd()
2493
    oprot.trans.flush()
2625
    oprot.trans.flush()
2494
 
2626
 
2495
  def process_validateDoa(self, seqid, iprot, oprot):
2627
  def process_validateDoa(self, seqid, iprot, oprot):
Line 2504... Line 2636...
2504
    oprot.writeMessageBegin("validateDoa", TMessageType.REPLY, seqid)
2636
    oprot.writeMessageBegin("validateDoa", TMessageType.REPLY, seqid)
2505
    result.write(oprot)
2637
    result.write(oprot)
2506
    oprot.writeMessageEnd()
2638
    oprot.writeMessageEnd()
2507
    oprot.trans.flush()
2639
    oprot.trans.flush()
2508
 
2640
 
-
 
2641
  def process_reshipOrder(self, seqid, iprot, oprot):
-
 
2642
    args = reshipOrder_args()
-
 
2643
    args.read(iprot)
-
 
2644
    iprot.readMessageEnd()
-
 
2645
    result = reshipOrder_result()
-
 
2646
    try:
-
 
2647
      result.success = self._handler.reshipOrder(args.orderId)
-
 
2648
    except TransactionServiceException, ex:
-
 
2649
      result.ex = ex
-
 
2650
    oprot.writeMessageBegin("reshipOrder", TMessageType.REPLY, seqid)
-
 
2651
    result.write(oprot)
-
 
2652
    oprot.writeMessageEnd()
-
 
2653
    oprot.trans.flush()
-
 
2654
 
-
 
2655
  def process_refundOrder(self, seqid, iprot, oprot):
-
 
2656
    args = refundOrder_args()
-
 
2657
    args.read(iprot)
-
 
2658
    iprot.readMessageEnd()
-
 
2659
    result = refundOrder_result()
-
 
2660
    try:
-
 
2661
      result.success = self._handler.refundOrder(args.orderId)
-
 
2662
    except TransactionServiceException, ex:
-
 
2663
      result.ex = ex
-
 
2664
    oprot.writeMessageBegin("refundOrder", TMessageType.REPLY, seqid)
-
 
2665
    result.write(oprot)
-
 
2666
    oprot.writeMessageEnd()
-
 
2667
    oprot.trans.flush()
-
 
2668
 
2509
 
2669
 
2510
# HELPER FUNCTIONS AND STRUCTURES
2670
# HELPER FUNCTIONS AND STRUCTURES
2511
 
2671
 
2512
class closeSession_args:
2672
class closeSession_args:
2513
 
2673
 
Line 7809... Line 7969...
7809
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
7969
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
7810
 
7970
 
7811
  def __ne__(self, other):
7971
  def __ne__(self, other):
7812
    return not (self == other)
7972
    return not (self == other)
7813
 
7973
 
7814
class acceptDoa_args:
7974
class receiveReturn_args:
7815
  """
7975
  """
7816
  Attributes:
7976
  Attributes:
7817
   - orderId
7977
   - orderId
7818
  """
7978
  """
7819
 
7979
 
Line 7846... Line 8006...
7846
 
8006
 
7847
  def write(self, oprot):
8007
  def write(self, oprot):
7848
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
8008
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
7849
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
8009
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
7850
      return
8010
      return
7851
    oprot.writeStructBegin('acceptDoa_args')
8011
    oprot.writeStructBegin('receiveReturn_args')
7852
    if self.orderId != None:
8012
    if self.orderId != None:
7853
      oprot.writeFieldBegin('orderId', TType.I64, 1)
8013
      oprot.writeFieldBegin('orderId', TType.I64, 1)
7854
      oprot.writeI64(self.orderId)
8014
      oprot.writeI64(self.orderId)
7855
      oprot.writeFieldEnd()
8015
      oprot.writeFieldEnd()
7856
    oprot.writeFieldStop()
8016
    oprot.writeFieldStop()
Line 7865... Line 8025...
7865
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
8025
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
7866
 
8026
 
7867
  def __ne__(self, other):
8027
  def __ne__(self, other):
7868
    return not (self == other)
8028
    return not (self == other)
7869
 
8029
 
7870
class acceptDoa_result:
8030
class receiveReturn_result:
7871
  """
8031
  """
7872
  Attributes:
8032
  Attributes:
7873
   - success
8033
   - success
7874
   - ex
8034
   - ex
7875
  """
8035
  """
Line 7910... Line 8070...
7910
 
8070
 
7911
  def write(self, oprot):
8071
  def write(self, oprot):
7912
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
8072
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
7913
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
8073
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
7914
      return
8074
      return
7915
    oprot.writeStructBegin('acceptDoa_result')
8075
    oprot.writeStructBegin('receiveReturn_result')
7916
    if self.success != None:
8076
    if self.success != None:
7917
      oprot.writeFieldBegin('success', TType.BOOL, 0)
8077
      oprot.writeFieldBegin('success', TType.BOOL, 0)
7918
      oprot.writeBool(self.success)
8078
      oprot.writeBool(self.success)
7919
      oprot.writeFieldEnd()
8079
      oprot.writeFieldEnd()
7920
    if self.ex != None:
8080
    if self.ex != None:
Line 8052... Line 8212...
8052
    if self.success != None:
8212
    if self.success != None:
8053
      oprot.writeFieldBegin('success', TType.BOOL, 0)
8213
      oprot.writeFieldBegin('success', TType.BOOL, 0)
8054
      oprot.writeBool(self.success)
8214
      oprot.writeBool(self.success)
8055
      oprot.writeFieldEnd()
8215
      oprot.writeFieldEnd()
8056
    if self.ex != None:
8216
    if self.ex != None:
-
 
8217
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
-
 
8218
      self.ex.write(oprot)
-
 
8219
      oprot.writeFieldEnd()
-
 
8220
    oprot.writeFieldStop()
-
 
8221
    oprot.writeStructEnd()
-
 
8222
 
-
 
8223
  def __repr__(self):
-
 
8224
    L = ['%s=%r' % (key, value)
-
 
8225
      for key, value in self.__dict__.iteritems()]
-
 
8226
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
8227
 
-
 
8228
  def __eq__(self, other):
-
 
8229
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
8230
 
-
 
8231
  def __ne__(self, other):
-
 
8232
    return not (self == other)
-
 
8233
 
-
 
8234
class reshipOrder_args:
-
 
8235
  """
-
 
8236
  Attributes:
-
 
8237
   - orderId
-
 
8238
  """
-
 
8239
 
-
 
8240
  thrift_spec = (
-
 
8241
    None, # 0
-
 
8242
    (1, TType.I64, 'orderId', None, None, ), # 1
-
 
8243
  )
-
 
8244
 
-
 
8245
  def __init__(self, orderId=None,):
-
 
8246
    self.orderId = orderId
-
 
8247
 
-
 
8248
  def read(self, iprot):
-
 
8249
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
8250
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
8251
      return
-
 
8252
    iprot.readStructBegin()
-
 
8253
    while True:
-
 
8254
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
8255
      if ftype == TType.STOP:
-
 
8256
        break
-
 
8257
      if fid == 1:
-
 
8258
        if ftype == TType.I64:
-
 
8259
          self.orderId = iprot.readI64();
-
 
8260
        else:
-
 
8261
          iprot.skip(ftype)
-
 
8262
      else:
-
 
8263
        iprot.skip(ftype)
-
 
8264
      iprot.readFieldEnd()
-
 
8265
    iprot.readStructEnd()
-
 
8266
 
-
 
8267
  def write(self, oprot):
-
 
8268
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
8269
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
8270
      return
-
 
8271
    oprot.writeStructBegin('reshipOrder_args')
-
 
8272
    if self.orderId != None:
-
 
8273
      oprot.writeFieldBegin('orderId', TType.I64, 1)
-
 
8274
      oprot.writeI64(self.orderId)
-
 
8275
      oprot.writeFieldEnd()
-
 
8276
    oprot.writeFieldStop()
-
 
8277
    oprot.writeStructEnd()
-
 
8278
 
-
 
8279
  def __repr__(self):
-
 
8280
    L = ['%s=%r' % (key, value)
-
 
8281
      for key, value in self.__dict__.iteritems()]
-
 
8282
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
8283
 
-
 
8284
  def __eq__(self, other):
-
 
8285
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
8286
 
-
 
8287
  def __ne__(self, other):
-
 
8288
    return not (self == other)
-
 
8289
 
-
 
8290
class reshipOrder_result:
-
 
8291
  """
-
 
8292
  Attributes:
-
 
8293
   - success
-
 
8294
   - ex
-
 
8295
  """
-
 
8296
 
-
 
8297
  thrift_spec = (
-
 
8298
    (0, TType.I64, 'success', None, None, ), # 0
-
 
8299
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
-
 
8300
  )
-
 
8301
 
-
 
8302
  def __init__(self, success=None, ex=None,):
-
 
8303
    self.success = success
-
 
8304
    self.ex = ex
-
 
8305
 
-
 
8306
  def read(self, iprot):
-
 
8307
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
8308
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
8309
      return
-
 
8310
    iprot.readStructBegin()
-
 
8311
    while True:
-
 
8312
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
8313
      if ftype == TType.STOP:
-
 
8314
        break
-
 
8315
      if fid == 0:
-
 
8316
        if ftype == TType.I64:
-
 
8317
          self.success = iprot.readI64();
-
 
8318
        else:
-
 
8319
          iprot.skip(ftype)
-
 
8320
      elif fid == 1:
-
 
8321
        if ftype == TType.STRUCT:
-
 
8322
          self.ex = TransactionServiceException()
-
 
8323
          self.ex.read(iprot)
-
 
8324
        else:
-
 
8325
          iprot.skip(ftype)
-
 
8326
      else:
-
 
8327
        iprot.skip(ftype)
-
 
8328
      iprot.readFieldEnd()
-
 
8329
    iprot.readStructEnd()
-
 
8330
 
-
 
8331
  def write(self, oprot):
-
 
8332
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
8333
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
8334
      return
-
 
8335
    oprot.writeStructBegin('reshipOrder_result')
-
 
8336
    if self.success != None:
-
 
8337
      oprot.writeFieldBegin('success', TType.I64, 0)
-
 
8338
      oprot.writeI64(self.success)
-
 
8339
      oprot.writeFieldEnd()
-
 
8340
    if self.ex != None:
-
 
8341
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
-
 
8342
      self.ex.write(oprot)
-
 
8343
      oprot.writeFieldEnd()
-
 
8344
    oprot.writeFieldStop()
-
 
8345
    oprot.writeStructEnd()
-
 
8346
 
-
 
8347
  def __repr__(self):
-
 
8348
    L = ['%s=%r' % (key, value)
-
 
8349
      for key, value in self.__dict__.iteritems()]
-
 
8350
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
8351
 
-
 
8352
  def __eq__(self, other):
-
 
8353
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
8354
 
-
 
8355
  def __ne__(self, other):
-
 
8356
    return not (self == other)
-
 
8357
 
-
 
8358
class refundOrder_args:
-
 
8359
  """
-
 
8360
  Attributes:
-
 
8361
   - orderId
-
 
8362
  """
-
 
8363
 
-
 
8364
  thrift_spec = (
-
 
8365
    None, # 0
-
 
8366
    (1, TType.I64, 'orderId', None, None, ), # 1
-
 
8367
  )
-
 
8368
 
-
 
8369
  def __init__(self, orderId=None,):
-
 
8370
    self.orderId = orderId
-
 
8371
 
-
 
8372
  def read(self, iprot):
-
 
8373
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
8374
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
8375
      return
-
 
8376
    iprot.readStructBegin()
-
 
8377
    while True:
-
 
8378
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
8379
      if ftype == TType.STOP:
-
 
8380
        break
-
 
8381
      if fid == 1:
-
 
8382
        if ftype == TType.I64:
-
 
8383
          self.orderId = iprot.readI64();
-
 
8384
        else:
-
 
8385
          iprot.skip(ftype)
-
 
8386
      else:
-
 
8387
        iprot.skip(ftype)
-
 
8388
      iprot.readFieldEnd()
-
 
8389
    iprot.readStructEnd()
-
 
8390
 
-
 
8391
  def write(self, oprot):
-
 
8392
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
8393
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
8394
      return
-
 
8395
    oprot.writeStructBegin('refundOrder_args')
-
 
8396
    if self.orderId != None:
-
 
8397
      oprot.writeFieldBegin('orderId', TType.I64, 1)
-
 
8398
      oprot.writeI64(self.orderId)
-
 
8399
      oprot.writeFieldEnd()
-
 
8400
    oprot.writeFieldStop()
-
 
8401
    oprot.writeStructEnd()
-
 
8402
 
-
 
8403
  def __repr__(self):
-
 
8404
    L = ['%s=%r' % (key, value)
-
 
8405
      for key, value in self.__dict__.iteritems()]
-
 
8406
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
8407
 
-
 
8408
  def __eq__(self, other):
-
 
8409
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
8410
 
-
 
8411
  def __ne__(self, other):
-
 
8412
    return not (self == other)
-
 
8413
 
-
 
8414
class refundOrder_result:
-
 
8415
  """
-
 
8416
  Attributes:
-
 
8417
   - success
-
 
8418
   - ex
-
 
8419
  """
-
 
8420
 
-
 
8421
  thrift_spec = (
-
 
8422
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
8423
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
-
 
8424
  )
-
 
8425
 
-
 
8426
  def __init__(self, success=None, ex=None,):
-
 
8427
    self.success = success
-
 
8428
    self.ex = ex
-
 
8429
 
-
 
8430
  def read(self, iprot):
-
 
8431
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
8432
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
8433
      return
-
 
8434
    iprot.readStructBegin()
-
 
8435
    while True:
-
 
8436
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
8437
      if ftype == TType.STOP:
-
 
8438
        break
-
 
8439
      if fid == 0:
-
 
8440
        if ftype == TType.BOOL:
-
 
8441
          self.success = iprot.readBool();
-
 
8442
        else:
-
 
8443
          iprot.skip(ftype)
-
 
8444
      elif fid == 1:
-
 
8445
        if ftype == TType.STRUCT:
-
 
8446
          self.ex = TransactionServiceException()
-
 
8447
          self.ex.read(iprot)
-
 
8448
        else:
-
 
8449
          iprot.skip(ftype)
-
 
8450
      else:
-
 
8451
        iprot.skip(ftype)
-
 
8452
      iprot.readFieldEnd()
-
 
8453
    iprot.readStructEnd()
-
 
8454
 
-
 
8455
  def write(self, oprot):
-
 
8456
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
8457
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
8458
      return
-
 
8459
    oprot.writeStructBegin('refundOrder_result')
-
 
8460
    if self.success != None:
-
 
8461
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
8462
      oprot.writeBool(self.success)
-
 
8463
      oprot.writeFieldEnd()
-
 
8464
    if self.ex != None:
8057
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
8465
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
8058
      self.ex.write(oprot)
8466
      self.ex.write(oprot)
8059
      oprot.writeFieldEnd()
8467
      oprot.writeFieldEnd()
8060
    oprot.writeFieldStop()
8468
    oprot.writeFieldStop()
8061
    oprot.writeStructEnd()
8469
    oprot.writeStructEnd()