File tree Expand file tree Collapse file tree 5 files changed +18
-9
lines changed
Expand file tree Collapse file tree 5 files changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -2,4 +2,4 @@ python-fedex Examples
22=====================
33This directory contains a number of examples of how to use python-fedex. For
44these examples to work, you must open example_config.py and enter your
5- testing account credentials there.
5+ testing account credentials there.
Original file line number Diff line number Diff line change 1919inquiry .Address .City = 'Clemson'
2020inquiry .Address .StateOrProvinceCode = 'SC'
2121
22- # If you'd like to see some documentation on the ship service WSDL, un-comment
22+ # If you'd like to see some documentation on the country service WSDL, un-comment
2323# this line. (Spammy).
2424# print(inquiry.client)
2525
Original file line number Diff line number Diff line change 11#!/usr/bin/env python
22"""
3- This example shows how to create shipments. The variables populated below
3+ This example shows how to create a freight shipment and generate
4+ a waybill as output. The variables populated below
45represents the minimum required values. You will need to fill all of these, or
56risk seeing a SchemaValidationError exception thrown.
67
Original file line number Diff line number Diff line change 11#!/usr/bin/env python
22"""
3- This example shows how to create shipments . The variables populated below
3+ This example shows how to create a shipment and generate a waybill as output . The variables populated below
44represents the minimum required values. You will need to fill all of these, or
55risk seeing a SchemaValidationError exception thrown.
66
Original file line number Diff line number Diff line change 5353print ("== Results ==" )
5454for match in track .response .CompletedTrackDetails [0 ].TrackDetails :
5555 print ("Tracking #: {}" .format (match .TrackingNumber ))
56- print ("Tracking # UniqueID: {}" .format (match .TrackingNumberUniqueIdentifier ))
57- print ("Status: {}" .format (match .StatusDetail .Description ))
58- print ("Status AncillaryDetails Reason: {}" .format (match .StatusDetail .AncillaryDetails [- 1 ].Reason ))
59- print ("Status AncillaryDetails Description:{}" .format (match .StatusDetail .AncillaryDetails [- 1 ].ReasonDescription ))
60- print ("Commit Message:{}" .format (match .ServiceCommitMessage ))
56+ if hasattr (match , 'TrackingNumberUniqueIdentifier' ):
57+ print ("Tracking # UniqueID: {}" .format (match .TrackingNumberUniqueIdentifier ))
58+ if hasattr (match , 'StatusDetail.Description' ):
59+ print ("Status Description: {}" .format (match .StatusDetail .Description ))
60+ if hasattr (match , 'StatusDetail.AncillaryDetails' ):
61+ print ("Status AncillaryDetails Reason: {}" .format (match .StatusDetail .AncillaryDetails [- 1 ].Reason ))
62+ print ("Status AncillaryDetails Description: {}" .format (match .StatusDetail .AncillaryDetails [- 1 ].ReasonDescription ))
63+ if hasattr (match , 'ServiceCommitMessage' ):
64+ print ("Commit Message: {}" .format (match .ServiceCommitMessage ))
65+ if hasattr (match , 'Notification' ):
66+ print ("Notification Severity: {}" .format (match .Notification .Severity ))
67+ print ("Notification Code: {}" .format (match .Notification .Code ))
68+ print ("Notification Message: {}" .format (match .Notification .Message ))
6169 print ("" )
6270
6371 event_details = []
You can’t perform that action at this time.
0 commit comments