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 BTShopperInsights public API shell #1142

Merged
merged 9 commits into from
Dec 7, 2023

Conversation

scannillo
Copy link
Contributor

@scannillo scannillo commented Dec 4, 2023

JIRA DTBTSDK-3173

Summary of changes

  • Add public API shell for the Payment Insights feature
    • BTShopperInsightsClient
    • BTShopperInsightsResult
  • Add template unit test file for BTShopperInsightsClient_Tests

Note

This feature is basically a V2/re-do of PreferredPaymentMethods (see removal PR). Though this feature will leverage a different underlying API to perform the eligibility checks.

Checklist

  • Added a changelog entry

Authors

@scannillo @MaxHastingsPP @saperi22

@scannillo scannillo requested a review from a team as a code owner December 4, 2023 18:40
@scannillo scannillo force-pushed the payment-insights-shell branch from 59c03fc to fb09a79 Compare December 4, 2023 19:56
@scannillo scannillo changed the title Add BTPaymentInsights public API shell Add BTShopperInsights public API shell Dec 4, 2023
@scannillo scannillo force-pushed the payment-insights-shell branch from 2fa7c1e to bf2efbd Compare December 4, 2023 21:09
/// Use `BTShopperInsightsClient` to optimize your checkout experience by prioritizing the customer’s preferred payment methods in your UI.
/// By customizing each customer’s checkout experience, you can improve conversion, increase sales/repeat buys and boost user retention/loyalty.
/// - Note: This feature is in beta. It's public API may change or be removed in future releases.
@objcMembers class BTShopperInsightsClient: NSObject {
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious about new modules supporting objective-c - is this required by project setup still or could we move to only swift classes?

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually I see now that this feature lives in core - what is the reason for not having a separate module for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are great questions - I honestly am very down to not add Objective-C support to this feature. We could always add it later if we see demand for it. Also worth noting - this feature will go out as an "alpha" so we have the room to iterate on it, break the API, etc.

Done in 0884b78. Will loop @jaxdesmarais in on this one though to confirm.

Copy link
Contributor Author

@scannillo scannillo Dec 6, 2023

Choose a reason for hiding this comment

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

Actually I see now that this feature lives in core - what is the reason for not having a separate module for this?

We could make this a separate module. I was approaching this from a path of least resistance approach for now as we target "alpha". We might save us the headache from creating and documenting an entire new module, if the feature doesn't get adopted. And should be relatively simple to move the files into a module if we do want to go that route later on. Open to folks thoughts, though!

Copy link
Contributor

Choose a reason for hiding this comment

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

Done in 0884b78. Will loop @jaxdesmarais in on this one though to confirm.

I am totally down for this! Should we take the same approach with the Messaging module (Swift only/init first/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.

Let's do it!

Copy link
Contributor

Choose a reason for hiding this comment

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

Should we also drop the BT prefix? Or do we want to leave that consistent until v7?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Another great question - maybe let's leave the prefix until we're ready to do that overhaul holistically?

Copy link
Contributor

Choose a reason for hiding this comment

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

That makes sense to me! I agree it could be confusing to have some things prefixed and some not so the consistency would be great then we can say goodbye to it in v7. 🚀

@scannillo
Copy link
Contributor Author

UI test failures are un-related & failing flakily on main

@scannillo scannillo merged commit 805fad8 into payment-insights-feature Dec 7, 2023
5 of 6 checks passed
@scannillo scannillo deleted the payment-insights-shell branch December 7, 2023 17:47
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.

5 participants