target.apidocs.com.google.api.services.androidpublisher.model.ProductPurchase.html Maven / Gradle / Ivy
ProductPurchase (Google Play Android Developer API v3-rev20240328-2.0.0)
com.google.api.services.androidpublisher.model
Class ProductPurchase
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.androidpublisher.model.ProductPurchase
-
public final class ProductPurchase
extends com.google.api.client.json.GenericJson
A ProductPurchase resource indicates the status of a user's inapp product purchase.
This is the Java data model class that specifies how to parse/serialize into the JSON that is
transmitted over HTTP when working with the Google Play Android Developer API. For a detailed
explanation see:
https://developers.google.com/api-client-library/java/google-http-java-client/json
- Author:
- Google, Inc.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
com.google.api.client.util.GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
-
Constructor Summary
Constructors
Constructor and Description
ProductPurchase()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
ProductPurchase
clone()
Integer
getAcknowledgementState()
The acknowledgement state of the inapp product.
Integer
getConsumptionState()
The consumption state of the inapp product.
String
getDeveloperPayload()
A developer-specified string that contains supplemental information about an order.
String
getKind()
This kind represents an inappPurchase object in the androidpublisher service.
String
getObfuscatedExternalAccountId()
An obfuscated version of the id that is uniquely associated with the user's account in your
app.
String
getObfuscatedExternalProfileId()
An obfuscated version of the id that is uniquely associated with the user's profile in your
app.
String
getOrderId()
The order id associated with the purchase of the inapp product.
String
getProductId()
The inapp product SKU.
Integer
getPurchaseState()
The purchase state of the order.
Long
getPurchaseTimeMillis()
The time the product was purchased, in milliseconds since the epoch (Jan 1, 1970).
String
getPurchaseToken()
The purchase token generated to identify this purchase.
Integer
getPurchaseType()
The type of purchase of the inapp product.
Integer
getQuantity()
The quantity associated with the purchase of the inapp product.
Integer
getRefundableQuantity()
The quantity eligible for refund, i.e.
String
getRegionCode()
ISO 3166-1 alpha-2 billing region code of the user at the time the product was granted.
ProductPurchase
set(String fieldName,
Object value)
ProductPurchase
setAcknowledgementState(Integer acknowledgementState)
The acknowledgement state of the inapp product.
ProductPurchase
setConsumptionState(Integer consumptionState)
The consumption state of the inapp product.
ProductPurchase
setDeveloperPayload(String developerPayload)
A developer-specified string that contains supplemental information about an order.
ProductPurchase
setKind(String kind)
This kind represents an inappPurchase object in the androidpublisher service.
ProductPurchase
setObfuscatedExternalAccountId(String obfuscatedExternalAccountId)
An obfuscated version of the id that is uniquely associated with the user's account in your
app.
ProductPurchase
setObfuscatedExternalProfileId(String obfuscatedExternalProfileId)
An obfuscated version of the id that is uniquely associated with the user's profile in your
app.
ProductPurchase
setOrderId(String orderId)
The order id associated with the purchase of the inapp product.
ProductPurchase
setProductId(String productId)
The inapp product SKU.
ProductPurchase
setPurchaseState(Integer purchaseState)
The purchase state of the order.
ProductPurchase
setPurchaseTimeMillis(Long purchaseTimeMillis)
The time the product was purchased, in milliseconds since the epoch (Jan 1, 1970).
ProductPurchase
setPurchaseToken(String purchaseToken)
The purchase token generated to identify this purchase.
ProductPurchase
setPurchaseType(Integer purchaseType)
The type of purchase of the inapp product.
ProductPurchase
setQuantity(Integer quantity)
The quantity associated with the purchase of the inapp product.
ProductPurchase
setRefundableQuantity(Integer refundableQuantity)
The quantity eligible for refund, i.e.
ProductPurchase
setRegionCode(String regionCode)
ISO 3166-1 alpha-2 billing region code of the user at the time the product was granted.
-
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
Method Detail
-
getAcknowledgementState
public Integer getAcknowledgementState()
The acknowledgement state of the inapp product. Possible values are: 0. Yet to be acknowledged
1. Acknowledged
- Returns:
- value or
null
for none
-
setAcknowledgementState
public ProductPurchase setAcknowledgementState(Integer acknowledgementState)
The acknowledgement state of the inapp product. Possible values are: 0. Yet to be acknowledged
1. Acknowledged
- Parameters:
acknowledgementState
- acknowledgementState or null
for none
-
getConsumptionState
public Integer getConsumptionState()
The consumption state of the inapp product. Possible values are: 0. Yet to be consumed 1.
Consumed
- Returns:
- value or
null
for none
-
setConsumptionState
public ProductPurchase setConsumptionState(Integer consumptionState)
The consumption state of the inapp product. Possible values are: 0. Yet to be consumed 1.
Consumed
- Parameters:
consumptionState
- consumptionState or null
for none
-
getDeveloperPayload
public String getDeveloperPayload()
A developer-specified string that contains supplemental information about an order.
- Returns:
- value or
null
for none
-
setDeveloperPayload
public ProductPurchase setDeveloperPayload(String developerPayload)
A developer-specified string that contains supplemental information about an order.
- Parameters:
developerPayload
- developerPayload or null
for none
-
getKind
public String getKind()
This kind represents an inappPurchase object in the androidpublisher service.
- Returns:
- value or
null
for none
-
setKind
public ProductPurchase setKind(String kind)
This kind represents an inappPurchase object in the androidpublisher service.
- Parameters:
kind
- kind or null
for none
-
getObfuscatedExternalAccountId
public String getObfuscatedExternalAccountId()
An obfuscated version of the id that is uniquely associated with the user's account in your
app. Only present if specified using https://developer.android.com/reference/com/android/billin
gclient/api/BillingFlowParams.Builder#setobfuscatedaccountid when the purchase was made.
- Returns:
- value or
null
for none
-
setObfuscatedExternalAccountId
public ProductPurchase setObfuscatedExternalAccountId(String obfuscatedExternalAccountId)
An obfuscated version of the id that is uniquely associated with the user's account in your
app. Only present if specified using https://developer.android.com/reference/com/android/billin
gclient/api/BillingFlowParams.Builder#setobfuscatedaccountid when the purchase was made.
- Parameters:
obfuscatedExternalAccountId
- obfuscatedExternalAccountId or null
for none
-
getObfuscatedExternalProfileId
public String getObfuscatedExternalProfileId()
An obfuscated version of the id that is uniquely associated with the user's profile in your
app. Only present if specified using https://developer.android.com/reference/com/android/billin
gclient/api/BillingFlowParams.Builder#setobfuscatedprofileid when the purchase was made.
- Returns:
- value or
null
for none
-
setObfuscatedExternalProfileId
public ProductPurchase setObfuscatedExternalProfileId(String obfuscatedExternalProfileId)
An obfuscated version of the id that is uniquely associated with the user's profile in your
app. Only present if specified using https://developer.android.com/reference/com/android/billin
gclient/api/BillingFlowParams.Builder#setobfuscatedprofileid when the purchase was made.
- Parameters:
obfuscatedExternalProfileId
- obfuscatedExternalProfileId or null
for none
-
getOrderId
public String getOrderId()
The order id associated with the purchase of the inapp product.
- Returns:
- value or
null
for none
-
setOrderId
public ProductPurchase setOrderId(String orderId)
The order id associated with the purchase of the inapp product.
- Parameters:
orderId
- orderId or null
for none
-
getProductId
public String getProductId()
The inapp product SKU. May not be present.
- Returns:
- value or
null
for none
-
setProductId
public ProductPurchase setProductId(String productId)
The inapp product SKU. May not be present.
- Parameters:
productId
- productId or null
for none
-
getPurchaseState
public Integer getPurchaseState()
The purchase state of the order. Possible values are: 0. Purchased 1. Canceled 2. Pending
- Returns:
- value or
null
for none
-
setPurchaseState
public ProductPurchase setPurchaseState(Integer purchaseState)
The purchase state of the order. Possible values are: 0. Purchased 1. Canceled 2. Pending
- Parameters:
purchaseState
- purchaseState or null
for none
-
getPurchaseTimeMillis
public Long getPurchaseTimeMillis()
The time the product was purchased, in milliseconds since the epoch (Jan 1, 1970).
- Returns:
- value or
null
for none
-
setPurchaseTimeMillis
public ProductPurchase setPurchaseTimeMillis(Long purchaseTimeMillis)
The time the product was purchased, in milliseconds since the epoch (Jan 1, 1970).
- Parameters:
purchaseTimeMillis
- purchaseTimeMillis or null
for none
-
getPurchaseToken
public String getPurchaseToken()
The purchase token generated to identify this purchase. May not be present.
- Returns:
- value or
null
for none
-
setPurchaseToken
public ProductPurchase setPurchaseToken(String purchaseToken)
The purchase token generated to identify this purchase. May not be present.
- Parameters:
purchaseToken
- purchaseToken or null
for none
-
getPurchaseType
public Integer getPurchaseType()
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: 0. Test (i.e. purchased from a
license testing account) 1. Promo (i.e. purchased using a promo code) 2. Rewarded (i.e. from
watching a video ad instead of paying)
- Returns:
- value or
null
for none
-
setPurchaseType
public ProductPurchase setPurchaseType(Integer purchaseType)
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: 0. Test (i.e. purchased from a
license testing account) 1. Promo (i.e. purchased using a promo code) 2. Rewarded (i.e. from
watching a video ad instead of paying)
- Parameters:
purchaseType
- purchaseType or null
for none
-
getQuantity
public Integer getQuantity()
The quantity associated with the purchase of the inapp product. If not present, the quantity is
1.
- Returns:
- value or
null
for none
-
setQuantity
public ProductPurchase setQuantity(Integer quantity)
The quantity associated with the purchase of the inapp product. If not present, the quantity is
1.
- Parameters:
quantity
- quantity or null
for none
-
getRefundableQuantity
public Integer getRefundableQuantity()
The quantity eligible for refund, i.e. quantity that hasn't been refunded. The value reflects
quantity-based partial refunds and full refunds.
- Returns:
- value or
null
for none
-
setRefundableQuantity
public ProductPurchase setRefundableQuantity(Integer refundableQuantity)
The quantity eligible for refund, i.e. quantity that hasn't been refunded. The value reflects
quantity-based partial refunds and full refunds.
- Parameters:
refundableQuantity
- refundableQuantity or null
for none
-
getRegionCode
public String getRegionCode()
ISO 3166-1 alpha-2 billing region code of the user at the time the product was granted.
- Returns:
- value or
null
for none
-
setRegionCode
public ProductPurchase setRegionCode(String regionCode)
ISO 3166-1 alpha-2 billing region code of the user at the time the product was granted.
- Parameters:
regionCode
- regionCode or null
for none
-
set
public ProductPurchase set(String fieldName,
Object value)
- Overrides:
set
in class com.google.api.client.json.GenericJson
-
clone
public ProductPurchase clone()
- Overrides:
clone
in class com.google.api.client.json.GenericJson
Copyright © 2011–2024 Google. All rights reserved.