Skip to content

[CF-1324] Fix personalizedPrice defaulting to false#952

Merged
beylmk merged 3 commits into
mainfrom
fix-default-personalized-price
Apr 6, 2023
Merged

[CF-1324] Fix personalizedPrice defaulting to false#952
beylmk merged 3 commits into
mainfrom
fix-default-personalized-price

Conversation

@beylmk

@beylmk beylmk commented Apr 5, 2023

Copy link
Copy Markdown
Contributor

isPersonalizedPrice was defaulting to false, when it should default to null.

Looks like I had two tests, neither of which really checked it... one was using the deprecated purchasePackage call, which doesn't interact with PurchaseParams. The other was missing the @test annotation and therefore not running 🤦‍♀️

I fixed the one with the missing annotation and added a test for the non-upgrade flow as well.

@beylmk beylmk requested a review from a team April 5, 2023 17:12
@beylmk beylmk added the bug label Apr 5, 2023

@joshdholtz joshdholtz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM 🚀

@joshdholtz joshdholtz added pr:fix A bug fix and removed bug labels Apr 6, 2023
@codecov

codecov Bot commented Apr 6, 2023

Copy link
Copy Markdown

Codecov Report

Merging #952 (a45441c) into main (7dbe098) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #952   +/-   ##
=======================================
  Coverage   85.03%   85.03%           
=======================================
  Files         166      166           
  Lines        5827     5827           
  Branches      801      801           
=======================================
  Hits         4955     4955           
  Misses        553      553           
  Partials      319      319           
Impacted Files Coverage Δ
.../kotlin/com/revenuecat/purchases/PurchaseParams.kt 92.10% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@beylmk beylmk merged commit 013274e into main Apr 6, 2023
@beylmk beylmk deleted the fix-default-personalized-price branch April 6, 2023 14:19
tonidero added a commit that referenced this pull request May 5, 2023
### Description
There was one test failing due to the change in
#952. This fixes the
verification so the test passes.
tonidero added a commit that referenced this pull request May 18, 2023
**This is an automatic release.**

### New Features
* CAT-859 Expose whether or not a SubscriptionOption is Prepaid in the
SDK (#1005) via Deema AlShamaa (@dalshamaa)
### Bugfixes
* [CF-1324] Fix personalizedPrice defaulting to false (#952) via beylmk
(@beylmk)
### Performance Improvements
* Store and return ETag last refresh time header (#978) via Toni Rico
(@tonidero)
### Dependency Updates
* Bump fastlane-plugin-revenuecat_internal from `3b03efa` to `fe45299`
(#991) via dependabot[bot] (@dependabot[bot])
* Bump danger from 9.2.0 to 9.3.0 (#981) via dependabot[bot]
(@dependabot[bot])
* Bump fastlane-plugin-revenuecat_internal from `8482a43` to `3b03efa`
(#974) via dependabot[bot] (@dependabot[bot])
* Bump fastlane from 2.212.1 to 2.212.2 (#973) via dependabot[bot]
(@dependabot[bot])
* Bump fastlane-plugin-revenuecat_internal from `9255366` to `8482a43`
(#961) via dependabot[bot] (@dependabot[bot])
### Other Changes
* Add proration modes to post to backend (#977) via swehner (@swehner)
* Added ENTITLEMENTS_COMPUTED_ON_DEVICE (#939) via Cesar de la Vega
(@vegaro)
* Fix flaky test in OfflineCustomerInfoCalculatorTest (#997) via Cesar
de la Vega (@vegaro)
* Fix `OfflineCustomerInfoCalculatorTest` `Unresolved reference:
ProducType` (#995) via Cesar de la Vega (@vegaro)
* Add support for product_plan_identifier for offline customer info
(#959) via Cesar de la Vega (@vegaro)
* Add non-subscriptions support to offline customer info (#958) via
Cesar de la Vega (@vegaro)
* Query only active purchases when generating offline entitlements
customer info (#1003) via Toni Rico (@tonidero)
* Fix `PurchasesIntegrationTest` building issue (#996 into main) (#998)
via Cesar de la Vega (@vegaro)
* Fail offline entitlements computation if product entitlement mapping
not available (#999) via Toni Rico (@tonidero)
* Fix  build_magic_weather lane (#993) via Cesar de la Vega (@vegaro)
* Add backend integration tests and test product entitlement mapping
endpoint (#988) via Toni Rico (@tonidero)
* Fix purchases integration tests (#980) via Toni Rico (@tonidero)
* Disable offline entitlements if active inapp purchases exist (#983)
via Toni Rico (@tonidero)
* Clear cached customer info upon entering offline entitlements mode
(#989) via Toni Rico (@tonidero)
* Update product entitlement mapping request to new format (#976) via
Toni Rico (@tonidero)
* Support enabling/disabling offline entitlements (#964) via Toni Rico
(@tonidero)
* Add back integration tests automation (#972) via Toni Rico (@tonidero)
* Upgrade to AGP 8.0 (#975) via Toni Rico (@tonidero)
* Extract post receipt logic to PostReceiptHelper (#967) via Toni Rico
(@tonidero)
* Add isServerDown to error callback for postReceipt and getCustomerInfo
requests (#963) via Toni Rico (@tonidero)
* Add back integration test flavors (#962) via Toni Rico (@tonidero)
* Fix storing test results (#966) via Cesar de la Vega (@vegaro)
* Extract detekt job from test job (#965) via Cesar de la Vega (@vegaro)


[CF-1324]:
https://revenuecats.atlassian.net/browse/CF-1324?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

---------

Co-authored-by: revenuecat-ops <ops@revenuecat.com>
Co-authored-by: Toni Rico <antonio.rico.diez@revenuecat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants