| Line 389... |
Line 389... |
| 389 |
- orderId
|
389 |
- orderId
|
| 390 |
- pickupNumber
|
390 |
- pickupNumber
|
| 391 |
"""
|
391 |
"""
|
| 392 |
pass
|
392 |
pass
|
| 393 |
|
393 |
|
| - |
|
394 |
def markDoasAsPickedUp(self, providerId, pickupDetails):
|
| - |
|
395 |
"""
|
| - |
|
396 |
Marks all DOA_PICKUP_AUTHORIZED orders of the previous day for a provider as DOA_RETURN_IN_TRANSIT.
|
| - |
|
397 |
Returns a list of orders that were authorized for pickup but did not appear in the pick-up report.
|
| - |
|
398 |
|
| - |
|
399 |
Parameters:
|
| - |
|
400 |
- providerId
|
| - |
|
401 |
- pickupDetails
|
| - |
|
402 |
"""
|
| - |
|
403 |
pass
|
| - |
|
404 |
|
| 394 |
def receiveReturn(self, orderId):
|
405 |
def receiveReturn(self, orderId):
|
| 395 |
"""
|
406 |
"""
|
| 396 |
If the order status is DOA_RETURN_AUTHORIZED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED and returns true.
|
407 |
If the order status is DOA_RETURN_AUTHORIZED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED and returns true.
|
| 397 |
If the order status is SALES_RETURN_IN_TRANSIT, marks the order status as SALES_RET_RECEIVED and returns true.
|
408 |
If the order status is SALES_RETURN_IN_TRANSIT, marks the order status as SALES_RET_RECEIVED and returns true.
|
| 398 |
If the order is in any other state, it returns false.
|
409 |
If the order is in any other state, it returns false.
|
| Line 1872... |
Line 1883... |
| 1872 |
return result.success
|
1883 |
return result.success
|
| 1873 |
if result.ex != None:
|
1884 |
if result.ex != None:
|
| 1874 |
raise result.ex
|
1885 |
raise result.ex
|
| 1875 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "authorizePickup failed: unknown result");
|
1886 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "authorizePickup failed: unknown result");
|
| 1876 |
|
1887 |
|
| - |
|
1888 |
def markDoasAsPickedUp(self, providerId, pickupDetails):
|
| - |
|
1889 |
"""
|
| - |
|
1890 |
Marks all DOA_PICKUP_AUTHORIZED orders of the previous day for a provider as DOA_RETURN_IN_TRANSIT.
|
| - |
|
1891 |
Returns a list of orders that were authorized for pickup but did not appear in the pick-up report.
|
| - |
|
1892 |
|
| - |
|
1893 |
Parameters:
|
| - |
|
1894 |
- providerId
|
| - |
|
1895 |
- pickupDetails
|
| - |
|
1896 |
"""
|
| - |
|
1897 |
self.send_markDoasAsPickedUp(providerId, pickupDetails)
|
| - |
|
1898 |
return self.recv_markDoasAsPickedUp()
|
| - |
|
1899 |
|
| - |
|
1900 |
def send_markDoasAsPickedUp(self, providerId, pickupDetails):
|
| - |
|
1901 |
self._oprot.writeMessageBegin('markDoasAsPickedUp', TMessageType.CALL, self._seqid)
|
| - |
|
1902 |
args = markDoasAsPickedUp_args()
|
| - |
|
1903 |
args.providerId = providerId
|
| - |
|
1904 |
args.pickupDetails = pickupDetails
|
| - |
|
1905 |
args.write(self._oprot)
|
| - |
|
1906 |
self._oprot.writeMessageEnd()
|
| - |
|
1907 |
self._oprot.trans.flush()
|
| - |
|
1908 |
|
| - |
|
1909 |
def recv_markDoasAsPickedUp(self, ):
|
| - |
|
1910 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
| - |
|
1911 |
if mtype == TMessageType.EXCEPTION:
|
| - |
|
1912 |
x = TApplicationException()
|
| - |
|
1913 |
x.read(self._iprot)
|
| - |
|
1914 |
self._iprot.readMessageEnd()
|
| - |
|
1915 |
raise x
|
| - |
|
1916 |
result = markDoasAsPickedUp_result()
|
| - |
|
1917 |
result.read(self._iprot)
|
| - |
|
1918 |
self._iprot.readMessageEnd()
|
| - |
|
1919 |
if result.success != None:
|
| - |
|
1920 |
return result.success
|
| - |
|
1921 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "markDoasAsPickedUp failed: unknown result");
|
| - |
|
1922 |
|
| 1877 |
def receiveReturn(self, orderId):
|
1923 |
def receiveReturn(self, orderId):
|
| 1878 |
"""
|
1924 |
"""
|
| 1879 |
If the order status is DOA_RETURN_AUTHORIZED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED and returns true.
|
1925 |
If the order status is DOA_RETURN_AUTHORIZED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED and returns true.
|
| 1880 |
If the order status is SALES_RETURN_IN_TRANSIT, marks the order status as SALES_RET_RECEIVED and returns true.
|
1926 |
If the order status is SALES_RETURN_IN_TRANSIT, marks the order status as SALES_RET_RECEIVED and returns true.
|
| 1881 |
If the order is in any other state, it returns false.
|
1927 |
If the order is in any other state, it returns false.
|
| Line 2187... |
Line 2233... |
| 2187 |
self._processMap["getValidOrdersAmountRange"] = Processor.process_getValidOrdersAmountRange
|
2233 |
self._processMap["getValidOrdersAmountRange"] = Processor.process_getValidOrdersAmountRange
|
| 2188 |
self._processMap["getValidOrders"] = Processor.process_getValidOrders
|
2234 |
self._processMap["getValidOrders"] = Processor.process_getValidOrders
|
| 2189 |
self._processMap["toggleDOAFlag"] = Processor.process_toggleDOAFlag
|
2235 |
self._processMap["toggleDOAFlag"] = Processor.process_toggleDOAFlag
|
| 2190 |
self._processMap["requestPickupNumber"] = Processor.process_requestPickupNumber
|
2236 |
self._processMap["requestPickupNumber"] = Processor.process_requestPickupNumber
|
| 2191 |
self._processMap["authorizePickup"] = Processor.process_authorizePickup
|
2237 |
self._processMap["authorizePickup"] = Processor.process_authorizePickup
|
| - |
|
2238 |
self._processMap["markDoasAsPickedUp"] = Processor.process_markDoasAsPickedUp
|
| 2192 |
self._processMap["receiveReturn"] = Processor.process_receiveReturn
|
2239 |
self._processMap["receiveReturn"] = Processor.process_receiveReturn
|
| 2193 |
self._processMap["validateDoa"] = Processor.process_validateDoa
|
2240 |
self._processMap["validateDoa"] = Processor.process_validateDoa
|
| 2194 |
self._processMap["reshipOrder"] = Processor.process_reshipOrder
|
2241 |
self._processMap["reshipOrder"] = Processor.process_reshipOrder
|
| 2195 |
self._processMap["refundOrder"] = Processor.process_refundOrder
|
2242 |
self._processMap["refundOrder"] = Processor.process_refundOrder
|
| 2196 |
self._processMap["getReturnOrders"] = Processor.process_getReturnOrders
|
2243 |
self._processMap["getReturnOrders"] = Processor.process_getReturnOrders
|
| Line 2746... |
Line 2793... |
| 2746 |
oprot.writeMessageBegin("authorizePickup", TMessageType.REPLY, seqid)
|
2793 |
oprot.writeMessageBegin("authorizePickup", TMessageType.REPLY, seqid)
|
| 2747 |
result.write(oprot)
|
2794 |
result.write(oprot)
|
| 2748 |
oprot.writeMessageEnd()
|
2795 |
oprot.writeMessageEnd()
|
| 2749 |
oprot.trans.flush()
|
2796 |
oprot.trans.flush()
|
| 2750 |
|
2797 |
|
| - |
|
2798 |
def process_markDoasAsPickedUp(self, seqid, iprot, oprot):
|
| - |
|
2799 |
args = markDoasAsPickedUp_args()
|
| - |
|
2800 |
args.read(iprot)
|
| - |
|
2801 |
iprot.readMessageEnd()
|
| - |
|
2802 |
result = markDoasAsPickedUp_result()
|
| - |
|
2803 |
result.success = self._handler.markDoasAsPickedUp(args.providerId, args.pickupDetails)
|
| - |
|
2804 |
oprot.writeMessageBegin("markDoasAsPickedUp", TMessageType.REPLY, seqid)
|
| - |
|
2805 |
result.write(oprot)
|
| - |
|
2806 |
oprot.writeMessageEnd()
|
| - |
|
2807 |
oprot.trans.flush()
|
| - |
|
2808 |
|
| 2751 |
def process_receiveReturn(self, seqid, iprot, oprot):
|
2809 |
def process_receiveReturn(self, seqid, iprot, oprot):
|
| 2752 |
args = receiveReturn_args()
|
2810 |
args = receiveReturn_args()
|
| 2753 |
args.read(iprot)
|
2811 |
args.read(iprot)
|
| 2754 |
iprot.readMessageEnd()
|
2812 |
iprot.readMessageEnd()
|
| 2755 |
result = receiveReturn_result()
|
2813 |
result = receiveReturn_result()
|
| Line 8146... |
Line 8204... |
| 8146 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
8204 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
| 8147 |
|
8205 |
|
| 8148 |
def __ne__(self, other):
|
8206 |
def __ne__(self, other):
|
| 8149 |
return not (self == other)
|
8207 |
return not (self == other)
|
| 8150 |
|
8208 |
|
| - |
|
8209 |
class markDoasAsPickedUp_args:
|
| - |
|
8210 |
"""
|
| - |
|
8211 |
Attributes:
|
| - |
|
8212 |
- providerId
|
| - |
|
8213 |
- pickupDetails
|
| - |
|
8214 |
"""
|
| - |
|
8215 |
|
| - |
|
8216 |
thrift_spec = (
|
| - |
|
8217 |
None, # 0
|
| - |
|
8218 |
(1, TType.I64, 'providerId', None, None, ), # 1
|
| - |
|
8219 |
(2, TType.MAP, 'pickupDetails', (TType.STRING,None,TType.STRING,None), None, ), # 2
|
| - |
|
8220 |
)
|
| - |
|
8221 |
|
| - |
|
8222 |
def __init__(self, providerId=None, pickupDetails=None,):
|
| - |
|
8223 |
self.providerId = providerId
|
| - |
|
8224 |
self.pickupDetails = pickupDetails
|
| - |
|
8225 |
|
| - |
|
8226 |
def read(self, iprot):
|
| - |
|
8227 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
| - |
|
8228 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
| - |
|
8229 |
return
|
| - |
|
8230 |
iprot.readStructBegin()
|
| - |
|
8231 |
while True:
|
| - |
|
8232 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
| - |
|
8233 |
if ftype == TType.STOP:
|
| - |
|
8234 |
break
|
| - |
|
8235 |
if fid == 1:
|
| - |
|
8236 |
if ftype == TType.I64:
|
| - |
|
8237 |
self.providerId = iprot.readI64();
|
| - |
|
8238 |
else:
|
| - |
|
8239 |
iprot.skip(ftype)
|
| - |
|
8240 |
elif fid == 2:
|
| - |
|
8241 |
if ftype == TType.MAP:
|
| - |
|
8242 |
self.pickupDetails = {}
|
| - |
|
8243 |
(_ktype156, _vtype157, _size155 ) = iprot.readMapBegin()
|
| - |
|
8244 |
for _i159 in xrange(_size155):
|
| - |
|
8245 |
_key160 = iprot.readString();
|
| - |
|
8246 |
_val161 = iprot.readString();
|
| - |
|
8247 |
self.pickupDetails[_key160] = _val161
|
| - |
|
8248 |
iprot.readMapEnd()
|
| - |
|
8249 |
else:
|
| - |
|
8250 |
iprot.skip(ftype)
|
| - |
|
8251 |
else:
|
| - |
|
8252 |
iprot.skip(ftype)
|
| - |
|
8253 |
iprot.readFieldEnd()
|
| - |
|
8254 |
iprot.readStructEnd()
|
| - |
|
8255 |
|
| - |
|
8256 |
def write(self, oprot):
|
| - |
|
8257 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
| - |
|
8258 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
| - |
|
8259 |
return
|
| - |
|
8260 |
oprot.writeStructBegin('markDoasAsPickedUp_args')
|
| - |
|
8261 |
if self.providerId != None:
|
| - |
|
8262 |
oprot.writeFieldBegin('providerId', TType.I64, 1)
|
| - |
|
8263 |
oprot.writeI64(self.providerId)
|
| - |
|
8264 |
oprot.writeFieldEnd()
|
| - |
|
8265 |
if self.pickupDetails != None:
|
| - |
|
8266 |
oprot.writeFieldBegin('pickupDetails', TType.MAP, 2)
|
| - |
|
8267 |
oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.pickupDetails))
|
| - |
|
8268 |
for kiter162,viter163 in self.pickupDetails.items():
|
| - |
|
8269 |
oprot.writeString(kiter162)
|
| - |
|
8270 |
oprot.writeString(viter163)
|
| - |
|
8271 |
oprot.writeMapEnd()
|
| - |
|
8272 |
oprot.writeFieldEnd()
|
| - |
|
8273 |
oprot.writeFieldStop()
|
| - |
|
8274 |
oprot.writeStructEnd()
|
| - |
|
8275 |
|
| - |
|
8276 |
def __repr__(self):
|
| - |
|
8277 |
L = ['%s=%r' % (key, value)
|
| - |
|
8278 |
for key, value in self.__dict__.iteritems()]
|
| - |
|
8279 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
| - |
|
8280 |
|
| - |
|
8281 |
def __eq__(self, other):
|
| - |
|
8282 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
| - |
|
8283 |
|
| - |
|
8284 |
def __ne__(self, other):
|
| - |
|
8285 |
return not (self == other)
|
| - |
|
8286 |
|
| - |
|
8287 |
class markDoasAsPickedUp_result:
|
| - |
|
8288 |
"""
|
| - |
|
8289 |
Attributes:
|
| - |
|
8290 |
- success
|
| - |
|
8291 |
"""
|
| - |
|
8292 |
|
| - |
|
8293 |
thrift_spec = (
|
| - |
|
8294 |
(0, TType.LIST, 'success', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 0
|
| - |
|
8295 |
)
|
| - |
|
8296 |
|
| - |
|
8297 |
def __init__(self, success=None,):
|
| - |
|
8298 |
self.success = success
|
| - |
|
8299 |
|
| - |
|
8300 |
def read(self, iprot):
|
| - |
|
8301 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
| - |
|
8302 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
| - |
|
8303 |
return
|
| - |
|
8304 |
iprot.readStructBegin()
|
| - |
|
8305 |
while True:
|
| - |
|
8306 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
| - |
|
8307 |
if ftype == TType.STOP:
|
| - |
|
8308 |
break
|
| - |
|
8309 |
if fid == 0:
|
| - |
|
8310 |
if ftype == TType.LIST:
|
| - |
|
8311 |
self.success = []
|
| - |
|
8312 |
(_etype167, _size164) = iprot.readListBegin()
|
| - |
|
8313 |
for _i168 in xrange(_size164):
|
| - |
|
8314 |
_elem169 = Order()
|
| - |
|
8315 |
_elem169.read(iprot)
|
| - |
|
8316 |
self.success.append(_elem169)
|
| - |
|
8317 |
iprot.readListEnd()
|
| - |
|
8318 |
else:
|
| - |
|
8319 |
iprot.skip(ftype)
|
| - |
|
8320 |
else:
|
| - |
|
8321 |
iprot.skip(ftype)
|
| - |
|
8322 |
iprot.readFieldEnd()
|
| - |
|
8323 |
iprot.readStructEnd()
|
| - |
|
8324 |
|
| - |
|
8325 |
def write(self, oprot):
|
| - |
|
8326 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
| - |
|
8327 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
| - |
|
8328 |
return
|
| - |
|
8329 |
oprot.writeStructBegin('markDoasAsPickedUp_result')
|
| - |
|
8330 |
if self.success != None:
|
| - |
|
8331 |
oprot.writeFieldBegin('success', TType.LIST, 0)
|
| - |
|
8332 |
oprot.writeListBegin(TType.STRUCT, len(self.success))
|
| - |
|
8333 |
for iter170 in self.success:
|
| - |
|
8334 |
iter170.write(oprot)
|
| - |
|
8335 |
oprot.writeListEnd()
|
| - |
|
8336 |
oprot.writeFieldEnd()
|
| - |
|
8337 |
oprot.writeFieldStop()
|
| - |
|
8338 |
oprot.writeStructEnd()
|
| - |
|
8339 |
|
| - |
|
8340 |
def __repr__(self):
|
| - |
|
8341 |
L = ['%s=%r' % (key, value)
|
| - |
|
8342 |
for key, value in self.__dict__.iteritems()]
|
| - |
|
8343 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
| - |
|
8344 |
|
| - |
|
8345 |
def __eq__(self, other):
|
| - |
|
8346 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
| - |
|
8347 |
|
| - |
|
8348 |
def __ne__(self, other):
|
| - |
|
8349 |
return not (self == other)
|
| - |
|
8350 |
|
| 8151 |
class receiveReturn_args:
|
8351 |
class receiveReturn_args:
|
| 8152 |
"""
|
8352 |
"""
|
| 8153 |
Attributes:
|
8353 |
Attributes:
|
| 8154 |
- orderId
|
8354 |
- orderId
|
| 8155 |
"""
|
8355 |
"""
|
| Line 8759... |
Line 8959... |
| 8759 |
if ftype == TType.STOP:
|
8959 |
if ftype == TType.STOP:
|
| 8760 |
break
|
8960 |
break
|
| 8761 |
if fid == 0:
|
8961 |
if fid == 0:
|
| 8762 |
if ftype == TType.LIST:
|
8962 |
if ftype == TType.LIST:
|
| 8763 |
self.success = []
|
8963 |
self.success = []
|
| 8764 |
(_etype158, _size155) = iprot.readListBegin()
|
8964 |
(_etype174, _size171) = iprot.readListBegin()
|
| 8765 |
for _i159 in xrange(_size155):
|
8965 |
for _i175 in xrange(_size171):
|
| 8766 |
_elem160 = ReturnOrder()
|
8966 |
_elem176 = ReturnOrder()
|
| 8767 |
_elem160.read(iprot)
|
8967 |
_elem176.read(iprot)
|
| 8768 |
self.success.append(_elem160)
|
8968 |
self.success.append(_elem176)
|
| 8769 |
iprot.readListEnd()
|
8969 |
iprot.readListEnd()
|
| 8770 |
else:
|
8970 |
else:
|
| 8771 |
iprot.skip(ftype)
|
8971 |
iprot.skip(ftype)
|
| 8772 |
else:
|
8972 |
else:
|
| 8773 |
iprot.skip(ftype)
|
8973 |
iprot.skip(ftype)
|
| Line 8780... |
Line 8980... |
| 8780 |
return
|
8980 |
return
|
| 8781 |
oprot.writeStructBegin('getReturnOrders_result')
|
8981 |
oprot.writeStructBegin('getReturnOrders_result')
|
| 8782 |
if self.success != None:
|
8982 |
if self.success != None:
|
| 8783 |
oprot.writeFieldBegin('success', TType.LIST, 0)
|
8983 |
oprot.writeFieldBegin('success', TType.LIST, 0)
|
| 8784 |
oprot.writeListBegin(TType.STRUCT, len(self.success))
|
8984 |
oprot.writeListBegin(TType.STRUCT, len(self.success))
|
| 8785 |
for iter161 in self.success:
|
8985 |
for iter177 in self.success:
|
| 8786 |
iter161.write(oprot)
|
8986 |
iter177.write(oprot)
|
| 8787 |
oprot.writeListEnd()
|
8987 |
oprot.writeListEnd()
|
| 8788 |
oprot.writeFieldEnd()
|
8988 |
oprot.writeFieldEnd()
|
| 8789 |
oprot.writeFieldStop()
|
8989 |
oprot.writeFieldStop()
|
| 8790 |
oprot.writeStructEnd()
|
8990 |
oprot.writeStructEnd()
|
| 8791 |
|
8991 |
|