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

Multiple validator #25

Merged
merged 7 commits into from
Dec 7, 2023
Merged

Conversation

derek-watson14
Copy link

@derek-watson14 derek-watson14 commented Nov 20, 2023

Added the function verifyMultiple which allows users to pass up to five addresses to be validated in a single request. Documentation for this feature is here, on page 4:

https://www.usps.com/business/web-tools-apis/address-information-api.pdf

Under the section "AddressValidateRequest / Address /", which states: "Up to 5 address verifications can be included per transaction."

I have already written tests for the new functionality which pass, and updated the readme to reflect the new method.

I also had to add dotenv to the dev dependencies to run tests locally.

@derek-watson14
Copy link
Author

Pressed the button without writing a description first, please see above for details!

@Sparticuz
Copy link
Owner

This is great! I'll look at this soon! Thank you!

@derek-watson14
Copy link
Author

Looks like the tests are failing because the USPS userId isnt being read properly from the environment. I was getting the same message locally which is why I added the dotenv package to dev dependencies which resolved it. Let me know if there is anything I need to change so the tests can run on your end!

@derek-watson14
Copy link
Author

Tried dropping the dotenv package from the environment because I think it was conflicting with GitHub environment variables and causing the tests to fail. Hopefully.

@Sparticuz
Copy link
Owner

Got it loaded and the tests passed. My only note would be to run the lint and fix the errors and warnings. You can turn off the no-param-reassign for that page / those lines, whichever (unless you want to fix it 😄 ), and I think? "Error" in addresses[0]! will fix the no-prototype-builtins? not sure.

I think it's not loading the Github secrets because it's running from a fork.

Thanks! I'll merge once the linting is good

@derek-watson14
Copy link
Author

Should be good to go with the linting errors! Thanks for taking a look

@Sparticuz
Copy link
Owner

lgtm, thank you !

@Sparticuz Sparticuz merged commit c4e9335 into Sparticuz:master Dec 7, 2023
2 of 4 checks passed
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.

2 participants