PaywallData

@Serializable
data class PaywallData(val templateName: String, val config: PaywallData.Configuration, val assetBaseURL: URL, val revision: Int = 0, localization: Map<String, PaywallData.LocalizedConfiguration>, localizationByTier: Map<String, Map<String, PaywallData.LocalizedConfiguration>> = emptyMap(), val zeroDecimalPlaceCountries: List<String> = emptyList(), val defaultLocale: String? = null)

Represents the data required to display a paywall using the RevenueCatUI library. This data can be created and configured in the dashboard and then accessed from the Offering/paywall.

See also

Constructors

Link copied to clipboard
constructor(templateName: String, config: PaywallData.Configuration, assetBaseURL: URL, revision: Int = 0, localization: Map<String, PaywallData.LocalizedConfiguration>, localizationByTier: Map<String, Map<String, PaywallData.LocalizedConfiguration>> = emptyMap(), zeroDecimalPlaceCountries: List<String> = emptyList(), defaultLocale: String? = null)

Types

Link copied to clipboard
@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.

Link copied to clipboard
@Serializable
data class LocalizedConfiguration(val title: String, val subtitle: String? = null, val callToAction: String, val callToActionWithIntroOffer: String? = null, val callToActionWithMultipleIntroOffers: String? = null, val offerDetails: String? = null, val offerDetailsWithIntroOffer: String? = null, val offerDetailsWithMultipleIntroOffers: String? = null, val offerName: String? = null, val features: List<PaywallData.LocalizedConfiguration.Feature> = emptyList(), val tierName: String? = null, val offerOverrides: Map<String, PaywallData.LocalizedConfiguration.OfferOverride> = emptyMap())

Defines the necessary localized information for a paywall.

Properties

Link copied to clipboard
@Serializable(with = URLSerializer::class)
val assetBaseURL: URL

The base remote URL where assets for this paywall are stored.

Link copied to clipboard

Generic configuration for any paywall.

Link copied to clipboard
val defaultLocale: String? = null

The default locale to be used on a paywall if the preferred languages aren't found.

Link copied to clipboard

Returns the Locale and LocalizedConfiguration to be used based on the current locale list and the available locales for this paywall.

Link copied to clipboard
val revision: Int = 0

The revision identifier for this paywall.

Link copied to clipboard

The type of template used to display this paywall.

Link copied to clipboard
@Serializable(with = GoogleListSerializer::class)
val zeroDecimalPlaceCountries: List<String>