changePlan

fun changePlan(activity: Activity, zsPlan: ZSPlan, oldPlanCode: String, storeOrderId: String, zsCustomFields: ArrayList<ZSCustomField> = ArrayList(), offerId: String, purchasesUpdatedListener: PurchaseUpdationListener)

Will upgrade/downgrade the current subscription of the user based on the product code details passed. The subscription will be updated in Play Store and the corresponding subscription will be updated in Zoho Billing too.

Parameters

activity

The current activity from which the purchase is initiated.

zsPlan

The plan object ZSPlan to which the user wants to change.

oldPlanCode

The product code of the current plan to be changed.

storeOrderId

The store order ID of the current plan to be changed.

zsCustomFields

An optional array of custom fields ZSCustomField to be sent along with the subscription data to Zoho Billing.

purchasesUpdatedListener

An interface which handles the success or failure result of the purchase flow.