Subversion Repositories SmartDukaan

Rev

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

Rev 2446 Rev 2536
Line 350... Line 350...
350
    Parameters:
350
    Parameters:
351
     - limit
351
     - limit
352
    """
352
    """
353
    pass
353
    pass
354
 
354
 
-
 
355
  def toggleDOAFlag(self, orderId):
-
 
356
    """
-
 
357
    Toggle the DOA flag of an order. This should be used to flag an order for follow-up and unflag it when the follow-up is complete.
-
 
358
    Returns the final flag status.
-
 
359
    Throws an exception if the order with the given id couldn't be found or if the order status is not DELVIERY_SUCCESS.
-
 
360
    
-
 
361
    Parameters:
-
 
362
     - orderId
-
 
363
    """
-
 
364
    pass
-
 
365
 
-
 
366
  def requestPickupNumber(self, orderId):
-
 
367
    """
-
 
368
    Sends out an email to the account manager of the original courier provider used to ship the order.
-
 
369
    If the order status was DELIVERY_SUCCESS, it is changed to be DOA_PICKUP_REQUESTED.
-
 
370
    If the order status was DOA_PICKUP_REQUESTED, it is left unchanged.
-
 
371
    For any other status, it returns false.
-
 
372
    Throws an exception if the order with the given id couldn't be found.
-
 
373
    
-
 
374
    Parameters:
-
 
375
     - orderId
-
 
376
    """
-
 
377
    pass
-
 
378
 
-
 
379
  def authorizePickup(self, orderId, pickupNumber):
-
 
380
    """
-
 
381
    If the order status is DOA_PICKUP_REQUESTED, it does the following
-
 
382
    	1. Sends out an email to the customer with the dispatch advice that he has to print as an attachment.
-
 
383
    	2. Changes order status to be DOA_PICKUP_AUTHORIZED.
-
 
384
    	3. Returns true
-
 
385
    If the order is any other status, it returns false.
-
 
386
    Throws an exception if the order with the given id couldn't be found.
-
 
387
    
-
 
388
    Parameters:
-
 
389
     - orderId
-
 
390
     - pickupNumber
-
 
391
    """
-
 
392
    pass
-
 
393
 
355
 
394
 
356
class Client(Iface):
395
class Client(Iface):
357
  def __init__(self, iprot, oprot=None):
396
  def __init__(self, iprot, oprot=None):
358
    self._iprot = self._oprot = iprot
397
    self._iprot = self._oprot = iprot
359
    if oprot != None:
398
    if oprot != None:
Line 1622... Line 1661...
1622
    self._iprot.readMessageEnd()
1661
    self._iprot.readMessageEnd()
1623
    if result.success != None:
1662
    if result.success != None:
1624
      return result.success
1663
      return result.success
1625
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrders failed: unknown result");
1664
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrders failed: unknown result");
1626
 
1665
 
-
 
1666
  def toggleDOAFlag(self, orderId):
-
 
1667
    """
-
 
1668
    Toggle the DOA flag of an order. This should be used to flag an order for follow-up and unflag it when the follow-up is complete.
-
 
1669
    Returns the final flag status.
-
 
1670
    Throws an exception if the order with the given id couldn't be found or if the order status is not DELVIERY_SUCCESS.
-
 
1671
    
-
 
1672
    Parameters:
-
 
1673
     - orderId
-
 
1674
    """
-
 
1675
    self.send_toggleDOAFlag(orderId)
-
 
1676
    return self.recv_toggleDOAFlag()
-
 
1677
 
-
 
1678
  def send_toggleDOAFlag(self, orderId):
-
 
1679
    self._oprot.writeMessageBegin('toggleDOAFlag', TMessageType.CALL, self._seqid)
-
 
1680
    args = toggleDOAFlag_args()
-
 
1681
    args.orderId = orderId
-
 
1682
    args.write(self._oprot)
-
 
1683
    self._oprot.writeMessageEnd()
-
 
1684
    self._oprot.trans.flush()
-
 
1685
 
-
 
1686
  def recv_toggleDOAFlag(self, ):
-
 
1687
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
1688
    if mtype == TMessageType.EXCEPTION:
-
 
1689
      x = TApplicationException()
-
 
1690
      x.read(self._iprot)
-
 
