StoreProduct

data class StoreProduct(    val sku: String,     val type: ProductType,     val price: String,     val priceAmountMicros: Long,     val priceCurrencyCode: String,     val originalPrice: String?,     val originalPriceAmountMicros: Long,     val title: String,     val description: String,     val subscriptionPeriod: String?,     val freeTrialPeriod: String?,     val introductoryPrice: String?,     val introductoryPriceAmountMicros: Long,     val introductoryPricePeriod: String?,     val introductoryPriceCycles: Int,     val iconUrl: String,     val originalJson: JSONObject) : Parcelable

Represents an in-app product's or subscription's listing details.

Constructors

Link copied to clipboard
fun StoreProduct(    sku: String,     type: ProductType,     price: String,     priceAmountMicros: Long,     priceCurrencyCode: String,     originalPrice: String?,     originalPriceAmountMicros: Long,     title: String,     description: String,     subscriptionPeriod: String?,     freeTrialPeriod: String?,     introductoryPrice: String?,     introductoryPriceAmountMicros: Long,     introductoryPricePeriod: String?,     introductoryPriceCycles: Int,     iconUrl: String,     originalJson: JSONObject)

Functions

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)

Properties

Link copied to clipboard
val description: String

The description of the product.

Link copied to clipboard
val freeTrialPeriod: String?

Subscription period, specified in ISO 8601 format. For example, P1W equates to one week, P1M equates to one month, P3M equates to three months, P6M equates to six months, and P1Y equates to one year.

Link copied to clipboard
val iconUrl: String

The icon of the product if present.

Link copied to clipboard
val introductoryPrice: String?

The billing period of the introductory price, specified in ISO 8601 format.

Link copied to clipboard
val introductoryPriceAmountMicros: Long

Introductory price in micro-units. The currency is the same as price_currency_code.

Link copied to clipboard
val introductoryPriceCycles: Int

The number of subscription billing periods for which the user will be given the introductory price, such as 3.

Link copied to clipboard
val introductoryPricePeriod: String?

The billing period of the introductory price, specified in ISO 8601 format.

Link copied to clipboard
val originalJson: JSONObject

JSONObject representing the original product class from Google or Amazon.

Link copied to clipboard
val originalPrice: String?

Formatted original price of the item, including its currency sign.

Link copied to clipboard
val originalPriceAmountMicros: Long

Returns the original price in micro-units, where 1,000,000 micro-units equal one unit of the currency.

Link copied to clipboard
val price: String

Formatted price of the item, including its currency sign. For example $3.00.

Link copied to clipboard
val priceAmountMicros: Long

Price in micro-units, where 1,000,000 micro-units equal one unit of the currency.

Link copied to clipboard
val priceCurrencyCode: String

Returns ISO 4217 currency code for price and original price.

Link copied to clipboard
val sku: String

The product ID.

Link copied to clipboard
val subscriptionPeriod: String?

Subscription period, specified in ISO 8601 format. For example, P1W equates to one week, P1M equates to one month, P3M equates to three months, P6M equates to six months, and P1Y equates to one year.

Link copied to clipboard
val title: String

Title of the product.

Link copied to clipboard
val type: ProductType

Type of product. One of ProductType.

Extensions

Link copied to clipboard
val StoreProduct.skuDetails: SkuDetails

Returns the original SkuDetails that was used to build the StoreProduct object.

Sources

Link copied to clipboard