All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.com.revenuecat.purchases.kmp.models.SubscriptionOptions.kt Maven / Gradle / Ivy

There is a newer version: 1.3.7+13.15.0
Show newest version
package com.revenuecat.purchases.kmp.models

/**
 * A collection of [SubscriptionOption]s.
 */
public interface SubscriptionOptions {
    /**
     * The base plan [SubscriptionOption].
     */
    public val basePlan: SubscriptionOption?

    /**
     * The first [SubscriptionOption] with a free trial [PricingPhase].
     */
    public val freeTrial: SubscriptionOption?

    /**
     * The first [SubscriptionOption] with an intro trial [PricingPhase].
     * There can be a free trial [PricingPhase] and intro trial [PricingPhase] in the same [SubscriptionOption].
     */
    public val introOffer: SubscriptionOption?

    /**
     * The default [SubscriptionOption]:
     *   - Filters out offers with "rc-ignore-offer" tag
     *   - Uses [SubscriptionOption] WITH longest free trial or cheapest first phase
     *   - Falls back to use base plan
     */
    public val defaultOffer: SubscriptionOption?

    /**
     * Finds all [SubscriptionOption]s with a specific tag.
     * Note: All offers inherit base plan tags.
     */
    public fun withTag(tag: String): List
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy