GoogleApi.AndroidPublisher.V2.Model.ProductPurchase (google_api_android_publisher v0.27.3) View Source

A ProductPurchase resource indicates the status of a user's inapp product purchase.


  • consumptionState (type: integer(), default: nil) - The consumption state of the inapp product. Possible values are:
    • Yet to be consumed
    • Consumed
  • developerPayload (type: String.t, default: nil) - A developer-specified string that contains supplemental information about an order.
  • kind (type: String.t, default: androidpublisher#productPurchase) - This kind represents an inappPurchase object in the androidpublisher service.
  • orderId (type: String.t, default: nil) - The order id associated with the purchase of the inapp product.
  • purchaseState (type: integer(), default: nil) - The purchase state of the order. Possible values are:
    • Purchased
    • Canceled
    • Pending
  • purchaseTimeMillis (type: String.t, default: nil) - The time the product was purchased, in milliseconds since the epoch (Jan 1, 1970).
  • purchaseType (type: integer(), default: nil) - The type of purchase of the inapp product. This field is only set if this purchase was not made using the standard in-app billing flow. Possible values are:
    • Test (i.e. purchased from a license testing account)
    • Promo (i.e. purchased using a promo code)
    • Rewarded (i.e. from watching a video ad instead of paying)

Link to this section Summary


Unwrap a decoded JSON object into its complex fields.

Link to this section Types


t() :: %GoogleApi.AndroidPublisher.V2.Model.ProductPurchase{
  consumptionState: integer(),
  developerPayload: String.t(),
  kind: String.t(),
  orderId: String.t(),
  purchaseState: integer(),
  purchaseTimeMillis: String.t(),
  purchaseType: integer()

Link to this section Functions


decode(struct(), keyword()) :: struct()

Unwrap a decoded JSON object into its complex fields.