Rev 6880 | Rev 7199 | 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.GenericServicefrom ttypes import *from thrift.Thrift import TProcessorfrom thrift.transport import TTransportfrom thrift.protocol import TBinaryProtocol, TProtocoltry:from thrift.protocol import fastbinaryexcept:fastbinary = Noneclass Iface(shop2020.thriftpy.generic.GenericService.Iface):def getInventoryItem(self, serialNumber):"""Retrieves serialized inventory item given a serial numberParameters:- serialNumber"""passdef getNonSeralizedInventoryItem(self, itemNumber, itemId, fulfilmentWarehouseId):"""Retrieves non-serialized inventory item from a given supplierParameters:- itemNumber- itemId- fulfilmentWarehouseId"""passdef scan(self, inventoryItem, type, quantity, billingWarehouseId):"""Scan non-serialized items.Parameters:- inventoryItem- type- quantity- billingWarehouseId"""passdef scanSerializedItemForOrder(self, serialNumber, type, orderId, fulfilmentWarehouseId, quantity, billingWarehouseId):"""Scan serialized items linked with an order. Returns its price.Parameters:- serialNumber- type- orderId- fulfilmentWarehouseId- quantity- billingWarehouseId"""passdef scanForOrder(self, inventoryItem, type, quantity, orderId, fulfilmentWarehouseId, billingWarehouseId):"""Scan non-serialized items linked with an order.Parameters:- inventoryItem- type- quantity- orderId- fulfilmentWarehouseId- billingWarehouseId"""passdef createItemNumberMapping(self, itemNumber, itemId):"""Created item number to item id mappingParameters:- itemNumber- itemId"""passdef getItemNumbers(self, itemId):"""Get itemNumber mappings for itemIdParameters:- itemId"""passdef getItemIds(self, itemNumber):"""Gets item ids for a given item numberParameters:- itemNumber"""passdef getInventoryItemsFromLastScanType(self, lastScanType):"""Retrieves all inventory items given a last scan typeParameters:- lastScanType"""passdef getInventoryItemFromId(self, inventoryItemId):"""Retrieves inventory item given a inventoryItem idParameters:- inventoryItemId"""passdef getPurchaseScans(self, startDate, endDate):"""Returns the purchase scans grouped by items for Purchase register reconciliationParameters:- startDate- endDate"""passdef fetchScansPerInvoiceNumber(self, date):"""Returns the invoices and the count of scans against on a given day.Parameters:- date"""passdef getInventoryItemFromOrder(self, orderId):"""Returns inventory item for a given orderParameters:- orderId"""passdef getInventoryAge(self, ):"""Fetches the stock inventory age week-wise"""passdef getInventoryScansForItem(self, itemId, fromDate, toDate):"""Fetches the scanRecords for a given item for a given time intervalParameters:- itemId- fromDate- toDate"""passdef getScanRecordsForSerialNumber(self, serialNumber):"""Fetches the scanRecords for a given serialNumber for a given time intervalParameters:- serialNumber"""passdef scanForPurchaseReturn(self, saleReturnItems, vendorId):"""Inserts outgoing scans for Returned Items and updates returnId in InventoryItemsParameters:- saleReturnItems- vendorId"""passdef scanForLostItem(self, lostItems, vendorId):"""Inserts scans for lost Items and updates lastScanType in InventoryItemsParameters:- lostItems- vendorId"""passdef getCurrentSerializedInventoryByScans(self, ):"""Get inventory count for available Serialized items in our warehouses using entries in ScanNew table"""passdef getCurrentNonSerializedInventoryByScans(self, ):"""Get inventory count for available Serialized items in our warehouses using entries in ScanNew table"""passdef getHistoricSerializedInventoryByScans(self, date):"""Get inventory for Serialized items in our warehouses at a given date using entries in ScanNew tableParameters:- date"""passdef getHistoricNonSerializedInventoryByScans(self, date):"""Get inventory for Non Serialized items in our warehouses at a given date using entries in ScanNew tableParameters:- date"""passdef scanForOursExternalSale(self, itemId, serialNumber, itemNumber, invoiceNumber, warehouseId, unitPrice, orderId):"""Insert Purchase/Sale Entries for product billed by Hotspot using OURS_EXTERNAL BillingParameters:- itemId- serialNumber- itemNumber- invoiceNumber- warehouseId- unitPrice- orderId"""passdef scanForOursExternalSaleReturn(self, orderId, unitPrice):"""Insert Purchase_Ret/Sale_Ret Entries for product billed by Hotspot using OURS_EXTERNAL BillingParameters:- orderId- unitPrice"""passdef getMovementNonSerializedInventoryByScans(self, startDate, endDate):"""Parameters:- startDate- endDate"""passdef getMovementSerializedInventoryByScans(self, startDate, endDate):"""Parameters:- startDate- endDate"""passdef scanfreebie(self, orderId, freebieItemId, freebieWarehouseId, scanType):"""Parameters:- orderId- freebieItemId- freebieWarehouseId- scanType"""passclass Client(shop2020.thriftpy.generic.GenericService.Client, Iface):def __init__(self, iprot, oprot=None):shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)def getInventoryItem(self, serialNumber):"""Retrieves serialized inventory item given a serial numberParameters:- serialNumber"""self.send_getInventoryItem(serialNumber)return self.recv_getInventoryItem()def send_getInventoryItem(self, serialNumber):self._oprot.writeMessageBegin('getInventoryItem', TMessageType.CALL, self._seqid)args = getInventoryItem_args()args.serialNumber = serialNumberargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getInventoryItem(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getInventoryItem_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successif result.wex is not None:raise result.wexraise TApplicationException(TApplicationException.MISSING_RESULT, "getInventoryItem failed: unknown result");def getNonSeralizedInventoryItem(self, itemNumber, itemId, fulfilmentWarehouseId):"""Retrieves non-serialized inventory item from a given supplierParameters:- itemNumber- itemId- fulfilmentWarehouseId"""self.send_getNonSeralizedInventoryItem(itemNumber, itemId, fulfilmentWarehouseId)return self.recv_getNonSeralizedInventoryItem()def send_getNonSeralizedInventoryItem(self, itemNumber, itemId, fulfilmentWarehouseId):self._oprot.writeMessageBegin('getNonSeralizedInventoryItem', TMessageType.CALL, self._seqid)args = getNonSeralizedInventoryItem_args()args.itemNumber = itemNumberargs.itemId = itemIdargs.fulfilmentWarehouseId = fulfilmentWarehouseIdargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getNonSeralizedInventoryItem(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getNonSeralizedInventoryItem_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successif result.wex is not None:raise result.wexraise TApplicationException(TApplicationException.MISSING_RESULT, "getNonSeralizedInventoryItem failed: unknown result");def scan(self, inventoryItem, type, quantity, billingWarehouseId):"""Scan non-serialized items.Parameters:- inventoryItem- type- quantity- billingWarehouseId"""self.send_scan(inventoryItem, type, quantity, billingWarehouseId)self.recv_scan()def send_scan(self, inventoryItem, type, quantity, billingWarehouseId):self._oprot.writeMessageBegin('scan', TMessageType.CALL, self._seqid)args = scan_args()args.inventoryItem = inventoryItemargs.type = typeargs.quantity = quantityargs.billingWarehouseId = billingWarehouseIdargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_scan(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = scan_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.wex is not None:raise result.wexreturndef scanSerializedItemForOrder(self, serialNumber, type, orderId, fulfilmentWarehouseId, quantity, billingWarehouseId):"""Scan serialized items linked with an order. Returns its price.Parameters:- serialNumber- type- orderId- fulfilmentWarehouseId- quantity- billingWarehouseId"""self.send_scanSerializedItemForOrder(serialNumber, type, orderId, fulfilmentWarehouseId, quantity, billingWarehouseId)return self.recv_scanSerializedItemForOrder()def send_scanSerializedItemForOrder(self, serialNumber, type, orderId, fulfilmentWarehouseId, quantity, billingWarehouseId):self._oprot.writeMessageBegin('scanSerializedItemForOrder', TMessageType.CALL, self._seqid)args = scanSerializedItemForOrder_args()args.serialNumber = serialNumberargs.type = typeargs.orderId = orderIdargs.fulfilmentWarehouseId = fulfilmentWarehouseIdargs.quantity = quantityargs.billingWarehouseId = billingWarehouseIdargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_scanSerializedItemForOrder(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = scanSerializedItemForOrder_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successif result.wex is not None:raise result.wexraise TApplicationException(TApplicationException.MISSING_RESULT, "scanSerializedItemForOrder failed: unknown result");def scanForOrder(self, inventoryItem, type, quantity, orderId, fulfilmentWarehouseId, billingWarehouseId):"""Scan non-serialized items linked with an order.Parameters:- inventoryItem- type- quantity- orderId- fulfilmentWarehouseId- billingWarehouseId"""self.send_scanForOrder(inventoryItem, type, quantity, orderId, fulfilmentWarehouseId, billingWarehouseId)return self.recv_scanForOrder()def send_scanForOrder(self, inventoryItem, type, quantity, orderId, fulfilmentWarehouseId, billingWarehouseId):self._oprot.writeMessageBegin('scanForOrder', TMessageType.CALL, self._seqid)args = scanForOrder_args()args.inventoryItem = inventoryItemargs.type = typeargs.quantity = quantityargs.orderId = orderIdargs.fulfilmentWarehouseId = fulfilmentWarehouseIdargs.billingWarehouseId = billingWarehouseIdargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_scanForOrder(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = scanForOrder_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successif result.wex is not None:raise result.wexraise TApplicationException(TApplicationException.MISSING_RESULT, "scanForOrder failed: unknown result");def createItemNumberMapping(self, itemNumber, itemId):"""Created item number to item id mappingParameters:- itemNumber- itemId"""self.send_createItemNumberMapping(itemNumber, itemId)self.recv_createItemNumberMapping()def send_createItemNumberMapping(self, itemNumber, itemId):self._oprot.writeMessageBegin('createItemNumberMapping', TMessageType.CALL, self._seqid)args = createItemNumberMapping_args()args.itemNumber = itemNumberargs.itemId = itemIdargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_createItemNumberMapping(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = createItemNumberMapping_result()result.read(self._iprot)self._iprot.readMessageEnd()returndef getItemNumbers(self, itemId):"""Get itemNumber mappings for itemIdParameters:- itemId"""self.send_getItemNumbers(itemId)return self.recv_getItemNumbers()def send_getItemNumbers(self, itemId):self._oprot.writeMessageBegin('getItemNumbers', TMessageType.CALL, self._seqid)args = getItemNumbers_args()args.itemId = itemIdargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getItemNumbers(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getItemNumbers_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successraise TApplicationException(TApplicationException.MISSING_RESULT, "getItemNumbers failed: unknown result");def getItemIds(self, itemNumber):"""Gets item ids for a given item numberParameters:- itemNumber"""self.send_getItemIds(itemNumber)return self.recv_getItemIds()def send_getItemIds(self, itemNumber):self._oprot.writeMessageBegin('getItemIds', TMessageType.CALL, self._seqid)args = getItemIds_args()args.itemNumber = itemNumberargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getItemIds(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getItemIds_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successraise TApplicationException(TApplicationException.MISSING_RESULT, "getItemIds failed: unknown result");def getInventoryItemsFromLastScanType(self, lastScanType):"""Retrieves all inventory items given a last scan typeParameters:- lastScanType"""self.send_getInventoryItemsFromLastScanType(lastScanType)return self.recv_getInventoryItemsFromLastScanType()def send_getInventoryItemsFromLastScanType(self, lastScanType):self._oprot.writeMessageBegin('getInventoryItemsFromLastScanType', TMessageType.CALL, self._seqid)args = getInventoryItemsFromLastScanType_args()args.lastScanType = lastScanTypeargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getInventoryItemsFromLastScanType(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getInventoryItemsFromLastScanType_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successif result.wex is not None:raise result.wexraise TApplicationException(TApplicationException.MISSING_RESULT, "getInventoryItemsFromLastScanType failed: unknown result");def getInventoryItemFromId(self, inventoryItemId):"""Retrieves inventory item given a inventoryItem idParameters:- inventoryItemId"""self.send_getInventoryItemFromId(inventoryItemId)return self.recv_getInventoryItemFromId()def send_getInventoryItemFromId(self, inventoryItemId):self._oprot.writeMessageBegin('getInventoryItemFromId', TMessageType.CALL, self._seqid)args = getInventoryItemFromId_args()args.inventoryItemId = inventoryItemIdargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getInventoryItemFromId(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getInventoryItemFromId_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successif result.wex is not None:raise result.wexraise TApplicationException(TApplicationException.MISSING_RESULT, "getInventoryItemFromId failed: unknown result");def getPurchaseScans(self, startDate, endDate):"""Returns the purchase scans grouped by items for Purchase register reconciliationParameters:- startDate- endDate"""self.send_getPurchaseScans(startDate, endDate)return self.recv_getPurchaseScans()def send_getPurchaseScans(self, startDate, endDate):self._oprot.writeMessageBegin('getPurchaseScans', TMessageType.CALL, self._seqid)args = getPurchaseScans_args()args.startDate = startDateargs.endDate = endDateargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getPurchaseScans(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getPurchaseScans_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successraise TApplicationException(TApplicationException.MISSING_RESULT, "getPurchaseScans failed: unknown result");def fetchScansPerInvoiceNumber(self, date):"""Returns the invoices and the count of scans against on a given day.Parameters:- date"""self.send_fetchScansPerInvoiceNumber(date)return self.recv_fetchScansPerInvoiceNumber()def send_fetchScansPerInvoiceNumber(self, date):self._oprot.writeMessageBegin('fetchScansPerInvoiceNumber', TMessageType.CALL, self._seqid)args = fetchScansPerInvoiceNumber_args()args.date = dateargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_fetchScansPerInvoiceNumber(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = fetchScansPerInvoiceNumber_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successraise TApplicationException(TApplicationException.MISSING_RESULT, "fetchScansPerInvoiceNumber failed: unknown result");def getInventoryItemFromOrder(self, orderId):"""Returns inventory item for a given orderParameters:- orderId"""self.send_getInventoryItemFromOrder(orderId)return self.recv_getInventoryItemFromOrder()def send_getInventoryItemFromOrder(self, orderId):self._oprot.writeMessageBegin('getInventoryItemFromOrder', TMessageType.CALL, self._seqid)args = getInventoryItemFromOrder_args()args.orderId = orderIdargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getInventoryItemFromOrder(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getInventoryItemFromOrder_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successif result.we is not None:raise result.weraise TApplicationException(TApplicationException.MISSING_RESULT, "getInventoryItemFromOrder failed: unknown result");def getInventoryAge(self, ):"""Fetches the stock inventory age week-wise"""self.send_getInventoryAge()return self.recv_getInventoryAge()def send_getInventoryAge(self, ):self._oprot.writeMessageBegin('getInventoryAge', TMessageType.CALL, self._seqid)args = getInventoryAge_args()args.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getInventoryAge(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getInventoryAge_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successraise TApplicationException(TApplicationException.MISSING_RESULT, "getInventoryAge failed: unknown result");def getInventoryScansForItem(self, itemId, fromDate, toDate):"""Fetches the scanRecords for a given item for a given time intervalParameters:- itemId- fromDate- toDate"""self.send_getInventoryScansForItem(itemId, fromDate, toDate)return self.recv_getInventoryScansForItem()def send_getInventoryScansForItem(self, itemId, fromDate, toDate):self._oprot.writeMessageBegin('getInventoryScansForItem', TMessageType.CALL, self._seqid)args = getInventoryScansForItem_args()args.itemId = itemIdargs.fromDate = fromDateargs.toDate = toDateargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getInventoryScansForItem(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getInventoryScansForItem_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successraise TApplicationException(TApplicationException.MISSING_RESULT, "getInventoryScansForItem failed: unknown result");def getScanRecordsForSerialNumber(self, serialNumber):"""Fetches the scanRecords for a given serialNumber for a given time intervalParameters:- serialNumber"""self.send_getScanRecordsForSerialNumber(serialNumber)return self.recv_getScanRecordsForSerialNumber()def send_getScanRecordsForSerialNumber(self, serialNumber):self._oprot.writeMessageBegin('getScanRecordsForSerialNumber', TMessageType.CALL, self._seqid)args = getScanRecordsForSerialNumber_args()args.serialNumber = serialNumberargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getScanRecordsForSerialNumber(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getScanRecordsForSerialNumber_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successraise TApplicationException(TApplicationException.MISSING_RESULT, "getScanRecordsForSerialNumber failed: unknown result");def scanForPurchaseReturn(self, saleReturnItems, vendorId):"""Inserts outgoing scans for Returned Items and updates returnId in InventoryItemsParameters:- saleReturnItems- vendorId"""self.send_scanForPurchaseReturn(saleReturnItems, vendorId)self.recv_scanForPurchaseReturn()def send_scanForPurchaseReturn(self, saleReturnItems, vendorId):self._oprot.writeMessageBegin('scanForPurchaseReturn', TMessageType.CALL, self._seqid)args = scanForPurchaseReturn_args()args.saleReturnItems = saleReturnItemsargs.vendorId = vendorIdargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_scanForPurchaseReturn(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = scanForPurchaseReturn_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.ex is not None:raise result.exreturndef scanForLostItem(self, lostItems, vendorId):"""Inserts scans for lost Items and updates lastScanType in InventoryItemsParameters:- lostItems- vendorId"""self.send_scanForLostItem(lostItems, vendorId)self.recv_scanForLostItem()def send_scanForLostItem(self, lostItems, vendorId):self._oprot.writeMessageBegin('scanForLostItem', TMessageType.CALL, self._seqid)args = scanForLostItem_args()args.lostItems = lostItemsargs.vendorId = vendorIdargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_scanForLostItem(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = scanForLostItem_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.ex is not None:raise result.exreturndef getCurrentSerializedInventoryByScans(self, ):"""Get inventory count for available Serialized items in our warehouses using entries in ScanNew table"""self.send_getCurrentSerializedInventoryByScans()return self.recv_getCurrentSerializedInventoryByScans()def send_getCurrentSerializedInventoryByScans(self, ):self._oprot.writeMessageBegin('getCurrentSerializedInventoryByScans', TMessageType.CALL, self._seqid)args = getCurrentSerializedInventoryByScans_args()args.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getCurrentSerializedInventoryByScans(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getCurrentSerializedInventoryByScans_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successraise TApplicationException(TApplicationException.MISSING_RESULT, "getCurrentSerializedInventoryByScans failed: unknown result");def getCurrentNonSerializedInventoryByScans(self, ):"""Get inventory count for available Serialized items in our warehouses using entries in ScanNew table"""self.send_getCurrentNonSerializedInventoryByScans()return self.recv_getCurrentNonSerializedInventoryByScans()def send_getCurrentNonSerializedInventoryByScans(self, ):self._oprot.writeMessageBegin('getCurrentNonSerializedInventoryByScans', TMessageType.CALL, self._seqid)args = getCurrentNonSerializedInventoryByScans_args()args.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getCurrentNonSerializedInventoryByScans(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getCurrentNonSerializedInventoryByScans_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successraise TApplicationException(TApplicationException.MISSING_RESULT, "getCurrentNonSerializedInventoryByScans failed: unknown result");def getHistoricSerializedInventoryByScans(self, date):"""Get inventory for Serialized items in our warehouses at a given date using entries in ScanNew tableParameters:- date"""self.send_getHistoricSerializedInventoryByScans(date)return self.recv_getHistoricSerializedInventoryByScans()def send_getHistoricSerializedInventoryByScans(self, date):self._oprot.writeMessageBegin('getHistoricSerializedInventoryByScans', TMessageType.CALL, self._seqid)args = getHistoricSerializedInventoryByScans_args()args.date = dateargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getHistoricSerializedInventoryByScans(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getHistoricSerializedInventoryByScans_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successraise TApplicationException(TApplicationException.MISSING_RESULT, "getHistoricSerializedInventoryByScans failed: unknown result");def getHistoricNonSerializedInventoryByScans(self, date):"""Get inventory for Non Serialized items in our warehouses at a given date using entries in ScanNew tableParameters:- date"""self.send_getHistoricNonSerializedInventoryByScans(date)return self.recv_getHistoricNonSerializedInventoryByScans()def send_getHistoricNonSerializedInventoryByScans(self, date):self._oprot.writeMessageBegin('getHistoricNonSerializedInventoryByScans', TMessageType.CALL, self._seqid)args = getHistoricNonSerializedInventoryByScans_args()args.date = dateargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getHistoricNonSerializedInventoryByScans(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getHistoricNonSerializedInventoryByScans_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successraise TApplicationException(TApplicationException.MISSING_RESULT, "getHistoricNonSerializedInventoryByScans failed: unknown result");def scanForOursExternalSale(self, itemId, serialNumber, itemNumber, invoiceNumber, warehouseId, unitPrice, orderId):"""Insert Purchase/Sale Entries for product billed by Hotspot using OURS_EXTERNAL BillingParameters:- itemId- serialNumber- itemNumber- invoiceNumber- warehouseId- unitPrice- orderId"""self.send_scanForOursExternalSale(itemId, serialNumber, itemNumber, invoiceNumber, warehouseId, unitPrice, orderId)return self.recv_scanForOursExternalSale()def send_scanForOursExternalSale(self, itemId, serialNumber, itemNumber, invoiceNumber, warehouseId, unitPrice, orderId):self._oprot.writeMessageBegin('scanForOursExternalSale', TMessageType.CALL, self._seqid)args = scanForOursExternalSale_args()args.itemId = itemIdargs.serialNumber = serialNumberargs.itemNumber = itemNumberargs.invoiceNumber = invoiceNumberargs.warehouseId = warehouseIdargs.unitPrice = unitPriceargs.orderId = orderIdargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_scanForOursExternalSale(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = scanForOursExternalSale_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successif result.ex is not None:raise result.exraise TApplicationException(TApplicationException.MISSING_RESULT, "scanForOursExternalSale failed: unknown result");def scanForOursExternalSaleReturn(self, orderId, unitPrice):"""Insert Purchase_Ret/Sale_Ret Entries for product billed by Hotspot using OURS_EXTERNAL BillingParameters:- orderId- unitPrice"""self.send_scanForOursExternalSaleReturn(orderId, unitPrice)self.recv_scanForOursExternalSaleReturn()def send_scanForOursExternalSaleReturn(self, orderId, unitPrice):self._oprot.writeMessageBegin('scanForOursExternalSaleReturn', TMessageType.CALL, self._seqid)args = scanForOursExternalSaleReturn_args()args.orderId = orderIdargs.unitPrice = unitPriceargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_scanForOursExternalSaleReturn(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = scanForOursExternalSaleReturn_result()result.read(self._iprot)self._iprot.readMessageEnd()returndef getMovementNonSerializedInventoryByScans(self, startDate, endDate):"""Parameters:- startDate- endDate"""self.send_getMovementNonSerializedInventoryByScans(startDate, endDate)return self.recv_getMovementNonSerializedInventoryByScans()def send_getMovementNonSerializedInventoryByScans(self, startDate, endDate):self._oprot.writeMessageBegin('getMovementNonSerializedInventoryByScans', TMessageType.CALL, self._seqid)args = getMovementNonSerializedInventoryByScans_args()args.startDate = startDateargs.endDate = endDateargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getMovementNonSerializedInventoryByScans(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getMovementNonSerializedInventoryByScans_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successraise TApplicationException(TApplicationException.MISSING_RESULT, "getMovementNonSerializedInventoryByScans failed: unknown result");def getMovementSerializedInventoryByScans(self, startDate, endDate):"""Parameters:- startDate- endDate"""self.send_getMovementSerializedInventoryByScans(startDate, endDate)return self.recv_getMovementSerializedInventoryByScans()def send_getMovementSerializedInventoryByScans(self, startDate, endDate):self._oprot.writeMessageBegin('getMovementSerializedInventoryByScans', TMessageType.CALL, self._seqid)args = getMovementSerializedInventoryByScans_args()args.startDate = startDateargs.endDate = endDateargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getMovementSerializedInventoryByScans(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getMovementSerializedInventoryByScans_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successraise TApplicationException(TApplicationException.MISSING_RESULT, "getMovementSerializedInventoryByScans failed: unknown result");def scanfreebie(self, orderId, freebieItemId, freebieWarehouseId, scanType):"""Parameters:- orderId- freebieItemId- freebieWarehouseId- scanType"""self.send_scanfreebie(orderId, freebieItemId, freebieWarehouseId, scanType)return self.recv_scanfreebie()def send_scanfreebie(self, orderId, freebieItemId, freebieWarehouseId, scanType):self._oprot.writeMessageBegin('scanfreebie', TMessageType.CALL, self._seqid)args = scanfreebie_args()args.orderId = orderIdargs.freebieItemId = freebieItemIdargs.freebieWarehouseId = freebieWarehouseIdargs.scanType = scanTypeargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_scanfreebie(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = scanfreebie_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successif result.wex is not None:raise result.wexraise TApplicationException(TApplicationException.MISSING_RESULT, "scanfreebie 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["getInventoryItem"] = Processor.process_getInventoryItemself._processMap["getNonSeralizedInventoryItem"] = Processor.process_getNonSeralizedInventoryItemself._processMap["scan"] = Processor.process_scanself._processMap["scanSerializedItemForOrder"] = Processor.process_scanSerializedItemForOrderself._processMap["scanForOrder"] = Processor.process_scanForOrderself._processMap["createItemNumberMapping"] = Processor.process_createItemNumberMappingself._processMap["getItemNumbers"] = Processor.process_getItemNumbersself._processMap["getItemIds"] = Processor.process_getItemIdsself._processMap["getInventoryItemsFromLastScanType"] = Processor.process_getInventoryItemsFromLastScanTypeself._processMap["getInventoryItemFromId"] = Processor.process_getInventoryItemFromIdself._processMap["getPurchaseScans"] = Processor.process_getPurchaseScansself._processMap["fetchScansPerInvoiceNumber"] = Processor.process_fetchScansPerInvoiceNumberself._processMap["getInventoryItemFromOrder"] = Processor.process_getInventoryItemFromOrderself._processMap["getInventoryAge"] = Processor.process_getInventoryAgeself._processMap["getInventoryScansForItem"] = Processor.process_getInventoryScansForItemself._processMap["getScanRecordsForSerialNumber"] = Processor.process_getScanRecordsForSerialNumberself._processMap["scanForPurchaseReturn"] = Processor.process_scanForPurchaseReturnself._processMap["scanForLostItem"] = Processor.process_scanForLostItemself._processMap["getCurrentSerializedInventoryByScans"] = Processor.process_getCurrentSerializedInventoryByScansself._processMap["getCurrentNonSerializedInventoryByScans"] = Processor.process_getCurrentNonSerializedInventoryByScansself._processMap["getHistoricSerializedInventoryByScans"] = Processor.process_getHistoricSerializedInventoryByScansself._processMap["getHistoricNonSerializedInventoryByScans"] = Processor.process_getHistoricNonSerializedInventoryByScansself._processMap["scanForOursExternalSale"] = Processor.process_scanForOursExternalSaleself._processMap["scanForOursExternalSaleReturn"] = Processor.process_scanForOursExternalSaleReturnself._processMap["getMovementNonSerializedInventoryByScans"] = Processor.process_getMovementNonSerializedInventoryByScansself._processMap["getMovementSerializedInventoryByScans"] = Processor.process_getMovementSerializedInventoryByScansself._processMap["scanfreebie"] = Processor.process_scanfreebiedef 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()returnelse:self._processMap[name](self, seqid, iprot, oprot)return Truedef process_getInventoryItem(self, seqid, iprot, oprot):args = getInventoryItem_args()args.read(iprot)iprot.readMessageEnd()result = getInventoryItem_result()try:result.success = self._handler.getInventoryItem(args.serialNumber)except WarehouseServiceException, wex:result.wex = wexoprot.writeMessageBegin("getInventoryItem", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_getNonSeralizedInventoryItem(self, seqid, iprot, oprot):args = getNonSeralizedInventoryItem_args()args.read(iprot)iprot.readMessageEnd()result = getNonSeralizedInventoryItem_result()try:result.success = self._handler.getNonSeralizedInventoryItem(args.itemNumber, args.itemId, args.fulfilmentWarehouseId)except WarehouseServiceException, wex:result.wex = wexoprot.writeMessageBegin("getNonSeralizedInventoryItem", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_scan(self, seqid, iprot, oprot):args = scan_args()args.read(iprot)iprot.readMessageEnd()result = scan_result()try:self._handler.scan(args.inventoryItem, args.type, args.quantity, args.billingWarehouseId)except WarehouseServiceException, wex:result.wex = wexoprot.writeMessageBegin("scan", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_scanSerializedItemForOrder(self, seqid, iprot, oprot):args = scanSerializedItemForOrder_args()args.read(iprot)iprot.readMessageEnd()result = scanSerializedItemForOrder_result()try:result.success = self._handler.scanSerializedItemForOrder(args.serialNumber, args.type, args.orderId, args.fulfilmentWarehouseId, args.quantity, args.billingWarehouseId)except WarehouseServiceException, wex:result.wex = wexoprot.writeMessageBegin("scanSerializedItemForOrder", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_scanForOrder(self, seqid, iprot, oprot):args = scanForOrder_args()args.read(iprot)iprot.readMessageEnd()result = scanForOrder_result()try:result.success = self._handler.scanForOrder(args.inventoryItem, args.type, args.quantity, args.orderId, args.fulfilmentWarehouseId, args.billingWarehouseId)except WarehouseServiceException, wex:result.wex = wexoprot.writeMessageBegin("scanForOrder", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_createItemNumberMapping(self, seqid, iprot, oprot):args = createItemNumberMapping_args()args.read(iprot)iprot.readMessageEnd()result = createItemNumberMapping_result()self._handler.createItemNumberMapping(args.itemNumber, args.itemId)oprot.writeMessageBegin("createItemNumberMapping", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_getItemNumbers(self, seqid, iprot, oprot):args = getItemNumbers_args()args.read(iprot)iprot.readMessageEnd()result = getItemNumbers_result()result.success = self._handler.getItemNumbers(args.itemId)oprot.writeMessageBegin("getItemNumbers", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_getItemIds(self, seqid, iprot, oprot):args = getItemIds_args()args.read(iprot)iprot.readMessageEnd()result = getItemIds_result()result.success = self._handler.getItemIds(args.itemNumber)oprot.writeMessageBegin("getItemIds", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_getInventoryItemsFromLastScanType(self, seqid, iprot, oprot):args = getInventoryItemsFromLastScanType_args()args.read(iprot)iprot.readMessageEnd()result = getInventoryItemsFromLastScanType_result()try:result.success = self._handler.getInventoryItemsFromLastScanType(args.lastScanType)except WarehouseServiceException, wex:result.wex = wexoprot.writeMessageBegin("getInventoryItemsFromLastScanType", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_getInventoryItemFromId(self, seqid, iprot, oprot):args = getInventoryItemFromId_args()args.read(iprot)iprot.readMessageEnd()result = getInventoryItemFromId_result()try:result.success = self._handler.getInventoryItemFromId(args.inventoryItemId)except WarehouseServiceException, wex:result.wex = wexoprot.writeMessageBegin("getInventoryItemFromId", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_getPurchaseScans(self, seqid, iprot, oprot):args = getPurchaseScans_args()args.read(iprot)iprot.readMessageEnd()result = getPurchaseScans_result()result.success = self._handler.getPurchaseScans(args.startDate, args.endDate)oprot.writeMessageBegin("getPurchaseScans", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_fetchScansPerInvoiceNumber(self, seqid, iprot, oprot):args = fetchScansPerInvoiceNumber_args()args.read(iprot)iprot.readMessageEnd()result = fetchScansPerInvoiceNumber_result()result.success = self._handler.fetchScansPerInvoiceNumber(args.date)oprot.writeMessageBegin("fetchScansPerInvoiceNumber", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_getInventoryItemFromOrder(self, seqid, iprot, oprot):args = getInventoryItemFromOrder_args()args.read(iprot)iprot.readMessageEnd()result = getInventoryItemFromOrder_result()try:result.success = self._handler.getInventoryItemFromOrder(args.orderId)except WarehouseServiceException, we:result.we = weoprot.writeMessageBegin("getInventoryItemFromOrder", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_getInventoryAge(self, seqid, iprot, oprot):args = getInventoryAge_args()args.read(iprot)iprot.readMessageEnd()result = getInventoryAge_result()result.success = self._handler.getInventoryAge()oprot.writeMessageBegin("getInventoryAge", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_getInventoryScansForItem(self, seqid, iprot, oprot):args = getInventoryScansForItem_args()args.read(iprot)iprot.readMessageEnd()result = getInventoryScansForItem_result()result.success = self._handler.getInventoryScansForItem(args.itemId, args.fromDate, args.toDate)oprot.writeMessageBegin("getInventoryScansForItem", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_getScanRecordsForSerialNumber(self, seqid, iprot, oprot):args = getScanRecordsForSerialNumber_args()args.read(iprot)iprot.readMessageEnd()result = getScanRecordsForSerialNumber_result()result.success = self._handler.getScanRecordsForSerialNumber(args.serialNumber)oprot.writeMessageBegin("getScanRecordsForSerialNumber", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_scanForPurchaseReturn(self, seqid, iprot, oprot):args = scanForPurchaseReturn_args()args.read(iprot)iprot.readMessageEnd()result = scanForPurchaseReturn_result()try:self._handler.scanForPurchaseReturn(args.saleReturnItems, args.vendorId)except WarehouseServiceException, ex:result.ex = exoprot.writeMessageBegin("scanForPurchaseReturn", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_scanForLostItem(self, seqid, iprot, oprot):args = scanForLostItem_args()args.read(iprot)iprot.readMessageEnd()result = scanForLostItem_result()try:self._handler.scanForLostItem(args.lostItems, args.vendorId)except WarehouseServiceException, ex:result.ex = exoprot.writeMessageBegin("scanForLostItem", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_getCurrentSerializedInventoryByScans(self, seqid, iprot, oprot):args = getCurrentSerializedInventoryByScans_args()args.read(iprot)iprot.readMessageEnd()result = getCurrentSerializedInventoryByScans_result()result.success = self._handler.getCurrentSerializedInventoryByScans()oprot.writeMessageBegin("getCurrentSerializedInventoryByScans", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_getCurrentNonSerializedInventoryByScans(self, seqid, iprot, oprot):args = getCurrentNonSerializedInventoryByScans_args()args.read(iprot)iprot.readMessageEnd()result = getCurrentNonSerializedInventoryByScans_result()result.success = self._handler.getCurrentNonSerializedInventoryByScans()oprot.writeMessageBegin("getCurrentNonSerializedInventoryByScans", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_getHistoricSerializedInventoryByScans(self, seqid, iprot, oprot):args = getHistoricSerializedInventoryByScans_args()args.read(iprot)iprot.readMessageEnd()result = getHistoricSerializedInventoryByScans_result()result.success = self._handler.getHistoricSerializedInventoryByScans(args.date)oprot.writeMessageBegin("getHistoricSerializedInventoryByScans", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_getHistoricNonSerializedInventoryByScans(self, seqid, iprot, oprot):args = getHistoricNonSerializedInventoryByScans_args()args.read(iprot)iprot.readMessageEnd()result = getHistoricNonSerializedInventoryByScans_result()result.success = self._handler.getHistoricNonSerializedInventoryByScans(args.date)oprot.writeMessageBegin("getHistoricNonSerializedInventoryByScans", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_scanForOursExternalSale(self, seqid, iprot, oprot):args = scanForOursExternalSale_args()args.read(iprot)iprot.readMessageEnd()result = scanForOursExternalSale_result()try:result.success = self._handler.scanForOursExternalSale(args.itemId, args.serialNumber, args.itemNumber, args.invoiceNumber, args.warehouseId, args.unitPrice, args.orderId)except WarehouseServiceException, ex:result.ex = exoprot.writeMessageBegin("scanForOursExternalSale", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_scanForOursExternalSaleReturn(self, seqid, iprot, oprot):args = scanForOursExternalSaleReturn_args()args.read(iprot)iprot.readMessageEnd()result = scanForOursExternalSaleReturn_result()self._handler.scanForOursExternalSaleReturn(args.orderId, args.unitPrice)oprot.writeMessageBegin("scanForOursExternalSaleReturn", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_getMovementNonSerializedInventoryByScans(self, seqid, iprot, oprot):args = getMovementNonSerializedInventoryByScans_args()args.read(iprot)iprot.readMessageEnd()result = getMovementNonSerializedInventoryByScans_result()result.success = self._handler.getMovementNonSerializedInventoryByScans(args.startDate, args.endDate)oprot.writeMessageBegin("getMovementNonSerializedInventoryByScans", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_getMovementSerializedInventoryByScans(self, seqid, iprot, oprot):args = getMovementSerializedInventoryByScans_args()args.read(iprot)iprot.readMessageEnd()result = getMovementSerializedInventoryByScans_result()result.success = self._handler.getMovementSerializedInventoryByScans(args.startDate, args.endDate)oprot.writeMessageBegin("getMovementSerializedInventoryByScans", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_scanfreebie(self, seqid, iprot, oprot):args = scanfreebie_args()args.read(iprot)iprot.readMessageEnd()result = scanfreebie_result()try:result.success = self._handler.scanfreebie(args.orderId, args.freebieItemId, args.freebieWarehouseId, args.scanType)except WarehouseServiceException, wex:result.wex = wexoprot.writeMessageBegin("scanfreebie", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()# HELPER FUNCTIONS AND STRUCTURESclass getInventoryItem_args:"""Attributes:- serialNumber"""thrift_spec = (None, # 0(1, TType.STRING, 'serialNumber', None, None, ), # 1)def __init__(self, serialNumber=None,):self.serialNumber = serialNumberdef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.STRING:self.serialNumber = 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)))returnoprot.writeStructBegin('getInventoryItem_args')if self.serialNumber is not None:oprot.writeFieldBegin('serialNumber', TType.STRING, 1)oprot.writeString(self.serialNumber)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getInventoryItem_result:"""Attributes:- success- wex"""thrift_spec = ((0, TType.STRUCT, 'success', (InventoryItem, InventoryItem.thrift_spec), None, ), # 0(1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1)def __init__(self, success=None, wex=None,):self.success = successself.wex = wexdef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.STRUCT:self.success = InventoryItem()self.success.read(iprot)else:iprot.skip(ftype)elif fid == 1:if ftype == TType.STRUCT:self.wex = WarehouseServiceException()self.wex.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)))returnoprot.writeStructBegin('getInventoryItem_result')if self.success is not None:oprot.writeFieldBegin('success', TType.STRUCT, 0)self.success.write(oprot)oprot.writeFieldEnd()if self.wex is not None:oprot.writeFieldBegin('wex', TType.STRUCT, 1)self.wex.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getNonSeralizedInventoryItem_args:"""Attributes:- itemNumber- itemId- fulfilmentWarehouseId"""thrift_spec = (None, # 0(1, TType.STRING, 'itemNumber', None, None, ), # 1(2, TType.I64, 'itemId', None, None, ), # 2(3, TType.I64, 'fulfilmentWarehouseId', None, None, ), # 3)def __init__(self, itemNumber=None, itemId=None, fulfilmentWarehouseId=None,):self.itemNumber = itemNumberself.itemId = itemIdself.fulfilmentWarehouseId = fulfilmentWarehouseIddef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.STRING:self.itemNumber = iprot.readString();else:iprot.skip(ftype)elif fid == 2:if ftype == TType.I64:self.itemId = iprot.readI64();else:iprot.skip(ftype)elif fid == 3:if ftype == TType.I64:self.fulfilmentWarehouseId = 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)))returnoprot.writeStructBegin('getNonSeralizedInventoryItem_args')if self.itemNumber is not None:oprot.writeFieldBegin('itemNumber', TType.STRING, 1)oprot.writeString(self.itemNumber)oprot.writeFieldEnd()if self.itemId is not None:oprot.writeFieldBegin('itemId', TType.I64, 2)oprot.writeI64(self.itemId)oprot.writeFieldEnd()if self.fulfilmentWarehouseId is not None:oprot.writeFieldBegin('fulfilmentWarehouseId', TType.I64, 3)oprot.writeI64(self.fulfilmentWarehouseId)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getNonSeralizedInventoryItem_result:"""Attributes:- success- wex"""thrift_spec = ((0, TType.STRUCT, 'success', (InventoryItem, InventoryItem.thrift_spec), None, ), # 0(1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1)def __init__(self, success=None, wex=None,):self.success = successself.wex = wexdef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.STRUCT:self.success = InventoryItem()self.success.read(iprot)else:iprot.skip(ftype)elif fid == 1:if ftype == TType.STRUCT:self.wex = WarehouseServiceException()self.wex.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)))returnoprot.writeStructBegin('getNonSeralizedInventoryItem_result')if self.success is not None:oprot.writeFieldBegin('success', TType.STRUCT, 0)self.success.write(oprot)oprot.writeFieldEnd()if self.wex is not None:oprot.writeFieldBegin('wex', TType.STRUCT, 1)self.wex.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 scan_args:"""Attributes:- inventoryItem- type- quantity- billingWarehouseId"""thrift_spec = (None, # 0(1, TType.STRUCT, 'inventoryItem', (InventoryItem, InventoryItem.thrift_spec), None, ), # 1(2, TType.I32, 'type', None, None, ), # 2(3, TType.I64, 'quantity', None, None, ), # 3(4, TType.I64, 'billingWarehouseId', None, None, ), # 4)def __init__(self, inventoryItem=None, type=None, quantity=None, billingWarehouseId=None,):self.inventoryItem = inventoryItemself.type = typeself.quantity = quantityself.billingWarehouseId = billingWarehouseIddef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.STRUCT:self.inventoryItem = InventoryItem()self.inventoryItem.read(iprot)else:iprot.skip(ftype)elif fid == 2:if ftype == TType.I32:self.type = iprot.readI32();else:iprot.skip(ftype)elif fid == 3:if ftype == TType.I64:self.quantity = iprot.readI64();else:iprot.skip(ftype)elif fid == 4:if ftype == TType.I64:self.billingWarehouseId = 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)))returnoprot.writeStructBegin('scan_args')if self.inventoryItem is not None:oprot.writeFieldBegin('inventoryItem', TType.STRUCT, 1)self.inventoryItem.write(oprot)oprot.writeFieldEnd()if self.type is not None:oprot.writeFieldBegin('type', TType.I32, 2)oprot.writeI32(self.type)oprot.writeFieldEnd()if self.quantity is not None:oprot.writeFieldBegin('quantity', TType.I64, 3)oprot.writeI64(self.quantity)oprot.writeFieldEnd()if self.billingWarehouseId is not None:oprot.writeFieldBegin('billingWarehouseId', TType.I64, 4)oprot.writeI64(self.billingWarehouseId)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 scan_result:"""Attributes:- wex"""thrift_spec = (None, # 0(1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1)def __init__(self, wex=None,):self.wex = wexdef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.STRUCT:self.wex = WarehouseServiceException()self.wex.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)))returnoprot.writeStructBegin('scan_result')if self.wex is not None:oprot.writeFieldBegin('wex', TType.STRUCT, 1)self.wex.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 scanSerializedItemForOrder_args:"""Attributes:- serialNumber- type- orderId- fulfilmentWarehouseId- quantity- billingWarehouseId"""thrift_spec = (None, # 0(1, TType.STRING, 'serialNumber', None, None, ), # 1(2, TType.I32, 'type', None, None, ), # 2(3, TType.I64, 'orderId', None, None, ), # 3(4, TType.I64, 'fulfilmentWarehouseId', None, None, ), # 4(5, TType.DOUBLE, 'quantity', None, None, ), # 5(6, TType.I64, 'billingWarehouseId', None, None, ), # 6)def __init__(self, serialNumber=None, type=None, orderId=None, fulfilmentWarehouseId=None, quantity=None, billingWarehouseId=None,):self.serialNumber = serialNumberself.type = typeself.orderId = orderIdself.fulfilmentWarehouseId = fulfilmentWarehouseIdself.quantity = quantityself.billingWarehouseId = billingWarehouseIddef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.STRING:self.serialNumber = iprot.readString();else:iprot.skip(ftype)elif fid == 2:if ftype == TType.I32:self.type = iprot.readI32();else:iprot.skip(ftype)elif fid == 3:if ftype == TType.I64:self.orderId = iprot.readI64();else:iprot.skip(ftype)elif fid == 4:if ftype == TType.I64:self.fulfilmentWarehouseId = iprot.readI64();else:iprot.skip(ftype)elif fid == 5:if ftype == TType.DOUBLE:self.quantity = iprot.readDouble();else:iprot.skip(ftype)elif fid == 6:if ftype == TType.I64:self.billingWarehouseId = 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)))returnoprot.writeStructBegin('scanSerializedItemForOrder_args')if self.serialNumber is not None:oprot.writeFieldBegin('serialNumber', TType.STRING, 1)oprot.writeString(self.serialNumber)oprot.writeFieldEnd()if self.type is not None:oprot.writeFieldBegin('type', TType.I32, 2)oprot.writeI32(self.type)oprot.writeFieldEnd()if self.orderId is not None:oprot.writeFieldBegin('orderId', TType.I64, 3)oprot.writeI64(self.orderId)oprot.writeFieldEnd()if self.fulfilmentWarehouseId is not None:oprot.writeFieldBegin('fulfilmentWarehouseId', TType.I64, 4)oprot.writeI64(self.fulfilmentWarehouseId)oprot.writeFieldEnd()if self.quantity is not None:oprot.writeFieldBegin('quantity', TType.DOUBLE, 5)oprot.writeDouble(self.quantity)oprot.writeFieldEnd()if self.billingWarehouseId is not None:oprot.writeFieldBegin('billingWarehouseId', TType.I64, 6)oprot.writeI64(self.billingWarehouseId)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 scanSerializedItemForOrder_result:"""Attributes:- success- wex"""thrift_spec = ((0, TType.STRUCT, 'success', (InventoryItem, InventoryItem.thrift_spec), None, ), # 0(1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1)def __init__(self, success=None, wex=None,):self.success = successself.wex = wexdef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.STRUCT:self.success = InventoryItem()self.success.read(iprot)else:iprot.skip(ftype)elif fid == 1:if ftype == TType.STRUCT:self.wex = WarehouseServiceException()self.wex.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)))returnoprot.writeStructBegin('scanSerializedItemForOrder_result')if self.success is not None:oprot.writeFieldBegin('success', TType.STRUCT, 0)self.success.write(oprot)oprot.writeFieldEnd()if self.wex is not None:oprot.writeFieldBegin('wex', TType.STRUCT, 1)self.wex.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 scanForOrder_args:"""Attributes:- inventoryItem- type- quantity- orderId- fulfilmentWarehouseId- billingWarehouseId"""thrift_spec = (None, # 0(1, TType.STRUCT, 'inventoryItem', (InventoryItem, InventoryItem.thrift_spec), None, ), # 1(2, TType.I32, 'type', None, None, ), # 2(3, TType.I64, 'quantity', None, None, ), # 3(4, TType.I64, 'orderId', None, None, ), # 4(5, TType.I64, 'fulfilmentWarehouseId', None, None, ), # 5(6, TType.I64, 'billingWarehouseId', None, None, ), # 6)def __init__(self, inventoryItem=None, type=None, quantity=None, orderId=None, fulfilmentWarehouseId=None, billingWarehouseId=None,):self.inventoryItem = inventoryItemself.type = typeself.quantity = quantityself.orderId = orderIdself.fulfilmentWarehouseId = fulfilmentWarehouseIdself.billingWarehouseId = billingWarehouseIddef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.STRUCT:self.inventoryItem = InventoryItem()self.inventoryItem.read(iprot)else:iprot.skip(ftype)elif fid == 2:if ftype == TType.I32:self.type = iprot.readI32();else:iprot.skip(ftype)elif fid == 3:if ftype == TType.I64:self.quantity = iprot.readI64();else:iprot.skip(ftype)elif fid == 4:if ftype == TType.I64:self.orderId = iprot.readI64();else:iprot.skip(ftype)elif fid == 5:if ftype == TType.I64:self.fulfilmentWarehouseId = iprot.readI64();else:iprot.skip(ftype)elif fid == 6:if ftype == TType.I64:self.billingWarehouseId = 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)))returnoprot.writeStructBegin('scanForOrder_args')if self.inventoryItem is not None:oprot.writeFieldBegin('inventoryItem', TType.STRUCT, 1)self.inventoryItem.write(oprot)oprot.writeFieldEnd()if self.type is not None:oprot.writeFieldBegin('type', TType.I32, 2)oprot.writeI32(self.type)oprot.writeFieldEnd()if self.quantity is not None:oprot.writeFieldBegin('quantity', TType.I64, 3)oprot.writeI64(self.quantity)oprot.writeFieldEnd()if self.orderId is not None:oprot.writeFieldBegin('orderId', TType.I64, 4)oprot.writeI64(self.orderId)oprot.writeFieldEnd()if self.fulfilmentWarehouseId is not None:oprot.writeFieldBegin('fulfilmentWarehouseId', TType.I64, 5)oprot.writeI64(self.fulfilmentWarehouseId)oprot.writeFieldEnd()if self.billingWarehouseId is not None:oprot.writeFieldBegin('billingWarehouseId', TType.I64, 6)oprot.writeI64(self.billingWarehouseId)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 scanForOrder_result:"""Attributes:- success- wex"""thrift_spec = ((0, TType.STRUCT, 'success', (InventoryItem, InventoryItem.thrift_spec), None, ), # 0(1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1)def __init__(self, success=None, wex=None,):self.success = successself.wex = wexdef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.STRUCT:self.success = InventoryItem()self.success.read(iprot)else:iprot.skip(ftype)elif fid == 1:if ftype == TType.STRUCT:self.wex = WarehouseServiceException()self.wex.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)))returnoprot.writeStructBegin('scanForOrder_result')if self.success is not None:oprot.writeFieldBegin('success', TType.STRUCT, 0)self.success.write(oprot)oprot.writeFieldEnd()if self.wex is not None:oprot.writeFieldBegin('wex', TType.STRUCT, 1)self.wex.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 createItemNumberMapping_args:"""Attributes:- itemNumber- itemId"""thrift_spec = (None, # 0(1, TType.STRING, 'itemNumber', None, None, ), # 1(2, TType.I64, 'itemId', None, None, ), # 2)def __init__(self, itemNumber=None, itemId=None,):self.itemNumber = itemNumberself.itemId = itemIddef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.STRING:self.itemNumber = iprot.readString();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)))returnoprot.writeStructBegin('createItemNumberMapping_args')if self.itemNumber is not None:oprot.writeFieldBegin('itemNumber', TType.STRING, 1)oprot.writeString(self.itemNumber)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):returndef __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 createItemNumberMapping_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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakelse: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)))returnoprot.writeStructBegin('createItemNumberMapping_result')oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getItemNumbers_args:"""Attributes:- itemId"""thrift_spec = (None, # 0(1, TType.I64, 'itemId', None, None, ), # 1)def __init__(self, itemId=None,):self.itemId = itemIddef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1: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)))returnoprot.writeStructBegin('getItemNumbers_args')if self.itemId is not None:oprot.writeFieldBegin('itemId', TType.I64, 1)oprot.writeI64(self.itemId)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getItemNumbers_result:"""Attributes:- success"""thrift_spec = ((0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0)def __init__(self, success=None,):self.success = successdef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.LIST:self.success = [](_etype3, _size0) = iprot.readListBegin()for _i4 in xrange(_size0):_elem5 = iprot.readString();self.success.append(_elem5)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)))returnoprot.writeStructBegin('getItemNumbers_result')if self.success is not None:oprot.writeFieldBegin('success', TType.LIST, 0)oprot.writeListBegin(TType.STRING, len(self.success))for iter6 in self.success:oprot.writeString(iter6)oprot.writeListEnd()oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getItemIds_args:"""Attributes:- itemNumber"""thrift_spec = (None, # 0(1, TType.STRING, 'itemNumber', None, None, ), # 1)def __init__(self, itemNumber=None,):self.itemNumber = itemNumberdef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.STRING:self.itemNumber = 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)))returnoprot.writeStructBegin('getItemIds_args')if self.itemNumber is not None:oprot.writeFieldBegin('itemNumber', TType.STRING, 1)oprot.writeString(self.itemNumber)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getItemIds_result:"""Attributes:- success"""thrift_spec = ((0, TType.LIST, 'success', (TType.I64,None), None, ), # 0)def __init__(self, success=None,):self.success = successdef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.LIST:self.success = [](_etype10, _size7) = iprot.readListBegin()for _i11 in xrange(_size7):_elem12 = iprot.readI64();self.success.append(_elem12)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)))returnoprot.writeStructBegin('getItemIds_result')if self.success is not None:oprot.writeFieldBegin('success', TType.LIST, 0)oprot.writeListBegin(TType.I64, len(self.success))for iter13 in self.success:oprot.writeI64(iter13)oprot.writeListEnd()oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getInventoryItemsFromLastScanType_args:"""Attributes:- lastScanType"""thrift_spec = (None, # 0(1, TType.I32, 'lastScanType', None, None, ), # 1)def __init__(self, lastScanType=None,):self.lastScanType = lastScanTypedef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.I32:self.lastScanType = 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)))returnoprot.writeStructBegin('getInventoryItemsFromLastScanType_args')if self.lastScanType is not None:oprot.writeFieldBegin('lastScanType', TType.I32, 1)oprot.writeI32(self.lastScanType)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getInventoryItemsFromLastScanType_result:"""Attributes:- success- wex"""thrift_spec = ((0, TType.LIST, 'success', (TType.STRUCT,(InventoryItem, InventoryItem.thrift_spec)), None, ), # 0(1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1)def __init__(self, success=None, wex=None,):self.success = successself.wex = wexdef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.LIST:self.success = [](_etype17, _size14) = iprot.readListBegin()for _i18 in xrange(_size14):_elem19 = InventoryItem()_elem19.read(iprot)self.success.append(_elem19)iprot.readListEnd()else:iprot.skip(ftype)elif fid == 1:if ftype == TType.STRUCT:self.wex = WarehouseServiceException()self.wex.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)))returnoprot.writeStructBegin('getInventoryItemsFromLastScanType_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.wex is not None:oprot.writeFieldBegin('wex', TType.STRUCT, 1)self.wex.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getInventoryItemFromId_args:"""Attributes:- inventoryItemId"""thrift_spec = (None, # 0(1, TType.I64, 'inventoryItemId', None, None, ), # 1)def __init__(self, inventoryItemId=None,):self.inventoryItemId = inventoryItemIddef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.I64:self.inventoryItemId = 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)))returnoprot.writeStructBegin('getInventoryItemFromId_args')if self.inventoryItemId is not None:oprot.writeFieldBegin('inventoryItemId', TType.I64, 1)oprot.writeI64(self.inventoryItemId)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getInventoryItemFromId_result:"""Attributes:- success- wex"""thrift_spec = ((0, TType.STRUCT, 'success', (InventoryItem, InventoryItem.thrift_spec), None, ), # 0(1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1)def __init__(self, success=None, wex=None,):self.success = successself.wex = wexdef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.STRUCT:self.success = InventoryItem()self.success.read(iprot)else:iprot.skip(ftype)elif fid == 1:if ftype == TType.STRUCT:self.wex = WarehouseServiceException()self.wex.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)))returnoprot.writeStructBegin('getInventoryItemFromId_result')if self.success is not None:oprot.writeFieldBegin('success', TType.STRUCT, 0)self.success.write(oprot)oprot.writeFieldEnd()if self.wex is not None:oprot.writeFieldBegin('wex', TType.STRUCT, 1)self.wex.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getPurchaseScans_args:"""Attributes:- startDate- endDate"""thrift_spec = (None, # 0(1, TType.I64, 'startDate', None, None, ), # 1(2, TType.I64, 'endDate', None, None, ), # 2)def __init__(self, startDate=None, endDate=None,):self.startDate = startDateself.endDate = endDatedef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.I64:self.startDate = iprot.readI64();else:iprot.skip(ftype)elif fid == 2:if ftype == TType.I64:self.endDate = 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)))returnoprot.writeStructBegin('getPurchaseScans_args')if self.startDate is not None:oprot.writeFieldBegin('startDate', TType.I64, 1)oprot.writeI64(self.startDate)oprot.writeFieldEnd()if self.endDate is not None:oprot.writeFieldBegin('endDate', TType.I64, 2)oprot.writeI64(self.endDate)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getPurchaseScans_result:"""Attributes:- success"""thrift_spec = ((0, TType.LIST, 'success', (TType.STRUCT,(DetailedPurchaseScan, DetailedPurchaseScan.thrift_spec)), None, ), # 0)def __init__(self, success=None,):self.success = successdef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.LIST:self.success = [](_etype24, _size21) = iprot.readListBegin()for _i25 in xrange(_size21):_elem26 = DetailedPurchaseScan()_elem26.read(iprot)self.success.append(_elem26)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)))returnoprot.writeStructBegin('getPurchaseScans_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()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 fetchScansPerInvoiceNumber_args:"""Attributes:- date"""thrift_spec = (None, # 0(1, TType.I64, 'date', None, None, ), # 1)def __init__(self, date=None,):self.date = datedef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.I64:self.date = 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)))returnoprot.writeStructBegin('fetchScansPerInvoiceNumber_args')if self.date is not None:oprot.writeFieldBegin('date', TType.I64, 1)oprot.writeI64(self.date)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 fetchScansPerInvoiceNumber_result:"""Attributes:- success"""thrift_spec = ((0, TType.LIST, 'success', (TType.STRUCT,(InvoiceScan, InvoiceScan.thrift_spec)), None, ), # 0)def __init__(self, success=None,):self.success = successdef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.LIST:self.success = [](_etype31, _size28) = iprot.readListBegin()for _i32 in xrange(_size28):_elem33 = InvoiceScan()_elem33.read(iprot)self.success.append(_elem33)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)))returnoprot.writeStructBegin('fetchScansPerInvoiceNumber_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()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getInventoryItemFromOrder_args:"""Attributes:- orderId"""thrift_spec = (None, # 0(1, TType.I64, 'orderId', None, None, ), # 1)def __init__(self, orderId=None,):self.orderId = orderIddef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif 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)))returnoprot.writeStructBegin('getInventoryItemFromOrder_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):returndef __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 getInventoryItemFromOrder_result:"""Attributes:- success- we"""thrift_spec = ((0, TType.STRUCT, 'success', (InventoryItem, InventoryItem.thrift_spec), None, ), # 0(1, TType.STRUCT, 'we', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1)def __init__(self, success=None, we=None,):self.success = successself.we = wedef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.STRUCT:self.success = InventoryItem()self.success.read(iprot)else:iprot.skip(ftype)elif fid == 1:if ftype == TType.STRUCT:self.we = WarehouseServiceException()self.we.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)))returnoprot.writeStructBegin('getInventoryItemFromOrder_result')if self.success is not None:oprot.writeFieldBegin('success', TType.STRUCT, 0)self.success.write(oprot)oprot.writeFieldEnd()if self.we is not None:oprot.writeFieldBegin('we', TType.STRUCT, 1)self.we.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getInventoryAge_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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakelse: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)))returnoprot.writeStructBegin('getInventoryAge_args')oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getInventoryAge_result:"""Attributes:- success"""thrift_spec = ((0, TType.LIST, 'success', (TType.STRUCT,(InventoryAge, InventoryAge.thrift_spec)), None, ), # 0)def __init__(self, success=None,):self.success = successdef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.LIST:self.success = [](_etype38, _size35) = iprot.readListBegin()for _i39 in xrange(_size35):_elem40 = InventoryAge()_elem40.read(iprot)self.success.append(_elem40)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)))returnoprot.writeStructBegin('getInventoryAge_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()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getInventoryScansForItem_args:"""Attributes:- itemId- fromDate- toDate"""thrift_spec = (None, # 0(1, TType.I64, 'itemId', None, None, ), # 1(2, TType.I64, 'fromDate', None, None, ), # 2(3, TType.I64, 'toDate', None, None, ), # 3)def __init__(self, itemId=None, fromDate=None, toDate=None,):self.itemId = itemIdself.fromDate = fromDateself.toDate = toDatedef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.I64:self.itemId = 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)))returnoprot.writeStructBegin('getInventoryScansForItem_args')if self.itemId is not None:oprot.writeFieldBegin('itemId', TType.I64, 1)oprot.writeI64(self.itemId)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):returndef __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 getInventoryScansForItem_result:"""Attributes:- success"""thrift_spec = ((0, TType.LIST, 'success', (TType.STRUCT,(Scan, Scan.thrift_spec)), None, ), # 0)def __init__(self, success=None,):self.success = successdef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.LIST:self.success = [](_etype45, _size42) = iprot.readListBegin()for _i46 in xrange(_size42):_elem47 = Scan()_elem47.read(iprot)self.success.append(_elem47)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)))returnoprot.writeStructBegin('getInventoryScansForItem_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()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getScanRecordsForSerialNumber_args:"""Attributes:- serialNumber"""thrift_spec = (None, # 0(1, TType.I64, 'serialNumber', None, None, ), # 1)def __init__(self, serialNumber=None,):self.serialNumber = serialNumberdef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.I64:self.serialNumber = 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)))returnoprot.writeStructBegin('getScanRecordsForSerialNumber_args')if self.serialNumber is not None:oprot.writeFieldBegin('serialNumber', TType.I64, 1)oprot.writeI64(self.serialNumber)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getScanRecordsForSerialNumber_result:"""Attributes:- success"""thrift_spec = ((0, TType.LIST, 'success', (TType.STRUCT,(Scan, Scan.thrift_spec)), None, ), # 0)def __init__(self, success=None,):self.success = successdef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.LIST:self.success = [](_etype52, _size49) = iprot.readListBegin()for _i53 in xrange(_size49):_elem54 = Scan()_elem54.read(iprot)self.success.append(_elem54)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)))returnoprot.writeStructBegin('getScanRecordsForSerialNumber_result')if self.success is not None:oprot.writeFieldBegin('success', TType.LIST, 0)oprot.writeListBegin(TType.STRUCT, len(self.success))for iter55 in self.success:iter55.write(oprot)oprot.writeListEnd()oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 scanForPurchaseReturn_args:"""Attributes:- saleReturnItems- vendorId"""thrift_spec = (None, # 0(1, TType.LIST, 'saleReturnItems', (TType.STRUCT,(InventoryItem, InventoryItem.thrift_spec)), None, ), # 1(2, TType.I64, 'vendorId', None, None, ), # 2)def __init__(self, saleReturnItems=None, vendorId=None,):self.saleReturnItems = saleReturnItemsself.vendorId = vendorIddef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.LIST:self.saleReturnItems = [](_etype59, _size56) = iprot.readListBegin()for _i60 in xrange(_size56):_elem61 = InventoryItem()_elem61.read(iprot)self.saleReturnItems.append(_elem61)iprot.readListEnd()else:iprot.skip(ftype)elif fid == 2:if ftype == TType.I64:self.vendorId = 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)))returnoprot.writeStructBegin('scanForPurchaseReturn_args')if self.saleReturnItems is not None:oprot.writeFieldBegin('saleReturnItems', TType.LIST, 1)oprot.writeListBegin(TType.STRUCT, len(self.saleReturnItems))for iter62 in self.saleReturnItems:iter62.write(oprot)oprot.writeListEnd()oprot.writeFieldEnd()if self.vendorId is not None:oprot.writeFieldBegin('vendorId', TType.I64, 2)oprot.writeI64(self.vendorId)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 scanForPurchaseReturn_result:"""Attributes:- ex"""thrift_spec = (None, # 0(1, TType.STRUCT, 'ex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1)def __init__(self, ex=None,):self.ex = exdef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.STRUCT:self.ex = WarehouseServiceException()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)))returnoprot.writeStructBegin('scanForPurchaseReturn_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):returndef __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 scanForLostItem_args:"""Attributes:- lostItems- vendorId"""thrift_spec = (None, # 0(1, TType.LIST, 'lostItems', (TType.STRUCT,(InventoryItem, InventoryItem.thrift_spec)), None, ), # 1(2, TType.I64, 'vendorId', None, None, ), # 2)def __init__(self, lostItems=None, vendorId=None,):self.lostItems = lostItemsself.vendorId = vendorIddef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.LIST:self.lostItems = [](_etype66, _size63) = iprot.readListBegin()for _i67 in xrange(_size63):_elem68 = InventoryItem()_elem68.read(iprot)self.lostItems.append(_elem68)iprot.readListEnd()else:iprot.skip(ftype)elif fid == 2:if ftype == TType.I64:self.vendorId = 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)))returnoprot.writeStructBegin('scanForLostItem_args')if self.lostItems is not None:oprot.writeFieldBegin('lostItems', TType.LIST, 1)oprot.writeListBegin(TType.STRUCT, len(self.lostItems))for iter69 in self.lostItems:iter69.write(oprot)oprot.writeListEnd()oprot.writeFieldEnd()if self.vendorId is not None:oprot.writeFieldBegin('vendorId', TType.I64, 2)oprot.writeI64(self.vendorId)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 scanForLostItem_result:"""Attributes:- ex"""thrift_spec = (None, # 0(1, TType.STRUCT, 'ex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1)def __init__(self, ex=None,):self.ex = exdef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.STRUCT:self.ex = WarehouseServiceException()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)))returnoprot.writeStructBegin('scanForLostItem_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):returndef __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 getCurrentSerializedInventoryByScans_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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakelse: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)))returnoprot.writeStructBegin('getCurrentSerializedInventoryByScans_args')oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getCurrentSerializedInventoryByScans_result:"""Attributes:- success"""thrift_spec = ((0, TType.LIST, 'success', (TType.STRUCT,(InventoryAvailability, InventoryAvailability.thrift_spec)), None, ), # 0)def __init__(self, success=None,):self.success = successdef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.LIST:self.success = [](_etype73, _size70) = iprot.readListBegin()for _i74 in xrange(_size70):_elem75 = InventoryAvailability()_elem75.read(iprot)self.success.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)))returnoprot.writeStructBegin('getCurrentSerializedInventoryByScans_result')if self.success is not None:oprot.writeFieldBegin('success', TType.LIST, 0)oprot.writeListBegin(TType.STRUCT, len(self.success))for iter76 in self.success:iter76.write(oprot)oprot.writeListEnd()oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getCurrentNonSerializedInventoryByScans_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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakelse: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)))returnoprot.writeStructBegin('getCurrentNonSerializedInventoryByScans_args')oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getCurrentNonSerializedInventoryByScans_result:"""Attributes:- success"""thrift_spec = ((0, TType.LIST, 'success', (TType.STRUCT,(InventoryAvailability, InventoryAvailability.thrift_spec)), None, ), # 0)def __init__(self, success=None,):self.success = successdef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.LIST:self.success = [](_etype80, _size77) = iprot.readListBegin()for _i81 in xrange(_size77):_elem82 = InventoryAvailability()_elem82.read(iprot)self.success.append(_elem82)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)))returnoprot.writeStructBegin('getCurrentNonSerializedInventoryByScans_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()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getHistoricSerializedInventoryByScans_args:"""Attributes:- date"""thrift_spec = (None, # 0(1, TType.I64, 'date', None, None, ), # 1)def __init__(self, date=None,):self.date = datedef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.I64:self.date = 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)))returnoprot.writeStructBegin('getHistoricSerializedInventoryByScans_args')if self.date is not None:oprot.writeFieldBegin('date', TType.I64, 1)oprot.writeI64(self.date)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getHistoricSerializedInventoryByScans_result:"""Attributes:- success"""thrift_spec = ((0, TType.LIST, 'success', (TType.STRUCT,(InventoryAvailability, InventoryAvailability.thrift_spec)), None, ), # 0)def __init__(self, success=None,):self.success = successdef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.LIST:self.success = [](_etype87, _size84) = iprot.readListBegin()for _i88 in xrange(_size84):_elem89 = InventoryAvailability()_elem89.read(iprot)self.success.append(_elem89)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)))returnoprot.writeStructBegin('getHistoricSerializedInventoryByScans_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()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getHistoricNonSerializedInventoryByScans_args:"""Attributes:- date"""thrift_spec = (None, # 0(1, TType.I64, 'date', None, None, ), # 1)def __init__(self, date=None,):self.date = datedef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.I64:self.date = 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)))returnoprot.writeStructBegin('getHistoricNonSerializedInventoryByScans_args')if self.date is not None:oprot.writeFieldBegin('date', TType.I64, 1)oprot.writeI64(self.date)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getHistoricNonSerializedInventoryByScans_result:"""Attributes:- success"""thrift_spec = ((0, TType.LIST, 'success', (TType.STRUCT,(InventoryAvailability, InventoryAvailability.thrift_spec)), None, ), # 0)def __init__(self, success=None,):self.success = successdef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.LIST:self.success = [](_etype94, _size91) = iprot.readListBegin()for _i95 in xrange(_size91):_elem96 = InventoryAvailability()_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)))returnoprot.writeStructBegin('getHistoricNonSerializedInventoryByScans_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):returndef __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 scanForOursExternalSale_args:"""Attributes:- itemId- serialNumber- itemNumber- invoiceNumber- warehouseId- unitPrice- orderId"""thrift_spec = (None, # 0(1, TType.I64, 'itemId', None, None, ), # 1(2, TType.STRING, 'serialNumber', None, None, ), # 2(3, TType.STRING, 'itemNumber', None, None, ), # 3(4, TType.STRING, 'invoiceNumber', None, None, ), # 4(5, TType.I64, 'warehouseId', None, None, ), # 5(6, TType.DOUBLE, 'unitPrice', None, None, ), # 6(7, TType.I64, 'orderId', None, None, ), # 7)def __init__(self, itemId=None, serialNumber=None, itemNumber=None, invoiceNumber=None, warehouseId=None, unitPrice=None, orderId=None,):self.itemId = itemIdself.serialNumber = serialNumberself.itemNumber = itemNumberself.invoiceNumber = invoiceNumberself.warehouseId = warehouseIdself.unitPrice = unitPriceself.orderId = orderIddef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.I64:self.itemId = iprot.readI64();else:iprot.skip(ftype)elif fid == 2:if ftype == TType.STRING:self.serialNumber = iprot.readString();else:iprot.skip(ftype)elif fid == 3:if ftype == TType.STRING:self.itemNumber = iprot.readString();else:iprot.skip(ftype)elif fid == 4:if ftype == TType.STRING:self.invoiceNumber = iprot.readString();else:iprot.skip(ftype)elif fid == 5:if ftype == TType.I64:self.warehouseId = iprot.readI64();else:iprot.skip(ftype)elif fid == 6:if ftype == TType.DOUBLE:self.unitPrice = iprot.readDouble();else:iprot.skip(ftype)elif fid == 7: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)))returnoprot.writeStructBegin('scanForOursExternalSale_args')if self.itemId is not None:oprot.writeFieldBegin('itemId', TType.I64, 1)oprot.writeI64(self.itemId)oprot.writeFieldEnd()if self.serialNumber is not None:oprot.writeFieldBegin('serialNumber', TType.STRING, 2)oprot.writeString(self.serialNumber)oprot.writeFieldEnd()if self.itemNumber is not None:oprot.writeFieldBegin('itemNumber', TType.STRING, 3)oprot.writeString(self.itemNumber)oprot.writeFieldEnd()if self.invoiceNumber is not None:oprot.writeFieldBegin('invoiceNumber', TType.STRING, 4)oprot.writeString(self.invoiceNumber)oprot.writeFieldEnd()if self.warehouseId is not None:oprot.writeFieldBegin('warehouseId', TType.I64, 5)oprot.writeI64(self.warehouseId)oprot.writeFieldEnd()if self.unitPrice is not None:oprot.writeFieldBegin('unitPrice', TType.DOUBLE, 6)oprot.writeDouble(self.unitPrice)oprot.writeFieldEnd()if self.orderId is not None:oprot.writeFieldBegin('orderId', TType.I64, 7)oprot.writeI64(self.orderId)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 scanForOursExternalSale_result:"""Attributes:- success- ex"""thrift_spec = ((0, TType.STRUCT, 'success', (InventoryItem, InventoryItem.thrift_spec), None, ), # 0(1, TType.STRUCT, 'ex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1)def __init__(self, success=None, ex=None,):self.success = successself.ex = exdef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.STRUCT:self.success = InventoryItem()self.success.read(iprot)else:iprot.skip(ftype)elif fid == 1:if ftype == TType.STRUCT:self.ex = WarehouseServiceException()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)))returnoprot.writeStructBegin('scanForOursExternalSale_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):returndef __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 scanForOursExternalSaleReturn_args:"""Attributes:- orderId- unitPrice"""thrift_spec = (None, # 0(1, TType.I64, 'orderId', None, None, ), # 1(2, TType.DOUBLE, 'unitPrice', None, None, ), # 2)def __init__(self, orderId=None, unitPrice=None,):self.orderId = orderIdself.unitPrice = unitPricedef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.I64:self.orderId = iprot.readI64();else:iprot.skip(ftype)elif fid == 2:if ftype == TType.DOUBLE:self.unitPrice = 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)))returnoprot.writeStructBegin('scanForOursExternalSaleReturn_args')if self.orderId is not None:oprot.writeFieldBegin('orderId', TType.I64, 1)oprot.writeI64(self.orderId)oprot.writeFieldEnd()if self.unitPrice is not None:oprot.writeFieldBegin('unitPrice', TType.DOUBLE, 2)oprot.writeDouble(self.unitPrice)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 scanForOursExternalSaleReturn_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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakelse: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)))returnoprot.writeStructBegin('scanForOursExternalSaleReturn_result')oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getMovementNonSerializedInventoryByScans_args:"""Attributes:- startDate- endDate"""thrift_spec = (None, # 0(1, TType.I64, 'startDate', None, None, ), # 1(2, TType.I64, 'endDate', None, None, ), # 2)def __init__(self, startDate=None, endDate=None,):self.startDate = startDateself.endDate = endDatedef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.I64:self.startDate = iprot.readI64();else:iprot.skip(ftype)elif fid == 2:if ftype == TType.I64:self.endDate = 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)))returnoprot.writeStructBegin('getMovementNonSerializedInventoryByScans_args')if self.startDate is not None:oprot.writeFieldBegin('startDate', TType.I64, 1)oprot.writeI64(self.startDate)oprot.writeFieldEnd()if self.endDate is not None:oprot.writeFieldBegin('endDate', TType.I64, 2)oprot.writeI64(self.endDate)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getMovementNonSerializedInventoryByScans_result:"""Attributes:- success"""thrift_spec = ((0, TType.LIST, 'success', (TType.STRUCT,(InventoryMovement, InventoryMovement.thrift_spec)), None, ), # 0)def __init__(self, success=None,):self.success = successdef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.LIST:self.success = [](_etype101, _size98) = iprot.readListBegin()for _i102 in xrange(_size98):_elem103 = InventoryMovement()_elem103.read(iprot)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)))returnoprot.writeStructBegin('getMovementNonSerializedInventoryByScans_result')if self.success is not None:oprot.writeFieldBegin('success', TType.LIST, 0)oprot.writeListBegin(TType.STRUCT, len(self.success))for iter104 in self.success:iter104.write(oprot)oprot.writeListEnd()oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getMovementSerializedInventoryByScans_args:"""Attributes:- startDate- endDate"""thrift_spec = (None, # 0(1, TType.I64, 'startDate', None, None, ), # 1(2, TType.I64, 'endDate', None, None, ), # 2)def __init__(self, startDate=None, endDate=None,):self.startDate = startDateself.endDate = endDatedef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.I64:self.startDate = iprot.readI64();else:iprot.skip(ftype)elif fid == 2:if ftype == TType.I64:self.endDate = 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)))returnoprot.writeStructBegin('getMovementSerializedInventoryByScans_args')if self.startDate is not None:oprot.writeFieldBegin('startDate', TType.I64, 1)oprot.writeI64(self.startDate)oprot.writeFieldEnd()if self.endDate is not None:oprot.writeFieldBegin('endDate', TType.I64, 2)oprot.writeI64(self.endDate)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getMovementSerializedInventoryByScans_result:"""Attributes:- success"""thrift_spec = ((0, TType.LIST, 'success', (TType.STRUCT,(InventoryMovement, InventoryMovement.thrift_spec)), None, ), # 0)def __init__(self, success=None,):self.success = successdef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.LIST:self.success = [](_etype108, _size105) = iprot.readListBegin()for _i109 in xrange(_size105):_elem110 = InventoryMovement()_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)))returnoprot.writeStructBegin('getMovementSerializedInventoryByScans_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):returndef __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 scanfreebie_args:"""Attributes:- orderId- freebieItemId- freebieWarehouseId- scanType"""thrift_spec = (None, # 0(1, TType.I64, 'orderId', None, None, ), # 1(2, TType.I64, 'freebieItemId', None, None, ), # 2(3, TType.I64, 'freebieWarehouseId', None, None, ), # 3(4, TType.I32, 'scanType', None, None, ), # 4)def __init__(self, orderId=None, freebieItemId=None, freebieWarehouseId=None, scanType=None,):self.orderId = orderIdself.freebieItemId = freebieItemIdself.freebieWarehouseId = freebieWarehouseIdself.scanType = scanTypedef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.I64:self.orderId = iprot.readI64();else:iprot.skip(ftype)elif fid == 2:if ftype == TType.I64:self.freebieItemId = iprot.readI64();else:iprot.skip(ftype)elif fid == 3:if ftype == TType.I64:self.freebieWarehouseId = iprot.readI64();else:iprot.skip(ftype)elif fid == 4:if ftype == TType.I32:self.scanType = 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)))returnoprot.writeStructBegin('scanfreebie_args')if self.orderId is not None:oprot.writeFieldBegin('orderId', TType.I64, 1)oprot.writeI64(self.orderId)oprot.writeFieldEnd()if self.freebieItemId is not None:oprot.writeFieldBegin('freebieItemId', TType.I64, 2)oprot.writeI64(self.freebieItemId)oprot.writeFieldEnd()if self.freebieWarehouseId is not None:oprot.writeFieldBegin('freebieWarehouseId', TType.I64, 3)oprot.writeI64(self.freebieWarehouseId)oprot.writeFieldEnd()if self.scanType is not None:oprot.writeFieldBegin('scanType', TType.I32, 4)oprot.writeI32(self.scanType)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 scanfreebie_result:"""Attributes:- success- wex"""thrift_spec = ((0, TType.STRUCT, 'success', (InventoryItem, InventoryItem.thrift_spec), None, ), # 0(1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1)def __init__(self, success=None, wex=None,):self.success = successself.wex = wexdef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.STRUCT:self.success = InventoryItem()self.success.read(iprot)else:iprot.skip(ftype)elif fid == 1:if ftype == TType.STRUCT:self.wex = WarehouseServiceException()self.wex.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)))returnoprot.writeStructBegin('scanfreebie_result')if self.success is not None:oprot.writeFieldBegin('success', TType.STRUCT, 0)self.success.write(oprot)oprot.writeFieldEnd()if self.wex is not None:oprot.writeFieldBegin('wex', TType.STRUCT, 1)self.wex.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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)