target.apidocs.com.google.api.services.androidpublisher.model.SubscriptionPurchaseV2.html Maven / Gradle / Ivy
SubscriptionPurchaseV2 (Google Play Android Developer API v3-rev20240129-2.0.0)
com.google.api.services.androidpublisher.model
Class SubscriptionPurchaseV2
- 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.SubscriptionPurchaseV2
-
public final class SubscriptionPurchaseV2
extends com.google.api.client.json.GenericJson
Indicates the status of a user's subscription 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
SubscriptionPurchaseV2()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
SubscriptionPurchaseV2
clone()
String
getAcknowledgementState()
The acknowledgement state of the subscription.
CanceledStateContext
getCanceledStateContext()
Additional context around canceled subscriptions.
ExternalAccountIdentifiers
getExternalAccountIdentifiers()
User account identifier in the third-party service.
String
getKind()
This kind represents a SubscriptionPurchaseV2 object in the androidpublisher service.
String
getLatestOrderId()
The order id of the latest order associated with the purchase of the subscription.
List<SubscriptionPurchaseLineItem>
getLineItems()
Item-level info for a subscription purchase.
String
getLinkedPurchaseToken()
The purchase token of the old subscription if this subscription is one of the following: * Re-
signup of a canceled but non-lapsed subscription * Upgrade/downgrade from a previous
subscription.
PausedStateContext
getPausedStateContext()
Additional context around paused subscriptions.
String
getRegionCode()
ISO 3166-1 alpha-2 billing country/region code of the user at the time the subscription was
granted.
String
getStartTime()
Time at which the subscription was granted.
SubscribeWithGoogleInfo
getSubscribeWithGoogleInfo()
User profile associated with purchases made with 'Subscribe with Google'.
String
getSubscriptionState()
The current state of the subscription.
TestPurchase
getTestPurchase()
Only present if this subscription purchase is a test purchase.
SubscriptionPurchaseV2
set(String fieldName,
Object value)
SubscriptionPurchaseV2
setAcknowledgementState(String acknowledgementState)
The acknowledgement state of the subscription.
SubscriptionPurchaseV2
setCanceledStateContext(CanceledStateContext canceledStateContext)
Additional context around canceled subscriptions.
SubscriptionPurchaseV2
setExternalAccountIdentifiers(ExternalAccountIdentifiers externalAccountIdentifiers)
User account identifier in the third-party service.
SubscriptionPurchaseV2
setKind(String kind)
This kind represents a SubscriptionPurchaseV2 object in the androidpublisher service.
SubscriptionPurchaseV2
setLatestOrderId(String latestOrderId)
The order id of the latest order associated with the purchase of the subscription.
SubscriptionPurchaseV2
setLineItems(List<SubscriptionPurchaseLineItem> lineItems)
Item-level info for a subscription purchase.
SubscriptionPurchaseV2
setLinkedPurchaseToken(String linkedPurchaseToken)
The purchase token of the old subscription if this subscription is one of the following: * Re-
signup of a canceled but non-lapsed subscription * Upgrade/downgrade from a previous
subscription.
SubscriptionPurchaseV2
setPausedStateContext(PausedStateContext pausedStateContext)
Additional context around paused subscriptions.
SubscriptionPurchaseV2
setRegionCode(String regionCode)
ISO 3166-1 alpha-2 billing country/region code of the user at the time the subscription was
granted.
SubscriptionPurchaseV2
setStartTime(String startTime)
Time at which the subscription was granted.
SubscriptionPurchaseV2
setSubscribeWithGoogleInfo(SubscribeWithGoogleInfo subscribeWithGoogleInfo)
User profile associated with purchases made with 'Subscribe with Google'.
SubscriptionPurchaseV2
setSubscriptionState(String subscriptionState)
The current state of the subscription.
SubscriptionPurchaseV2
setTestPurchase(TestPurchase testPurchase)
Only present if this subscription purchase is a test purchase.
-
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 String getAcknowledgementState()
The acknowledgement state of the subscription.
- Returns:
- value or
null
for none
-
setAcknowledgementState
public SubscriptionPurchaseV2 setAcknowledgementState(String acknowledgementState)
The acknowledgement state of the subscription.
- Parameters:
acknowledgementState
- acknowledgementState or null
for none
-
getCanceledStateContext
public CanceledStateContext getCanceledStateContext()
Additional context around canceled subscriptions. Only present if the subscription currently
has subscription_state SUBSCRIPTION_STATE_CANCELED.
- Returns:
- value or
null
for none
-
setCanceledStateContext
public SubscriptionPurchaseV2 setCanceledStateContext(CanceledStateContext canceledStateContext)
Additional context around canceled subscriptions. Only present if the subscription currently
has subscription_state SUBSCRIPTION_STATE_CANCELED.
- Parameters:
canceledStateContext
- canceledStateContext or null
for none
-
getExternalAccountIdentifiers
public ExternalAccountIdentifiers getExternalAccountIdentifiers()
User account identifier in the third-party service.
- Returns:
- value or
null
for none
-
setExternalAccountIdentifiers
public SubscriptionPurchaseV2 setExternalAccountIdentifiers(ExternalAccountIdentifiers externalAccountIdentifiers)
User account identifier in the third-party service.
- Parameters:
externalAccountIdentifiers
- externalAccountIdentifiers or null
for none
-
getKind
public String getKind()
This kind represents a SubscriptionPurchaseV2 object in the androidpublisher service.
- Returns:
- value or
null
for none
-
setKind
public SubscriptionPurchaseV2 setKind(String kind)
This kind represents a SubscriptionPurchaseV2 object in the androidpublisher service.
- Parameters:
kind
- kind or null
for none
-
getLatestOrderId
public String getLatestOrderId()
The order id of the latest order associated with the purchase of the subscription. For
autoRenewing subscription, this is the order id of signup order if it is not renewed yet, or
the last recurring order id (success, pending, or declined order). For prepaid subscription,
this is the order id associated with the queried purchase token.
- Returns:
- value or
null
for none
-
setLatestOrderId
public SubscriptionPurchaseV2 setLatestOrderId(String latestOrderId)
The order id of the latest order associated with the purchase of the subscription. For
autoRenewing subscription, this is the order id of signup order if it is not renewed yet, or
the last recurring order id (success, pending, or declined order). For prepaid subscription,
this is the order id associated with the queried purchase token.
- Parameters:
latestOrderId
- latestOrderId or null
for none
-
getLineItems
public List<SubscriptionPurchaseLineItem> getLineItems()
Item-level info for a subscription purchase. The items in the same purchase should be either
all with AutoRenewingPlan or all with PrepaidPlan.
- Returns:
- value or
null
for none
-
setLineItems
public SubscriptionPurchaseV2 setLineItems(List<SubscriptionPurchaseLineItem> lineItems)
Item-level info for a subscription purchase. The items in the same purchase should be either
all with AutoRenewingPlan or all with PrepaidPlan.
- Parameters:
lineItems
- lineItems or null
for none
-
getLinkedPurchaseToken
public String getLinkedPurchaseToken()
The purchase token of the old subscription if this subscription is one of the following: * Re-
signup of a canceled but non-lapsed subscription * Upgrade/downgrade from a previous
subscription. * Convert from prepaid to auto renewing subscription. * Convert from an auto
renewing subscription to prepaid. * Topup a prepaid subscription.
- Returns:
- value or
null
for none
-
setLinkedPurchaseToken
public SubscriptionPurchaseV2 setLinkedPurchaseToken(String linkedPurchaseToken)
The purchase token of the old subscription if this subscription is one of the following: * Re-
signup of a canceled but non-lapsed subscription * Upgrade/downgrade from a previous
subscription. * Convert from prepaid to auto renewing subscription. * Convert from an auto
renewing subscription to prepaid. * Topup a prepaid subscription.
- Parameters:
linkedPurchaseToken
- linkedPurchaseToken or null
for none
-
getPausedStateContext
public PausedStateContext getPausedStateContext()
Additional context around paused subscriptions. Only present if the subscription currently has
subscription_state SUBSCRIPTION_STATE_PAUSED.
- Returns:
- value or
null
for none
-
setPausedStateContext
public SubscriptionPurchaseV2 setPausedStateContext(PausedStateContext pausedStateContext)
Additional context around paused subscriptions. Only present if the subscription currently has
subscription_state SUBSCRIPTION_STATE_PAUSED.
- Parameters:
pausedStateContext
- pausedStateContext or null
for none
-
getRegionCode
public String getRegionCode()
ISO 3166-1 alpha-2 billing country/region code of the user at the time the subscription was
granted.
- Returns:
- value or
null
for none
-
setRegionCode
public SubscriptionPurchaseV2 setRegionCode(String regionCode)
ISO 3166-1 alpha-2 billing country/region code of the user at the time the subscription was
granted.
- Parameters:
regionCode
- regionCode or null
for none
-
getStartTime
public String getStartTime()
Time at which the subscription was granted. Not set for pending subscriptions (subscription was
created but awaiting payment during signup).
- Returns:
- value or
null
for none
-
setStartTime
public SubscriptionPurchaseV2 setStartTime(String startTime)
Time at which the subscription was granted. Not set for pending subscriptions (subscription was
created but awaiting payment during signup).
- Parameters:
startTime
- startTime or null
for none
-
getSubscribeWithGoogleInfo
public SubscribeWithGoogleInfo getSubscribeWithGoogleInfo()
User profile associated with purchases made with 'Subscribe with Google'.
- Returns:
- value or
null
for none
-
setSubscribeWithGoogleInfo
public SubscriptionPurchaseV2 setSubscribeWithGoogleInfo(SubscribeWithGoogleInfo subscribeWithGoogleInfo)
User profile associated with purchases made with 'Subscribe with Google'.
- Parameters:
subscribeWithGoogleInfo
- subscribeWithGoogleInfo or null
for none
-
getSubscriptionState
public String getSubscriptionState()
The current state of the subscription.
- Returns:
- value or
null
for none
-
setSubscriptionState
public SubscriptionPurchaseV2 setSubscriptionState(String subscriptionState)
The current state of the subscription.
- Parameters:
subscriptionState
- subscriptionState or null
for none
-
getTestPurchase
public TestPurchase getTestPurchase()
Only present if this subscription purchase is a test purchase.
- Returns:
- value or
null
for none
-
setTestPurchase
public SubscriptionPurchaseV2 setTestPurchase(TestPurchase testPurchase)
Only present if this subscription purchase is a test purchase.
- Parameters:
testPurchase
- testPurchase or null
for none
-
set
public SubscriptionPurchaseV2 set(String fieldName,
Object value)
- Overrides:
set
in class com.google.api.client.json.GenericJson
-
clone
public SubscriptionPurchaseV2 clone()
- Overrides:
clone
in class com.google.api.client.json.GenericJson
Copyright © 2011–2024 Google. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy