def update_shipment(shipment_id):
"""
Update a single shipment object.
:param shipment_id: The shipment's id
:param {
"id": "123",
"status": "SHIPPED",
"createdAt": "2015-11-05T22:00:51.692765",
"updatedAt": "2015-11-08T22:00:51.692765",
"deliveredAt": "2015-11-08T22:00:51.692765",
"estimatedTimeOfArrival": "2015-11-07T22:00:51.692765",
"currentLocation": {Address},
"fromId": "D2",
"toId:": "123"
}
:return: {
"id": "123",
"status": "SHIPPED",
"createdAt": "2015-11-05T22:00:51.692765",
"updatedAt": "2015-11-08T22:00:51.692765",
"deliveredAt": "2015-11-08T22:00:51.692765",
"estimatedTimeOfArrival": "2015-11-07T22:00:51.692765",
"currentLocation": {Address},
"fromId": "D2",
"toId:": "123"
}
"""
check_null_input((shipment_id, 'shipment to update'))
updated_shipment = get_json_data(request)
shipment = shipment_service.update_shipment(token=g.auth['loopback_token'],
shipment_id=shipment_id, shipment=updated_shipment)
return Response(shipment,
status=200,
mimetype='application/json')
shipments.py 文件源码
python
阅读 22
收藏 0
点赞 0
评论 0
评论列表
文章目录