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

Rename Google Pay APIs #824

Merged
merged 6 commits into from
Nov 13, 2023
Merged

Rename Google Pay APIs #824

merged 6 commits into from
Nov 13, 2023

Conversation

sarahkoop
Copy link
Contributor

Summary of changes

  • Rename Google Pay APIs to createPaymentAuthRequest and tokenize and rename associated result objects and callbacks
  • Cleanup GooglePayClient - use lambdas

Checklist

  • Added a changelog entry

Authors

@sarahkoop sarahkoop requested a review from a team as a code owner November 9, 2023 17:48
@@ -200,63 +189,55 @@ public void requestPayment(@NonNull final GooglePayRequest request,

//noinspection ConstantConditions
if (request == null) {
callback.onGooglePayIntentData(null, new BraintreeException(
Copy link
Contributor

Choose a reason for hiding this comment

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

Random 🤔 : There may be a benefit to having on<PAYMENT_METHOD>Result() style callbacks. It would help in the extreme case that a merchant decides to implement multiple payment method listener interfaces on the same class. If they're all named the same it could get confusing. It's more verbose, but for single response objects they'll be shortened to lambdas on Java 8 and up.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point - I'll plan to refactor the naming of these methods in the PRs that move to single result object callbacks to make sure that the naming all makes sense.

@sarahkoop sarahkoop merged commit 1567e76 into v5 Nov 13, 2023
2 checks passed
@sarahkoop sarahkoop deleted the rename_google_pay_api branch November 13, 2023 15:37
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.

3 participants