Builder

open class Builder

Builder to configure a purchase. Initialized with an Activity either a Package, StoreProduct, or SubscriptionOption.

If a Package or StoreProduct is passed in, the defaultOption will be purchased. defaultOption is selected via the following logic:

  • Filters out offers with "rc-ignore-offer" tag

  • Uses SubscriptionOption with the longest free trial or cheapest first phase

  • Falls back to use base plan

Constructors

Link copied to clipboard
fun Builder(activity: Activity, packageToPurchase: Package)
Link copied to clipboard
fun Builder(activity: Activity, storeProduct: StoreProduct)
Link copied to clipboard
fun Builder(activity: Activity, subscriptionOption: SubscriptionOption)

Functions

Link copied to clipboard
open fun build(): PurchaseParams
Link copied to clipboard
fun googleProrationMode(googleProrationMode: GoogleProrationMode): PurchaseParams.Builder
Link copied to clipboard
fun isPersonalizedPrice(isPersonalizedPrice: Boolean): PurchaseParams.Builder
Link copied to clipboard
fun oldProductId(oldProductId: String): PurchaseParams.Builder

Sources

Link copied to clipboard