Skip to content

Commit c8ff959

Browse files
author
Greg Taylor
committed
Correct shipment validation.
1 parent e6a5137 commit c8ff959

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

examples/create_shipment.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,10 @@
110110
# If you want to make sure that all of your entered details are valid, you
111111
# can call this and parse it just like you would via send_request(). If
112112
# shipment.response.HighestSeverity == "SUCCESS", your shipment is valid.
113-
#shipment.send_validation_request()
113+
shipment.send_validation_request()
114114

115115
# Fires off the request, sets the 'response' attribute on the object.
116-
shipment.send_request()
116+
#shipment.send_request()
117117

118118
# This will show the reply to your shipment being sent. You can access the
119119
# attributes through the response attribute on the request object. This is

fedex/base_service.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ def __init__(self, config_obj, wsdl_name, *args, **kwargs):
8181

8282
self.client = Client('file://%s' % self.wsdl_path)
8383

84+
print self.client
85+
8486
self.VersionId = None
8587
"""@ivar: Holds details on the version numbers of the WSDL."""
8688
self.WebAuthenticationDetail = None

fedex/services/ship_service.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,14 @@ def send_validation_request(self):
105105

106106
def _assemble_and_send_validation_request(self):
107107
"""
108-
Fires off the Fedex request.
108+
Fires off the Fedex shipment validation request.
109109
110-
@warning: NEVER CALL THIS METHOD DIRECTLY. CALL send_request(), WHICH RESIDES
111-
ON FedexBaseService AND IS INHERITED.
110+
@warning: NEVER CALL THIS METHOD DIRECTLY. CALL
111+
send_validation_request(), WHICH RESIDES ON FedexBaseService
112+
AND IS INHERITED.
112113
"""
113114
# Fire off the query.
114-
response = self.client.service.processShipment(WebAuthenticationDetail=self.WebAuthenticationDetail,
115+
response = self.client.service.validateShipment(WebAuthenticationDetail=self.WebAuthenticationDetail,
115116
ClientDetail=self.ClientDetail,
116117
TransactionDetail=self.TransactionDetail,
117118
Version=self.VersionId,
@@ -122,8 +123,8 @@ def _assemble_and_send_request(self):
122123
"""
123124
Fires off the Fedex request.
124125
125-
@warning: NEVER CALL THIS METHOD DIRECTLY. CALL send_request(), WHICH RESIDES
126-
ON FedexBaseService AND IS INHERITED.
126+
@warning: NEVER CALL THIS METHOD DIRECTLY. CALL send_request(),
127+
WHICH RESIDES ON FedexBaseService AND IS INHERITED.
127128
"""
128129
# Fire off the query.
129130
response = self.client.service.processShipment(WebAuthenticationDetail=self.WebAuthenticationDetail,

0 commit comments

Comments
 (0)