11"""
22Ship Service Module
33===================
4- This package contains the shipping and tracking methods defined by Fedex's
4+ This package contains the shipping methods defined by Fedex's
55ShipService WSDL file. Each is encapsulated in a class for easy access.
66For more details on each, refer to the respective class's documentation.
77"""
88from .. base_service import FedexBaseService
99
10- class FedexTrackRequest (FedexBaseService ):
10+ class FedexShipRequest (FedexBaseService ):
1111 """
1212 This class allows you to track shipments by providing a tracking
1313 number or other identifying features. By default, you
@@ -35,31 +35,19 @@ def __init__(self, config_obj, tracking_value,
3535 self ._config_obj = config_obj
3636
3737 # Holds version info for the VersionId SOAP object.
38- self ._version_info = {'service_id' : 'trck' , 'major' : '4 ' ,
38+ self ._version_info = {'service_id' : 'trck' , 'major' : '7 ' ,
3939 'intermediate' : '0' , 'minor' : '0' }
4040 # Call the parent FedexBaseService class for basic setup work.
41- super (FedexTrackRequest , self ).__init__ (self ._config_obj ,
42- 'TrackService_v4 .wsdl' ,
41+ super (FedexShipRequest , self ).__init__ (self ._config_obj ,
42+ 'ShipService_v7 .wsdl' ,
4343 * args , ** kwargs )
44-
45- # Important request-specific instance variables.
46- self .package_identifier = package_identifier
47- """@ivar: Determines what L{tracking_value} is, be it a tracking number,
48- purchase order, or other things."""
49- self .tracking_value = tracking_value
50- """@ivar: This is typically a Fedex tracking number, but setting
51- L{package_identifier} to other values makes this change."""
5244
53- def __set_track_package_identifier (self ):
45+ def __set_transactional_detail (self ):
5446 """
55- This sets the package identifier information. This may be a tracking
56- number or a few different things as per the Fedex spec.
5747 """
58- TrackPackageIdentifier = self .client .factory .create ('TrackPackageIdentifier' )
59- TrackPackageIdentifier .Type = self .package_identifier
60- TrackPackageIdentifier .Value = self .tracking_value
61- self .logger .debug (TrackPackageIdentifier )
62- self .TrackPackageIdentifier = TrackPackageIdentifier
48+ TransactionDetail = self .client .factory .create ('TransactionDetail' )
49+ self .logger .info (TransactionDetail )
50+ self .TransactionDetail = TransactionDetail
6351
6452 def _assemble_and_send_request (self ):
6553 """
@@ -68,13 +56,14 @@ def _assemble_and_send_request(self):
6856 @warning: NEVER CALL THIS METHOD DIRECTLY. CALL send_request(), WHICH RESIDES
6957 ON FedexBaseService AND IS INHERITED.
7058 """
71- self .__set_track_package_identifier ()
59+ self .__set_transactional_detail ()
7260 client = self .client
7361 # Fire off the query.
74- response = client .service .track (WebAuthenticationDetail = self .WebAuthenticationDetail ,
75- ClientDetail = self .ClientDetail ,
76- TransactionDetail = self .TransactionDetail ,
77- Version = self .VersionId ,
78- CarrierCodeType = self .CarrierCodeType ,
79- PackageIdentifier = self .TrackPackageIdentifier )
80- return response
62+ """
63+ processShipment(WebAuthenticationDetail WebAuthenticationDetail,
64+ ClientDetail ClientDetail,
65+ TransactionDetail TransactionDetail,
66+ VersionId Version,
67+ RequestedShipment RequestedShipment)
68+ """
69+ #return response
0 commit comments