Skip to content

Commit 809c208

Browse files
author
dmpayton
committed
update address_validation example to show setting of AddressValidationOptions
1 parent 22995e0 commit 809c208

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

examples/address_validation.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ class can handle up to 100 addresses for validation.
1414
# We're using the FedexConfig object from example_config.py in this dir.
1515
address = FedexAddressValidationRequest(CONFIG_OBJ)
1616

17+
address.AddressValidationOptions.CheckResidentialStatus = True
18+
address.AddressValidationOptions.VerifyAddresses = True
19+
address.AddressValidationOptions.MaximumNumberOfMatches = 3
20+
address.AddressValidationOptions.StreetAccuracy = 'LOOSE'
21+
del address.AddressValidationOptions.DirectionalAccuracy
22+
del address.AddressValidationOptions.CompanyNameAccuracy
23+
del address.AddressValidationOptions.ConvertToUpperCase
24+
address.AddressValidationOptions.RecognizeAlternateCityNames = True
25+
del address.AddressValidationOptions.ReturnParsedElements
26+
1727
address1 = address.create_wsdl_object_of_type('AddressToValidate')
1828
address1.CompanyName = 'International Paper'
1929
address1.Address.StreetLines = ['155 Old Greenville Hwy', 'Suite 103']

0 commit comments

Comments
 (0)