Add missing response fields to CustomerInfo. Including transaction Prices#2128
Conversation
120a014 to
c9eec4e
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2128 +/- ##
==========================================
- Coverage 80.34% 80.12% -0.23%
==========================================
Files 281 282 +1
Lines 9964 10026 +62
Branches 1417 1421 +4
==========================================
+ Hits 8006 8033 +27
- Misses 1346 1378 +32
- Partials 612 615 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
68c0085 to
88a7c06
Compare
tonidero
left a comment
There was a problem hiding this comment.
Mostly just some comments to avoid the breaking changes but looking good!
88a7c06 to
8f498c2
Compare
|
checking the tests now |
tonidero
left a comment
There was a problem hiding this comment.
Left some comments but nothing really blocking. Thanks for adding this!
|
|
||
| @OptIn(ExperimentalSerializationApi::class) | ||
| @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) | ||
| internal val json = Json { |
There was a problem hiding this comment.
We've talked in the past that we should try to unify these into a single Json instance with a single configuration, so serializing is consistent accross models... Maybe we could extract the OfferingParser json instance and use that one? I see this one has explicitNulls set to false, but I would assume that should be fine even if the same thing happens for Offerings?
We can probably also do this in a separate PR, but feels like something we should try to move towards soon.
|
|
||
| internal companion object { | ||
| @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) | ||
| internal val json = Json { |
There was a problem hiding this comment.
Same thing about the json instance. I think ideally we only add at most one for CustomerInfo data (but preferable use the same as other parts of the SDK).
There was a problem hiding this comment.
Did that in a9da840 (#2128)
Thanks for the idea!
5345286 to
74e7af4
Compare
tonidero
left a comment
There was a problem hiding this comment.
Thanks for doing those changes! ![]()
**This is an automatic release.** ## RevenueCat SDK ### 🐞 Bugfixes * Add missing response fields to `CustomerInfo`. Including transaction Prices (#2128) via Cesar de la Vega (@vegaro) ## RevenueCatUI SDK ### Paywallv2 #### 🐞 Bugfixes * [Paywalls v2] Fixes timeline layout when width is Fit (#2354) via JayShortway (@JayShortway) * [Paywalls V2] Improves fuzzy matching locale when the region doesn't match (#2355) via JayShortway (@JayShortway) * [Paywalls V2] Norwegian Bokmål and Norwegian Nynorsk fall back to Norwegian. (#2329) via JayShortway (@JayShortway) ### Customer Center #### 🐞 Bugfixes * Clean up on restoring functionality in customer center (#2316) via Cesar de la Vega (@vegaro) ### 🔄 Other Changes * [Paywalls v2] Adds the unsupported Background type to the error message (#2350) via JayShortway (@JayShortway) * [Paywalls v2] Uses a fixed date for template previews to avoid daily changes. (#2351) via JayShortway (@JayShortway) * [Paywalls v2] Adds a default case to `Background` and `ButtonComponent` (#2347) via JayShortway (@JayShortway) * [Paywalls v2] Improves `PaywallComponentsTemplatePreviewRecorder` stability (#2352) via JayShortway (@JayShortway) * [Paywalls v2] Adds a default case to most enums and sealed types (#2346) via JayShortway (@JayShortway) * Adds `EnumDeserializerWithDefault` and `SealedDeserializerWithDefault` (#2345) via JayShortway (@JayShortway) * [Paywalls V2] Renders template previews in a fixed resolution using Paparazzi (#2214) via JayShortway (@JayShortway) * Bump fastlane from 2.227.0 to 2.227.1 (#2344) via dependabot[bot] (@dependabot[bot]) * Migrate root gradle file to KTS (#2343) via Jaewoong Eum (@skydoves) * Migrate tester modules to KTS format (#2340) via Jaewoong Eum (@skydoves) * Introduce purchases-bom package (#2339) via Jaewoong Eum (@skydoves) * [AUTOMATIC][Paywalls V2] Updates paywall-preview-resources submodule (#2338) via RevenueCat Git Bot (@RCGitBot) * [Diagnostics] Removes Android 7 requirement (#2335) via JayShortway (@JayShortway) * [Paywalls v2] Fixes `update-paywall-preview-resources-submodule` CI job (#2337) via JayShortway (@JayShortway) * Make purchases module to transitive dependency for the ui module (#2334) via Jaewoong Eum (@skydoves) * Migrate settings.gradle to KTS and add the dependency resolutions (#2328) via Jaewoong Eum (@skydoves) Co-authored-by: revenuecat-ops <ops@revenuecat.com>
This pull request introduces several enhancements and new features to the
SubscriptionInfoand related classes in thepurchasesmodule. The most important changes include adding new properties to theSubscriptionInfoclass, creating a newPriceResponseclass, and updating theSubscriptionInfoResponseclass to include additional fields.Enhancements to
SubscriptionInfoand related classes:purchases/src/main/kotlin/com/revenuecat/purchases/SubscriptionInfo.kt:autoResumeDate,displayName,price, andproductPlanIdentifierto theSubscriptionInfoclass. [1] [2]localeparameter to the constructor ofSubscriptionInfo, for building the pricepurchases/src/main/kotlin/com/revenuecat/purchases/common/responses/PriceResponse.kt:PriceResponseclass to handle price-related information.purchases/src/main/kotlin/com/revenuecat/purchases/common/responses/SubscriptionInfoResponse.kt:SubscriptionInfoResponseclass to includeautoResumeDate,displayName,price, andproductPlanIdentifierfields. [1] [2]purchases/src/main/kotlin/com/revenuecat/purchases/models/Transaction.kt:displayName,isSandbox,originalPurchaseDate, andpriceto theTransactionclass. [1] [2]Additional updates:
purchases/src/main/kotlin/com/revenuecat/purchases/utils/PriceExtensions.kt:MICRO_MULTIPLIERtointernal.