Skip to content

Use a shared struct for address proofing results#7097

Merged
jmhooper merged 3 commits intomainfrom
jmhooper-phone-finder-struct
Oct 6, 2022
Merged

Use a shared struct for address proofing results#7097
jmhooper merged 3 commits intomainfrom
jmhooper-phone-finder-struct

Conversation

@jmhooper
Copy link
Contributor

@jmhooper jmhooper commented Oct 5, 2022

This commit adds a shared struct for the address proofer calls. This commits make sure that all of our adapters return a result with the same public API.

See also: #7088, #7092

[skip changelog]

This commit adds a shared struct for the address proofer calls. This commits make sure that all of our adapters return a result with the same public API.

See also: #7088, #7092

[skip changelog]
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

end

def parse_verification_errors(verification_response)
errors = Hash.new { |h, k| h[k] = [] }
Copy link
Contributor

Choose a reason for hiding this comment

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

i see you 😍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you learn something new every day

exception:,
vendor_name:,
transaction_id: '',
reference: ''
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe easier to default reference to nil than empty string?

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 was just trying to keep reference consistent with transaction_id

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'm not sure I understand the reasoning for making it nil vs empty string? I think all we do is log it and the result is the same in the end, right?

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess nil to me is a more real "isn't there" vs some sort of default from empty string, but you're right, for most situations they're the same

@jmhooper jmhooper merged commit d4e4900 into main Oct 6, 2022
@jmhooper jmhooper deleted the jmhooper-phone-finder-struct branch October 6, 2022 16:32
jskinne3 pushed a commit that referenced this pull request Oct 12, 2022
This commit adds a shared struct for the address proofer calls. This commits make sure that all of our adapters return a result with the same public API.

See also: #7088, #7092

[skip changelog]
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