1691
      self._iprot.readMessageEnd()
-
 
1692
      raise x
-
 
1693
    result = toggleDOAFlag_result()
-
 
1694
    result.read(self._iprot)
-
 
1695
    self._iprot.readMessageEnd()
-
 
1696
    if result.success != None:
-
 
1697
      return result.success
-
 
1698
    if result.ex != None:
-
 
1699
      raise result.ex
-
 
1700
    raise TApplicationException(TApplicationException.MISSING_RESULT, "toggleDOAFlag failed: unknown result");
-
 
1701
 
-
 
1702
  def requestPickupNumber(self, orderId):
-
 
1703
    """
-
 
1704
    Sends out an email to the account manager of the original courier provider used to ship the order.
-
 
1705
    If the order status was DELIVERY_SUCCESS, it is changed to be DOA_PICKUP_REQUESTED.
-
 
1706
    If the order status was DOA_PICKUP_REQUESTED, it is left unchanged.
-
 
1707
    For any other status, it returns false.
-
 
1708
    Throws an exception if the order with the given id couldn't be found.
-
 
1709
    
-
 
1710
    Parameters:
-
 
1711
     - orderId
-
 
1712
    """
-
 
1713
    self.send_requestPickupNumber(orderId)
-
 
1714
    return self.recv_requestPickupNumber()
-
 
1715
 
-
 
1716
  def send_requestPickupNumber(self, orderId):
-
 
1717
    self._oprot.writeMessageBegin('requestPickupNumber', TMessageType.CALL, self._seqid)
-
 
1718
    args = requestPickupNumber_args()
-
 
1719
    args.orderId = orderId
-
 
1720
    args.write(self._oprot)
-
 
1721
    self._oprot.writeMessageEnd()
-
 
1722
    self._oprot.trans.flush()
-
 
1723
 
-
 
1724
  def recv_requestPickupNumber(self, ):
-
 
1725
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
1726
    if mtype == TMessageType.EXCEPTION:
-
 
1727
      x = TApplicationException()
-
 
1728
      x.read(self._iprot)
-
 
1729
      self._iprot.readMessageEnd()
-
 
1730
      raise x
-
 
1731
    result = requestPickupNumber_result()
-
 
1732
    result.read(self._iprot)
-
 
1733
    self._iprot.readMessageEnd()
-
 
1734
    if result.success != None:
-
 
1735
      return result.success
-
 
1736
    if result.ex != None:
-
 
1737
      raise result.ex
-
 
1738
    raise TApplicationException(TApplicationException.MISSING_RESULT, "requestPickupNumber failed: unknown result");
-
 
1739
 
-
 
1740
  def authorizePickup(self, orderId, pickupNumber):
-
 
1741
    """
-
 
1742
    If the order status is DOA_PICKUP_REQUESTED, it does the following
-
 
1743
    	1. Sends out an email to the customer with the dispatch advice that he has to print as an attachment.
-
 
1744
    	2. Changes order status to be DOA_PICKUP_AUTHORIZED.
-
 
1745
    	3. Returns true
-
 
1746
    If the order is any other status, it returns false.
-
 
1747
    Throws an exception if the order with the given id couldn't be found.
-
 
1748
    
-
 
1749
    Parameters:
-
 
1750
     - orderId
-
 
1751
     - pickupNumber
-
 
1752
    """
-
 
1753
    self.send_authorizePickup(orderId, pickupNumber)
-
 
1754
    return self.recv_authorizePickup()
-
 
1755
 
-
 
1756
  def send_authorizePickup(self, orderId, pickupNumber):
-
 
1757
    self._oprot.writeMessageBegin('authorizePickup', TMessageType.CALL, self._seqid)
-
 
1758
    args = authorizePickup_args()
-
 
1759
    args.orderId = orderId
-
 
1760
    args.pickupNumber = pickupNumber
-
 
1761
    args.write(self._oprot)
-
 
1762
    self._oprot.writeMessageEnd()
-
 
1763
    self._oprot.trans.flush()
-
 
1764
 
-
 
1765
  def recv_authorizePickup(self, ):
-
 
1766
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
1767
    if mtype == TMessageType.EXCEPTION:
-
 
1768
      x = TApplicationException()
-
 
1769
      x.read(self._iprot)
-
 
1770
      self._iprot.readMessageEnd()
-
 
1771
      raise x
-
 
1772
    result = authorizePickup_result()
-
 
1773
    result.read(self._iprot)
-
 
1774
    self._iprot.readMessageEnd()
-
 
1775
    if result.success != None:
-
 
1776
      return result.success
-
 
1777
    if result.ex != None:
-
 
1778
      raise result.ex
-
 
1779
    raise TApplicationException(TApplicationException.MISSING_RESULT, "authorizePickup failed: unknown result");
-
 
1780
 
1627
 
1781
 
1628
class Processor(Iface, TProcessor):
1782
class Processor(Iface, TProcessor):
1629
  def __init__(self, handler):
1783
  def __init__(self, handler):
1630
    self._handler = handler
1784
    self._handler = handler
1631
    self._processMap = {}
1785
    self._processMap = {}
Line 1664... Line 1818...
1664
    self._processMap["setAlert"] = Processor.process_setAlert
1818
    self._processMap["setAlert"] = Processor.process_setAlert
1665
    self._processMap["getValidOrderCount"] = Processor.process_getValidOrderCount
1819
    self._processMap["getValidOrderCount"] = Processor.process_getValidOrderCount
1666
    self._processMap["getNoOfCustomersWithSuccessfulTransaction"] = Processor.process_getNoOfCustomersWithSuccessfulTransaction
1820
    self._processMap["getNoOfCustomersWithSuccessfulTransaction"] = Processor.process_getNoOfCustomersWithSuccessfulTransaction
1667
    self._processMap["getValidOrdersAmountRange"] = Processor.process_getValidOrdersAmountRange
1821
    self._processMap["getValidOrdersAmountRange"] = Processor.process_getValidOrdersAmountRange
1668
    self._processMap["getValidOrders"] = Processor.process_getValidOrders
1822
    self._processMap["getValidOrders"] = Processor.process_getValidOrders
-
 
1823
    self._processMap["toggleDOAFlag"] = Processor.process_toggleDOAFlag
-
 
1824
    self._processMap["requestPickupNumber"] = Processor.process_requestPickupNumber
-
 
1825
    self._processMap["authorizePickup"] = Processor.process_authorizePickup
1669
 
1826
 
1670
  def process(self, iprot, oprot):
1827
  def process(self, iprot, oprot):
1671
    (name, type, seqid) = iprot.readMessageBegin()
1828
    (name, type, seqid) = iprot.readMessageBegin()
1672
    if name not in self._processMap:
1829
    if name not in self._processMap:
1673
      iprot.skip(TType.STRUCT)
1830
      iprot.skip(TType.STRUCT)
Line 2174... Line 2331...
2174
    oprot.writeMessageBegin("getValidOrders", TMessageType.REPLY, seqid)
2331
    oprot.writeMessageBegin("getValidOrders", TMessageType.REPLY, seqid)
2175
    result.write(oprot)
2332
    result.write(oprot)
2176
    oprot.writeMessageEnd()
2333
    oprot.writeMessageEnd()
2177
    oprot.trans.flush()
2334
    oprot.trans.flush()
2178
 
2335
 
-
 
2336
  def process_toggleDOAFlag(self, seqid, iprot, oprot):
-
 
2337
    args = toggleDOAFlag_args()
-
 
2338
    args.read(iprot)
-
 
2339
    iprot.readMessageEnd()
-
 
2340
    result = toggleDOAFlag_result()
-
 
2341
    try:
-
 
2342
      result.success = self._handler.toggleDOAFlag(args.orderId)
-
 
2343
    except TransactionServiceException, ex:
-
 
2344
      result.ex = ex
-
 
2345
    oprot.writeMessageBegin("toggleDOAFlag", TMessageType.REPLY, seqid)
-
 
2346
    result.write(oprot)
-
 
2347
    oprot.writeMessageEnd()
-
 
2348
    oprot.trans.flush()
-
 
2349
 
-
 
2350
  def process_requestPickupNumber(self, seqid, iprot, oprot):
-
 
2351
    args = requestPickupNumber_args()
-
 
2352
    args.read(iprot)
-
 
2353
    iprot.readMessageEnd()
-
 
2354
    result = requestPickupNumber_result()
-
 
2355
    try:
-
 
