import json
from fedex.services.track_service import FedexTrackRequest
from fedex.tools.conversion import sobject_to_json
def get_delivered_at_time(tracking_number):
track_request = FedexTrackRequest(fedex_config_object)
track_request.SelectionDetails.PackageIdentifier.Value = tracking_num
track_request.SelectionDetails.PackageIdentifier.Type = 'TRACKING_NUMBER_OR_DOORTAG'
# remove FedEx operating company from request
del track_request.SelectionDetails.OperatingCompany
track_request.send_request()
json_response = sobject_to_json(track_request.response)
json_response = json.loads(json_response)
tracking_details = json_response['CompletedTrackDetails'][0]['TrackDetails']
if 'ActualDeliveryTimestamp' in tracking_details:
do stuff
It looks like the ActualDeliveryTimestamp was removed from the specifications for sobject_to_json wsdl specifications used by fedex-python between 2.4.0 and 2.4.1 (see here)
As a result, our code cannot get the essential data from the fedex api response, and the "do stuff" block in our code is unreachable.
I didn't see anything in a changelog about the update. When I contacted Fedex developer support, they claim that no updates were made to the structure of the data they send out.
Are we using the package incorrectly?
Where would I find out about breaking changes like this?
UPDATED to clarify my question as I understand the changes.
Simplified use case for python-fedex:
It looks like the
ActualDeliveryTimestamp
was removed from thespecifications forwsdl specifications used by fedex-python between 2.4.0 and 2.4.1 (see here)sobject_to_json
As a result, our code cannot get the essential data from the fedex api response, and the "do stuff" block in our code is unreachable.
I didn't see anything in a changelog about the update. When I contacted Fedex developer support, they claim that no updates were made to the structure of the data they send out.
UPDATED to clarify my question as I understand the changes.