Merged
Conversation
fe14d4c to
86e37ff
Compare
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
- Implement OpenIAP compliant subscription status APIs - Add ActiveSubscription model with platform-specific fields - Rename IAPPlatform to IapPlatform for naming convention - Fix type casting issues in extract utility functions - Add iOS transactionState mapping in _convertToPurchase - Handle both JSON string and decoded List in extractors - Add comprehensive tests with proper mock handlers - All tests passing locally
86e37ff to
b6bce71
Compare
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.
This PR implements standardized subscription management APIs as specified in the OpenIAP specification, providing a unified way to check subscription status across iOS and Android platforms with automatic detection of all active subscriptions and platform-specific details like iOS expiration dates and Android auto-renewal status.
OpenIAP Specification References
Changes
New APIs
Add
getActiveSubscriptions()to retrieve detailed subscription informationActiveSubscriptionobjects with platform-specific fieldsAdd
hasActiveSubscriptions()for simple boolean subscription checkstrueif user has any active subscriptionsfalseType System
ActiveSubscriptionmodel with platform-specific fields:expirationDateIOS,environmentIOS,daysUntilExpirationIOSautoRenewingAndroidproductId,isActive,willExpireSoon(within 7 days)Code Quality
IAPPlatformtoIapPlatformfollowing Dart naming conventionsextractPurchasedandextractItemsutilities_convertToPurchasegetCurrentPlatform()calls with instance-based platform detectionTesting
Usage Example
Breaking Changes
None - these are new additions to the API surface.
Migration Notes
checkSubscribed()method (removed in v6.0.0) can now be replaced withhasActiveSubscriptions()Related