-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecates observerMode in favor of purchasesAreCompletedBy (#1708)
- Adds `PurchasesAreCompletedBy` enum. - Adds `PurchasesConfiguration.Builder.purchasesAreCompletedBy()` - Deprecates `PurchasesConfiguration.Builder.observerMode()`, with a nice `ReplaceWith` action. - Adds `Purchases.syncAmazonPurchase()`. - Deprecates `Purchases.syncObserverModeAmazonPurchase`, with a nice `ReplaceWith` action. - Deprecates `Purchases.finishTransactions`, with an okay `ReplaceWith` action. - Adds API tests for `PurchasesAreCompletedBy`. - Adds API tests for `purchasesAreCompletedBy()`. - PaywallsTester, PurchaseTester and the MagicWeather samples use `purchasesAreCompletedBy()` instead of `observerMode()`. - Adds some unit tests for `purchasesAreCompletedBy()`.
- Loading branch information
1 parent
61ded49
commit b8bae4a
Showing
21 changed files
with
286 additions
and
45 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
13 changes: 13 additions & 0 deletions
13
api-tester/src/main/java/com/revenuecat/apitester/java/PurchasesAreCompletedByAPI.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.revenuecat.apitester.java; | ||
|
||
import com.revenuecat.purchases.PurchasesAreCompletedBy; | ||
|
||
@SuppressWarnings({"unused"}) | ||
final class PurchasesAreCompletedByAPI { | ||
static void check(final PurchasesAreCompletedBy mode) { | ||
switch (mode) { | ||
case REVENUECAT: | ||
case MY_APP: | ||
} | ||
} | ||
} |
This file contains 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
15 changes: 15 additions & 0 deletions
15
api-tester/src/main/java/com/revenuecat/apitester/kotlin/PurchasesAreCompletedByAPI.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.revenuecat.apitester.kotlin | ||
|
||
import com.revenuecat.purchases.PurchasesAreCompletedBy | ||
|
||
@Suppress("unused") | ||
private class PurchasesAreCompletedByAPI { | ||
fun check(mode: PurchasesAreCompletedBy) { | ||
when (mode) { | ||
PurchasesAreCompletedBy.REVENUECAT, | ||
PurchasesAreCompletedBy.MY_APP, | ||
-> { | ||
} | ||
}.exhaustive | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.