2356
      result.success = self._handler.requestPickupNumber(args.orderId)
-
 
2357
    except TransactionServiceException, ex:
-
 
2358
      result.ex = ex
-
 
2359
    oprot.writeMessageBegin("requestPickupNumber", TMessageType.REPLY, seqid)
-
 
2360
    result.write(oprot)
-
 
2361
    oprot.writeMessageEnd()
-
 
2362
    oprot.trans.flush()
-
 
2363
 
-
 
2364
  def process_authorizePickup(self, seqid, iprot, oprot):
-
 
2365
    args = authorizePickup_args()
-
 
2366
    args.read(iprot)
-
 
2367
    iprot.readMessageEnd()
-
 
2368
    result = authorizePickup_result()
-
 
2369
    try:
-
 
2370
      result.success = self._handler.authorizePickup(args.orderId, args.pickupNumber)
-
 
2371
    except TransactionServiceException, ex:
-
 
2372
      result.ex = ex
-
 
2373
    oprot.writeMessageBegin("authorizePickup", TMessageType.REPLY, seqid)
-
 
2374
    result.write(oprot)
-
 
2375
    oprot.writeMessageEnd()
-
 
2376
    oprot.trans.flush()
-
 
2377
 
2179
 
2378
 
2180
# HELPER FUNCTIONS AND STRUCTURES
2379
# HELPER FUNCTIONS AND STRUCTURES
2181
 
2380
 
2182
class closeSession_args:
2381
class closeSession_args:
2183
 
2382
 
Line 7085... Line 7284...
7085
      oprot.writeFieldEnd()
7284
      oprot.writeFieldEnd()
7086
    oprot.writeFieldStop()
7285
    oprot.writeFieldStop()
7087
    oprot.writeStructEnd()
7286
    oprot.writeStructEnd()
7088
 
7287
 
7089
  def __repr__(self):
7288
  def __repr__(self):
-
 
7289
    L = ['%s=%r' % (key, value)
-
 
7290
      for key, value in self.__dict__.iteritems()]
-
 
7291
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
7292
 
-
 
7293
  def __eq__(self, other):
-
 
7294
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
7295
 
-
 
7296
  def __ne__(self, other):
-
 
7297
    return not (self == other)
-
 
7298
 
-
 
7299
class toggleDOAFlag_args:
-
 
7300
  """
-
 
7301
  Attributes:
-
 
7302
   - orderId
-
 
7303
  """
-
 
7304
 
-
 
7305
  thrift_spec = (
-
 
7306
    None, # 0
-
 
7307
    (1, TType.I64, 'orderId', None, None, ), # 1
-
 
7308
  )
-
 
7309
 
-
 
7310
  def __init__(self, orderId=None,):
-
 
7311
    self.orderId = orderId
-
 
7312
 
-
 
7313
  def read(self, iprot):
-
 
7314
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
7315
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
7316
      return
-
 
7317
    iprot.readStructBegin()
-
 
7318
    while True:
-
 
7319
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
7320
      if ftype == TType.STOP:
-
 
7321
        break
-
 
7322
      if fid == 1:
-
 
7323
        if ftype == TType.I64:
-
 
7324
          self.orderId = iprot.readI64();
-
 
7325
        else:
-
 
7326
          iprot.skip(ftype)
-
 
7327
      else:
-
 
7328
        iprot.skip(ftype)
-
 
7329
      iprot.readFieldEnd()
-
 
7330
    iprot.readStructEnd()
-
 
7331
 
-
 
7332
  def write(self, oprot):
-
 
7333
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
7334
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
7335
      return
-
 
7336
    oprot.writeStructBegin('toggleDOAFlag_args')
-
 
7337
    if self.orderId != None:
-
 
7338
      oprot.writeFieldBegin('orderId', TType.I64, 1)
-
 
7339
      oprot.writeI64(self.orderId)
-
 
7340
      oprot.writeFieldEnd()
-
 
7341
    oprot.writeFieldStop()
-
 
7342
    oprot.writeStructEnd()
-
 
7343
 
-
 
7344
  def __repr__(self):
-
 
7345
    L = ['%s=%r' % (key, value)
-
 
7346
      for key, value in self.__dict__.iteritems()]
-
 
7347
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
7348
 
-
 
7349
  def __eq__(self, other):
