Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add revision branch #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

viable-hartman
Copy link

Adding the ability to dynamically add the Revision element so you can get additional metadata:
e.g.

Validataion Currently

{   u'AddressValidateResponse': {   u'Address': {   u'@ID': u'0',
                                                    u'Address2': u'99 SOMPLACE DR',
                                                    u'City': u'E STROUDSBURG',
                                                    u'State': u'PA',
                                                    u'Zip4': None,
                                                    u'Zip5': u'18302'}}}

Validataion with Revision Element

{   u'AddressValidateResponse': {   u'Address': {   u'@ID': u'0',
                                                    u'Address2': u'99 SOMPLACE DR',
                                                    u'CarrierRoute': u'R018',
                                                    u'CentralDeliveryPoint': u'N',
                                                    u'City': u'EAST STROUDSBURG',
                                                    u'CityAbbreviation': u'E STROUDSBURG',
                                                    u'DPVConfirmation': u'N',
                                                    u'DPVFalse': u'N',
                                                    u'DPVFootnotes': u'AAM3',
                                                    u'State': u'PA',
                                                    u'Zip4': None,
                                                    u'Zip5': u'18302'}}}

Example Usage

from usps import USPSApi, Address

usps = USPSApi('API_USER_ID', test=True)
usps.validate_address(Address(**usps_addr), with_revision=True)

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.

1 participant