Configuration

@Serializable
data class Configuration(val packageIds: List<String> = emptyList(), val defaultPackage: String? = null, imagesWebp: PaywallData.Configuration.Images? = null, legacyImages: PaywallData.Configuration.Images? = null, val imagesByTier: Map<String, PaywallData.Configuration.Images>? = null, val blurredBackgroundImage: Boolean = false, val displayRestorePurchases: Boolean = true, val termsOfServiceURL: URL? = null, val privacyURL: URL? = null, val colors: PaywallData.Configuration.ColorInformation, val colorsByTier: Map<String, PaywallData.Configuration.ColorInformation>? = null, val tiers: List<PaywallData.Configuration.Tier>? = null, val defaultTier: String? = null)

Generic configuration for any paywall.

Constructors

Link copied to clipboard
constructor(packageIds: List<String>, defaultPackage: String? = null, images: PaywallData.Configuration.Images, imagesByTier: Map<String, PaywallData.Configuration.Images>? = null, colors: PaywallData.Configuration.ColorInformation, colorsByTier: Map<String, PaywallData.Configuration.ColorInformation>? = null, tiers: List<PaywallData.Configuration.Tier>? = null, blurredBackgroundImage: Boolean = false, displayRestorePurchases: Boolean = true, termsOfServiceURL: URL? = null, privacyURL: URL? = null)
constructor(packageIds: List<String> = emptyList(), defaultPackage: String? = null, imagesWebp: PaywallData.Configuration.Images? = null, legacyImages: PaywallData.Configuration.Images? = null, imagesByTier: Map<String, PaywallData.Configuration.Images>? = null, blurredBackgroundImage: Boolean = false, displayRestorePurchases: Boolean = true, termsOfServiceURL: URL? = null, privacyURL: URL? = null, colors: PaywallData.Configuration.ColorInformation, colorsByTier: Map<String, PaywallData.Configuration.ColorInformation>? = null, tiers: List<PaywallData.Configuration.Tier>? = null, defaultTier: String? = null)

Types

Link copied to clipboard
@Serializable
data class ColorInformation(val light: PaywallData.Configuration.Colors, val dark: PaywallData.Configuration.Colors? = null)
Link copied to clipboard
@Serializable
data class Colors(val background: PaywallColor, val text1: PaywallColor, val text2: PaywallColor? = null, val text3: PaywallColor? = null, val callToActionBackground: PaywallColor, val callToActionForeground: PaywallColor, val callToActionSecondaryBackground: PaywallColor? = null, val accent1: PaywallColor? = null, val accent2: PaywallColor? = null, val accent3: PaywallColor? = null, val closeButton: PaywallColor? = null, val tierControlBackground: PaywallColor? = null, val tierControlForeground: PaywallColor? = null, val tierControlSelectedBackground: PaywallColor? = null, val tierControlSelectedForeground: PaywallColor? = null)
Link copied to clipboard
@Serializable
data class Images(val header: String? = null, val background: String? = null, val icon: String? = null)
Link copied to clipboard
@Serializable
data class Tier(val id: String, val packageIds: List<String>, val defaultPackageId: String)

Properties

Link copied to clipboard

Whether the background image will be blurred (in templates with one).

Link copied to clipboard

The set of colors used for single-tier paywalls.

Link copied to clipboard

The set of colors used for multi-tier paywalls.

Link copied to clipboard
val defaultPackage: String? = null

The package to be selected by default.

Link copied to clipboard
val defaultTier: String? = null

The tier to be selected by default.

Link copied to clipboard

Whether a restore purchases button should be displayed.

Link copied to clipboard

The images for this template.

Link copied to clipboard
Link copied to clipboard

The list of package identifiers this paywall will display.

Link copied to clipboard
@Serializable(with = OptionalURLSerializer::class)
val privacyURL: URL? = null

If set, the paywall will display a privacy policy link.

Link copied to clipboard
@Serializable(with = OptionalURLSerializer::class)
val termsOfServiceURL: URL? = null

If set, the paywall will display a terms of service link.

Link copied to clipboard

Tiers used for multi-tier paywalls.