Add hasPaywall property to Offering#4847
Merged
Merged
Conversation
Returns `true` if the offering has either a v1 or a v2 paywall
…wall", as `PaywallData` only refers to v1 paywalls
…nts` to mention the new `hasPaywall` property
…to offering-has-paywall-getter
tonidero
approved these changes
Mar 4, 2025
ajpallares
commented
Mar 4, 2025
Member
Author
There was a problem hiding this comment.
Made the methods here static to be able to access the decodeFixture from other test clases not inheriting from BaseHTTPResponseTest (see Tests/UnitTests/Purchasing/OfferingsTests.swift)
tonidero
approved these changes
Mar 4, 2025
tonidero
left a comment
Contributor
There was a problem hiding this comment.
Nice! Thanks for adding those tests! 🙌
Offering hasPaywall getterhasPaywall property to Offering
2 tasks
ajpallares
added a commit
to RevenueCat/purchases-android
that referenced
this pull request
Mar 4, 2025
### Checklist - [x] If applicable, unit tests - [ ] If applicable, create follow-up issues for `purchases-ios` and hybrids ### Motivation Checking whether an `Offering` has a paywall is not possible now that there's also v2 paywalls. Added the same property in iOS (see RevenueCat/purchases-ios/pull/4847) ### Description This PR adds the `hasPaywall` property to `Offering` to allow knowing whether an `Offering` has a paywall or not.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
purchases-androidand hybridsMotivation
Checking whether an
Offeringhas a paywall can be confusing now that we have v1 and v2 paywalls.Description
hasPaywallgetter toOfferingto make it easier to know whether anOfferinghas a paywall or notPaywallView(and related) that was implyingPaywallDatato mean "paywall", which is not true anymore since v2 paywalls.