-
 
7350
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
7351
 
-
 
7352
  def __ne__(self, other):
-
 
7353
    return not (self == other)
-
 
7354
 
-
 
7355
class toggleDOAFlag_result:
-
 
7356
  """
-
 
7357
  Attributes:
-
 
7358
   - success
-
 
7359
   - ex
-
 
7360
  """
-
 
7361
 
-
 
7362
  thrift_spec = (
-
 
7363
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
7364
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
-
 
7365
  )
-
 
7366
 
-
 
7367
  def __init__(self, success=None, ex=None,):
-
 
7368
    self.success = success
-
 
7369
    self.ex = ex
-
 
7370
 
-
 
7371
  def read(self, iprot):
-
 
7372
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
7373
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
7374
      return
-
 
7375
    iprot.readStructBegin()
-
 
7376
    while True:
-
 
7377
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
7378
      if ftype == TType.STOP:
-
 
7379
        break
-
 
7380
      if fid == 0:
-
 
7381
        if ftype == TType.BOOL:
-
 
7382
          self.success = iprot.readBool();
-
 
7383
        else:
-
 
7384
          iprot.skip(ftype)
-
 
7385
      elif fid == 1:
-
 
7386
        if ftype == TType.STRUCT:
-
 
7387
          self.ex = TransactionServiceException()
-
 
7388
          self.ex.read(iprot)
-
 
7389
        else:
-
 
7390
          iprot.skip(ftype)
-
 
7391
      else:
-
 
7392
        iprot.skip(ftype)
-
 
7393
      iprot.readFieldEnd()
-
 
7394
    iprot.readStructEnd()
-
 
7395
 
-
 
7396
  def write(self, oprot):
-
 
7397
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
7398
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
7399
      return
-
 
7400
    oprot.writeStructBegin('toggleDOAFlag_result')
-
 
7401
    if self.success != None:
-
 
7402
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
7403
      oprot.writeBool(self.success)
-
 
7404
      oprot.writeFieldEnd()
-
 
7405
    if self.ex != None:
-
 
7406
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
-
 
7407
      self.ex.write(oprot)
-
 
7408
      oprot.writeFieldEnd()
-
 
7409
    oprot.writeFieldStop()
-
 
7410
    oprot.writeStructEnd()
-
 
7411
 
-
 
7412
  def __repr__(self):
-
 
7413
    L = ['%s=%r' % (key, value)
-
 
7414
      for key, value in self.__dict__.iteritems()]
-
 
7415
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
7416
 
-
 
7417
  def __eq__(self, other):
-
 
7418
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
7419
 
-
 
7420
  def __ne__(self, other):
-
 
7421
    return not (self == other)
-
 
7422
 
-
 
7423
class requestPickupNumber_args:
-
 
7424
  """
-
 
7425
  Attributes:
-
 
7426
   - orderId
-
 
7427
  """
-
 
7428
 
-
 
7429
  thrift_spec = (
-
 
7430
    None, # 0
-
 
7431
    (1, TType.I64, 'orderId', None, None, ), # 1
-
 
7432
  )
-
 
7433
 
-
 
7434
  def __init__(self, orderId=None,):
-
 
7435
    self.orderId = orderId
-
 
7436
 
-
 
7437
  def read(self, iprot):
-
 
7438
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
7439
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
7440
      return
-
 
7441
    iprot.readStructBegin()
-
 
7442
    while True:
-
 
7443
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
7444
      if ftype == TType.STOP:
-
 
7445
        break
-
 
7446
      if fid == 1:
-
 
7447
        if ftype == TType.I64:
-
 
7448
          self.orderId = iprot.readI64();
-
 
7449
        else:
-
 
7450
          iprot.skip(ftype)
-
 
7451
      else:
-
 
7452
        iprot.skip(ftype)
-
 
7453
      iprot.readFieldEnd()
-
 
7454
    iprot.readStructEnd()
-
 
7455
 
-
 
7456
  def write(self, oprot):
-
 
7457
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
7458
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
7459
      return
-
 
7460
    oprot.writeStructBegin('requestPickupNumber_args')
-
 
7461
    if self.orderId != None:
-
 
7462
      oprot.writeFieldBegin('orderId', TType.I64, 1)
-
 
7463
      oprot.writeI64(self.orderId)
