|
4 | 4 | This package contains classes to check service availability, route, and postal |
5 | 5 | codes. Defined by the PackageMovementInformationService WSDL file. |
6 | 6 | """ |
7 | | -import logging |
| 7 | +import warnings |
| 8 | + |
8 | 9 | from ..base_service import FedexBaseService, FedexError |
9 | 10 |
|
10 | 11 |
|
@@ -41,11 +42,22 @@ def __init__(self, config_obj, postal_code=None, country_code=None, *args, **kwa |
41 | 42 | self._config_obj = config_obj |
42 | 43 |
|
43 | 44 | # Holds version info for the VersionId SOAP object. |
44 | | - self._version_info = {'service_id': 'pmis', 'major': '4', |
45 | | - 'intermediate': '0', 'minor': '0'} |
| 45 | + self._version_info = {'service_id': 'pmis', |
| 46 | + 'major': '4', |
| 47 | + 'intermediate': '0', |
| 48 | + 'minor': '0'} |
| 49 | + |
46 | 50 | self.PostalCode = postal_code |
47 | 51 | self.CountryCode = country_code |
48 | 52 |
|
| 53 | + warnings.warn( |
| 54 | + "DeprecationWarning: Package Movement Service has been deprecated; " |
| 55 | + "please use Country Service for postal code validation requests or " |
| 56 | + "Availability and Commitment Service for service availability " |
| 57 | + "requests instead.", |
| 58 | + DeprecationWarning |
| 59 | + ) |
| 60 | + |
49 | 61 | # Call the parent FedexBaseService class for basic setup work. |
50 | 62 | super(PostalCodeInquiryRequest, self).__init__(self._config_obj, |
51 | 63 | 'PackageMovementInformationService_v4.wsdl', |
@@ -84,6 +96,7 @@ def _assemble_and_send_request(self): |
84 | 96 | @warning: NEVER CALL THIS METHOD DIRECTLY. CALL send_request(), WHICH RESIDES |
85 | 97 | ON FedexBaseService AND IS INHERITED. |
86 | 98 | """ |
| 99 | + |
87 | 100 | client = self.client |
88 | 101 |
|
89 | 102 | # We get an exception like this when specifying an IntegratorId: |
|
0 commit comments