Skip to content

Implement headless USPS in-person proofing (LG-3855)#4523

Merged
mitchellhenke merged 5 commits intomasterfrom
mitchellhenke/usps-ipp-headless-lg-3855
Dec 21, 2020
Merged

Implement headless USPS in-person proofing (LG-3855)#4523
mitchellhenke merged 5 commits intomasterfrom
mitchellhenke/usps-ipp-headless-lg-3855

Conversation

@mitchellhenke
Copy link
Contributor

The aim was to be able to make the API calls that we'd use during the course of someone in-person proofing, and document some of the more surprising parts of the API to better prepare for the future integration. I wanted to keep it small and self-contained, so it notably doesn't subclass Proofer and the token storage is not intuitive.

Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! thanks for the YARD documentation too!!

password: AppConfig.env.usps_ipp_password,
grant_type: 'implicit',
response_type: 'token',
client_id: '424ada78-62ae-4c53-8e3a-0b737708a9db',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we make this a config as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it changes as I understand it. Any IPP API will use that client_id.

Mitchell Henke and others added 4 commits December 21, 2020 15:02
@mitchellhenke mitchellhenke merged commit f66cfa8 into master Dec 21, 2020
@mitchellhenke mitchellhenke deleted the mitchellhenke/usps-ipp-headless-lg-3855 branch December 21, 2020 22:30
Comment on lines +68 to +75
PostOffice.new(
post_office['distance'],
post_office['streetAddress'],
post_office['city'],
post_office['phone'],
post_office['name'],
post_office['zip5'],
post_office['state'],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend keyword_init: true on the struct so we don't have to worry about ordering changes:

PostOffice.new(
  distance: post_office['distance'],
  address: post_office['street_address'],
  # etc ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh right, opened #4526 to fix this

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