ProductDetails

class ProductDetails(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) : Parcelable

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

Constructors

ProductDetails
Link copied to clipboard
fun ProductDetails(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

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

Properties

description
Link copied to clipboard
val description: String
The description of the product.
freeTrialPeriod
Link copied to clipboard
val freeTrialPeriod: String?
Subscription period, specified in ISO 8601 format.
iconUrl
Link copied to clipboard
val iconUrl: String
The icon of the product if present.
introductoryPrice
Link copied to clipboard
val introductoryPrice: String?
The billing period of the introductory price, specified in ISO 8601 format.
introductoryPriceAmountMicros
Link copied to clipboard
val introductoryPriceAmountMicros: Long
Introductory price in micro-units.
introductoryPriceCycles
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.
introductoryPricePeriod
Link copied to clipboard
val introductoryPricePeriod: String?
The billing period of the introductory price, specified in ISO 8601 format.
originalJson
Link copied to clipboard
val originalJson: JSONObject
JSONObject representing the original product class from Google.
originalPrice
Link copied to clipboard
val originalPrice: String?
Formatted original price of the item, including its currency sign.
originalPriceAmountMicros
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.
price
Link copied to clipboard
val price: String
Formatted price of the item, including its currency sign.
priceAmountMicros
Link copied to clipboard
val priceAmountMicros: Long
Price in micro-units, where 1,000,000 micro-units equal one unit of the currency.
priceCurrencyCode
Link copied to clipboard
val priceCurrencyCode: String
Returns ISO 4217 currency code for price and original price.
sku
Link copied to clipboard
val sku: String
The product ID.
subscriptionPeriod
Link copied to clipboard
val subscriptionPeriod: String?
Subscription period, specified in ISO 8601 format.
title
Link copied to clipboard
val title: String
Title of the product.
type
Link copied to clipboard
val type: ProductType
Type of product.

Extensions

skuDetails
Link copied to clipboard
val ProductDetails.skuDetails: SkuDetails
Returns the original SkuDetails that was used to build the ProductDetails object.