Productz

interface Productz : ModuleIdentifier

Author

rjsuzuki

Note: Do not use orderId to check for duplicate purchases or as a primary key in your database, as not all purchases are guaranteed to generate an orderId. In particular, purchases made with promo codes do not generate an orderId.

Types

Link copied to clipboard
interface Pricing

Supplementary pricing information on a product if available.

Link copied to clipboard
enum Promotion : Enum<Productz.Promotion>
Link copied to clipboard
enum Type : Enum<Productz.Type>

Functions

Link copied to clipboard
abstract fun getCurrency(): Currency
Link copied to clipboard
abstract fun getDescription(): String?

A convenience variable to provide a description of your product

Link copied to clipboard
abstract fun getIconUrl(): String?

The remote path of the products image. Android Billing Lib v5 does not support this.

Link copied to clipboard
abstract fun getName(): String?

A convenience variable to provide the name of your product. Value may be the same as getTitle.

Link copied to clipboard
abstract fun getPrice(): String?

A convenience variable to provide the price of your product as a String in the local currency

Link copied to clipboard
abstract fun getPricingInfo(): PricingInfo?

Amazon IAP does not support these particular data points, so this object will return null for the Amazon flavor.

Link copied to clipboard
abstract fun getProductId(): String?

The sku (product id) that is referenced by your account's store listing

Link copied to clipboard
abstract fun getPromotion(): Productz.Promotion

The promotion type of the product. NONE is the default.

Link copied to clipboard
abstract fun getTitle(): String?

A convenience variable to provide the title of your product Value may be the same as getName.

Link copied to clipboard
abstract fun isAmazon(): Boolean

Convenience method to check if object is an instance from the Amazon module

Link copied to clipboard
abstract fun isGoogle(): Boolean

Convenience method to check if object is an instance from the Google module

Properties

Link copied to clipboard
abstract val type: Productz.Type

The product type can be one of the following: CONSUMABLE, NON_CONSUMABLE (aka Entitlement), SUBSCRIPTION