-
 
7464
      oprot.writeFieldEnd()
-
 
7465
    oprot.writeFieldStop()
-
 
7466
    oprot.writeStructEnd()
-
 
7467
 
-
 
7468
  def __repr__(self):
-
 
7469
    L = ['%s=%r' % (key, value)
-
 
7470
      for key, value in self.__dict__.iteritems()]
-
 
7471
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
7472
 
-
 
7473
  def __eq__(self, other):
-
 
7474
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
7475
 
-
 
7476
  def __ne__(self, other):
-
 
7477
    return not (self == other)
-
 
7478
 
-
 
7479
class requestPickupNumber_result:
-
 
7480
  """
-
 
7481
  Attributes:
-
 
7482
   - success
-
 
7483
   - ex
-
 
7484
  """
-
 
7485
 
-
 
7486
  thrift_spec = (
-
 
7487
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
7488
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
-
 
7489
  )
-
 
7490
 
-
 
7491
  def __init__(self, success=None, ex=None,):
-
 
7492
    self.success = success
-
 
7493
    self.ex = ex
-
 
7494
 
-
 
7495
  def read(self, iprot):
-
 
7496
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
7497
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
7498
      return
-
 
7499
    iprot.readStructBegin()
-
 
7500
    while True:
-
 
7501
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
7502
      if ftype == TType.STOP:
-
 
7503
        break
-
 
7504
      if fid == 0:
-
 
7505
        if ftype == TType.BOOL:
-
 
7506
          self.success = iprot.readBool();
-
 
7507
        else:
-
 
7508
          iprot.skip(ftype)
-
 
7509
      elif fid == 1:
-
 
7510
        if ftype == TType.STRUCT:
-
 
7511
          self.ex = TransactionServiceException()
-
 
7512
          self.ex.read(iprot)
-
 
7513
        else:
-
 
7514
          iprot.skip(ftype)
-
 
7515
      else:
-
 
7516
        iprot.skip(ftype)
-
 
7517
      iprot.readFieldEnd()
-
 
7518
    iprot.readStructEnd()
-
 
7519
 
-
 
7520
  def write(self, oprot):
-
 
7521
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
7522
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
7523
      return
-
 
7524
    oprot.writeStructBegin('requestPickupNumber_result')
-
 
7525
    if self.success != None:
-
 
7526
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
7527
      oprot.writeBool(self.success)
-
 
7528
      oprot.writeFieldEnd()
-
 
7529
    if self.ex != None:
-
 
7530
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
-
 
7531
      self.ex.write(oprot)
-
 
7532
      oprot.writeFieldEnd()
-
 
7533
    oprot.writeFieldStop()
-
 
7534
    oprot.writeStructEnd()
-
 
7535
 
-
 
7536
  def __repr__(self):
-
 
7537
    L = ['%s=%r' % (key, value)
-
 
7538
      for key, value in self.__dict__.iteritems()]
-
 
7539
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
7540
 
-
 
7541
  def __eq__(self, other):
-
 
7542
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
7543
 
-
 
7544
  def __ne__(self, other):
-
 
7545
    return not (self == other)
-
 
7546
 
-
 
7547
class authorizePickup_args:
-
 
7548
  """
-
 
7549
  Attributes:
-
 
7550
   - orderId
-
 
7551
   - pickupNumber
-
 
7552
  """
-
 
7553
 
-
 
7554
  thrift_spec = (
-
 
7555
    None, # 0
-
 
7556
    (1, TType.I64, 'orderId', None, None, ), # 1
-
 
7557
    (2, TType.STRING, 'pickupNumber', None, None, ), # 2
-
 
7558
  )
-
 
7559
 
-
 
7560
  def __init__(self, orderId=None, pickupNumber=None,):
-
 
7561
    self.orderId = orderId
-
 
7562
    self.pickupNumber = pickupNumber
-
 
7563
 
-
 
7564
  def read(self, iprot):
-
 
7565
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
7566
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
7567
      return
-
 
7568
    iprot.readStructBegin()
-
 
7569
    while True:
-
 
7570
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
7571
      if ftype == TType.STOP:
-
 
7572
        break
-
 
7573
      if fid == 1:
-
 
7574
        if ftype == TType.I64:
-
 
7575
          self.orderId = iprot.readI64();
