Subversion Repositories SmartDukaan

Rev

Rev 3469 | Rev 3956 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

#
# Autogenerated by Thrift Compiler (0.7.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#

from thrift.Thrift import *
import shop2020.thriftpy.generic.GenericService
from ttypes import *
from thrift.Thrift import TProcessor
from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol, TProtocol
try:
  from thrift.protocol import fastbinary
except:
  fastbinary = None


class Iface(shop2020.thriftpy.generic.GenericService.Iface):
  def createTransaction(self, transaction):
    """
    Parameters:
     - transaction
    """
    pass

  def getTransaction(self, id):
    """
    Parameters:
     - id
    """
    pass

  def getTransactionsForCustomer(self, customerId, from_date, to_date, status):
    """
    Parameters:
     - customerId
     - from_date
     - to_date
     - status
    """
    pass

  def getTransactionsForShoppingCartId(self, shoppingCartId):
    """
    Parameters:
     - shoppingCartId
    """
    pass

  def getTransactionStatus(self, transactionId):
    """
    Parameters:
     - transactionId
    """
    pass

  def changeTransactionStatus(self, transactionId, status, description):
    """
    Parameters:
     - transactionId
     - status
     - description
    """
    pass

  def enqueueTransactionInfoEmail(self, transactionId):
    """
    Parameters:
     - transactionId
    """
    pass

  def getAllOrders(self, status, from_date, to_date, warehouse_id):
    """
    Parameters:
     - status
     - from_date
     - to_date
     - warehouse_id
    """
    pass

  def getOrdersByBillingDate(self, status, start_billing_date, end_billing_date, warehouse_id):
    """
    Returns orders within a range of their billing dates

    Parameters:
     - status
     - start_billing_date
     - end_billing_date
     - warehouse_id
    """
    pass

  def getOrdersByShippingDate(self, fromShippingDate, toShippingDate, providerId, warehouseId, cod):
    """
    Returns orders for a particular provider and warehouse which were shipped between the given dates.
    Returned orders comprise of COD orders if cod parameter is true. It comprises of prepaid orders otherwise.
    Pass providerId and warehouseId as -1 to ignore both these parameters.

    Parameters:
     - fromShippingDate
     - toShippingDate
     - providerId
     - warehouseId
     - cod
    """
    pass

  def getReturnableOrdersForCustomer(self, customer_id, limit):
    """
    Returns order ids for orders which can be returned

    Parameters:
     - customer_id
     - limit
    """
    pass

  def getCancellableOrdersForCustomer(self, customer_id, limit):
    """
    Returns order ids for orders which can be cancelled

    Parameters:
     - customer_id
     - limit
    """
    pass

  def changeOrderStatus(self, orderId, status, description):
    """
    Parameters:
     - orderId
     - status
     - description
    """
    pass

  def getOrdersForTransaction(self, transactionId, customerId):
    """
    Returns list of orders for given transaction Id. Also filters based on customer Id so that
    only user who owns the transaction can view its order details.

    Parameters:
     - transactionId
     - customerId
    """
    pass

  def getOrdersForCustomer(self, customerId, from_date, to_date, statuses):
    """
    Returns list of orders for the given customer created between the given dates and having the given statuses.
    Pass and empty list to ignore filtering on statuses.

    Parameters:
     - customerId
     - from_date
     - to_date
     - statuses
    """
    pass

  def createOrder(self, order):
    """
    Parameters:
     - order
    """
    pass

  def getOrder(self, id):
    """
    Parameters:
     - id
    """
    pass

  def getLineItemsForOrder(self, orderId):
    """
    Parameters:
     - orderId
    """
    pass

  def getOrderForCustomer(self, orderId, customerId):
    """
    Returns an order for the order Id. Also checks if the order belongs to the customer whose Id is passed.
    Throws exception if either order Id is invalid or order does not below to the customer whose Id is passed.

    Parameters:
     - orderId
     - customerId
    """
    pass

  def getAlerts(self, orderId, valid):
    """
    Parameters:
     - orderId
     - valid
    """
    pass

  def setAlert(self, orderId, unset, type, comment):
    """
    Parameters:
     - orderId
     - unset
     - type
     - comment
    """
    pass

  def getValidOrderCount(self, ):
    """
    Return the number of valid orders. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
    """
    pass

  def getNoOfCustomersWithSuccessfulTransaction(self, ):
    """
    Returns the number of distinct customers who have done successful transactions
    """
    pass

  def getValidOrdersAmountRange(self, ):
    """
    Returns the minimum and maximum amounts of a valid order. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
    List contains two values, first minimum amount and second maximum amount.
    """
    pass

  def getValidOrders(self, limit):
    """
    Returns list of Orders in descending order by Order creation date. List is restricted to limit Orders.
    If limit is passed as 0, then all valid Orders are returned.

    Parameters:
     - limit
    """
    pass

  def batchOrders(self, warehouseId):
    """
    Create a batch of all the pending orders for the given warehouse.
    The returned list is orderd by created_timestamp.
    If there are no pending orders, an empty list is returned.

    Parameters:
     - warehouseId
    """
    pass

  def markOrderAsOutOfStock(self, orderId):
    """
    Mark the given order as out of stock. Throws an exception if the order with the given Id couldn't be found.

    Parameters:
     - orderId
    """
    pass

  def verifyOrder(self, orderId):
    """
    Marks the given order as SUBMITTED_FOR_PROCESSING and updates the verified
    timestamp. It is intended to be used for COD orders but can be harmlessly
    used for all other orders as well.
    Throws an exception if no such order exists.

    Parameters:
     - orderId
    """
    pass

  def acceptOrder(self, orderId):
    """
    Marks the given order as ACCEPTED and updates the accepted timestamp. If the
    given order is not a COD order, it also captures the payment if the same has
    not been captured.
    Throws an exception if no such order exists.

    Parameters:
     - orderId
    """
    pass

  def billOrder(self, orderId):
    """
    Parameters:
     - orderId
    """
    pass

  def addBillingDetails(self, orderId, invoice_number, billed_by):
    """
    Add billing details such as the bill number and the biller to the Order.
    Should be used when the bill is issued by a 3rd party and we've to feed
    the information into our system.

    Parameters:
     - orderId
     - invoice_number
     - billed_by
    """
    pass

  def addJacketNumber(self, orderId, jacketNumber, imeiNumber, itemNumber, billedBy, billingType):
    """
    Adds jacket number, item number and IMEI no. to the order. Doesn't update
    the IMEI no. if a -1 is supplied.
    Also, it generates an invoice number for the order, marks the order as
    BILLED and sets the billing timestamp.
    It should be used when we are billing the orders ourselves.

    Returns false if it doesn't find the order with the given ID.

    Parameters:
     - orderId
     - jacketNumber
     - imeiNumber
     - itemNumber
     - billedBy
     - billingType
    """
    pass

  def markOrdersAsManifested(self, warehouseId, providerId, cod):
    """
    Depending on the third parameter, marks either all prepaid or all cod orders BILLED by the
    given warehouse and were picked up by the given provider as SHIPPED_FROM_WH.

    Parameters:
     - warehouseId
     - providerId
     - cod
    """
    pass

  def markOrdersAsPickedUp(self, providerId, pickupDetails):
    """
    Marks all SHIPPED_FROM_WH orders of the previous day for a provider as SHIPPED_TO_LOGISTICS.
    Returns a list of orders that were shipped from warehouse but did not appear in the pick-up report.
    Raises an exception if we encounter report for an AWB number that we did not ship.

    Parameters:
     - providerId
     - pickupDetails
    """
    pass

  def markOrdersAsDelivered(self, providerId, deliveredOrders):
    """
    Marks all orders with AWBs in the given map as delivered. Also sets the delivery timestamp and
    the name of the receiver.
    Raises an exception if we encounter report for an AWB number that we did not ship.

    Parameters:
     - providerId
     - deliveredOrders
    """
    pass

  def markOrdersAsFailed(self, providerId, returnedOrders):
    """
    Mark all orders with AWBs in the given map as failed. Also sets the delivery timestamp.
    Raises an exception if we encounter report for an AWB number that we did not ship.

    Parameters:
     - providerId
     - returnedOrders
    """
    pass

  def updateNonDeliveryReason(self, providerId, undeliveredOrders):
    """
    Update the status description of orders whose AWB numbers are keys of the Map.

    Parameters:
     - providerId
     - undeliveredOrders
    """
    pass

  def getUndeliveredOrders(self, providerId, warehouseId):
    """
    Returns the list of orders whose delivery time has passed but have not been
    delivered yet for the given provider and warehouse. To get a complete list of
    undelivered orders, pass them as -1.
    Returns an empty list if no such orders exist.

    Parameters:
     - providerId
     - warehouseId
    """
    pass

  def toggleDOAFlag(self, orderId):
    """
    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.
    Returns the final flag status.
    Throws an exception if the order with the given id couldn't be found or if the order status is not DELVIERY_SUCCESS.

    Parameters:
     - orderId
    """
    pass

  def requestPickupNumber(self, orderId):
    """
    Sends out an email to the account manager of the original courier provider used to ship the order.
    If the order status was DELIVERY_SUCCESS, it is changed to be DOA_PICKUP_REQUESTED.
    If the order status was DOA_PICKUP_REQUESTED, it is left unchanged.
    For any other status, it returns false.
    Throws an exception if the order with the given id couldn't be found.

    Parameters:
     - orderId
    """
    pass

  def authorizePickup(self, orderId, pickupNumber):
    """
    If the order status is DOA_PICKUP_REQUESTED, it does the following
        1. Sends out an email to the customer with the dispatch advice that he has to print as an attachment.
        2. Changes order status to be DOA_PICKUP_AUTHORIZED.
        3. Returns true
    If the order is in any other status, it returns false.
    Throws an exception if the order with the given id couldn't be found.

    Parameters:
     - orderId
     - pickupNumber
    """
    pass

  def markDoasAsPickedUp(self, providerId, pickupDetails):
    """
    Marks all DOA_PICKUP_AUTHORIZED orders of the previous day for a provider as DOA_RETURN_IN_TRANSIT.
    Returns a list of orders that were authorized for pickup but did not appear in the pick-up report.

    Parameters:
     - providerId
     - pickupDetails
    """
    pass

  def receiveReturn(self, orderId):
    """
    If the order status is DOA_RETURN_AUTHORIZED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED and returns true.
    If the order status is SALES_RETURN_IN_TRANSIT, marks the order status as SALES_RET_RECEIVED and returns true.
    If the order is in any other state, it returns false.
    Throws an exception if the order with the given id couldn't be found.

    Parameters:
     - orderId
    """
    pass

  def validateDoa(self, orderId, isValid):
    """
    Used to validate the DOA certificate for an order in the DOA_RECEIVED state. If the certificate is valid,
    the order state is changed to DOA_CERT_VALID. If the certificate is invalid, the order state is changed to DOA_CERT_INVALID.
    If the order is in any other state, it returns false.
    Throws an exception if the order with the given id couldn't be found.

    Parameters:
     - orderId
     - isValid
    """
    pass

  def reshipOrder(self, orderId):
    """
    If the order is in SALES_RET_RECEIVED or DOA_CERT_INVALID state, it does the following:
        1. Creates a new order for processing in the BILLED state. All billing information is saved.
        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.
        
    If the order is in DOA_CERT_VALID state, it does the following:
        1. Creates a new order for processing in the SUBMITTED_FOR_PROCESSING state.
        2. Creates a return order for the warehouse executive to return the DOA material.
        3. Marks the current order as the final DOA_RESHIPPED state.

    Returns the id of the newly created order.

    Throws an exception if the order with the given id couldn't be found.

    Parameters:
     - orderId
    """
    pass

  def refundOrder(self, orderId, refundedBy, reason):
    """
    If the order is in SALES_RET_RECEIVED, DOA_CERT_VALID or DOA_CERT_INVALID state, it does the following:
        1. Creates a refund request for batch processing.
        2. Creates a return order for the warehouse executive to return the shipped material.
        3. Marks the current order as SALES_RET_REFUNDED, DOA_VALID_REFUNDED or DOA_INVALID_REFUNDED final states.

    If the order is in SUBMITTED_FOR_PROCESSING or INVENTORY_LOW state, it does the following:
        1. Creates a refund request for batch processing.
        2. Cancels the reservation of the item in the warehouse.
        3. Marks the current order as the REFUNDED final state.

    For all COD orders, if the order is in INIT, SUBMITTED_FOR_PROCESSING or INVENTORY_LOW state, it does the following:
        1. Cancels the reservation of the item in the warehouse.
        2. Marks the current order as CANCELED.
        
    In all cases, it updates the reason for cancellation or refund and the person who performed the action.
     
    Returns True if it is successful, False otherwise.

    Throws an exception if the order with the given id couldn't be found.

    Parameters:
     - orderId
     - refundedBy
     - reason
    """
    pass

  def getReturnOrders(self, warehouseId, fromDate, toDate):
    """
    Get all return orders created between the from and to dates for the given warehouse.
    Ignores the warehouse if it is passed as -1.

    Parameters:
     - warehouseId
     - fromDate
     - toDate
    """
    pass

  def getReturnOrder(self, id):
    """
    Returns the ReturnOrder corresponding to the given id.
    Throws an exception if the return order with the given id couldn't be found.

    Parameters:
     - id
    """
    pass

  def processReturn(self, returnOrderId):
    """
    Marks the return order with the given id as processed. Raises an exception if no such return order exists.

    Parameters:
     - returnOrderId
    """
    pass

  def createPurchaseOrder(self, warehouseId):
    """
    Creates a purchase order corresponding to all the pending orders of the given warehouse.
    Returns the PO no. of the newly created purchase order. Returns -1 no new purchase order had to be created.

    Parameters:
     - warehouseId
    """
    pass

  def updateWeight(self, orderId, weight):
    """
    Set the weight of the given order to the provided value. Will attempt to update the weight of the item in the catalog as well.

    Parameters:
     - orderId
     - weight
    """
    pass

  def changeItem(self, orderId, itemId):
    """
    Change the item to be shipped for this order. Also adjusts the reservation in the inventory accordingly.
    Currently, it also ensures that only a different color of the given item is shipped.

    Parameters:
     - orderId
     - itemId
    """
    pass

  def shiftToWarehouse(self, orderId, warehouseId):
    """
    Moves the given order to the given warehouse. Also adjusts the inventory reservations accordingly.

    Parameters:
     - orderId
     - warehouseId
    """
    pass

  def addDelayReason(self, orderId, delayReason):
    """
    Adds the given delay reason to the given order.
    Raises an exception if no order with the given id can be found.

    Parameters:
     - orderId
     - delayReason
    """
    pass


