Skip to content

feat(addressvalidation): support administrativeArea and postalCode - #557

Open
M-Colley wants to merge 1 commit into
googlemaps:masterfrom
M-Colley:fix/issue-526-addressvalidation-cass-fields
Open

M-Colley wants to merge 1 commit into
googlemaps:masterfrom
M-Colley:fix/issue-526-addressvalidation-cass-fields

Conversation

@M-Colley

@M-Colley M-Colley commented Dec 2, 2026

Copy link
Copy Markdown

Calling Client.addressvalidation with administrativeArea or postalCode raises TypeError for unexpected keyword arguments even though the Address Validation API PostalAddress schema accepts both fields alongside enableUspsCass. Fixes #526.

Added optional administrativeArea=None and postalCode=None parameters to addressvalidation in googlemaps/addressvalidation.py and serialized them under params["address"] when provided. Added regression tests in tests/test_addressvalidation.py covering request payload serialization and field omission when unset.

Ran python -m pytest tests/test_addressvalidation.py -o addopts= -W default (3 passed in 0.09s).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add administrativeArea, postalCode to addressverification when using USPS CASS

1 participant