File tree 5 files changed +18
-9
lines changed
5 files changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -2,4 +2,4 @@ python-fedex Examples
2
2
=====================
3
3
This directory contains a number of examples of how to use python-fedex. For
4
4
these 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 19
19
inquiry .Address .City = 'Clemson'
20
20
inquiry .Address .StateOrProvinceCode = 'SC'
21
21
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
23
23
# this line. (Spammy).
24
24
# print(inquiry.client)
25
25
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env python
2
2
"""
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
4
5
represents the minimum required values. You will need to fill all of these, or
5
6
risk seeing a SchemaValidationError exception thrown.
6
7
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env python
2
2
"""
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
4
4
represents the minimum required values. You will need to fill all of these, or
5
5
risk seeing a SchemaValidationError exception thrown.
6
6
Original file line number Diff line number Diff line change 53
53
print ("== Results ==" )
54
54
for match in track .response .CompletedTrackDetails [0 ].TrackDetails :
55
55
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 ))
61
69
print ("" )
62
70
63
71
event_details = []
You can’t perform that action at this time.
0 commit comments