From 14a86b28a20ad77ced22a8d96265337e87871055 Mon Sep 17 00:00:00 2001 From: cb-kedarborkar <86285112+cb-kedarborkar@users.noreply.github.com> Date: Tue, 10 Dec 2024 16:38:02 +0530 Subject: [PATCH 1/2] Update README.md added customer object in parameter in restorepurchase method --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5d8bc20..8e30d35 100644 --- a/README.md +++ b/README.md @@ -149,13 +149,13 @@ The function is called asynchronously, and it returns a `Result` object with a ` #### Restore Purchases -The `restorePurchases()` function helps to recover your app user's previous purchases without making them pay again. Sometimes, your app user may want to restore their previous purchases after switching to a new device or reinstalling your app. You can use the `restorePurchases()` function to allow your app user to easily restore their previous purchases. +The `restorePurchases()` function helps to recover your app user's previous purchases without making them pay again. Sometimes, your app user may want to restore their previous purchases after switching to a new device or reinstalling your app. You can use the `restorePurchases()` function to allow your app user to easily restore their previous purchases by providing the `customer` object as a parameter. To retrieve **inactive** purchases along with the **active** purchases for your app user, you can call the `restorePurchases()` function with the `includeInactivePurchases` parameter set to true. If you only want to restore active subscriptions, set the parameter to false. Here is an example of how to use the restorePurchases() function in your code with the `includeInactivePurchases` parameter set to true. ``` dart try { - final result = await Chargebee.restorePurchases(true); + final result = await Chargebee.restorePurchases(true, customer); print("result : $result"); } on PlatformException catch (e) { print('Error Message: ${e.message}, Error Details: ${e.details}, Error Code: ${e.code}'); From cb874a26b40c28f8ec4e608874973613eeeab4b8 Mon Sep 17 00:00:00 2001 From: cb-kedarborkar <86285112+cb-kedarborkar@users.noreply.github.com> Date: Fri, 13 Dec 2024 16:04:39 +0530 Subject: [PATCH 2/2] Update README.md created customer object --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8e30d35..7307f64 100644 --- a/README.md +++ b/README.md @@ -155,6 +155,7 @@ To retrieve **inactive** purchases along with the **active** purchases for your ``` dart try { + final customer = CBCustomer('id','','',''); final result = await Chargebee.restorePurchases(true, customer); print("result : $result"); } on PlatformException catch (e) {