applyOfferToCurrentPlan

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

Will apply offer to the current subscription of the user based on the product code and offer id 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.

currentPlanCode

The product code of the current plan to which the offer has to be applied.

storeOrderId

The store order ID of the current plan.

zsCustomFields

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

offerId

The offer id which has to be applied to the current plan.

purchasesUpdatedListener

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