-
 
7576
        else:
-
 
7577
          iprot.skip(ftype)
-
 
7578
      elif fid == 2:
-
 
7579
        if ftype == TType.STRING:
-
 
7580
          self.pickupNumber = iprot.readString();
-
 
7581
        else:
-
 
7582
          iprot.skip(ftype)
-
 
7583
      else:
-
 
7584
        iprot.skip(ftype)
-
 
7585
      iprot.readFieldEnd()
-
 
7586
    iprot.readStructEnd()
-
 
7587
 
-
 
7588
  def write(self, oprot):
-
 
7589
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
7590
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
7591
      return
-
 
7592
    oprot.writeStructBegin('authorizePickup_args')
-
 
7593
    if self.orderId != None:
-
 
7594
      oprot.writeFieldBegin('orderId', TType.I64, 1)
-
 
7595
      oprot.writeI64(self.orderId)
-
 
7596
      oprot.writeFieldEnd()
-
 
7597
    if self.pickupNumber != None:
-
 
7598
      oprot.writeFieldBegin('pickupNumber', TType.STRING, 2)
-
 
7599
      oprot.writeString(self.pickupNumber)
-
 
7600
      oprot.writeFieldEnd()
-
 
7601
    oprot.writeFieldStop()
-
 
7602
    oprot.writeStructEnd()
-
 
7603
 
-
 
7604
  def __repr__(self):
-
 
7605
    L = ['%s=%r' % (key, value)
-
 
7606
      for key, value in self.__dict__.iteritems()]
-
 
7607
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
7608
 
-
 
7609
  def __eq__(self, other):
-
 
7610
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
7611
 
-
 
7612
  def __ne__(self, other):
-
 
7613
    return not (self == other)
-
 
7614
 
-
 
7615
class authorizePickup_result:
-
 
7616
  """
-
 
7617
  Attributes:
-
 
7618
   - success
-
 
7619
   - ex
-
 
7620
  """
-
 
7621
 
-
 
7622
  thrift_spec = (
-
 
7623
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
7624
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
-
 
7625
  )
-
 
7626
 
-
 
7627
  def __init__(self, success=None, ex=None,):
-
 
7628
    self.success = success
-
 
7629
    self.ex = ex
-
 
7630
 
-
 
7631
  def read(self, iprot):
-
 
7632
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
7633
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
7634
      return
-
 
7635
    iprot.readStructBegin()
-
 
7636
    while True:
-
 
7637
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
7638
      if ftype == TType.STOP:
-
 
7639
        break
-
 
7640
      if fid == 0:
-
 
7641
        if ftype == TType.BOOL:
-
 
7642
          self.success = iprot.readBool();
-
 
7643
        else:
-
 
7644
          iprot.skip(ftype)
-
 
7645
      elif fid == 1:
-
 
7646
        if ftype == TType.STRUCT:
-
 
7647
          self.ex = TransactionServiceException()
-
 
7648
          self.ex.read(iprot)
-
 
7649
        else:
-
 
7650
          iprot.skip(ftype)
-
 
7651
      else:
-
 
7652
        iprot.skip(ftype)
-
 
7653
      iprot.readFieldEnd()
-
 
7654
    iprot.readStructEnd()
-
 
7655
 
-
 
7656
  def write(self, oprot):
-
 
7657
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
7658
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
7659
      return
-
 
7660
    oprot.writeStructBegin('authorizePickup_result')
-
 
7661
    if self.success != None:
-
 
7662
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
7663
      oprot.writeBool(self.success)
-
 
7664
      oprot.writeFieldEnd()
-
 
7665
    if self.ex != None:
-
 
7666
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
-
 
7667
      self.ex.write(oprot)
-
 
7668
      oprot.writeFieldEnd()
-
 
7669
    oprot.writeFieldStop()
-
 
7670
    oprot.writeStructEnd()
-
 
7671
 
-
 
7672
  def __repr__(self):
7090
    L = ['%s=%r' % (key, value)
7673
    L = ['%s=%r' % (key, value)
7091
      for key, value in self.__dict__.iteritems()]
7674
      for key, value in self.__dict__.iteritems()]
7092
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
7675
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
7093
 
7676
 
7094
  def __eq__(self, other):
7677
  def __eq__(self, other):