getPlans

fun getPlans(planDetailsListener: PlanDetailsListener, customFieldFilters: ArrayList<ZSCustomFieldFilter> = arrayListOf(), useCache: Boolean = false)

This method is used to get the array of plans that are applicable to the user. The resulting array will contain the plans that are active in both the play store and Zoho Billing.

Parameters

planDetailsListener
  • An interface which handles the success or failure result of the Play Billing Manager GET plans API.

customFieldFilters
  • An optional array of custom field filters used to filter plans. Each filter must include the API name of the custom field and the value to match. For example, if you have a custom field named "Supported Countries" with the custom field's API name cf_supported_countries, and you want to filter by "India", you can pass an array list like this as customFieldFilters:

       arrayListOf<ZSCustomFieldFilter>().apply {
    add(ZSCustomFieldFilter(fieldAPIName = "cf_supported_countries", filterValue = "India", matchType = ZSCustomFieldFilter.MatchType.CONTAINS))
    }