Add extra error cases for web purchases redemptions#1899
Conversation
There was a problem hiding this comment.
I didn't need separate error/success callbacks for this operation so had to change this. I could have moved that transformation outside, but it would mean we would need to be leaking the result body out of the backend class, so I thought this was a bit better...
There was a problem hiding this comment.
These shouldn't really be used... But I added it so it fixes the compiler.
There was a problem hiding this comment.
Needed for some tests. I think it shouldn't hurt anything.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1899 +/- ##
==========================================
- Coverage 82.16% 82.07% -0.10%
==========================================
Files 231 232 +1
Lines 8048 8088 +40
Branches 1132 1147 +15
==========================================
+ Hits 6613 6638 +25
- Misses 986 994 +8
- Partials 449 456 +7 ☔ View full report in Codecov by Sentry. |
a3ca925 to
5208298
Compare
| * might be sent if a new one wasn't already sent recently. | ||
| * The email where it will be sent is indicated by the [obfuscatedEmail]. | ||
| */ | ||
| data class Expired(val obfuscatedEmail: String) : Result() |
There was a problem hiding this comment.
Is obfuscated something like c*****ro@gmail.com?
There was a problem hiding this comment.
Yeah, for example, t****@r*****.c**
| */ | ||
| @ExperimentalPreviewRevenueCatPurchasesAPI | ||
| class WebPurchaseRedemption internal constructor( | ||
| internal val redemptionToken: String, |
There was a problem hiding this comment.
Hmm could be... It's internal so we can really change it whenever... I think it might be better to leave it as is so we know the type of token it is, not a strong opinion though
|
Will merge this. Everything is marked as experimental APIs and functionality hidden behind a feature flag right now. |
**This is an automatic release.** ## RevenueCatUI SDK ### 🐞 Bugfixes * Handle `IllegalArgumentException` when opening a Uri in the paywalls (#1904) via Toni Rico (@tonidero) ### 🔄 Other Changes * Create sample web purchase redemption app (#1908) via Toni Rico (@tonidero) * Add extra error cases for web purchases redemptions (#1899) via Toni Rico (@tonidero) * Use new web redemption endpoint (#1903) via Toni Rico (@tonidero) Co-authored-by: revenuecat-ops <ops@revenuecat.com>
Description
This adds some new result types to a web purchase redemption:
This falls behind the experimental APIs introduced in #1889
Additionally, this renames
parseAsDeepLinktoparseAsWebPurchaseRedemptionand removes theDeepLinktype. This is a breaking change, but should be ok since the API is marked as experimental and not usable still by any customers.