@@ -65,3 +65,81 @@ def _assemble_and_send_request(self):
6565 CountryRelationship = self .CountryRelationship
6666 )
6767
68+
69+ class FedexPickupAvailabilityRequest (FedexBaseService ):
70+
71+ def __init__ (self , config_obj , * args , ** kwargs ):
72+ self ._config_obj = config_obj
73+ # Holds version info for the VersionId SOAP object.
74+ self ._version_info = {
75+ 'service_id' : 'disp' ,
76+ 'major' : '17' ,
77+ 'intermediate' : '0' ,
78+ 'minor' : '0'
79+ }
80+ self .PickupType = None
81+ self .AccountNumber = None
82+ self .PickupAddress = None
83+ self .PickupRequestType = None
84+ self .DispatchDate = None
85+ self .NumberOfBusinessDays = None
86+ self .PackageReadyTime = None
87+ self .CustomerCloseTime = None
88+ self .Carriers = None
89+ self .ShipmentAttributes = None
90+ self .PackageDetails = None
91+ super (FedexPickupAvailabilityRequest , self ).__init__ (self ._config_obj , 'PickupService_v17.wsdl' , * args , ** kwargs )
92+
93+ def _prepare_wsdl_objects (self ):
94+ self .Carriers = 'FDXE'
95+
96+ self .AccountNumber = self .client .factory .create ('AssociatedAccount' )
97+ self .AccountNumber .Type = None
98+ self .AccountNumber .AccountNumber = None
99+
100+ self .PickupAddress = self .client .factory .create ('Address' )
101+
102+ self .ShipmentAttributes = self .client .factory .create ('PickupShipmentAttributes' )
103+ self .ShipmentAttributes .ServiceType = None
104+ self .ShipmentAttributes .PackagingType = None
105+
106+ self .ShipmentAttributes .Dimensions = self .client .factory .create ('Dimensions' )
107+ self .ShipmentAttributes .Dimensions .Length = None
108+ self .ShipmentAttributes .Dimensions .Width = None
109+ self .ShipmentAttributes .Dimensions .Height = None
110+ self .ShipmentAttributes .Dimensions .Units = None
111+
112+ self .ShipmentAttributes .Weight = self .client .factory .create ('Weight' )
113+ self .ShipmentAttributes .Weight .Units = None
114+ self .ShipmentAttributes .Weight .Value = None
115+
116+ self .PackageDetails = self .client .factory .create ('RequestedPickupPackageDetail' )
117+ self .PackageDetails .PackageSpecialServices = self .client .factory .create ('PickupPackageSpecialServicesRequested' )
118+ self .PackageDetails .Weight = self .client .factory .create ('Weight' )
119+
120+ def _assemble_and_send_request (self ):
121+ """
122+ Fires off the Fedex request.
123+
124+ @warning: NEVER CALL THIS METHOD DIRECTLY. CALL send_request(),
125+ WHICH RESIDES ON FedexBaseService AND IS INHERITED.
126+ """
127+
128+ # Fire off the query.
129+ return self .client .service .getPickupAvailability (
130+ WebAuthenticationDetail = self .WebAuthenticationDetail ,
131+ ClientDetail = self .ClientDetail ,
132+ TransactionDetail = self .TransactionDetail ,
133+ Version = self .VersionId ,
134+ PickupType = self .PickupType ,
135+ AccountNumber = self .AccountNumber ,
136+ PickupAddress = self .PickupAddress ,
137+ PickupRequestType = self .PickupRequestType ,
138+ DispatchDate = self .DispatchDate ,
139+ NumberOfBusinessDays = self .NumberOfBusinessDays ,
140+ PackageReadyTime = self .PackageReadyTime ,
141+ CustomerCloseTime = self .CustomerCloseTime ,
142+ Carriers = self .Carriers ,
143+ ShipmentAttributes = self .ShipmentAttributes ,
144+ PackageDetails = self .PackageDetails
145+ )
0 commit comments