class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
  def __init__(self, iprot, oprot=None):
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)

  def createTransaction(self, transaction):
    """
    Parameters:
     - transaction
    """
    self.send_createTransaction(transaction)
    return self.recv_createTransaction()

  def send_createTransaction(self, transaction):
    self._oprot.writeMessageBegin('createTransaction', TMessageType.CALL, self._seqid)
    args = createTransaction_args()
    args.transaction = transaction
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_createTransaction(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = createTransaction_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createTransaction failed: unknown result");

  def getTransaction(self, id):
    """
    Parameters:
     - id
    """
    self.send_getTransaction(id)
    return self.recv_getTransaction()

  def send_getTransaction(self, id):
    self._oprot.writeMessageBegin('getTransaction', TMessageType.CALL, self._seqid)
    args = getTransaction_args()
    args.id = id
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getTransaction(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getTransaction_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getTransaction failed: unknown result");

  def getTransactionsForCustomer(self, customerId, from_date, to_date, status):
    """
    Parameters:
     - customerId
     - from_date
     - to_date
     - status
    """
    self.send_getTransactionsForCustomer(customerId, from_date, to_date, status)
    return self.recv_getTransactionsForCustomer()

  def send_getTransactionsForCustomer(self, customerId, from_date, to_date, status):
    self._oprot.writeMessageBegin('getTransactionsForCustomer', TMessageType.CALL, self._seqid)
    args = getTransactionsForCustomer_args()
    args.customerId = customerId
    args.from_date = from_date
    args.to_date = to_date
    args.status = status
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getTransactionsForCustomer(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getTransactionsForCustomer_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForCustomer failed: unknown result");

  def getTransactionsForShoppingCartId(self, shoppingCartId):
    """
    Parameters:
     - shoppingCartId
    """
    self.send_getTransactionsForShoppingCartId(shoppingCartId)
    return self.recv_getTransactionsForShoppingCartId()

  def send_getTransactionsForShoppingCartId(self, shoppingCartId):
    self._oprot.writeMessageBegin('getTransactionsForShoppingCartId', TMessageType.CALL, self._seqid)
    args = getTransactionsForShoppingCartId_args()
    args.shoppingCartId = shoppingCartId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getTransactionsForShoppingCartId(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getTransactionsForShoppingCartId_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForShoppingCartId failed: unknown result");

  def getTransactionStatus(self, transactionId):
    """
    Parameters:
     - transactionId
    """
    self.send_getTransactionStatus(transactionId)
    return self.recv_getTransactionStatus()

  def send_getTransactionStatus(self, transactionId):
    self._oprot.writeMessageBegin('getTransactionStatus', TMessageType.CALL, self._seqid)
    args = getTransactionStatus_args()
    args.transactionId = transactionId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getTransactionStatus(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getTransactionStatus_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionStatus failed: unknown result");

  def changeTransactionStatus(self, transactionId, status, description):
    """
    Parameters:
     - transactionId
     - status
     - description
    """
    self.send_changeTransactionStatus(transactionId, status, description)
    return self.recv_changeTransactionStatus()

  def send_changeTransactionStatus(self, transactionId, status, description):
    self._oprot.writeMessageBegin('changeTransactionStatus', TMessageType.CALL, self._seqid)
    args = changeTransactionStatus_args()
    args.transactionId = transactionId
    args.status = status
    args.description = description
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_changeTransactionStatus(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = changeTransactionStatus_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "changeTransactionStatus failed: unknown result");

  def enqueueTransactionInfoEmail(self, transactionId):
    """
    Parameters:
     - transactionId
    """
    self.send_enqueueTransactionInfoEmail(transactionId)
    return self.recv_enqueueTransactionInfoEmail()

  def send_enqueueTransactionInfoEmail(self, transactionId):
    self._oprot.writeMessageBegin('enqueueTransactionInfoEmail', TMessageType.CALL, self._seqid)
    args = enqueueTransactionInfoEmail_args()
    args.transactionId = transactionId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_enqueueTransactionInfoEmail(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = enqueueTransactionInfoEmail_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "enqueueTransactionInfoEmail failed: unknown result");

  def getAllOrders(self, status, from_date, to_date, warehouse_id):
    """
    Parameters:
     - status
     - from_date
     - to_date
     - warehouse_id
    """
    self.send_getAllOrders(status, from_date, to_date, warehouse_id)
    return self.recv_getAllOrders()

  def send_getAllOrders(self, status, from_date, to_date, warehouse_id):
    self._oprot.writeMessageBegin('getAllOrders', TMessageType.CALL, self._seqid)
    args = getAllOrders_args()
    args.status = status
    args.from_date = from_date
    args.to_date = to_date
    args.warehouse_id = warehouse_id
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getAllOrders(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getAllOrders_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllOrders failed: unknown result");

  def getOrdersByBillingDate(self, status, start_billing_date, end_billing_date, warehouse_id):
    """
    Returns orders within a range of their billing dates

    Parameters:
     - status
     - start_billing_date
     - end_billing_date
     - warehouse_id
    """
    self.send_getOrdersByBillingDate(status, start_billing_date, end_billing_date, warehouse_id)
    return self.recv_getOrdersByBillingDate()

  def send_getOrdersByBillingDate(self, status, start_billing_date, end_billing_date, warehouse_id):
    self._oprot.writeMessageBegin('getOrdersByBillingDate', TMessageType.CALL, self._seqid)
    args = getOrdersByBillingDate_args()
    args.status = status
    args.start_billing_date = start_billing_date
    args.end_billing_date = end_billing_date
    args.warehouse_id = warehouse_id
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getOrdersByBillingDate(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getOrdersByBillingDate_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersByBillingDate failed: unknown result");

  def getOrdersByShippingDate(self, fromShippingDate, toShippingDate, providerId, warehouseId, cod):
    """
    Returns orders for a particular provider and warehouse which were shipped between the given dates.
    Returned orders comprise of COD orders if cod parameter is true. It comprises of prepaid orders otherwise.
    Pass providerId and warehouseId as -1 to ignore both these parameters.

    Parameters:
     - fromShippingDate
     - toShippingDate
     - providerId
     - warehouseId
     - cod
    """
    self.send_getOrdersByShippingDate(fromShippingDate, toShippingDate, providerId, warehouseId, cod)
    return self.recv_getOrdersByShippingDate()

  def send_getOrdersByShippingDate(self, fromShippingDate, toShippingDate, providerId, warehouseId, cod):
    self._oprot.writeMessageBegin('getOrdersByShippingDate', TMessageType.CALL, self._seqid)
    args = getOrdersByShippingDate_args()
    args.fromShippingDate = fromShippingDate
    args.toShippingDate = toShippingDate
    args.providerId = providerId
    args.warehouseId = warehouseId
    args.cod = cod
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getOrdersByShippingDate(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getOrdersByShippingDate_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersByShippingDate failed: unknown result");

  def getReturnableOrdersForCustomer(self, customer_id, limit):
    """
    Returns order ids for orders which can be returned

    Parameters:
     - customer_id
     - limit
    """
    self.send_getReturnableOrdersForCustomer(customer_id, limit)
    return self.recv_getReturnableOrdersForCustomer()

  def send_getReturnableOrdersForCustomer(self, customer_id, limit):
    self._oprot.writeMessageBegin('getReturnableOrdersForCustomer', TMessageType.CALL, self._seqid)
    args = getReturnableOrdersForCustomer_args()
    args.customer_id = customer_id
    args.limit = limit
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getReturnableOrdersForCustomer(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getReturnableOrdersForCustomer_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getReturnableOrdersForCustomer failed: unknown result");

  def getCancellableOrdersForCustomer(self, customer_id, limit):
    """
    Returns order ids for orders which can be cancelled

    Parameters:
     - customer_id
     - limit
    """
    self.send_getCancellableOrdersForCustomer(customer_id, limit)
    return self.recv_getCancellableOrdersForCustomer()

  def send_getCancellableOrdersForCustomer(self, customer_id, limit):
    self._oprot.writeMessageBegin('getCancellableOrdersForCustomer', TMessageType.CALL, self._seqid)
    args = getCancellableOrdersForCustomer_args()
    args.customer_id = customer_id
    args.limit = limit
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getCancellableOrdersForCustomer(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getCancellableOrdersForCustomer_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getCancellableOrdersForCustomer failed: unknown result");

  def changeOrderStatus(self, orderId, status, description):
    """
    Parameters:
     - orderId
     - status
     - description
    """
    self.send_changeOrderStatus(orderId, status, description)
    return self.recv_changeOrderStatus()

  def send_changeOrderStatus(self, orderId, status, description):
    self._oprot.writeMessageBegin('changeOrderStatus', TMessageType.CALL, self._seqid)
    args = changeOrderStatus_args()
    args.orderId = orderId
    args.status = status
    args.description = description
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_changeOrderStatus(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = changeOrderStatus_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "changeOrderStatus failed: unknown result");

  def getOrdersForTransaction(self, transactionId, customerId):
    """
    Returns list of orders for given transaction Id. Also filters based on customer Id so that
    only user who owns the transaction can view its order details.

    Parameters:
     - transactionId
     - customerId
    """
    self.send_getOrdersForTransaction(transactionId, customerId)
    return self.recv_getOrdersForTransaction()

  def send_getOrdersForTransaction(self, transactionId, customerId):
    self._oprot.writeMessageBegin('getOrdersForTransaction', TMessageType.CALL, self._seqid)
    args = getOrdersForTransaction_args()
    args.transactionId = transactionId
    args.customerId = customerId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getOrdersForTransaction(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getOrdersForTransaction_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForTransaction failed: unknown result");

  def getOrdersForCustomer(self, customerId, from_date, to_date, statuses):
    """
    Returns list of orders for the given customer created between the given dates and having the given statuses.
    Pass and empty list to ignore filtering on statuses.

    Parameters:
     - customerId
     - from_date
     - to_date
     - statuses
    """
    self.send_getOrdersForCustomer(customerId, from_date, to_date, statuses)
    return self.recv_getOrdersForCustomer()

  def send_getOrdersForCustomer(self, customerId, from_date, to_date, statuses):
    self._oprot.writeMessageBegin('getOrdersForCustomer', TMessageType.CALL, self._seqid)
    args = getOrdersForCustomer_args()
    args.customerId = customerId
    args.from_date = from_date
    args.to_date = to_date
    args.statuses = statuses
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getOrdersForCustomer(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getOrdersForCustomer_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForCustomer failed: unknown result");

  def createOrder(self, order):
    """
    Parameters:
     - order
    """
    self.send_createOrder(order)
    return self.recv_createOrder()

  def send_createOrder(self, order):
    self._oprot.writeMessageBegin('createOrder', TMessageType.CALL, self._seqid)
    args = createOrder_args()
    args.order = order
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_createOrder(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = createOrder_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createOrder failed: unknown result");

  def getOrder(self, id):
    """
    Parameters:
     - id
    """
    self.send_getOrder(id)
    return self.recv_getOrder()

  def send_getOrder(self, id):
    self._oprot.writeMessageBegin('getOrder', TMessageType.CALL, self._seqid)
    args = getOrder_args()
    args.id = id
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getOrder(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getOrder_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOrder failed: unknown result");

  def getLineItemsForOrder(self, orderId):
    """
    Parameters:
     - orderId
    """
    self.send_getLineItemsForOrder(orderId)
    return self.recv_getLineItemsForOrder()

  def send_getLineItemsForOrder(self, orderId):
    self._oprot.writeMessageBegin('getLineItemsForOrder', TMessageType.CALL, self._seqid)
    args = getLineItemsForOrder_args()
    args.orderId = orderId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getLineItemsForOrder(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getLineItemsForOrder_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getLineItemsForOrder failed: unknown result");

  def getOrderForCustomer(self, orderId, customerId):
    """
    Returns an order for the order Id. Also checks if the order belongs to the customer whose Id is passed.
    Throws exception if either order Id is invalid or order does not below to the customer whose Id is passed.

    Parameters:
     - orderId
     - customerId
    """
    self.send_getOrderForCustomer(orderId, customerId)
    return self.recv_getOrderForCustomer()

  def send_getOrderForCustomer(self, orderId, customerId):
    self._oprot.writeMessageBegin('getOrderForCustomer', TMessageType.CALL, self._seqid)
    args = getOrderForCustomer_args()
    args.orderId = orderId
    args.customerId = customerId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getOrderForCustomer(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getOrderForCustomer_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOrderForCustomer failed: unknown result");

  def getAlerts(self, orderId, valid):
    """
    Parameters:
     - orderId
     - valid
    """
    self.send_getAlerts(orderId, valid)
    return self.recv_getAlerts()

  def send_getAlerts(self, orderId, valid):
    self._oprot.writeMessageBegin('getAlerts', TMessageType.CALL, self._seqid)
    args = getAlerts_args()
    args.orderId = orderId
    args.valid = valid
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getAlerts(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getAlerts_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAlerts failed: unknown result");

  def setAlert(self, orderId, unset, type, comment):
    """
    Parameters:
     - orderId
     - unset
     - type
     - comment
    """
    self.send_setAlert(orderId, unset, type, comment)
    self.recv_setAlert()

  def send_setAlert(self, orderId, unset, type, comment):
    self._oprot.writeMessageBegin('setAlert', TMessageType.CALL, self._seqid)
    args = setAlert_args()
    args.orderId = orderId
    args.unset = unset
    args.type = type
    args.comment = comment
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_setAlert(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = setAlert_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    return

  def getValidOrderCount(self, ):
    """
    Return the number of valid orders. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
    """
    self.send_getValidOrderCount()
    return self.recv_getValidOrderCount()

  def send_getValidOrderCount(self, ):
    self._oprot.writeMessageBegin('getValidOrderCount', TMessageType.CALL, self._seqid)
    args = getValidOrderCount_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getValidOrderCount(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getValidOrderCount_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrderCount failed: unknown result");

  def getNoOfCustomersWithSuccessfulTransaction(self, ):
    """
    Returns the number of distinct customers who have done successful transactions
    """
    self.send_getNoOfCustomersWithSuccessfulTransaction()
    return self.recv_getNoOfCustomersWithSuccessfulTransaction()

  def send_getNoOfCustomersWithSuccessfulTransaction(self, ):
    self._oprot.writeMessageBegin('getNoOfCustomersWithSuccessfulTransaction', TMessageType.CALL, self._seqid)
    args = getNoOfCustomersWithSuccessfulTransaction_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getNoOfCustomersWithSuccessfulTransaction(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getNoOfCustomersWithSuccessfulTransaction_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getNoOfCustomersWithSuccessfulTransaction failed: unknown result");

  def getValidOrdersAmountRange(self, ):
    """
    Returns the minimum and maximum amounts of a valid order. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
    List contains two values, first minimum amount and second maximum amount.
    """
    self.send_getValidOrdersAmountRange()
    return self.recv_getValidOrdersAmountRange()

  def send_getValidOrdersAmountRange(self, ):
    self._oprot.writeMessageBegin('getValidOrdersAmountRange', TMessageType.CALL, self._seqid)
    args = getValidOrdersAmountRange_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getValidOrdersAmountRange(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getValidOrdersAmountRange_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrdersAmountRange failed: unknown result");

  def getValidOrders(self, limit):
    """
    Returns list of Orders in descending order by Order creation date. List is restricted to limit Orders.
    If limit is passed as 0, then all valid Orders are returned.

    Parameters:
     - limit
    """
    self.send_getValidOrders(limit)
    return self.recv_getValidOrders()

  def send_getValidOrders(self, limit):
    self._oprot.writeMessageBegin('getValidOrders', TMessageType.CALL, self._seqid)
    args = getValidOrders_args()
    args.limit = limit
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getValidOrders(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getValidOrders_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrders failed: unknown result");

  def batchOrders(self, warehouseId):
    """
    Create a batch of all the pending orders for the given warehouse.
    The returned list is orderd by created_timestamp.
    If there are no pending orders, an empty list is returned.

    Parameters:
     - warehouseId
    """
    self.send_batchOrders(warehouseId)
    return self.recv_batchOrders()

  def send_batchOrders(self, warehouseId):
    self._oprot.writeMessageBegin('batchOrders', TMessageType.CALL, self._seqid)
    args = batchOrders_args()
    args.warehouseId = warehouseId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_batchOrders(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = batchOrders_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "batchOrders failed: unknown result");

  def markOrderAsOutOfStock(self, orderId):
    """
    Mark the given order as out of stock. Throws an exception if the order with the given Id couldn't be found.

    Parameters:
     - orderId
    """
    self.send_markOrderAsOutOfStock(orderId)
    return self.recv_markOrderAsOutOfStock()

  def send_markOrderAsOutOfStock(self, orderId):
    self._oprot.writeMessageBegin('markOrderAsOutOfStock', TMessageType.CALL, self._seqid)
    args = markOrderAsOutOfStock_args()
    args.orderId = orderId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_markOrderAsOutOfStock(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = markOrderAsOutOfStock_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "markOrderAsOutOfStock failed: unknown result");

  def verifyOrder(self, orderId):
    """
    Marks the given order as SUBMITTED_FOR_PROCESSING and updates the verified
    timestamp. It is intended to be used for COD orders but can be harmlessly
    used for all other orders as well.
    Throws an exception if no such order exists.

    Parameters:
     - orderId
    """
    self.send_verifyOrder(orderId)
    return self.recv_verifyOrder()

  def send_verifyOrder(self, orderId):
    self._oprot.writeMessageBegin('verifyOrder', TMessageType.CALL, self._seqid)
    args = verifyOrder_args()
    args.orderId = orderId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_verifyOrder(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = verifyOrder_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "verifyOrder failed: unknown result");

  def acceptOrder(self, orderId):
    """
    Marks the given order as ACCEPTED and updates the accepted timestamp. If the
    given order is not a COD order, it also captures the payment if the same has
    not been captured.
    Throws an exception if no such order exists.

    Parameters:
     - orderId
    """
    self.send_acceptOrder(orderId)
    return self.recv_acceptOrder()

  def send_acceptOrder(self, orderId):
    self._oprot.writeMessageBegin('acceptOrder', TMessageType.CALL, self._seqid)
    args = acceptOrder_args()
    args.orderId = orderId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_acceptOrder(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = acceptOrder_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "acceptOrder failed: unknown result");

  def billOrder(self, orderId):
    """
    Parameters:
     - orderId
    """
    self.send_billOrder(orderId)
    return self.recv_billOrder()

  def send_billOrder(self, orderId):
    self._oprot.writeMessageBegin('billOrder', TMessageType.CALL, self._seqid)
    args = billOrder_args()
    args.orderId = orderId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_billOrder(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = billOrder_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "billOrder failed: unknown result");

  def addBillingDetails(self, orderId, invoice_number, billed_by):
    """
    Add billing details such as the bill number and the biller to the Order.
    Should be used when the bill is issued by a 3rd party and we've to feed
    the information into our system.

    Parameters:
     - orderId
     - invoice_number
     - billed_by
    """
    self.send_addBillingDetails(orderId, invoice_number, billed_by)
    return self.recv_addBillingDetails()

  def send_addBillingDetails(self, orderId, invoice_number, billed_by):
    self._oprot.writeMessageBegin('addBillingDetails', TMessageType.CALL, self._seqid)
    args = addBillingDetails_args()
    args.orderId = orderId
    args.invoice_number = invoice_number
    args.billed_by = billed_by
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_addBillingDetails(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = addBillingDetails_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addBillingDetails failed: unknown result");

  def addJacketNumber(self, orderId, jacketNumber, imeiNumber, itemNumber, billedBy, billingType):
    """
    Adds jacket number, item number and IMEI no. to the order. Doesn't update
    the IMEI no. if a -1 is supplied.
    Also, it generates an invoice number for the order, marks the order as
    BILLED and sets the billing timestamp.
    It should be used when we are billing the orders ourselves.

    Returns false if it doesn't find the order with the given ID.

    Parameters:
     - orderId
     - jacketNumber
     - imeiNumber
     - itemNumber
     - billedBy
     - billingType
    """
    self.send_addJacketNumber(orderId, jacketNumber, imeiNumber, itemNumber, billedBy, billingType)
    return self.recv_addJacketNumber()

  def send_addJacketNumber(self, orderId, jacketNumber, imeiNumber, itemNumber, billedBy, billingType):
    self._oprot.writeMessageBegin('addJacketNumber', TMessageType.CALL, self._seqid)
    args = addJacketNumber_args()
    args.orderId = orderId
    args.jacketNumber = jacketNumber
    args.imeiNumber = imeiNumber
    args.itemNumber = itemNumber
    args.billedBy = billedBy
    args.billingType = billingType
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_addJacketNumber(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = addJacketNumber_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addJacketNumber failed: unknown result");

  def markOrdersAsManifested(self, warehouseId, providerId, cod):
    """
    Depending on the third parameter, marks either all prepaid or all cod orders BILLED by the
    given warehouse and were picked up by the given provider as SHIPPED_FROM_WH.

    Parameters:
     - warehouseId
     - providerId
     - cod
    """
    self.send_markOrdersAsManifested(warehouseId, providerId, cod)
    return self.recv_markOrdersAsManifested()

  def send_markOrdersAsManifested(self, warehouseId, providerId, cod):
    self._oprot.writeMessageBegin('markOrdersAsManifested', TMessageType.CALL, self._seqid)
    args = markOrdersAsManifested_args()
    args.warehouseId = warehouseId
    args.providerId = providerId
    args.cod = cod
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_markOrdersAsManifested(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = markOrdersAsManifested_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsManifested failed: unknown result");

  def markOrdersAsPickedUp(self, providerId, pickupDetails):
    """
    Marks all SHIPPED_FROM_WH orders of the previous day for a provider as SHIPPED_TO_LOGISTICS.
    Returns a list of orders that were shipped from warehouse but did not appear in the pick-up report.
    Raises an exception if we encounter report for an AWB number that we did not ship.

    Parameters:
     - providerId
     - pickupDetails
    """
    self.send_markOrdersAsPickedUp(providerId, pickupDetails)
    return self.recv_markOrdersAsPickedUp()

  def send_markOrdersAsPickedUp(self, providerId, pickupDetails):
    self._oprot.writeMessageBegin('markOrdersAsPickedUp', TMessageType.CALL, self._seqid)
    args = markOrdersAsPickedUp_args()
    args.providerId = providerId
    args.pickupDetails = pickupDetails
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_markOrdersAsPickedUp(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = markOrdersAsPickedUp_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsPickedUp failed: unknown result");

  def markOrdersAsDelivered(self, providerId, deliveredOrders):
    """
    Marks all orders with AWBs in the given map as delivered. Also sets the delivery timestamp and
    the name of the receiver.
    Raises an exception if we encounter report for an AWB number that we did not ship.

    Parameters:
     - providerId
     - deliveredOrders
    """
    self.send_markOrdersAsDelivered(providerId, deliveredOrders)
    self.recv_markOrdersAsDelivered()

  def send_markOrdersAsDelivered(self, providerId, deliveredOrders):
    self._oprot.writeMessageBegin('markOrdersAsDelivered', TMessageType.CALL, self._seqid)
    args = markOrdersAsDelivered_args()
    args.providerId = providerId
    args.deliveredOrders = deliveredOrders
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_markOrdersAsDelivered(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = markOrdersAsDelivered_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.ex is not None:
      raise result.ex
    return

  def markOrdersAsFailed(self, providerId, returnedOrders):
    """
    Mark all orders with AWBs in the given map as failed. Also sets the delivery timestamp.
    Raises an exception if we encounter report for an AWB number that we did not ship.

    Parameters:
     - providerId
     - returnedOrders
    """
    self.send_markOrdersAsFailed(providerId, returnedOrders)
    self.recv_markOrdersAsFailed()

  def send_markOrdersAsFailed(self, providerId, returnedOrders):
    self._oprot.writeMessageBegin('markOrdersAsFailed', TMessageType.CALL, self._seqid)
    args = markOrdersAsFailed_args()
    args.providerId = providerId
    args.returnedOrders = returnedOrders
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_markOrdersAsFailed(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = markOrdersAsFailed_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.ex is not None:
      raise result.ex
    return

  def updateNonDeliveryReason(self, providerId, undeliveredOrders):
    """
    Update the status description of orders whose AWB numbers are keys of the Map.

    Parameters:
     - providerId
     - undeliveredOrders
    """
    self.send_updateNonDeliveryReason(providerId, undeliveredOrders)
    self.recv_updateNonDeliveryReason()

  def send_updateNonDeliveryReason(self, providerId, undeliveredOrders):
    self._oprot.writeMessageBegin('updateNonDeliveryReason', TMessageType.CALL, self._seqid)
    args = updateNonDeliveryReason_args()
    args.providerId = providerId
    args.undeliveredOrders = undeliveredOrders
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_updateNonDeliveryReason(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = updateNonDeliveryReason_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.ex is not None:
      raise result.ex
    return

  def getUndeliveredOrders(self, providerId, warehouseId):
    """
    Returns the list of orders whose delivery time has passed but have not been
    delivered yet for the given provider and warehouse. To get a complete list of
    undelivered orders, pass them as -1.
    Returns an empty list if no such orders exist.

    Parameters:
     - providerId
     - warehouseId
    """
    self.send_getUndeliveredOrders(providerId, warehouseId)
    return self.recv_getUndeliveredOrders()

  def send_getUndeliveredOrders(self, providerId, warehouseId):
    self._oprot.writeMessageBegin('getUndeliveredOrders', TMessageType.CALL, self._seqid)
    args = getUndeliveredOrders_args()
    args.providerId = providerId
    args.warehouseId = warehouseId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getUndeliveredOrders(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getUndeliveredOrders_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getUndeliveredOrders failed: unknown result");

  def toggleDOAFlag(self, orderId):
    """
    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.
    Returns the final flag status.
    Throws an exception if the order with the given id couldn't be found or if the order status is not DELVIERY_SUCCESS.

    Parameters:
     - orderId
    """
    self.send_toggleDOAFlag(orderId)
    return self.recv_toggleDOAFlag()

  def send_toggleDOAFlag(self, orderId):
    self._oprot.writeMessageBegin('toggleDOAFlag', TMessageType.CALL, self._seqid)
    args = toggleDOAFlag_args()
    args.orderId = orderId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_toggleDOAFlag(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = toggleDOAFlag_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "toggleDOAFlag failed: unknown result");

  def requestPickupNumber(self, orderId):
    """
    Sends out an email to the account manager of the original courier provider used to ship the order.
    If the order status was DELIVERY_SUCCESS, it is changed to be DOA_PICKUP_REQUESTED.
    If the order status was DOA_PICKUP_REQUESTED, it is left unchanged.
    For any other status, it returns false.
    Throws an exception if the order with the given id couldn't be found.

    Parameters:
     - orderId
    """
    self.send_requestPickupNumber(orderId)
    return self.recv_requestPickupNumber()

  def send_requestPickupNumber(self, orderId):
    self._oprot.writeMessageBegin('requestPickupNumber', TMessageType.CALL, self._seqid)
    args = requestPickupNumber_args()
    args.orderId = orderId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_requestPickupNumber(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = requestPickupNumber_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "requestPickupNumber failed: unknown result");

  def authorizePickup(self, orderId, pickupNumber):
    """
    If the order status is DOA_PICKUP_REQUESTED, it does the following
        1. Sends out an email to the customer with the dispatch advice that he has to print as an attachment.
        2. Changes order status to be DOA_PICKUP_AUTHORIZED.
        3. Returns true
    If the order is in any other status, it returns false.
    Throws an exception if the order with the given id couldn't be found.

    Parameters:
     - orderId
     - pickupNumber
    """
    self.send_authorizePickup(orderId, pickupNumber)
    return self.recv_authorizePickup()

  def send_authorizePickup(self, orderId, pickupNumber):
    self._oprot.writeMessageBegin('authorizePickup', TMessageType.CALL, self._seqid)
    args = authorizePickup_args()
    args.orderId = orderId
    args.pickupNumber = pickupNumber
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_authorizePickup(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = authorizePickup_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "authorizePickup failed: unknown result");

  def markDoasAsPickedUp(self, providerId, pickupDetails):
    """
    Marks all DOA_PICKUP_AUTHORIZED orders of the previous day for a provider as DOA_RETURN_IN_TRANSIT.
    Returns a list of orders that were authorized for pickup but did not appear in the pick-up report.

    Parameters:
     - providerId
     - pickupDetails
    """
    self.send_markDoasAsPickedUp(providerId, pickupDetails)
    return self.recv_markDoasAsPickedUp()

  def send_markDoasAsPickedUp(self, providerId, pickupDetails):
    self._oprot.writeMessageBegin('markDoasAsPickedUp', TMessageType.CALL, self._seqid)
    args = markDoasAsPickedUp_args()
    args.providerId = providerId
    args.pickupDetails = pickupDetails
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_markDoasAsPickedUp(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = markDoasAsPickedUp_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    raise TApplicationException(TApplicationException.MISSING_RESULT, "markDoasAsPickedUp failed: unknown result");

  def receiveReturn(self, orderId):
    """
    If the order status is DOA_RETURN_AUTHORIZED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED and returns true.
    If the order status is SALES_RETURN_IN_TRANSIT, marks the order status as SALES_RET_RECEIVED and returns true.
    If the order is in any other state, it returns false.
    Throws an exception if the order with the given id couldn't be found.

    Parameters:
     - orderId
    """
    self.send_receiveReturn(orderId)
    return self.recv_receiveReturn()

  def send_receiveReturn(self, orderId):
    self._oprot.writeMessageBegin('receiveReturn', TMessageType.CALL, self._seqid)
    args = receiveReturn_args()
    args.orderId = orderId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_receiveReturn(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = receiveReturn_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "receiveReturn failed: unknown result");

  def validateDoa(self, orderId, isValid):
    """
    Used to validate the DOA certificate for an order in the DOA_RECEIVED state. If the certificate is valid,
    the order state is changed to DOA_CERT_VALID. If the certificate is invalid, the order state is changed to DOA_CERT_INVALID.
    If the order is in any other state, it returns false.
    Throws an exception if the order with the given id couldn't be found.

    Parameters:
     - orderId
     - isValid
    """
    self.send_validateDoa(orderId, isValid)
    return self.recv_validateDoa()

  def send_validateDoa(self, orderId, isValid):
    self._oprot.writeMessageBegin('validateDoa', TMessageType.CALL, self._seqid)
    args = validateDoa_args()
    args.orderId = orderId
    args.isValid = isValid
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_validateDoa(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = validateDoa_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "validateDoa failed: unknown result");

  def reshipOrder(self, orderId):
    """
    If the order is in SALES_RET_RECEIVED or DOA_CERT_INVALID state, it does the following:
        1. Creates a new order for processing in the BILLED state. All billing information is saved.
        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.
        
    If the order is in DOA_CERT_VALID state, it does the following:
        1. Creates a new order for processing in the SUBMITTED_FOR_PROCESSING state.
        2. Creates a return order for the warehouse executive to return the DOA material.
        3. Marks the current order as the final DOA_RESHIPPED state.

    Returns the id of the newly created order.

    Throws an exception if the order with the given id couldn't be found.

    Parameters:
     - orderId
    """
    self.send_reshipOrder(orderId)
    return self.recv_reshipOrder()

  def send_reshipOrder(self, orderId):
    self._oprot.writeMessageBegin('reshipOrder', TMessageType.CALL, self._seqid)
    args = reshipOrder_args()
    args.orderId = orderId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_reshipOrder(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = reshipOrder_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "reshipOrder failed: unknown result");

  def refundOrder(self, orderId, refundedBy, reason):
    """
    If the order is in SALES_RET_RECEIVED, DOA_CERT_VALID or DOA_CERT_INVALID state, it does the following:
        1. Creates a refund request for batch processing.
        2. Creates a return order for the warehouse executive to return the shipped material.
        3. Marks the current order as SALES_RET_REFUNDED, DOA_VALID_REFUNDED or DOA_INVALID_REFUNDED final states.

    If the order is in SUBMITTED_FOR_PROCESSING or INVENTORY_LOW state, it does the following:
        1. Creates a refund request for batch processing.
        2. Cancels the reservation of the item in the warehouse.
        3. Marks the current order as the REFUNDED final state.

    For all COD orders, if the order is in INIT, SUBMITTED_FOR_PROCESSING or INVENTORY_LOW state, it does the following:
        1. Cancels the reservation of the item in the warehouse.
        2. Marks the current order as CANCELED.
        
    In all cases, it updates the reason for cancellation or refund and the person who performed the action.
     
    Returns True if it is successful, False otherwise.

    Throws an exception if the order with the given id couldn't be found.

    Parameters:
     - orderId
     - refundedBy
     - reason
    """
    self.send_refundOrder(orderId, refundedBy, reason)
    return self.recv_refundOrder()

  def send_refundOrder(self, orderId, refundedBy, reason):
    self._oprot.writeMessageBegin('refundOrder', TMessageType.CALL, self._seqid)
    args = refundOrder_args()
    args.orderId = orderId
    args.refundedBy = refundedBy
    args.reason = reason
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_refundOrder(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = refundOrder_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "refundOrder failed: unknown result");

  def getReturnOrders(self, warehouseId, fromDate, toDate):
    """
    Get all return orders created between the from and to dates for the given warehouse.
    Ignores the warehouse if it is passed as -1.

    Parameters:
     - warehouseId
     - fromDate
     - toDate
    """
    self.send_getReturnOrders(warehouseId, fromDate, toDate)
    return self.recv_getReturnOrders()

  def send_getReturnOrders(self, warehouseId, fromDate, toDate):
    self._oprot.writeMessageBegin('getReturnOrders', TMessageType.CALL, self._seqid)
    args = getReturnOrders_args()
    args.warehouseId = warehouseId
    args.fromDate = fromDate
    args.toDate = toDate
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getReturnOrders(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getReturnOrders_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getReturnOrders failed: unknown result");

  def getReturnOrder(self, id):
    """
    Returns the ReturnOrder corresponding to the given id.
    Throws an exception if the return order with the given id couldn't be found.

    Parameters:
     - id
    """
    self.send_getReturnOrder(id)
    return self.recv_getReturnOrder()

  def send_getReturnOrder(self, id):
    self._oprot.writeMessageBegin('getReturnOrder', TMessageType.CALL, self._seqid)
    args = getReturnOrder_args()
    args.id = id
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getReturnOrder(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getReturnOrder_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getReturnOrder failed: unknown result");

  def processReturn(self, returnOrderId):
    """
    Marks the return order with the given id as processed. Raises an exception if no such return order exists.

    Parameters:
     - returnOrderId
    """
    self.send_processReturn(returnOrderId)
    self.recv_processReturn()

  def send_processReturn(self, returnOrderId):
    self._oprot.writeMessageBegin('processReturn', TMessageType.CALL, self._seqid)
    args = processReturn_args()
    args.returnOrderId = returnOrderId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_processReturn(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = processReturn_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.ex is not None:
      raise result.ex
    return

  def createPurchaseOrder(self, warehouseId):
    """
    Creates a purchase order corresponding to all the pending orders of the given warehouse.
    Returns the PO no. of the newly created purchase order. Returns -1 no new purchase order had to be created.

    Parameters:
     - warehouseId
    """
    self.send_createPurchaseOrder(warehouseId)
    return self.recv_createPurchaseOrder()

  def send_createPurchaseOrder(self, warehouseId):
    self._oprot.writeMessageBegin('createPurchaseOrder', TMessageType.CALL, self._seqid)
    args = createPurchaseOrder_args()
    args.warehouseId = warehouseId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_createPurchaseOrder(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = createPurchaseOrder_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createPurchaseOrder failed: unknown result");

  def updateWeight(self, orderId, weight):
    """
    Set the weight of the given order to the provided value. Will attempt to update the weight of the item in the catalog as well.

    Parameters:
     - orderId
     - weight
    """
    self.send_updateWeight(orderId, weight)
    return self.recv_updateWeight()

  def send_updateWeight(self, orderId, weight):
    self._oprot.writeMessageBegin('updateWeight', TMessageType.CALL, self._seqid)
    args = updateWeight_args()
    args.orderId = orderId
    args.weight = weight
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_updateWeight(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = updateWeight_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updateWeight failed: unknown result");

  def changeItem(self, orderId, itemId):
    """
    Change the item to be shipped for this order. Also adjusts the reservation in the inventory accordingly.
    Currently, it also ensures that only a different color of the given item is shipped.

    Parameters:
     - orderId
     - itemId
    """
    self.send_changeItem(orderId, itemId)
    return self.recv_changeItem()

  def send_changeItem(self, orderId, itemId):
    self._oprot.writeMessageBegin('changeItem', TMessageType.CALL, self._seqid)
    args = changeItem_args()
    args.orderId = orderId
    args.itemId = itemId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_changeItem(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = changeItem_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "changeItem failed: unknown result");

  def shiftToWarehouse(self, orderId, warehouseId):
    """
    Moves the given order to the given warehouse. Also adjusts the inventory reservations accordingly.

    Parameters:
     - orderId
     - warehouseId
    """
    self.send_shiftToWarehouse(orderId, warehouseId)
    return self.recv_shiftToWarehouse()

  def send_shiftToWarehouse(self, orderId, warehouseId):
    self._oprot.writeMessageBegin('shiftToWarehouse', TMessageType.CALL, self._seqid)
    args = shiftToWarehouse_args()
    args.orderId = orderId
    args.warehouseId = warehouseId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_shiftToWarehouse(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = shiftToWarehouse_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "shiftToWarehouse failed: unknown result");

  def addDelayReason(self, orderId, delayReason):
    """
    Adds the given delay reason to the given order.
    Raises an exception if no order with the given id can be found.

    Parameters:
     - orderId
     - delayReason
    """
    self.send_addDelayReason(orderId, delayReason)
    return self.recv_addDelayReason()

  def send_addDelayReason(self, orderId, delayReason):
    self._oprot.writeMessageBegin('addDelayReason', TMessageType.CALL, self._seqid)
    args = addDelayReason_args()
    args.orderId = orderId
    args.delayReason = delayReason
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_addDelayReason(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = addDelayReason_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.ex is not None:
      raise result.ex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addDelayReason failed: unknown result");


class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
  def __init__(self, handler):
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
    self._processMap["createTransaction"] = Processor.process_createTransaction
    self._processMap["getTransaction"] = Processor.process_getTransaction
    self._processMap["getTransactionsForCustomer"] = Processor.process_getTransactionsForCustomer
    self._processMap["getTransactionsForShoppingCartId"] = Processor.process_getTransactionsForShoppingCartId
    self._processMap["getTransactionStatus"] = Processor.process_getTransactionStatus
    self._processMap["changeTransactionStatus"] = Processor.process_changeTransactionStatus
    self._processMap["enqueueTransactionInfoEmail"] = Processor.process_enqueueTransactionInfoEmail
    self._processMap["getAllOrders"] = Processor.process_getAllOrders
    self._processMap["getOrdersByBillingDate"] = Processor.process_getOrdersByBillingDate
    self._processMap["getOrdersByShippingDate"] = Processor.process_getOrdersByShippingDate
    self._processMap["getReturnableOrdersForCustomer"] = Processor.process_getReturnableOrdersForCustomer
    self._processMap["getCancellableOrdersForCustomer"] = Processor.process_getCancellableOrdersForCustomer
    self._processMap["changeOrderStatus"] = Processor.process_changeOrderStatus
    self._processMap["getOrdersForTransaction"] = Processor.process_getOrdersForTransaction
    self._processMap["getOrdersForCustomer"] = Processor.process_getOrdersForCustomer
    self._processMap["createOrder"] = Processor.process_createOrder
    self._processMap["getOrder"] = Processor.process_getOrder
    self._processMap["getLineItemsForOrder"] = Processor.process_getLineItemsForOrder
    self._processMap["getOrderForCustomer"] = Processor.process_getOrderForCustomer
    self._processMap["getAlerts"] = Processor.process_getAlerts
    self._processMap["setAlert"] = Processor.process_setAlert
    self._processMap["getValidOrderCount"] = Processor.process_getValidOrderCount
    self._processMap["getNoOfCustomersWithSuccessfulTransaction"] = Processor.process_getNoOfCustomersWithSuccessfulTransaction
    self._processMap["getValidOrdersAmountRange"] = Processor.process_getValidOrdersAmountRange
    self._processMap["getValidOrders"] = Processor.process_getValidOrders
    self._processMap["batchOrders"] = Processor.process_batchOrders
    self._processMap["markOrderAsOutOfStock"] = Processor.process_markOrderAsOutOfStock
    self._processMap["verifyOrder"] = Processor.process_verifyOrder
    self._processMap["acceptOrder"] = Processor.process_acceptOrder
    self._processMap["billOrder"] = Processor.process_billOrder
    self._processMap["addBillingDetails"] = Processor.process_addBillingDetails
    self._processMap["addJacketNumber"] = Processor.process_addJacketNumber
    self._processMap["markOrdersAsManifested"] = Processor.process_markOrdersAsManifested
    self._processMap["markOrdersAsPickedUp"] = Processor.process_markOrdersAsPickedUp
    self._processMap["markOrdersAsDelivered"] = Processor.process_markOrdersAsDelivered
    self._processMap["markOrdersAsFailed"] = Processor.process_markOrdersAsFailed
    self._processMap["updateNonDeliveryReason"] = Processor.process_updateNonDeliveryReason
    self._processMap["getUndeliveredOrders"] = Processor.process_getUndeliveredOrders
    self._processMap["toggleDOAFlag"] = Processor.process_toggleDOAFlag
    self._processMap["requestPickupNumber"] = Processor.process_requestPickupNumber
    self._processMap["authorizePickup"] = Processor.process_authorizePickup
    self._processMap["markDoasAsPickedUp"] = Processor.process_markDoasAsPickedUp
    self._processMap["receiveReturn"] = Processor.process_receiveReturn
    self._processMap["validateDoa"] = Processor.process_validateDoa
    self._processMap["reshipOrder"] = Processor.process_reshipOrder
    self._processMap["refundOrder"] = Processor.process_refundOrder
    self._processMap["getReturnOrders"] = Processor.process_getReturnOrders
    self._processMap["getReturnOrder"] = Processor.process_getReturnOrder
    self._processMap["processReturn"] = Processor.process_processReturn
    self._processMap["createPurchaseOrder"] = Processor.process_createPurchaseOrder
    self._processMap["updateWeight"] = Processor.process_updateWeight
    self._processMap["changeItem"] = Processor.process_changeItem
    self._processMap["shiftToWarehouse"] = Processor.process_shiftToWarehouse
    self._processMap["addDelayReason"] = Processor.process_addDelayReason

  def process(self, iprot, oprot):
    (name, type, seqid) = iprot.readMessageBegin()
    if name not in self._processMap:
      iprot.skip(TType.STRUCT)
      iprot.readMessageEnd()
      x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
      oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
      x.write(oprot)
      oprot.writeMessageEnd()
      oprot.trans.flush()
      return
    else:
      self._processMap[name](self, seqid, iprot, oprot)
    return True

  def process_createTransaction(self, seqid, iprot, oprot):
    args = createTransaction_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = createTransaction_result()
    try:
      result.success = self._handler.createTransaction(args.transaction)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("createTransaction", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getTransaction(self, seqid, iprot, oprot):
    args = getTransaction_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getTransaction_result()
    try:
      result.success = self._handler.getTransaction(args.id)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("getTransaction", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getTransactionsForCustomer(self, seqid, iprot, oprot):
    args = getTransactionsForCustomer_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getTransactionsForCustomer_result()
    try:
      result.success = self._handler.getTransactionsForCustomer(args.customerId, args.from_date, args.to_date, args.status)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("getTransactionsForCustomer", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getTransactionsForShoppingCartId(self, seqid, iprot, oprot):
    args = getTransactionsForShoppingCartId_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getTransactionsForShoppingCartId_result()
    try:
      result.success = self._handler.getTransactionsForShoppingCartId(args.shoppingCartId)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("getTransactionsForShoppingCartId", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getTransactionStatus(self, seqid, iprot, oprot):
    args = getTransactionStatus_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getTransactionStatus_result()
    try:
      result.success = self._handler.getTransactionStatus(args.transactionId)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("getTransactionStatus", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_changeTransactionStatus(self, seqid, iprot, oprot):
    args = changeTransactionStatus_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = changeTransactionStatus_result()
    try:
      result.success = self._handler.changeTransactionStatus(args.transactionId, args.status, args.description)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("changeTransactionStatus", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_enqueueTransactionInfoEmail(self, seqid, iprot, oprot):
    args = enqueueTransactionInfoEmail_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = enqueueTransactionInfoEmail_result()
    try:
      result.success = self._handler.enqueueTransactionInfoEmail(args.transactionId)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("enqueueTransactionInfoEmail", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getAllOrders(self, seqid, iprot, oprot):
    args = getAllOrders_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getAllOrders_result()
    try:
      result.success = self._handler.getAllOrders(args.status, args.from_date, args.to_date, args.warehouse_id)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("getAllOrders", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getOrdersByBillingDate(self, seqid, iprot, oprot):
    args = getOrdersByBillingDate_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getOrdersByBillingDate_result()
    try:
      result.success = self._handler.getOrdersByBillingDate(args.status, args.start_billing_date, args.end_billing_date, args.warehouse_id)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("getOrdersByBillingDate", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getOrdersByShippingDate(self, seqid, iprot, oprot):
    args = getOrdersByShippingDate_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getOrdersByShippingDate_result()
    try:
      result.success = self._handler.getOrdersByShippingDate(args.fromShippingDate, args.toShippingDate, args.providerId, args.warehouseId, args.cod)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("getOrdersByShippingDate", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getReturnableOrdersForCustomer(self, seqid, iprot, oprot):
    args = getReturnableOrdersForCustomer_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getReturnableOrdersForCustomer_result()
    try:
      result.success = self._handler.getReturnableOrdersForCustomer(args.customer_id, args.limit)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("getReturnableOrdersForCustomer", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getCancellableOrdersForCustomer(self, seqid, iprot, oprot):
    args = getCancellableOrdersForCustomer_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getCancellableOrdersForCustomer_result()
    try:
      result.success = self._handler.getCancellableOrdersForCustomer(args.customer_id, args.limit)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("getCancellableOrdersForCustomer", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_changeOrderStatus(self, seqid, iprot, oprot):
    args = changeOrderStatus_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = changeOrderStatus_result()
    try:
      result.success = self._handler.changeOrderStatus(args.orderId, args.status, args.description)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("changeOrderStatus", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getOrdersForTransaction(self, seqid, iprot, oprot):
    args = getOrdersForTransaction_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getOrdersForTransaction_result()
    try:
      result.success = self._handler.getOrdersForTransaction(args.transactionId, args.customerId)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("getOrdersForTransaction", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getOrdersForCustomer(self, seqid, iprot, oprot):
    args = getOrdersForCustomer_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getOrdersForCustomer_result()
    try:
      result.success = self._handler.getOrdersForCustomer(args.customerId, args.from_date, args.to_date, args.statuses)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("getOrdersForCustomer", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_createOrder(self, seqid, iprot, oprot):
    args = createOrder_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = createOrder_result()
    try:
      result.success = self._handler.createOrder(args.order)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("createOrder", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getOrder(self, seqid, iprot, oprot):
    args = getOrder_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getOrder_result()
    try:
      result.success = self._handler.getOrder(args.id)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("getOrder", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getLineItemsForOrder(self, seqid, iprot, oprot):
    args = getLineItemsForOrder_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getLineItemsForOrder_result()
    try:
      result.success = self._handler.getLineItemsForOrder(args.orderId)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("getLineItemsForOrder", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getOrderForCustomer(self, seqid, iprot, oprot):
    args = getOrderForCustomer_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getOrderForCustomer_result()
    try:
      result.success = self._handler.getOrderForCustomer(args.orderId, args.customerId)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("getOrderForCustomer", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getAlerts(self, seqid, iprot, oprot):
    args = getAlerts_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getAlerts_result()
    result.success = self._handler.getAlerts(args.orderId, args.valid)
    oprot.writeMessageBegin("getAlerts", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_setAlert(self, seqid, iprot, oprot):
    args = setAlert_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = setAlert_result()
    self._handler.setAlert(args.orderId, args.unset, args.type, args.comment)
    oprot.writeMessageBegin("setAlert", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getValidOrderCount(self, seqid, iprot, oprot):
    args = getValidOrderCount_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getValidOrderCount_result()
    result.success = self._handler.getValidOrderCount()
    oprot.writeMessageBegin("getValidOrderCount", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getNoOfCustomersWithSuccessfulTransaction(self, seqid, iprot, oprot):
    args = getNoOfCustomersWithSuccessfulTransaction_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getNoOfCustomersWithSuccessfulTransaction_result()
    result.success = self._handler.getNoOfCustomersWithSuccessfulTransaction()
    oprot.writeMessageBegin("getNoOfCustomersWithSuccessfulTransaction", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getValidOrdersAmountRange(self, seqid, iprot, oprot):
    args = getValidOrdersAmountRange_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getValidOrdersAmountRange_result()
    result.success = self._handler.getValidOrdersAmountRange()
    oprot.writeMessageBegin("getValidOrdersAmountRange", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getValidOrders(self, seqid, iprot, oprot):
    args = getValidOrders_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getValidOrders_result()
    result.success = self._handler.getValidOrders(args.limit)
    oprot.writeMessageBegin("getValidOrders", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_batchOrders(self, seqid, iprot, oprot):
    args = batchOrders_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = batchOrders_result()
    try:
      result.success = self._handler.batchOrders(args.warehouseId)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("batchOrders", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_markOrderAsOutOfStock(self, seqid, iprot, oprot):
    args = markOrderAsOutOfStock_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = markOrderAsOutOfStock_result()
    try:
      result.success = self._handler.markOrderAsOutOfStock(args.orderId)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("markOrderAsOutOfStock", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_verifyOrder(self, seqid, iprot, oprot):
    args = verifyOrder_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = verifyOrder_result()
    try:
      result.success = self._handler.verifyOrder(args.orderId)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("verifyOrder", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_acceptOrder(self, seqid, iprot, oprot):
    args = acceptOrder_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = acceptOrder_result()
    try:
      result.success = self._handler.acceptOrder(args.orderId)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("acceptOrder", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_billOrder(self, seqid, iprot, oprot):
    args = billOrder_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = billOrder_result()
    try:
      result.success = self._handler.billOrder(args.orderId)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("billOrder", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_addBillingDetails(self, seqid, iprot, oprot):
    args = addBillingDetails_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = addBillingDetails_result()
    try:
      result.success = self._handler.addBillingDetails(args.orderId, args.invoice_number, args.billed_by)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("addBillingDetails", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_addJacketNumber(self, seqid, iprot, oprot):
    args = addJacketNumber_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = addJacketNumber_result()
    try:
      result.success = self._handler.addJacketNumber(args.orderId, args.jacketNumber, args.imeiNumber, args.itemNumber, args.billedBy, args.billingType)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("addJacketNumber", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_markOrdersAsManifested(self, seqid, iprot, oprot):
    args = markOrdersAsManifested_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = markOrdersAsManifested_result()
    try:
      result.success = self._handler.markOrdersAsManifested(args.warehouseId, args.providerId, args.cod)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("markOrdersAsManifested", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_markOrdersAsPickedUp(self, seqid, iprot, oprot):
    args = markOrdersAsPickedUp_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = markOrdersAsPickedUp_result()
    try:
      result.success = self._handler.markOrdersAsPickedUp(args.providerId, args.pickupDetails)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("markOrdersAsPickedUp", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_markOrdersAsDelivered(self, seqid, iprot, oprot):
    args = markOrdersAsDelivered_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = markOrdersAsDelivered_result()
    try:
      self._handler.markOrdersAsDelivered(args.providerId, args.deliveredOrders)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("markOrdersAsDelivered", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_markOrdersAsFailed(self, seqid, iprot, oprot):
    args = markOrdersAsFailed_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = markOrdersAsFailed_result()
    try:
      self._handler.markOrdersAsFailed(args.providerId, args.returnedOrders)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("markOrdersAsFailed", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_updateNonDeliveryReason(self, seqid, iprot, oprot):
    args = updateNonDeliveryReason_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = updateNonDeliveryReason_result()
    try:
      self._handler.updateNonDeliveryReason(args.providerId, args.undeliveredOrders)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("updateNonDeliveryReason", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getUndeliveredOrders(self, seqid, iprot, oprot):
    args = getUndeliveredOrders_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getUndeliveredOrders_result()
    result.success = self._handler.getUndeliveredOrders(args.providerId, args.warehouseId)
    oprot.writeMessageBegin("getUndeliveredOrders", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_toggleDOAFlag(self, seqid, iprot, oprot):
    args = toggleDOAFlag_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = toggleDOAFlag_result()
    try:
      result.success = self._handler.toggleDOAFlag(args.orderId)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("toggleDOAFlag", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_requestPickupNumber(self, seqid, iprot, oprot):
    args = requestPickupNumber_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = requestPickupNumber_result()
    try:
      result.success = self._handler.requestPickupNumber(args.orderId)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("requestPickupNumber", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_authorizePickup(self, seqid, iprot, oprot):
    args = authorizePickup_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = authorizePickup_result()
    try:
      result.success = self._handler.authorizePickup(args.orderId, args.pickupNumber)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("authorizePickup", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_markDoasAsPickedUp(self, seqid, iprot, oprot):
    args = markDoasAsPickedUp_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = markDoasAsPickedUp_result()
    result.success = self._handler.markDoasAsPickedUp(args.providerId, args.pickupDetails)
    oprot.writeMessageBegin("markDoasAsPickedUp", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_receiveReturn(self, seqid, iprot, oprot):
    args = receiveReturn_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = receiveReturn_result()
    try:
      result.success = self._handler.receiveReturn(args.orderId)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("receiveReturn", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_validateDoa(self, seqid, iprot, oprot):
    args = validateDoa_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = validateDoa_result()
    try:
      result.success = self._handler.validateDoa(args.orderId, args.isValid)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("validateDoa", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_reshipOrder(self, seqid, iprot, oprot):
    args = reshipOrder_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = reshipOrder_result()
    try:
      result.success = self._handler.reshipOrder(args.orderId)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("reshipOrder", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_refundOrder(self, seqid, iprot, oprot):
    args = refundOrder_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = refundOrder_result()
    try:
      result.success = self._handler.refundOrder(args.orderId, args.refundedBy, args.reason)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("refundOrder", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getReturnOrders(self, seqid, iprot, oprot):
    args = getReturnOrders_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getReturnOrders_result()
    result.success = self._handler.getReturnOrders(args.warehouseId, args.fromDate, args.toDate)
    oprot.writeMessageBegin("getReturnOrders", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getReturnOrder(self, seqid, iprot, oprot):
    args = getReturnOrder_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getReturnOrder_result()
    try:
      result.success = self._handler.getReturnOrder(args.id)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("getReturnOrder", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_processReturn(self, seqid, iprot, oprot):
    args = processReturn_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = processReturn_result()
    try:
      self._handler.processReturn(args.returnOrderId)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("processReturn", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_createPurchaseOrder(self, seqid, iprot, oprot):
    args = createPurchaseOrder_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = createPurchaseOrder_result()
    try:
      result.success = self._handler.createPurchaseOrder(args.warehouseId)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("createPurchaseOrder", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_updateWeight(self, seqid, iprot, oprot):
    args = updateWeight_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = updateWeight_result()
    try:
      result.success = self._handler.updateWeight(args.orderId, args.weight)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("updateWeight", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_changeItem(self, seqid, iprot, oprot):
    args = changeItem_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = changeItem_result()
    try:
      result.success = self._handler.changeItem(args.orderId, args.itemId)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("changeItem", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_shiftToWarehouse(self, seqid, iprot, oprot):
    args = shiftToWarehouse_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = shiftToWarehouse_result()
    try:
      result.success = self._handler.shiftToWarehouse(args.orderId, args.warehouseId)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("shiftToWarehouse", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_addDelayReason(self, seqid, iprot, oprot):
    args = addDelayReason_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = addDelayReason_result()
    try:
      result.success = self._handler.addDelayReason(args.orderId, args.delayReason)
    except TransactionServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("addDelayReason", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()


# HELPER FUNCTIONS AND STRUCTURES

class createTransaction_args:
  """
  Attributes:
   - transaction
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'transaction', (Transaction, Transaction.thrift_spec), None, ), # 1
  )

  def __init__(self, transaction=None,):
    self.transaction = transaction

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.STRUCT:
          self.transaction = Transaction()
          self.transaction.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('createTransaction_args')
    if self.transaction is not None:
      oprot.writeFieldBegin('transaction', TType.STRUCT, 1)
      self.transaction.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class createTransaction_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.I64, 'success', None, None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.I64:
          self.success = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('createTransaction_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.I64, 0)
      oprot.writeI64(self.success)
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getTransaction_args:
  """
  Attributes:
   - id
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, None, ), # 1
  )

  def __init__(self, id=None,):
    self.id = id

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.id = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getTransaction_args')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getTransaction_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.STRUCT, 'success', (Transaction, Transaction.thrift_spec), None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.STRUCT:
          self.success = Transaction()
          self.success.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getTransaction_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
      self.success.write(oprot)
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getTransactionsForCustomer_args:
  """
  Attributes:
   - customerId
   - from_date
   - to_date
   - status
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'customerId', None, None, ), # 1
    (2, TType.I64, 'from_date', None, None, ), # 2
    (3, TType.I64, 'to_date', None, None, ), # 3
    (4, TType.I32, 'status', None, None, ), # 4
  )

  def __init__(self, customerId=None, from_date=None, to_date=None, status=None,):
    self.customerId = customerId
    self.from_date = from_date
    self.to_date = to_date
    self.status = status

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.customerId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.from_date = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.to_date = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I32:
          self.status = iprot.readI32();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getTransactionsForCustomer_args')
    if self.customerId is not None:
      oprot.writeFieldBegin('customerId', TType.I64, 1)
      oprot.writeI64(self.customerId)
      oprot.writeFieldEnd()
    if self.from_date is not None:
      oprot.writeFieldBegin('from_date', TType.I64, 2)
      oprot.writeI64(self.from_date)
      oprot.writeFieldEnd()
    if self.to_date is not None:
      oprot.writeFieldBegin('to_date', TType.I64, 3)
      oprot.writeI64(self.to_date)
      oprot.writeFieldEnd()
    if self.status is not None:
      oprot.writeFieldBegin('status', TType.I32, 4)
      oprot.writeI32(self.status)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getTransactionsForCustomer_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(Transaction, Transaction.thrift_spec)), None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype17, _size14) = iprot.readListBegin()
          for _i18 in xrange(_size14):
            _elem19 = Transaction()
            _elem19.read(iprot)
            self.success.append(_elem19)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getTransactionsForCustomer_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter20 in self.success:
        iter20.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getTransactionsForShoppingCartId_args:
  """
  Attributes:
   - shoppingCartId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'shoppingCartId', None, None, ), # 1
  )

  def __init__(self, shoppingCartId=None,):
    self.shoppingCartId = shoppingCartId

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.shoppingCartId = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getTransactionsForShoppingCartId_args')
    if self.shoppingCartId is not None:
      oprot.writeFieldBegin('shoppingCartId', TType.I64, 1)
      oprot.writeI64(self.shoppingCartId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getTransactionsForShoppingCartId_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(Transaction, Transaction.thrift_spec)), None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype24, _size21) = iprot.readListBegin()
          for _i25 in xrange(_size21):
            _elem26 = Transaction()
            _elem26.read(iprot)
            self.success.append(_elem26)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getTransactionsForShoppingCartId_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter27 in self.success:
        iter27.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getTransactionStatus_args:
  """
  Attributes:
   - transactionId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'transactionId', None, None, ), # 1
  )

  def __init__(self, transactionId=None,):
    self.transactionId = transactionId

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.transactionId = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getTransactionStatus_args')
    if self.transactionId is not None:
      oprot.writeFieldBegin('transactionId', TType.I64, 1)
      oprot.writeI64(self.transactionId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getTransactionStatus_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.I32, 'success', None, None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.I32:
          self.success = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getTransactionStatus_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.I32, 0)
      oprot.writeI32(self.success)
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class changeTransactionStatus_args:
  """
  Attributes:
   - transactionId
   - status
   - description
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'transactionId', None, None, ), # 1
    (2, TType.I32, 'status', None, None, ), # 2
    (3, TType.STRING, 'description', None, None, ), # 3
  )

  def __init__(self, transactionId=None, status=None, description=None,):
    self.transactionId = transactionId
    self.status = status
    self.description = description

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.transactionId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.status = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.description = iprot.readString();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('changeTransactionStatus_args')
    if self.transactionId is not None:
      oprot.writeFieldBegin('transactionId', TType.I64, 1)
      oprot.writeI64(self.transactionId)
      oprot.writeFieldEnd()
    if self.status is not None:
      oprot.writeFieldBegin('status', TType.I32, 2)
      oprot.writeI32(self.status)
      oprot.writeFieldEnd()
    if self.description is not None:
      oprot.writeFieldBegin('description', TType.STRING, 3)
      oprot.writeString(self.description)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class changeTransactionStatus_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.BOOL, 'success', None, None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.BOOL:
          self.success = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('changeTransactionStatus_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.BOOL, 0)
      oprot.writeBool(self.success)
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class enqueueTransactionInfoEmail_args:
  """
  Attributes:
   - transactionId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'transactionId', None, None, ), # 1
  )

  def __init__(self, transactionId=None,):
    self.transactionId = transactionId

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.transactionId = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('enqueueTransactionInfoEmail_args')
    if self.transactionId is not None:
      oprot.writeFieldBegin('transactionId', TType.I64, 1)
      oprot.writeI64(self.transactionId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class enqueueTransactionInfoEmail_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.BOOL, 'success', None, None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.BOOL:
          self.success = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('enqueueTransactionInfoEmail_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.BOOL, 0)
      oprot.writeBool(self.success)
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getAllOrders_args:
  """
  Attributes:
   - status
   - from_date
   - to_date
   - warehouse_id
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'status', None, None, ), # 1
    (2, TType.I64, 'from_date', None, None, ), # 2
    (3, TType.I64, 'to_date', None, None, ), # 3
    (4, TType.I64, 'warehouse_id', None, None, ), # 4
  )

  def __init__(self, status=None, from_date=None, to_date=None, warehouse_id=None,):
    self.status = status
    self.from_date = from_date
    self.to_date = to_date
    self.warehouse_id = warehouse_id

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I32:
          self.status = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.from_date = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.to_date = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.warehouse_id = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getAllOrders_args')
    if self.status is not None:
      oprot.writeFieldBegin('status', TType.I32, 1)
      oprot.writeI32(self.status)
      oprot.writeFieldEnd()
    if self.from_date is not None:
      oprot.writeFieldBegin('from_date', TType.I64, 2)
      oprot.writeI64(self.from_date)
      oprot.writeFieldEnd()
    if self.to_date is not None:
      oprot.writeFieldBegin('to_date', TType.I64, 3)
      oprot.writeI64(self.to_date)
      oprot.writeFieldEnd()
    if self.warehouse_id is not None:
      oprot.writeFieldBegin('warehouse_id', TType.I64, 4)
      oprot.writeI64(self.warehouse_id)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getAllOrders_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype31, _size28) = iprot.readListBegin()
          for _i32 in xrange(_size28):
            _elem33 = Order()
            _elem33.read(iprot)
            self.success.append(_elem33)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getAllOrders_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter34 in self.success:
        iter34.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getOrdersByBillingDate_args:
  """
  Attributes:
   - status
   - start_billing_date
   - end_billing_date
   - warehouse_id
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'status', None, None, ), # 1
    (2, TType.I64, 'start_billing_date', None, None, ), # 2
    (3, TType.I64, 'end_billing_date', None, None, ), # 3
    (4, TType.I64, 'warehouse_id', None, None, ), # 4
  )

  def __init__(self, status=None, start_billing_date=None, end_billing_date=None, warehouse_id=None,):
    self.status = status
    self.start_billing_date = start_billing_date
    self.end_billing_date = end_billing_date
    self.warehouse_id = warehouse_id

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I32:
          self.status = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.start_billing_date = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.end_billing_date = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.warehouse_id = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getOrdersByBillingDate_args')
    if self.status is not None:
      oprot.writeFieldBegin('status', TType.I32, 1)
      oprot.writeI32(self.status)
      oprot.writeFieldEnd()
    if self.start_billing_date is not None:
      oprot.writeFieldBegin('start_billing_date', TType.I64, 2)
      oprot.writeI64(self.start_billing_date)
      oprot.writeFieldEnd()
    if self.end_billing_date is not None:
      oprot.writeFieldBegin('end_billing_date', TType.I64, 3)
      oprot.writeI64(self.end_billing_date)
      oprot.writeFieldEnd()
    if self.warehouse_id is not None:
      oprot.writeFieldBegin('warehouse_id', TType.I64, 4)
      oprot.writeI64(self.warehouse_id)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getOrdersByBillingDate_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype38, _size35) = iprot.readListBegin()
          for _i39 in xrange(_size35):
            _elem40 = Order()
            _elem40.read(iprot)
            self.success.append(_elem40)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getOrdersByBillingDate_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter41 in self.success:
        iter41.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getOrdersByShippingDate_args:
  """
  Attributes:
   - fromShippingDate
   - toShippingDate
   - providerId
   - warehouseId
   - cod
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'fromShippingDate', None, None, ), # 1
    (2, TType.I64, 'toShippingDate', None, None, ), # 2
    (3, TType.I64, 'providerId', None, None, ), # 3
    (4, TType.I64, 'warehouseId', None, None, ), # 4
    (5, TType.BOOL, 'cod', None, None, ), # 5
  )

  def __init__(self, fromShippingDate=None, toShippingDate=None, providerId=None, warehouseId=None, cod=None,):
    self.fromShippingDate = fromShippingDate
    self.toShippingDate = toShippingDate
    self.providerId = providerId
    self.warehouseId = warehouseId
    self.cod = cod

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.fromShippingDate = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.toShippingDate = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.providerId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.warehouseId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.BOOL:
          self.cod = iprot.readBool();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getOrdersByShippingDate_args')
    if self.fromShippingDate is not None:
      oprot.writeFieldBegin('fromShippingDate', TType.I64, 1)
      oprot.writeI64(self.fromShippingDate)
      oprot.writeFieldEnd()
    if self.toShippingDate is not None:
      oprot.writeFieldBegin('toShippingDate', TType.I64, 2)
      oprot.writeI64(self.toShippingDate)
      oprot.writeFieldEnd()
    if self.providerId is not None:
      oprot.writeFieldBegin('providerId', TType.I64, 3)
      oprot.writeI64(self.providerId)
      oprot.writeFieldEnd()
    if self.warehouseId is not None:
      oprot.writeFieldBegin('warehouseId', TType.I64, 4)
      oprot.writeI64(self.warehouseId)
      oprot.writeFieldEnd()
    if self.cod is not None:
      oprot.writeFieldBegin('cod', TType.BOOL, 5)
      oprot.writeBool(self.cod)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getOrdersByShippingDate_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype45, _size42) = iprot.readListBegin()
          for _i46 in xrange(_size42):
            _elem47 = Order()
            _elem47.read(iprot)
            self.success.append(_elem47)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getOrdersByShippingDate_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter48 in self.success:
        iter48.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getReturnableOrdersForCustomer_args:
  """
  Attributes:
   - customer_id
   - limit
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'customer_id', None, None, ), # 1
    (2, TType.I64, 'limit', None, None, ), # 2
  )

  def __init__(self, customer_id=None, limit=None,):
    self.customer_id = customer_id
    self.limit = limit

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.customer_id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.limit = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getReturnableOrdersForCustomer_args')
    if self.customer_id is not None:
      oprot.writeFieldBegin('customer_id', TType.I64, 1)
      oprot.writeI64(self.customer_id)
      oprot.writeFieldEnd()
    if self.limit is not None:
      oprot.writeFieldBegin('limit', TType.I64, 2)
      oprot.writeI64(self.limit)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getReturnableOrdersForCustomer_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.I64,None), None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype52, _size49) = iprot.readListBegin()
          for _i53 in xrange(_size49):
            _elem54 = iprot.readI64();
            self.success.append(_elem54)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getReturnableOrdersForCustomer_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.I64, len(self.success))
      for iter55 in self.success:
        oprot.writeI64(iter55)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getCancellableOrdersForCustomer_args:
  """
  Attributes:
   - customer_id
   - limit
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'customer_id', None, None, ), # 1
    (2, TType.I64, 'limit', None, None, ), # 2
  )

  def __init__(self, customer_id=None, limit=None,):
    self.customer_id = customer_id
    self.limit = limit

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.customer_id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.limit = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getCancellableOrdersForCustomer_args')
    if self.customer_id is not None:
      oprot.writeFieldBegin('customer_id', TType.I64, 1)
      oprot.writeI64(self.customer_id)
      oprot.writeFieldEnd()
    if self.limit is not None:
      oprot.writeFieldBegin('limit', TType.I64, 2)
      oprot.writeI64(self.limit)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getCancellableOrdersForCustomer_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.I64,None), None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype59, _size56) = iprot.readListBegin()
          for _i60 in xrange(_size56):
            _elem61 = iprot.readI64();
            self.success.append(_elem61)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getCancellableOrdersForCustomer_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.I64, len(self.success))
      for iter62 in self.success:
        oprot.writeI64(iter62)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class changeOrderStatus_args:
  """
  Attributes:
   - orderId
   - status
   - description
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'orderId', None, None, ), # 1
    (2, TType.I32, 'status', None, None, ), # 2
    (3, TType.STRING, 'description', None, None, ), # 3
  )

  def __init__(self, orderId=None, status=None, description=None,):
    self.orderId = orderId
    self.status = status
    self.description = description

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.orderId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.status = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.description = iprot.readString();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('changeOrderStatus_args')
    if self.orderId is not None:
      oprot.writeFieldBegin('orderId', TType.I64, 1)
      oprot.writeI64(self.orderId)
      oprot.writeFieldEnd()
    if self.status is not None:
      oprot.writeFieldBegin('status', TType.I32, 2)
      oprot.writeI32(self.status)
      oprot.writeFieldEnd()
    if self.description is not None:
      oprot.writeFieldBegin('description', TType.STRING, 3)
      oprot.writeString(self.description)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class changeOrderStatus_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.BOOL, 'success', None, None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.BOOL:
          self.success = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('changeOrderStatus_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.BOOL, 0)
      oprot.writeBool(self.success)
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getOrdersForTransaction_args:
  """
  Attributes:
   - transactionId
   - customerId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'transactionId', None, None, ), # 1
    (2, TType.I64, 'customerId', None, None, ), # 2
  )

  def __init__(self, transactionId=None, customerId=None,):
    self.transactionId = transactionId
    self.customerId = customerId

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.transactionId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.customerId = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getOrdersForTransaction_args')
    if self.transactionId is not None:
      oprot.writeFieldBegin('transactionId', TType.I64, 1)
      oprot.writeI64(self.transactionId)
      oprot.writeFieldEnd()
    if self.customerId is not None:
      oprot.writeFieldBegin('customerId', TType.I64, 2)
      oprot.writeI64(self.customerId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getOrdersForTransaction_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype66, _size63) = iprot.readListBegin()
          for _i67 in xrange(_size63):
            _elem68 = Order()
            _elem68.read(iprot)
            self.success.append(_elem68)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getOrdersForTransaction_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter69 in self.success:
        iter69.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getOrdersForCustomer_args:
  """
  Attributes:
   - customerId
   - from_date
   - to_date
   - statuses
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'customerId', None, None, ), # 1
    (2, TType.I64, 'from_date', None, None, ), # 2
    (3, TType.I64, 'to_date', None, None, ), # 3
    (4, TType.LIST, 'statuses', (TType.I32,None), None, ), # 4
  )

  def __init__(self, customerId=None, from_date=None, to_date=None, statuses=None,):
    self.customerId = customerId
    self.from_date = from_date
    self.to_date = to_date
    self.statuses = statuses

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.customerId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.from_date = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.to_date = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.LIST:
          self.statuses = []
          (_etype73, _size70) = iprot.readListBegin()
          for _i74 in xrange(_size70):
            _elem75 = iprot.readI32();
            self.statuses.append(_elem75)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getOrdersForCustomer_args')
    if self.customerId is not None:
      oprot.writeFieldBegin('customerId', TType.I64, 1)
      oprot.writeI64(self.customerId)
      oprot.writeFieldEnd()
    if self.from_date is not None:
      oprot.writeFieldBegin('from_date', TType.I64, 2)
      oprot.writeI64(self.from_date)
      oprot.writeFieldEnd()
    if self.to_date is not None:
      oprot.writeFieldBegin('to_date', TType.I64, 3)
      oprot.writeI64(self.to_date)
      oprot.writeFieldEnd()
    if self.statuses is not None:
      oprot.writeFieldBegin('statuses', TType.LIST, 4)
      oprot.writeListBegin(TType.I32, len(self.statuses))
      for iter76 in self.statuses:
        oprot.writeI32(iter76)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getOrdersForCustomer_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype80, _size77) = iprot.readListBegin()
          for _i81 in xrange(_size77):
            _elem82 = Order()
            _elem82.read(iprot)
            self.success.append(_elem82)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getOrdersForCustomer_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter83 in self.success:
        iter83.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class createOrder_args:
  """
  Attributes:
   - order
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'order', (Order, Order.thrift_spec), None, ), # 1
  )

  def __init__(self, order=None,):
    self.order = order

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.STRUCT:
          self.order = Order()
          self.order.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('createOrder_args')
    if self.order is not None:
      oprot.writeFieldBegin('order', TType.STRUCT, 1)
      self.order.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class createOrder_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.I64, 'success', None, None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.I64:
          self.success = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('createOrder_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.I64, 0)
      oprot.writeI64(self.success)
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getOrder_args:
  """
  Attributes:
   - id
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, None, ), # 1
  )

  def __init__(self, id=None,):
    self.id = id

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.id = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getOrder_args')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getOrder_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.STRUCT, 'success', (Order, Order.thrift_spec), None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.STRUCT:
          self.success = Order()
          self.success.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getOrder_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
      self.success.write(oprot)
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getLineItemsForOrder_args:
  """
  Attributes:
   - orderId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'orderId', None, None, ), # 1
  )

  def __init__(self, orderId=None,):
    self.orderId = orderId

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.orderId = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getLineItemsForOrder_args')
    if self.orderId is not None:
      oprot.writeFieldBegin('orderId', TType.I64, 1)
      oprot.writeI64(self.orderId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getLineItemsForOrder_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(LineItem, LineItem.thrift_spec)), None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype87, _size84) = iprot.readListBegin()
          for _i88 in xrange(_size84):
            _elem89 = LineItem()
            _elem89.read(iprot)
            self.success.append(_elem89)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getLineItemsForOrder_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter90 in self.success:
        iter90.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getOrderForCustomer_args:
  """
  Attributes:
   - orderId
   - customerId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'orderId', None, None, ), # 1
    (2, TType.I64, 'customerId', None, None, ), # 2
  )

  def __init__(self, orderId=None, customerId=None,):
    self.orderId = orderId
    self.customerId = customerId

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.orderId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.customerId = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getOrderForCustomer_args')
    if self.orderId is not None:
      oprot.writeFieldBegin('orderId', TType.I64, 1)
      oprot.writeI64(self.orderId)
      oprot.writeFieldEnd()
    if self.customerId is not None:
      oprot.writeFieldBegin('customerId', TType.I64, 2)
      oprot.writeI64(self.customerId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getOrderForCustomer_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.STRUCT, 'success', (Order, Order.thrift_spec), None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.STRUCT:
          self.success = Order()
          self.success.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getOrderForCustomer_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
      self.success.write(oprot)
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getAlerts_args:
  """
  Attributes:
   - orderId
   - valid
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'orderId', None, None, ), # 1
    (2, TType.BOOL, 'valid', None, None, ), # 2
  )

  def __init__(self, orderId=None, valid=None,):
    self.orderId = orderId
    self.valid = valid

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.orderId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.BOOL:
          self.valid = iprot.readBool();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getAlerts_args')
    if self.orderId is not None:
      oprot.writeFieldBegin('orderId', TType.I64, 1)
      oprot.writeI64(self.orderId)
      oprot.writeFieldEnd()
    if self.valid is not None:
      oprot.writeFieldBegin('valid', TType.BOOL, 2)
      oprot.writeBool(self.valid)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getAlerts_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(Alert, Alert.thrift_spec)), None, ), # 0
  )

  def __init__(self, success=None,):
    self.success = success

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype94, _size91) = iprot.readListBegin()
          for _i95 in xrange(_size91):
            _elem96 = Alert()
            _elem96.read(iprot)
            self.success.append(_elem96)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getAlerts_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter97 in self.success:
        iter97.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class setAlert_args:
  """
  Attributes:
   - orderId
   - unset
   - type
   - comment
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'orderId', None, None, ), # 1
    (2, TType.BOOL, 'unset', None, None, ), # 2
    (3, TType.I64, 'type', None, None, ), # 3
    (4, TType.STRING, 'comment', None, None, ), # 4
  )

  def __init__(self, orderId=None, unset=None, type=None, comment=None,):
    self.orderId = orderId
    self.unset = unset
    self.type = type
    self.comment = comment

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.orderId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.BOOL:
          self.unset = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.type = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.comment = iprot.readString();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('setAlert_args')
    if self.orderId is not None:
      oprot.writeFieldBegin('orderId', TType.I64, 1)
      oprot.writeI64(self.orderId)
      oprot.writeFieldEnd()
    if self.unset is not None:
      oprot.writeFieldBegin('unset', TType.BOOL, 2)
      oprot.writeBool(self.unset)
      oprot.writeFieldEnd()
    if self.type is not None:
      oprot.writeFieldBegin('type', TType.I64, 3)
      oprot.writeI64(self.type)
      oprot.writeFieldEnd()
    if self.comment is not None:
      oprot.writeFieldBegin('comment', TType.STRING, 4)
      oprot.writeString(self.comment)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class setAlert_result:

  thrift_spec = (
  )

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('setAlert_result')
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getValidOrderCount_args:

  thrift_spec = (
  )

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getValidOrderCount_args')
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getValidOrderCount_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.I64, 'success', None, None, ), # 0
  )

  def __init__(self, success=None,):
    self.success = success

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.I64:
          self.success = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getValidOrderCount_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.I64, 0)
      oprot.writeI64(self.success)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getNoOfCustomersWithSuccessfulTransaction_args:

  thrift_spec = (
  )

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getNoOfCustomersWithSuccessfulTransaction_args')
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getNoOfCustomersWithSuccessfulTransaction_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.I64, 'success', None, None, ), # 0
  )

  def __init__(self, success=None,):
    self.success = success

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.I64:
          self.success = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getNoOfCustomersWithSuccessfulTransaction_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.I64, 0)
      oprot.writeI64(self.success)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getValidOrdersAmountRange_args:

  thrift_spec = (
  )

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getValidOrdersAmountRange_args')
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getValidOrdersAmountRange_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.DOUBLE,None), None, ), # 0
  )

  def __init__(self, success=None,):
    self.success = success

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype101, _size98) = iprot.readListBegin()
          for _i102 in xrange(_size98):
            _elem103 = iprot.readDouble();
            self.success.append(_elem103)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getValidOrdersAmountRange_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.DOUBLE, len(self.success))
      for iter104 in self.success:
        oprot.writeDouble(iter104)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getValidOrders_args:
  """
  Attributes:
   - limit
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'limit', None, None, ), # 1
  )

  def __init__(self, limit=None,):
    self.limit = limit

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.limit = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getValidOrders_args')
    if self.limit is not None:
      oprot.writeFieldBegin('limit', TType.I64, 1)
      oprot.writeI64(self.limit)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getValidOrders_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 0
  )

  def __init__(self, success=None,):
    self.success = success

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype108, _size105) = iprot.readListBegin()
          for _i109 in xrange(_size105):
            _elem110 = Order()
            _elem110.read(iprot)
            self.success.append(_elem110)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getValidOrders_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter111 in self.success:
        iter111.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class batchOrders_args:
  """
  Attributes:
   - warehouseId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'warehouseId', None, None, ), # 1
  )

  def __init__(self, warehouseId=None,):
    self.warehouseId = warehouseId

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.warehouseId = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('batchOrders_args')
    if self.warehouseId is not None:
      oprot.writeFieldBegin('warehouseId', TType.I64, 1)
      oprot.writeI64(self.warehouseId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class batchOrders_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype115, _size112) = iprot.readListBegin()
          for _i116 in xrange(_size112):
            _elem117 = Order()
            _elem117.read(iprot)
            self.success.append(_elem117)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('batchOrders_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter118 in self.success:
        iter118.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class markOrderAsOutOfStock_args:
  """
  Attributes:
   - orderId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'orderId', None, None, ), # 1
  )

  def __init__(self, orderId=None,):
    self.orderId = orderId

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.orderId = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('markOrderAsOutOfStock_args')
    if self.orderId is not None:
      oprot.writeFieldBegin('orderId', TType.I64, 1)
      oprot.writeI64(self.orderId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class markOrderAsOutOfStock_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.BOOL, 'success', None, None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.BOOL:
          self.success = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('markOrderAsOutOfStock_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.BOOL, 0)
      oprot.writeBool(self.success)
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class verifyOrder_args:
  """
  Attributes:
   - orderId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'orderId', None, None, ), # 1
  )

  def __init__(self, orderId=None,):
    self.orderId = orderId

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.orderId = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('verifyOrder_args')
    if self.orderId is not None:
      oprot.writeFieldBegin('orderId', TType.I64, 1)
      oprot.writeI64(self.orderId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class verifyOrder_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.BOOL, 'success', None, None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.BOOL:
          self.success = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('verifyOrder_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.BOOL, 0)
      oprot.writeBool(self.success)
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class acceptOrder_args:
  """
  Attributes:
   - orderId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'orderId', None, None, ), # 1
  )

  def __init__(self, orderId=None,):
    self.orderId = orderId

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.orderId = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('acceptOrder_args')
    if self.orderId is not None:
      oprot.writeFieldBegin('orderId', TType.I64, 1)
      oprot.writeI64(self.orderId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class acceptOrder_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.BOOL, 'success', None, None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.BOOL:
          self.success = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('acceptOrder_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.BOOL, 0)
      oprot.writeBool(self.success)
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class billOrder_args:
  """
  Attributes:
   - orderId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'orderId', None, None, ), # 1
  )

  def __init__(self, orderId=None,):
    self.orderId = orderId

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.orderId = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('billOrder_args')
    if self.orderId is not None:
      oprot.writeFieldBegin('orderId', TType.I64, 1)
      oprot.writeI64(self.orderId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class billOrder_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.BOOL, 'success', None, None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.BOOL:
          self.success = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('billOrder_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.BOOL, 0)
      oprot.writeBool(self.success)
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class addBillingDetails_args:
  """
  Attributes:
   - orderId
   - invoice_number
   - billed_by
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'orderId', None, None, ), # 1
    (2, TType.STRING, 'invoice_number', None, None, ), # 2
    (3, TType.STRING, 'billed_by', None, None, ), # 3
  )

  def __init__(self, orderId=None, invoice_number=None, billed_by=None,):
    self.orderId = orderId
    self.invoice_number = invoice_number
    self.billed_by = billed_by

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.orderId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.invoice_number = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.billed_by = iprot.readString();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('addBillingDetails_args')
    if self.orderId is not None:
      oprot.writeFieldBegin('orderId', TType.I64, 1)
      oprot.writeI64(self.orderId)
      oprot.writeFieldEnd()
    if self.invoice_number is not None:
      oprot.writeFieldBegin('invoice_number', TType.STRING, 2)
      oprot.writeString(self.invoice_number)
      oprot.writeFieldEnd()
    if self.billed_by is not None:
      oprot.writeFieldBegin('billed_by', TType.STRING, 3)
      oprot.writeString(self.billed_by)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class addBillingDetails_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.BOOL, 'success', None, None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.BOOL:
          self.success = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('addBillingDetails_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.BOOL, 0)
      oprot.writeBool(self.success)
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class addJacketNumber_args:
  """
  Attributes:
   - orderId
   - jacketNumber
   - imeiNumber
   - itemNumber
   - billedBy
   - billingType
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'orderId', None, None, ), # 1
    (2, TType.I64, 'jacketNumber', None, None, ), # 2
    (3, TType.I64, 'imeiNumber', None, None, ), # 3
    (4, TType.STRING, 'itemNumber', None, None, ), # 4
    (5, TType.STRING, 'billedBy', None, None, ), # 5
    (6, TType.I64, 'billingType', None, None, ), # 6
  )

  def __init__(self, orderId=None, jacketNumber=None, imeiNumber=None, itemNumber=None, billedBy=None, billingType=None,):
    self.orderId = orderId
    self.jacketNumber = jacketNumber
    self.imeiNumber = imeiNumber
    self.itemNumber = itemNumber
    self.billedBy = billedBy
    self.billingType = billingType

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.orderId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.jacketNumber = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.imeiNumber = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.itemNumber = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.billedBy = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.I64:
          self.billingType = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('addJacketNumber_args')
    if self.orderId is not None:
      oprot.writeFieldBegin('orderId', TType.I64, 1)
      oprot.writeI64(self.orderId)
      oprot.writeFieldEnd()
    if self.jacketNumber is not None:
      oprot.writeFieldBegin('jacketNumber', TType.I64, 2)
      oprot.writeI64(self.jacketNumber)
      oprot.writeFieldEnd()
    if self.imeiNumber is not None:
      oprot.writeFieldBegin('imeiNumber', TType.I64, 3)
      oprot.writeI64(self.imeiNumber)
      oprot.writeFieldEnd()
    if self.itemNumber is not None:
      oprot.writeFieldBegin('itemNumber', TType.STRING, 4)
      oprot.writeString(self.itemNumber)
      oprot.writeFieldEnd()
    if self.billedBy is not None:
      oprot.writeFieldBegin('billedBy', TType.STRING, 5)
      oprot.writeString(self.billedBy)
      oprot.writeFieldEnd()
    if self.billingType is not None:
      oprot.writeFieldBegin('billingType', TType.I64, 6)
      oprot.writeI64(self.billingType)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class addJacketNumber_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.BOOL, 'success', None, None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.BOOL:
          self.success = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('addJacketNumber_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.BOOL, 0)
      oprot.writeBool(self.success)
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class markOrdersAsManifested_args:
  """
  Attributes:
   - warehouseId
   - providerId
   - cod
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'warehouseId', None, None, ), # 1
    (2, TType.I64, 'providerId', None, None, ), # 2
    (3, TType.BOOL, 'cod', None, None, ), # 3
  )

  def __init__(self, warehouseId=None, providerId=None, cod=None,):
    self.warehouseId = warehouseId
    self.providerId = providerId
    self.cod = cod

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.warehouseId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.providerId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.BOOL:
          self.cod = iprot.readBool();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('markOrdersAsManifested_args')
    if self.warehouseId is not None:
      oprot.writeFieldBegin('warehouseId', TType.I64, 1)
      oprot.writeI64(self.warehouseId)
      oprot.writeFieldEnd()
    if self.providerId is not None:
      oprot.writeFieldBegin('providerId', TType.I64, 2)
      oprot.writeI64(self.providerId)
      oprot.writeFieldEnd()
    if self.cod is not None:
      oprot.writeFieldBegin('cod', TType.BOOL, 3)
      oprot.writeBool(self.cod)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class markOrdersAsManifested_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.BOOL, 'success', None, None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.BOOL:
          self.success = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('markOrdersAsManifested_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.BOOL, 0)
      oprot.writeBool(self.success)
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class markOrdersAsPickedUp_args:
  """
  Attributes:
   - providerId
   - pickupDetails
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'providerId', None, None, ), # 1
    (2, TType.MAP, 'pickupDetails', (TType.STRING,None,TType.STRING,None), None, ), # 2
  )

  def __init__(self, providerId=None, pickupDetails=None,):
    self.providerId = providerId
    self.pickupDetails = pickupDetails

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.providerId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.MAP:
          self.pickupDetails = {}
          (_ktype120, _vtype121, _size119 ) = iprot.readMapBegin() 
          for _i123 in xrange(_size119):
            _key124 = iprot.readString();
            _val125 = iprot.readString();
            self.pickupDetails[_key124] = _val125
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('markOrdersAsPickedUp_args')
    if self.providerId is not None:
      oprot.writeFieldBegin('providerId', TType.I64, 1)
      oprot.writeI64(self.providerId)
      oprot.writeFieldEnd()
    if self.pickupDetails is not None:
      oprot.writeFieldBegin('pickupDetails', TType.MAP, 2)
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.pickupDetails))
      for kiter126,viter127 in self.pickupDetails.items():
        oprot.writeString(kiter126)
        oprot.writeString(viter127)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class markOrdersAsPickedUp_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype131, _size128) = iprot.readListBegin()
          for _i132 in xrange(_size128):
            _elem133 = Order()
            _elem133.read(iprot)
            self.success.append(_elem133)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('markOrdersAsPickedUp_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter134 in self.success:
        iter134.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class markOrdersAsDelivered_args:
  """
  Attributes:
   - providerId
   - deliveredOrders
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'providerId', None, None, ), # 1
    (2, TType.MAP, 'deliveredOrders', (TType.STRING,None,TType.STRING,None), None, ), # 2
  )

  def __init__(self, providerId=None, deliveredOrders=None,):
    self.providerId = providerId
    self.deliveredOrders = deliveredOrders

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.providerId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.MAP:
          self.deliveredOrders = {}
          (_ktype136, _vtype137, _size135 ) = iprot.readMapBegin() 
          for _i139 in xrange(_size135):
            _key140 = iprot.readString();
            _val141 = iprot.readString();
            self.deliveredOrders[_key140] = _val141
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('markOrdersAsDelivered_args')
    if self.providerId is not None:
      oprot.writeFieldBegin('providerId', TType.I64, 1)
      oprot.writeI64(self.providerId)
      oprot.writeFieldEnd()
    if self.deliveredOrders is not None:
      oprot.writeFieldBegin('deliveredOrders', TType.MAP, 2)
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.deliveredOrders))
      for kiter142,viter143 in self.deliveredOrders.items():
        oprot.writeString(kiter142)
        oprot.writeString(viter143)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class markOrdersAsDelivered_result:
  """
  Attributes:
   - ex
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, ex=None,):
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('markOrdersAsDelivered_result')
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class markOrdersAsFailed_args:
  """
  Attributes:
   - providerId
   - returnedOrders
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'providerId', None, None, ), # 1
    (2, TType.MAP, 'returnedOrders', (TType.STRING,None,TType.STRING,None), None, ), # 2
  )

  def __init__(self, providerId=None, returnedOrders=None,):
    self.providerId = providerId
    self.returnedOrders = returnedOrders

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.providerId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.MAP:
          self.returnedOrders = {}
          (_ktype145, _vtype146, _size144 ) = iprot.readMapBegin() 
          for _i148 in xrange(_size144):
            _key149 = iprot.readString();
            _val150 = iprot.readString();
            self.returnedOrders[_key149] = _val150
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('markOrdersAsFailed_args')
    if self.providerId is not None:
      oprot.writeFieldBegin('providerId', TType.I64, 1)
      oprot.writeI64(self.providerId)
      oprot.writeFieldEnd()
    if self.returnedOrders is not None:
      oprot.writeFieldBegin('returnedOrders', TType.MAP, 2)
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.returnedOrders))
      for kiter151,viter152 in self.returnedOrders.items():
        oprot.writeString(kiter151)
        oprot.writeString(viter152)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class markOrdersAsFailed_result:
  """
  Attributes:
   - ex
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, ex=None,):
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('markOrdersAsFailed_result')
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class updateNonDeliveryReason_args:
  """
  Attributes:
   - providerId
   - undeliveredOrders
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'providerId', None, None, ), # 1
    (2, TType.MAP, 'undeliveredOrders', (TType.STRING,None,TType.STRING,None), None, ), # 2
  )

  def __init__(self, providerId=None, undeliveredOrders=None,):
    self.providerId = providerId
    self.undeliveredOrders = undeliveredOrders

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.providerId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.MAP:
          self.undeliveredOrders = {}
          (_ktype154, _vtype155, _size153 ) = iprot.readMapBegin() 
          for _i157 in xrange(_size153):
            _key158 = iprot.readString();
            _val159 = iprot.readString();
            self.undeliveredOrders[_key158] = _val159
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('updateNonDeliveryReason_args')
    if self.providerId is not None:
      oprot.writeFieldBegin('providerId', TType.I64, 1)
      oprot.writeI64(self.providerId)
      oprot.writeFieldEnd()
    if self.undeliveredOrders is not None:
      oprot.writeFieldBegin('undeliveredOrders', TType.MAP, 2)
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.undeliveredOrders))
      for kiter160,viter161 in self.undeliveredOrders.items():
        oprot.writeString(kiter160)
        oprot.writeString(viter161)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class updateNonDeliveryReason_result:
  """
  Attributes:
   - ex
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, ex=None,):
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('updateNonDeliveryReason_result')
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getUndeliveredOrders_args:
  """
  Attributes:
   - providerId
   - warehouseId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'providerId', None, None, ), # 1
    (2, TType.I64, 'warehouseId', None, None, ), # 2
  )

  def __init__(self, providerId=None, warehouseId=None,):
    self.providerId = providerId
    self.warehouseId = warehouseId

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.providerId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.warehouseId = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getUndeliveredOrders_args')
    if self.providerId is not None:
      oprot.writeFieldBegin('providerId', TType.I64, 1)
      oprot.writeI64(self.providerId)
      oprot.writeFieldEnd()
    if self.warehouseId is not None:
      oprot.writeFieldBegin('warehouseId', TType.I64, 2)
      oprot.writeI64(self.warehouseId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getUndeliveredOrders_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 0
  )

  def __init__(self, success=None,):
    self.success = success

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype165, _size162) = iprot.readListBegin()
          for _i166 in xrange(_size162):
            _elem167 = Order()
            _elem167.read(iprot)
            self.success.append(_elem167)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getUndeliveredOrders_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter168 in self.success:
        iter168.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class toggleDOAFlag_args:
  """
  Attributes:
   - orderId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'orderId', None, None, ), # 1
  )

  def __init__(self, orderId=None,):
    self.orderId = orderId

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.orderId = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('toggleDOAFlag_args')
    if self.orderId is not None:
      oprot.writeFieldBegin('orderId', TType.I64, 1)
      oprot.writeI64(self.orderId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class toggleDOAFlag_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.BOOL, 'success', None, None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.BOOL:
          self.success = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('toggleDOAFlag_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.BOOL, 0)
      oprot.writeBool(self.success)
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class requestPickupNumber_args:
  """
  Attributes:
   - orderId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'orderId', None, None, ), # 1
  )

  def __init__(self, orderId=None,):
    self.orderId = orderId

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.orderId = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('requestPickupNumber_args')
    if self.orderId is not None:
      oprot.writeFieldBegin('orderId', TType.I64, 1)
      oprot.writeI64(self.orderId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class requestPickupNumber_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.BOOL, 'success', None, None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.BOOL:
          self.success = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('requestPickupNumber_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.BOOL, 0)
      oprot.writeBool(self.success)
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class authorizePickup_args:
  """
  Attributes:
   - orderId
   - pickupNumber
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'orderId', None, None, ), # 1
    (2, TType.STRING, 'pickupNumber', None, None, ), # 2
  )

  def __init__(self, orderId=None, pickupNumber=None,):
    self.orderId = orderId
    self.pickupNumber = pickupNumber

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.orderId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.pickupNumber = iprot.readString();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('authorizePickup_args')
    if self.orderId is not None:
      oprot.writeFieldBegin('orderId', TType.I64, 1)
      oprot.writeI64(self.orderId)
      oprot.writeFieldEnd()
    if self.pickupNumber is not None:
      oprot.writeFieldBegin('pickupNumber', TType.STRING, 2)
      oprot.writeString(self.pickupNumber)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class authorizePickup_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.BOOL, 'success', None, None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.BOOL:
          self.success = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('authorizePickup_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.BOOL, 0)
      oprot.writeBool(self.success)
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class markDoasAsPickedUp_args:
  """
  Attributes:
   - providerId
   - pickupDetails
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'providerId', None, None, ), # 1
    (2, TType.MAP, 'pickupDetails', (TType.STRING,None,TType.STRING,None), None, ), # 2
  )

  def __init__(self, providerId=None, pickupDetails=None,):
    self.providerId = providerId
    self.pickupDetails = pickupDetails

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.providerId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.MAP:
          self.pickupDetails = {}
          (_ktype170, _vtype171, _size169 ) = iprot.readMapBegin() 
          for _i173 in xrange(_size169):
            _key174 = iprot.readString();
            _val175 = iprot.readString();
            self.pickupDetails[_key174] = _val175
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('markDoasAsPickedUp_args')
    if self.providerId is not None:
      oprot.writeFieldBegin('providerId', TType.I64, 1)
      oprot.writeI64(self.providerId)
      oprot.writeFieldEnd()
    if self.pickupDetails is not None:
      oprot.writeFieldBegin('pickupDetails', TType.MAP, 2)
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.pickupDetails))
      for kiter176,viter177 in self.pickupDetails.items():
        oprot.writeString(kiter176)
        oprot.writeString(viter177)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class markDoasAsPickedUp_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 0
  )

  def __init__(self, success=None,):
    self.success = success

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype181, _size178) = iprot.readListBegin()
          for _i182 in xrange(_size178):
            _elem183 = Order()
            _elem183.read(iprot)
            self.success.append(_elem183)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('markDoasAsPickedUp_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter184 in self.success:
        iter184.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class receiveReturn_args:
  """
  Attributes:
   - orderId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'orderId', None, None, ), # 1
  )

  def __init__(self, orderId=None,):
    self.orderId = orderId

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.orderId = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('receiveReturn_args')
    if self.orderId is not None:
      oprot.writeFieldBegin('orderId', TType.I64, 1)
      oprot.writeI64(self.orderId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class receiveReturn_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.BOOL, 'success', None, None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.BOOL:
          self.success = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('receiveReturn_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.BOOL, 0)
      oprot.writeBool(self.success)
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class validateDoa_args:
  """
  Attributes:
   - orderId
   - isValid
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'orderId', None, None, ), # 1
    (2, TType.BOOL, 'isValid', None, None, ), # 2
  )

  def __init__(self, orderId=None, isValid=None,):
    self.orderId = orderId
    self.isValid = isValid

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.orderId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.BOOL:
          self.isValid = iprot.readBool();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('validateDoa_args')
    if self.orderId is not None:
      oprot.writeFieldBegin('orderId', TType.I64, 1)
      oprot.writeI64(self.orderId)
      oprot.writeFieldEnd()
    if self.isValid is not None:
      oprot.writeFieldBegin('isValid', TType.BOOL, 2)
      oprot.writeBool(self.isValid)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class validateDoa_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.BOOL, 'success', None, None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.BOOL:
          self.success = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('validateDoa_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.BOOL, 0)
      oprot.writeBool(self.success)
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class reshipOrder_args:
  """
  Attributes:
   - orderId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'orderId', None, None, ), # 1
  )

  def __init__(self, orderId=None,):
    self.orderId = orderId

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.orderId = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('reshipOrder_args')
    if self.orderId is not None:
      oprot.writeFieldBegin('orderId', TType.I64, 1)
      oprot.writeI64(self.orderId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class reshipOrder_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.I64, 'success', None, None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.I64:
          self.success = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('reshipOrder_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.I64, 0)
      oprot.writeI64(self.success)
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class refundOrder_args:
  """
  Attributes:
   - orderId
   - refundedBy
   - reason
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'orderId', None, None, ), # 1
    (2, TType.STRING, 'refundedBy', None, None, ), # 2
    (3, TType.STRING, 'reason', None, None, ), # 3
  )

  def __init__(self, orderId=None, refundedBy=None, reason=None,):
    self.orderId = orderId
    self.refundedBy = refundedBy
    self.reason = reason

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.orderId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.refundedBy = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.reason = iprot.readString();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('refundOrder_args')
    if self.orderId is not None:
      oprot.writeFieldBegin('orderId', TType.I64, 1)
      oprot.writeI64(self.orderId)
      oprot.writeFieldEnd()
    if self.refundedBy is not None:
      oprot.writeFieldBegin('refundedBy', TType.STRING, 2)
      oprot.writeString(self.refundedBy)
      oprot.writeFieldEnd()
    if self.reason is not None:
      oprot.writeFieldBegin('reason', TType.STRING, 3)
      oprot.writeString(self.reason)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class refundOrder_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.BOOL, 'success', None, None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.BOOL:
          self.success = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('refundOrder_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.BOOL, 0)
      oprot.writeBool(self.success)
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getReturnOrders_args:
  """
  Attributes:
   - warehouseId
   - fromDate
   - toDate
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'warehouseId', None, None, ), # 1
    (2, TType.I64, 'fromDate', None, None, ), # 2
    (3, TType.I64, 'toDate', None, None, ), # 3
  )

  def __init__(self, warehouseId=None, fromDate=None, toDate=None,):
    self.warehouseId = warehouseId
    self.fromDate = fromDate
    self.toDate = toDate

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.warehouseId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.fromDate = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.toDate = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getReturnOrders_args')
    if self.warehouseId is not None:
      oprot.writeFieldBegin('warehouseId', TType.I64, 1)
      oprot.writeI64(self.warehouseId)
      oprot.writeFieldEnd()
    if self.fromDate is not None:
      oprot.writeFieldBegin('fromDate', TType.I64, 2)
      oprot.writeI64(self.fromDate)
      oprot.writeFieldEnd()
    if self.toDate is not None:
      oprot.writeFieldBegin('toDate', TType.I64, 3)
      oprot.writeI64(self.toDate)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getReturnOrders_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(ReturnOrder, ReturnOrder.thrift_spec)), None, ), # 0
  )

  def __init__(self, success=None,):
    self.success = success

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype188, _size185) = iprot.readListBegin()
          for _i189 in xrange(_size185):
            _elem190 = ReturnOrder()
            _elem190.read(iprot)
            self.success.append(_elem190)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getReturnOrders_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter191 in self.success:
        iter191.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getReturnOrder_args:
  """
  Attributes:
   - id
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, None, ), # 1
  )

  def __init__(self, id=None,):
    self.id = id

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.id = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getReturnOrder_args')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class getReturnOrder_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.STRUCT, 'success', (ReturnOrder, ReturnOrder.thrift_spec), None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.STRUCT:
          self.success = ReturnOrder()
          self.success.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getReturnOrder_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
      self.success.write(oprot)
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class processReturn_args:
  """
  Attributes:
   - returnOrderId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'returnOrderId', None, None, ), # 1
  )

  def __init__(self, returnOrderId=None,):
    self.returnOrderId = returnOrderId

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.returnOrderId = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('processReturn_args')
    if self.returnOrderId is not None:
      oprot.writeFieldBegin('returnOrderId', TType.I64, 1)
      oprot.writeI64(self.returnOrderId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class processReturn_result:
  """
  Attributes:
   - ex
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, ex=None,):
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('processReturn_result')
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class createPurchaseOrder_args:
  """
  Attributes:
   - warehouseId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'warehouseId', None, None, ), # 1
  )

  def __init__(self, warehouseId=None,):
    self.warehouseId = warehouseId

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.warehouseId = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('createPurchaseOrder_args')
    if self.warehouseId is not None:
      oprot.writeFieldBegin('warehouseId', TType.I64, 1)
      oprot.writeI64(self.warehouseId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class createPurchaseOrder_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.I64, 'success', None, None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.I64:
          self.success = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('createPurchaseOrder_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.I64, 0)
      oprot.writeI64(self.success)
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class updateWeight_args:
  """
  Attributes:
   - orderId
   - weight
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'orderId', None, None, ), # 1
    (2, TType.DOUBLE, 'weight', None, None, ), # 2
  )

  def __init__(self, orderId=None, weight=None,):
    self.orderId = orderId
    self.weight = weight

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.orderId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.DOUBLE:
          self.weight = iprot.readDouble();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('updateWeight_args')
    if self.orderId is not None:
      oprot.writeFieldBegin('orderId', TType.I64, 1)
      oprot.writeI64(self.orderId)
      oprot.writeFieldEnd()
    if self.weight is not None:
      oprot.writeFieldBegin('weight', TType.DOUBLE, 2)
      oprot.writeDouble(self.weight)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class updateWeight_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.STRUCT, 'success', (Order, Order.thrift_spec), None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.STRUCT:
          self.success = Order()
          self.success.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('updateWeight_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
      self.success.write(oprot)
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class changeItem_args:
  """
  Attributes:
   - orderId
   - itemId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'orderId', None, None, ), # 1
    (2, TType.I64, 'itemId', None, None, ), # 2
  )

  def __init__(self, orderId=None, itemId=None,):
    self.orderId = orderId
    self.itemId = itemId

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.orderId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.itemId = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('changeItem_args')
    if self.orderId is not None:
      oprot.writeFieldBegin('orderId', TType.I64, 1)
      oprot.writeI64(self.orderId)
      oprot.writeFieldEnd()
    if self.itemId is not None:
      oprot.writeFieldBegin('itemId', TType.I64, 2)
      oprot.writeI64(self.itemId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class changeItem_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.STRUCT, 'success', (Order, Order.thrift_spec), None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.STRUCT:
          self.success = Order()
          self.success.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('changeItem_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
      self.success.write(oprot)
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class shiftToWarehouse_args:
  """
  Attributes:
   - orderId
   - warehouseId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'orderId', None, None, ), # 1
    (2, TType.I64, 'warehouseId', None, None, ), # 2
  )

  def __init__(self, orderId=None, warehouseId=None,):
    self.orderId = orderId
    self.warehouseId = warehouseId

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.orderId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.warehouseId = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('shiftToWarehouse_args')
    if self.orderId is not None:
      oprot.writeFieldBegin('orderId', TType.I64, 1)
      oprot.writeI64(self.orderId)
      oprot.writeFieldEnd()
    if self.warehouseId is not None:
      oprot.writeFieldBegin('warehouseId', TType.I64, 2)
      oprot.writeI64(self.warehouseId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class shiftToWarehouse_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.STRUCT, 'success', (Order, Order.thrift_spec), None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.STRUCT:
          self.success = Order()
          self.success.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('shiftToWarehouse_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
      self.success.write(oprot)
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class addDelayReason_args:
  """
  Attributes:
   - orderId
   - delayReason
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'orderId', None, None, ), # 1
    (2, TType.I32, 'delayReason', None, None, ), # 2
  )

  def __init__(self, orderId=None, delayReason=None,):
    self.orderId = orderId
    self.delayReason = delayReason

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.orderId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.delayReason = iprot.readI32();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('addDelayReason_args')
    if self.orderId is not None:
      oprot.writeFieldBegin('orderId', TType.I64, 1)
      oprot.writeI64(self.orderId)
      oprot.writeFieldEnd()
    if self.delayReason is not None:
      oprot.writeFieldBegin('delayReason', TType.I32, 2)
      oprot.writeI32(self.delayReason)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class addDelayReason_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.BOOL, 'success', None, None, ), # 0
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, ex=None,):
    self.success = success
    self.ex = ex

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.BOOL:
          self.success = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = TransactionServiceException()
          self.ex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('addDelayReason_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.BOOL, 0)
      oprot.writeBool(self.success)
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)