| Line 154... |
Line 154... |
| 154 |
- promisedShippingTimestamp
|
154 |
- promisedShippingTimestamp
|
| 155 |
- quantity
|
155 |
- quantity
|
| 156 |
"""
|
156 |
"""
|
| 157 |
pass
|
157 |
pass
|
| 158 |
|
158 |
|
| - |
|
159 |
def updateReservationForOrder(self, itemId, warehouseId, sourceId, orderId, createdTimestamp, promisedShippingTimestamp, quantity):
|
| - |
|
160 |
"""
|
| - |
|
161 |
Updates the reservation for Order
|
| - |
|
162 |
|
| - |
|
163 |
Parameters:
|
| - |
|
164 |
- itemId
|
| - |
|
165 |
- warehouseId
|
| - |
|
166 |
- sourceId
|
| - |
|
167 |
- orderId
|
| - |
|
168 |
- createdTimestamp
|
| - |
|
169 |
- promisedShippingTimestamp
|
| - |
|
170 |
- quantity
|
| - |
|
171 |
"""
|
| - |
|
172 |
pass
|
| - |
|
173 |
|
| 159 |
def reduceReservationCount(self, itemId, warehouseId, sourceId, orderId, quantity):
|
174 |
def reduceReservationCount(self, itemId, warehouseId, sourceId, orderId, quantity):
|
| 160 |
"""
|
175 |
"""
|
| 161 |
Decreases the reservation count for an item in a warehouse. Should always succeed normally.
|
176 |
Decreases the reservation count for an item in a warehouse. Should always succeed normally.
|
| 162 |
|
177 |
|
| 163 |
Parameters:
|
178 |
Parameters:
|
| Line 981... |
Line 996... |
| 981 |
return result.success
|
996 |
return result.success
|
| 982 |
if result.cex is not None:
|
997 |
if result.cex is not None:
|
| 983 |
raise result.cex
|
998 |
raise result.cex
|
| 984 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "reserveItemInWarehouse failed: unknown result");
|
999 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "reserveItemInWarehouse failed: unknown result");
|
| 985 |
|
1000 |
|
| - |
|
1001 |
def updateReservationForOrder(self, itemId, warehouseId, sourceId, orderId, createdTimestamp, promisedShippingTimestamp, quantity):
|
| - |
|
1002 |
"""
|
| - |
|
1003 |
Updates the reservation for Order
|
| - |
|
1004 |
|
| - |
|
1005 |
Parameters:
|
| - |
|
1006 |
- itemId
|
| - |
|
1007 |
- warehouseId
|
| - |
|
1008 |
- sourceId
|
| - |
|
1009 |
- orderId
|
| - |
|
1010 |
- createdTimestamp
|
| - |
|
1011 |
- promisedShippingTimestamp
|
| - |
|
1012 |
- quantity
|
| - |
|
1013 |
"""
|
| - |
|
1014 |
self.send_updateReservationForOrder(itemId, warehouseId, sourceId, orderId, createdTimestamp, promisedShippingTimestamp, quantity)
|
| - |
|
1015 |
return self.recv_updateReservationForOrder()
|
| - |
|
1016 |
|
| - |
|
1017 |
def send_updateReservationForOrder(self, itemId, warehouseId, sourceId, orderId, createdTimestamp, promisedShippingTimestamp, quantity):
|
| - |
|
1018 |
self._oprot.writeMessageBegin('updateReservationForOrder', TMessageType.CALL, self._seqid)
|
| - |
|
1019 |
args = updateReservationForOrder_args()
|
| - |
|
1020 |
args.itemId = itemId
|
| - |
|
1021 |
args.warehouseId = warehouseId
|
| - |
|
1022 |
args.sourceId = sourceId
|
| - |
|
1023 |
args.orderId = orderId
|
| - |
|
1024 |
args.createdTimestamp = createdTimestamp
|
| - |
|
1025 |
args.promisedShippingTimestamp = promisedShippingTimestamp
|
| - |
|
1026 |
args.quantity = quantity
|
| - |
|
1027 |
args.write(self._oprot)
|
| - |
|
1028 |
self._oprot.writeMessageEnd()
|
| - |
|
1029 |
self._oprot.trans.flush()
|
| - |
|
1030 |
|
| - |
|
1031 |
def recv_updateReservationForOrder(self, ):
|
| - |
|
1032 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
| - |
|
1033 |
if mtype == TMessageType.EXCEPTION:
|
| - |
|
1034 |
x = TApplicationException()
|
| - |
|
1035 |
x.read(self._iprot)
|
| - |
|
1036 |
self._iprot.readMessageEnd()
|
| - |
|
1037 |
raise x
|
| - |
|
1038 |
result = updateReservationForOrder_result()
|
| - |
|
1039 |
result.read(self._iprot)
|
| - |
|
1040 |
self._iprot.readMessageEnd()
|
| - |
|
1041 |
if result.success is not None:
|
| - |
|
1042 |
return result.success
|
| - |
|
1043 |
if result.cex is not None:
|
| - |
|
1044 |
raise result.cex
|
| - |
|
1045 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "updateReservationForOrder failed: unknown result");
|
| - |
|
1046 |
|
| 986 |
def reduceReservationCount(self, itemId, warehouseId, sourceId, orderId, quantity):
|
1047 |
def reduceReservationCount(self, itemId, warehouseId, sourceId, orderId, quantity):
|
| 987 |
"""
|
1048 |
"""
|
| 988 |
Decreases the reservation count for an item in a warehouse. Should always succeed normally.
|
1049 |
Decreases the reservation count for an item in a warehouse. Should always succeed normally.
|
| 989 |
|
1050 |
|
| 990 |
Parameters:
|
1051 |
Parameters:
|
| Line 2254... |
Line 2315... |
| 2254 |
self._processMap["getAllWarehouses"] = Processor.process_getAllWarehouses
|
2315 |
self._processMap["getAllWarehouses"] = Processor.process_getAllWarehouses
|
| 2255 |
self._processMap["getWarehouse"] = Processor.process_getWarehouse
|
2316 |
self._processMap["getWarehouse"] = Processor.process_getWarehouse
|
| 2256 |
self._processMap["getAllItemsForWarehouse"] = Processor.process_getAllItemsForWarehouse
|
2317 |
self._processMap["getAllItemsForWarehouse"] = Processor.process_getAllItemsForWarehouse
|
| 2257 |
self._processMap["isOrderBillable"] = Processor.process_isOrderBillable
|
2318 |
self._processMap["isOrderBillable"] = Processor.process_isOrderBillable
|
| 2258 |
self._processMap["reserveItemInWarehouse"] = Processor.process_reserveItemInWarehouse
|
2319 |
self._processMap["reserveItemInWarehouse"] = Processor.process_reserveItemInWarehouse
|
| - |
|
2320 |
self._processMap["updateReservationForOrder"] = Processor.process_updateReservationForOrder
|
| 2259 |
self._processMap["reduceReservationCount"] = Processor.process_reduceReservationCount
|
2321 |
self._processMap["reduceReservationCount"] = Processor.process_reduceReservationCount
|
| 2260 |
self._processMap["getItemPricing"] = Processor.process_getItemPricing
|
2322 |
self._processMap["getItemPricing"] = Processor.process_getItemPricing
|
| 2261 |
self._processMap["getAllItemPricing"] = Processor.process_getAllItemPricing
|
2323 |
self._processMap["getAllItemPricing"] = Processor.process_getAllItemPricing
|
| 2262 |
self._processMap["addVendorItemPricing"] = Processor.process_addVendorItemPricing
|
2324 |
self._processMap["addVendorItemPricing"] = Processor.process_addVendorItemPricing
|
| 2263 |
self._processMap["getVendor"] = Processor.process_getVendor
|
2325 |
self._processMap["getVendor"] = Processor.process_getVendor
|
| Line 2503... |
Line 2565... |
| 2503 |
oprot.writeMessageBegin("reserveItemInWarehouse", TMessageType.REPLY, seqid)
|
2565 |
oprot.writeMessageBegin("reserveItemInWarehouse", TMessageType.REPLY, seqid)
|
| 2504 |
result.write(oprot)
|
2566 |
result.write(oprot)
|
| 2505 |
oprot.writeMessageEnd()
|
2567 |
oprot.writeMessageEnd()
|
| 2506 |
oprot.trans.flush()
|
2568 |
oprot.trans.flush()
|
| 2507 |
|
2569 |
|
| - |
|
2570 |
def process_updateReservationForOrder(self, seqid, iprot, oprot):
|
| - |
|
2571 |
args = updateReservationForOrder_args()
|
| - |
|
2572 |
args.read(iprot)
|
| - |
|
2573 |
iprot.readMessageEnd()
|
| - |
|
2574 |
result = updateReservationForOrder_result()
|
| - |
|
2575 |
try:
|
| - |
|
2576 |
result.success = self._handler.updateReservationForOrder(args.itemId, args.warehouseId, args.sourceId, args.orderId, args.createdTimestamp, args.promisedShippingTimestamp, args.quantity)
|
| - |
|
2577 |
except InventoryServiceException, cex:
|
| - |
|
2578 |
result.cex = cex
|
| - |
|
2579 |
oprot.writeMessageBegin("updateReservationForOrder", TMessageType.REPLY, seqid)
|
| - |
|
2580 |
result.write(oprot)
|
| - |
|
2581 |
oprot.writeMessageEnd()
|
| - |
|
2582 |
oprot.trans.flush()
|
| - |
|
2583 |
|
| 2508 |
def process_reduceReservationCount(self, seqid, iprot, oprot):
|
2584 |
def process_reduceReservationCount(self, seqid, iprot, oprot):
|
| 2509 |
args = reduceReservationCount_args()
|
2585 |
args = reduceReservationCount_args()
|
| 2510 |
args.read(iprot)
|
2586 |
args.read(iprot)
|
| 2511 |
iprot.readMessageEnd()
|
2587 |
iprot.readMessageEnd()
|
| 2512 |
result = reduceReservationCount_result()
|
2588 |
result = reduceReservationCount_result()
|
| Line 4996... |
Line 5072... |
| 4996 |
if self.success is not None:
|
5072 |
if self.success is not None:
|
| 4997 |
oprot.writeFieldBegin('success', TType.BOOL, 0)
|
5073 |
oprot.writeFieldBegin('success', TType.BOOL, 0)
|
| 4998 |
oprot.writeBool(self.success)
|
5074 |
oprot.writeBool(self.success)
|
| 4999 |
oprot.writeFieldEnd()
|
5075 |
oprot.writeFieldEnd()
|
| 5000 |
if self.cex is not None:
|
5076 |
if self.cex is not None:
|
| - |
|
5077 |
oprot.writeFieldBegin('cex', TType.STRUCT, 1)
|
| - |
|
5078 |
self.cex.write(oprot)
|
| - |
|
5079 |
oprot.writeFieldEnd()
|
| - |
|
5080 |
oprot.writeFieldStop()
|
| - |
|
5081 |
oprot.writeStructEnd()
|
| - |
|
5082 |
|
| - |
|
5083 |
def validate(self):
|
| - |
|
5084 |
return
|
| - |
|
5085 |
|
| - |
|
5086 |
|
| - |
|
5087 |
def __repr__(self):
|
| - |
|
5088 |
L = ['%s=%r' % (key, value)
|
| - |
|
5089 |
for key, value in self.__dict__.iteritems()]
|
| - |
|
5090 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
| - |
|
5091 |
|
| - |
|
5092 |
def __eq__(self, other):
|
| - |
|
5093 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
| - |
|
5094 |
|
| - |
|
5095 |
def __ne__(self, other):
|
| - |
|
5096 |
return not (self == other)
|
| - |
|
5097 |
|
| - |
|
5098 |
class updateReservationForOrder_args:
|
| - |
|
5099 |
"""
|
| - |
|
5100 |
Attributes:
|
| - |
|
5101 |
- itemId
|
| - |
|
5102 |
- warehouseId
|
| - |
|
5103 |
- sourceId
|
| - |
|
5104 |
- orderId
|
| - |
|
5105 |
- createdTimestamp
|
| - |
|
5106 |
- promisedShippingTimestamp
|
| - |
|
5107 |
- quantity
|
| - |
|
5108 |
"""
|
| - |
|
5109 |
|
| - |
|
5110 |
thrift_spec = (
|
| - |
|
5111 |
None, # 0
|
| - |
|
5112 |
(1, TType.I64, 'itemId', None, None, ), # 1
|
| - |
|
5113 |
(2, TType.I64, 'warehouseId', None, None, ), # 2
|
| - |
|
5114 |
(3, TType.I64, 'sourceId', None, None, ), # 3
|
| - |
|
5115 |
(4, TType.I64, 'orderId', None, None, ), # 4
|
| - |
|
5116 |
(5, TType.I64, 'createdTimestamp', None, None, ), # 5
|
| - |
|
5117 |
(6, TType.I64, 'promisedShippingTimestamp', None, None, ), # 6
|
| - |
|
5118 |
(7, TType.DOUBLE, 'quantity', None, None, ), # 7
|
| - |
|
5119 |
)
|
| - |
|
5120 |
|
| - |
|
5121 |
def __init__(self, itemId=None, warehouseId=None, sourceId=None, orderId=None, createdTimestamp=None, promisedShippingTimestamp=None, quantity=None,):
|
| - |
|
5122 |
self.itemId = itemId
|
| - |
|
5123 |
self.warehouseId = warehouseId
|
| - |
|
5124 |
self.sourceId = sourceId
|
| - |
|
5125 |
self.orderId = orderId
|
| - |
|
5126 |
self.createdTimestamp = createdTimestamp
|
| - |
|
5127 |
self.promisedShippingTimestamp = promisedShippingTimestamp
|
| - |
|
5128 |
self.quantity = quantity
|
| - |
|
5129 |
|
| - |
|
5130 |
def read(self, iprot):
|
| - |
|
5131 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
| - |
|
5132 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
| - |
|
5133 |
return
|
| - |
|
5134 |
iprot.readStructBegin()
|
| - |
|
5135 |
while True:
|
| - |
|
5136 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
| - |
|
5137 |
if ftype == TType.STOP:
|
| - |
|
5138 |
break
|
| - |
|
5139 |
if fid == 1:
|
| - |
|
5140 |
if ftype == TType.I64:
|
| - |
|
5141 |
self.itemId = iprot.readI64();
|
| - |
|
5142 |
else:
|
| - |
|
5143 |
iprot.skip(ftype)
|
| - |
|
5144 |
elif fid == 2:
|
| - |
|
5145 |
if ftype == TType.I64:
|
| - |
|
5146 |
self.warehouseId = iprot.readI64();
|
| - |
|
5147 |
else:
|
| - |
|
5148 |
iprot.skip(ftype)
|
| - |
|
5149 |
elif fid == 3:
|
| - |
|
5150 |
if ftype == TType.I64:
|
| - |
|
5151 |
self.sourceId = iprot.readI64();
|
| - |
|
5152 |
else:
|
| - |
|
5153 |
iprot.skip(ftype)
|
| - |
|
5154 |
elif fid == 4:
|
| - |
|
5155 |
if ftype == TType.I64:
|
| - |
|
5156 |
self.orderId = iprot.readI64();
|
| - |
|
5157 |
else:
|
| - |
|
5158 |
iprot.skip(ftype)
|
| - |
|
5159 |
elif fid == 5:
|
| - |
|
5160 |
if ftype == TType.I64:
|
| - |
|
5161 |
self.createdTimestamp = iprot.readI64();
|
| - |
|
5162 |
else:
|
| - |
|
5163 |
iprot.skip(ftype)
|
| - |
|
5164 |
elif fid == 6:
|
| - |
|
5165 |
if ftype == TType.I64:
|
| - |
|
5166 |
self.promisedShippingTimestamp = iprot.readI64();
|
| - |
|
5167 |
else:
|
| - |
|
5168 |
iprot.skip(ftype)
|
| - |
|
5169 |
elif fid == 7:
|
| - |
|
5170 |
if ftype == TType.DOUBLE:
|
| - |
|
5171 |
self.quantity = iprot.readDouble();
|
| - |
|
5172 |
else:
|
| - |
|
5173 |
iprot.skip(ftype)
|
| - |
|
5174 |
else:
|
| - |
|
5175 |
iprot.skip(ftype)
|
| - |
|
5176 |
iprot.readFieldEnd()
|
| - |
|
5177 |
iprot.readStructEnd()
|
| - |
|
5178 |
|
| - |
|
5179 |
def write(self, oprot):
|
| - |
|
5180 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
| - |
|
5181 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
| - |
|
5182 |
return
|
| - |
|
5183 |
oprot.writeStructBegin('updateReservationForOrder_args')
|
| - |
|
5184 |
if self.itemId is not None:
|
| - |
|
5185 |
oprot.writeFieldBegin('itemId', TType.I64, 1)
|
| - |
|
5186 |
oprot.writeI64(self.itemId)
|
| - |
|
5187 |
oprot.writeFieldEnd()
|
| - |
|
5188 |
if self.warehouseId is not None:
|
| - |
|
5189 |
oprot.writeFieldBegin('warehouseId', TType.I64, 2)
|
| - |
|
5190 |
oprot.writeI64(self.warehouseId)
|
| - |
|
5191 |
oprot.writeFieldEnd()
|
| - |
|
5192 |
if self.sourceId is not None:
|
| - |
|
5193 |
oprot.writeFieldBegin('sourceId', TType.I64, 3)
|
| - |
|
5194 |
oprot.writeI64(self.sourceId)
|
| - |
|
5195 |
oprot.writeFieldEnd()
|
| - |
|
5196 |
if self.orderId is not None:
|
| - |
|
5197 |
oprot.writeFieldBegin('orderId', TType.I64, 4)
|
| - |
|
5198 |
oprot.writeI64(self.orderId)
|
| - |
|
5199 |
oprot.writeFieldEnd()
|
| - |
|
5200 |
if self.createdTimestamp is not None:
|
| - |
|
5201 |
oprot.writeFieldBegin('createdTimestamp', TType.I64, 5)
|
| - |
|
5202 |
oprot.writeI64(self.createdTimestamp)
|
| - |
|
5203 |
oprot.writeFieldEnd()
|
| - |
|
5204 |
if self.promisedShippingTimestamp is not None:
|
| - |
|
5205 |
oprot.writeFieldBegin('promisedShippingTimestamp', TType.I64, 6)
|
| - |
|
5206 |
oprot.writeI64(self.promisedShippingTimestamp)
|
| - |
|
5207 |
oprot.writeFieldEnd()
|
| - |
|
5208 |
if self.quantity is not None:
|
| - |
|
5209 |
oprot.writeFieldBegin('quantity', TType.DOUBLE, 7)
|
| - |
|
5210 |
oprot.writeDouble(self.quantity)
|
| - |
|
5211 |
oprot.writeFieldEnd()
|
| - |
|
5212 |
oprot.writeFieldStop()
|
| - |
|
5213 |
oprot.writeStructEnd()
|
| - |
|
5214 |
|
| - |
|
5215 |
def validate(self):
|
| - |
|
5216 |
return
|
| - |
|
5217 |
|
| - |
|
5218 |
|
| - |
|
5219 |
def __repr__(self):
|
| - |
|
5220 |
L = ['%s=%r' % (key, value)
|
| - |
|
5221 |
for key, value in self.__dict__.iteritems()]
|
| - |
|
5222 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
| - |
|
5223 |
|
| - |
|
5224 |
def __eq__(self, other):
|
| - |
|
5225 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
| - |
|
5226 |
|
| - |
|
5227 |
def __ne__(self, other):
|
| - |
|
5228 |
return not (self == other)
|
| - |
|
5229 |
|
| - |
|
5230 |
class updateReservationForOrder_result:
|
| - |
|
5231 |
"""
|
| - |
|
5232 |
Attributes:
|
| - |
|
5233 |
- success
|
| - |
|
5234 |
- cex
|
| - |
|
5235 |
"""
|
| - |
|
5236 |
|
| - |
|
5237 |
thrift_spec = (
|
| - |
|
5238 |
(0, TType.BOOL, 'success', None, None, ), # 0
|
| - |
|
5239 |
(1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
|
| - |
|
5240 |
)
|
| - |
|
5241 |
|
| - |
|
5242 |
def __init__(self, success=None, cex=None,):
|
| - |
|
5243 |
self.success = success
|
| - |
|
5244 |
self.cex = cex
|
| - |
|
5245 |
|
| - |
|
5246 |
def read(self, iprot):
|
| - |
|
5247 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
| - |
|
5248 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
| - |
|
5249 |
return
|
| - |
|
5250 |
iprot.readStructBegin()
|
| - |
|
5251 |
while True:
|
| - |
|
5252 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
| - |
|
5253 |
if ftype == TType.STOP:
|
| - |
|
5254 |
break
|
| - |
|
5255 |
if fid == 0:
|
| - |
|
5256 |
if ftype == TType.BOOL:
|
| - |
|
5257 |
self.success = iprot.readBool();
|
| - |
|
5258 |
else:
|
| - |
|
5259 |
iprot.skip(ftype)
|
| - |
|
5260 |
elif fid == 1:
|
| - |
|
5261 |
if ftype == TType.STRUCT:
|
| - |
|
5262 |
self.cex = InventoryServiceException()
|
| - |
|
5263 |
self.cex.read(iprot)
|
| - |
|
5264 |
else:
|
| - |
|
5265 |
iprot.skip(ftype)
|
| - |
|
5266 |
else:
|
| - |
|
5267 |
iprot.skip(ftype)
|
| - |
|
5268 |
iprot.readFieldEnd()
|
| - |
|
5269 |
iprot.readStructEnd()
|
| - |
|
5270 |
|
| - |
|
5271 |
def write(self, oprot):
|
| - |
|
5272 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
| - |
|
5273 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
| - |
|
5274 |
return
|
| - |
|
5275 |
oprot.writeStructBegin('updateReservationForOrder_result')
|
| - |
|
5276 |
if self.success is not None:
|
| - |
|
5277 |
oprot.writeFieldBegin('success', TType.BOOL, 0)
|
| - |
|
5278 |
oprot.writeBool(self.success)
|
| - |
|
5279 |
oprot.writeFieldEnd()
|
| - |
|
5280 |
if self.cex is not None:
|
| 5001 |
oprot.writeFieldBegin('cex', TType.STRUCT, 1)
|
5281 |
oprot.writeFieldBegin('cex', TType.STRUCT, 1)
|
| 5002 |
self.cex.write(oprot)
|
5282 |
self.cex.write(oprot)
|
| 5003 |
oprot.writeFieldEnd()
|
5283 |
oprot.writeFieldEnd()
|
| 5004 |
oprot.writeFieldStop()
|
5284 |
oprot.writeFieldStop()
|
| 5005 |
oprot.writeStructEnd()
|
5285 |
oprot.writeStructEnd()
|