AmazonStoreProduct

data class AmazonStoreProduct @JvmOverloads constructor(val id: String, val type: ProductType, val name: String, val title: String, val description: String, val period: Period?, val price: Price, val subscriptionOptions: SubscriptionOptions?, val defaultOption: SubscriptionOption?, val iconUrl: String, val freeTrialPeriod: Period?, val originalProductJSON: JSONObject, val presentedOfferingContext: PresentedOfferingContext? = null) : StoreProduct

Constructors

Link copied to clipboard
constructor(id: String, type: ProductType, name: String, title: String, description: String, period: Period?, price: Price, subscriptionOptions: SubscriptionOptions?, defaultOption: SubscriptionOption?, iconUrl: String, freeTrialPeriod: Period?, originalProductJSON: JSONObject, presentedOfferingContext: PresentedOfferingContext? = null)

Functions

Link copied to clipboard
open override fun copyWithPresentedOfferingContext(presentedOfferingContext: PresentedOfferingContext?): StoreProduct

For internal RevenueCat use.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open fun formattedPricePerMonth(locale: Locale = Locale.getDefault()): String?

Null for INAPP products. The price of the StoreProduct in the given locale in a monthly recurrence. This means that, for example, if the period is annual, the price will be divided by 12. It uses a currency formatter to format the price in the given locale. Note that this value may be an approximation. For Google subscriptions, this value will use the basePlan to calculate the value.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open fun pricePerMonth(locale: Locale = Locale.getDefault()): Price?

Null for INAPP products. The price of the StoreProduct in the given locale in a monthly recurrence. This means that, for example, if the period is annual, the price will be divided by 12. It uses a currency formatter to format the price in the given locale. Note that this value may be an approximation. For Google subscriptions, this value will use the basePlan to calculate the value.

Link copied to clipboard
open fun pricePerWeek(locale: Locale = Locale.getDefault()): Price?

Null for INAPP products. The price of the StoreProduct in the given locale in a weekly recurrence. This means that, for example, if the period is monthly, the price will be divided by 4. It uses a currency formatter to format the price in the given locale. Note that this value may be an approximation. For Google subscriptions, this value will use the basePlan to calculate the value.

Link copied to clipboard
open fun pricePerYear(locale: Locale = Locale.getDefault()): Price?

Null for INAPP products. The price of the StoreProduct in the given locale in a yearly recurrence. This means that, for example, if the period is monthly, the price will be multiplied by 12. It uses a currency formatter to format the price in the given locale. Note that this value may be an approximation. For Google subscriptions, this value will use the basePlan to calculate the value.

Properties

Link copied to clipboard

StoreProduct object containing Amazon-specific fields: originalProductJson freeTrialPeriod iconUrl

Link copied to clipboard
open override val defaultOption: SubscriptionOption?

Always null for AmazonStoreProduct

Link copied to clipboard
open override val description: String

The description of the product.

Link copied to clipboard

The Period of a subscription's free trial. Null for INAPP.

Link copied to clipboard

StoreProduct object containing Google-specific fields: productId basePlanId productDetails

Link copied to clipboard

The icon URL of the product.

Link copied to clipboard
open override val id: String

The productId For subscriptions: the term sku For INAPP: the sku

Link copied to clipboard
open override val name: String

Name of the product. This will match the title for Amazon products.

Link copied to clipboard

JSONObject representing the original Product class from Amazon.

Link copied to clipboard
open override val period: Period?

Subscription period.

Link copied to clipboard

The context from which this product was obtained.

Link copied to clipboard
open override val price: Price

Price information for a non-subscription product. Term price for a subscription.

Link copied to clipboard

Contains only data that is required to make the purchase.

Link copied to clipboard

Always null for AmazonStoreProduct

Link copied to clipboard
open override val title: String

Title of the product.

Link copied to clipboard
open override val type: ProductType

Type of product. One of ProductType.