Skip to content

Commit 2ec46ae

Browse files
author
Brent Sanders
committed
updates create service, wsdl and example
1 parent 4db5551 commit 2ec46ae

File tree

4 files changed

+12587
-5
lines changed

4 files changed

+12587
-5
lines changed

examples/create_shipment.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
# No idea what this is.
3535
# INDIVIDUAL_PACKAGES, PACKAGE_GROUPS, PACKAGE_SUMMARY
36-
shipment.RequestedShipment.PackageDetail = 'INDIVIDUAL_PACKAGES'
36+
# shipment.RequestedShipment.PackageDetail = 'INDIVIDUAL_PACKAGES'
3737

3838
# Shipper contact info.
3939
shipment.RequestedShipment.Shipper.Contact.PersonName = 'Sender Name'
@@ -61,6 +61,7 @@
6161
shipment.RequestedShipment.Recipient.Address.CountryCode = 'US'
6262
# This is needed to ensure an accurate rate quote with the response.
6363
shipment.RequestedShipment.Recipient.Address.Residential = True
64+
shipment.RequestedShipment.EdtRequestType = 'NONE'
6465

6566
# Who pays for the shipment?
6667
# RECIPIENT, SENDER or THIRD_PARTY
@@ -90,6 +91,7 @@
9091
package1_weight.Units = "LB"
9192

9293
package1 = shipment.create_wsdl_object_of_type('RequestedPackageLineItem')
94+
package1.PhysicalPackaging = 'BOX'
9395
package1.Weight = package1_weight
9496
# Un-comment this to see the other variables you may set on a package.
9597
#print package1

fedex/services/ship_service.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ def __init__(self, config_obj, *args, **kwargs):
2626
self._config_obj = config_obj
2727

2828
# Holds version info for the VersionId SOAP object.
29-
self._version_info = {'service_id': 'ship', 'major': '7',
29+
self._version_info = {'service_id': 'ship', 'major': '13',
3030
'intermediate': '0', 'minor': '0'}
3131

3232
self.RequestedShipment = None
3333
"""@ivar: Holds the RequestedShipment WSDL object."""
3434
# Call the parent FedexBaseService class for basic setup work.
3535
super(FedexProcessShipmentRequest, self).__init__(self._config_obj,
36-
'ShipService_v7.wsdl',
36+
'ShipService_v13.wsdl',
3737
*args, **kwargs)
3838

3939
def _prepare_wsdl_objects(self):
@@ -72,9 +72,9 @@ def _prepare_wsdl_objects(self):
7272

7373
Payor = self.client.factory.create('Payor')
7474
# Grab the account number from the FedexConfig object by default.
75-
Payor.AccountNumber = self._config_obj.account_number
75+
Payor.ResponsibleParty.AccountNumber = self._config_obj.account_number
7676
# Assume US.
77-
Payor.CountryCode = 'US'
77+
Payor.ResponsibleParty.Address.CountryCode = 'US'
7878

7979
ShippingChargesPayment = self.client.factory.create('Payment')
8080
ShippingChargesPayment.Payor = Payor

0 commit comments

Comments
 (0)