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 subscriptionsByProductIdentifier to CustomerInfo #2052

Merged
merged 6 commits into from
Jan 14, 2025

Conversation

vegaro
Copy link
Contributor

@vegaro vegaro commented Jan 13, 2025

We had more information we were not exposing in the CustomerInfo JSON

This PR adds CustomerInfo.subscriptionsByProductIdentifier which has some useful information for devs that don't use the entitlements system

RevenueCat/purchases-ios#4508

@vegaro vegaro added the pr:feat A new feature label Jan 13, 2025
@vegaro vegaro changed the title Add subscriptionsByProductIdentifier Add subscriptionsByProductIdentifier to CustomerInfo Jan 13, 2025
@vegaro vegaro requested a review from a team January 13, 2025 17:21
Copy link
Contributor

@tonidero tonidero left a comment

Choose a reason for hiding this comment

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

Just some small things but LGTM!

Copy link

codecov bot commented Jan 14, 2025

Codecov Report

Attention: Patch coverage is 63.30935% with 51 lines in your changes missing coverage. Please review.

Project coverage is 81.57%. Comparing base (3b60d92) to head (e7d908c).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
...hases/common/responses/SubscriptionInfoResponse.kt 28.94% 26 Missing and 1 partial ⚠️
...otlin/com/revenuecat/purchases/SubscriptionInfo.kt 69.23% 16 Missing ⚠️
...revenuecat/purchases/common/CustomerInfoFactory.kt 66.66% 6 Missing ⚠️
...rchases/utils/serializers/ISO8601DateSerializer.kt 60.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2052      +/-   ##
==========================================
- Coverage   81.90%   81.57%   -0.34%     
==========================================
  Files         261      265       +4     
  Lines        8526     8644     +118     
  Branches     1227     1228       +1     
==========================================
+ Hits         6983     7051      +68     
- Misses       1042     1092      +50     
  Partials      501      501              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vegaro vegaro merged commit 57ed7b3 into main Jan 14, 2025
12 checks passed
@vegaro vegaro deleted the customer-info-subscriptions branch January 14, 2025 12:53
This was referenced Jan 15, 2025
tonidero pushed a commit that referenced this pull request Jan 17, 2025
**This is an automatic release.**

## RevenueCat SDK
### ✨ New Features
* Add `subscriptionsByProductIdentifier` to `CustomerInfo` (#2052) via
Cesar de la Vega (@vegaro)
### 🐞 Bugfixes
* Fix `OwnershipType` enum serialization (#2061) via Cesar de la Vega
(@vegaro)

## RevenueCatUI SDK
### 🐞 Bugfixes
* Allow repurchasing custom packages (#2044) via Toni Rico (@tonidero)

### 🔄 Other Changes
* [Paywalls V2] Do not attempt to purchase if currently subscribed
(#2062) via JayShortway (@JayShortway)
* [Trusted Entitlements] Enable `Trusted Entitlements` by default
(#2050) via Toni Rico (@tonidero)
* [Trusted Entitlements] Do not clear CustomerInfo upon enabling Trusted
Entitlements (#2049) via Toni Rico (@tonidero)
* [Paywalls V2] Removes `MaskShape.Pill` in favor of `MaskShape.Circle`.
(#2063) via JayShortway (@JayShortway)
* [Paywalls V2] Font sizes are integers now. (#2059) via JayShortway
(@JayShortway)
* [Paywalls V2] Handles intro offer eligibility overrides (#2058) via
JayShortway (@JayShortway)
* [Paywalls V2] Implements `Convex` and `Concave` image masks (#2055)
via JayShortway (@JayShortway)
* [Paywalls V2] Add new `ImageComponent` properties (#2056) via Toni
Rico (@tonidero)
* [Paywalls V2] Add `Badge`'s `nested` style layout (#2041) via Toni
Rico (@tonidero)
* [Paywalls V2] Add `Badge`'s `edgeToEdge` `Top`/`Bottom` alignment
style layout (#2039) via Toni Rico (@tonidero)
* [Paywalls V2] Various `PaywallViewModel` fixes and tests (#2051) via
JayShortway (@JayShortway)
* [Paywalls V2] Fixes minimum spacing when distribution is
`SPACE_BETWEEN`, `SPACE_AROUND` or `SPACE_EVENLY` (#2053) via
JayShortway (@JayShortway)
* [Paywalls V2] Correctly determines when to show or hide decimals for
prices (#2048) via JayShortway (@JayShortway)
* [Paywalls V2] `TextComponentView` uses the correct `Package` for
variable values (#2042) via JayShortway (@JayShortway)
* [Paywalls V2] Adds Custom Tabs to support in-app browser URL
destinations (#2035) via JayShortway (@JayShortway)
* Update `agp` to 8.8.0 (#2045) via Toni Rico (@tonidero)
* [Paywalls V2] Add `Badge`'s `overlay` style layout (#2009) via Toni
Rico (@tonidero)
* [Paywalls V2] Implements all button actions (#2034) via JayShortway
(@JayShortway)
* Convert error message property into computed property (#2038) via Toni
Rico (@tonidero)

Co-authored-by: revenuecat-ops <ops@revenuecat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:feat A new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants