Class SubscriptionPurchase
A SubscriptionPurchase resource indicates the status of a user's subscription purchase.
Inheritance
Implements
Namespace: Google.Apis.AndroidPublisher.v2.Data
Assembly: Google.Apis.AndroidPublisher.v2.dll
Syntax
public class SubscriptionPurchase : object, IDirectResponseSchema
Properties
AutoRenewing
Whether the subscription will automatically be renewed when it reaches its current expiry time.
Declaration
public virtual Nullable<bool> AutoRenewing { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Boolean> |
CancelReason
The reason why a subscription was canceled or is not auto-renewing. Possible values are: - User canceled the subscription - Subscription was canceled by the system, for example because of a billing problem - Subscription was replaced with a new subscription - Subscription was canceled by the developer
Declaration
public virtual Nullable<int> CancelReason { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Int32> |
CancelSurveyResult
Information provided by the user when they complete the subscription cancellation flow (cancellation reason survey).
Declaration
public virtual SubscriptionCancelSurveyResult CancelSurveyResult { get; set; }
Property Value
| Type | Description |
|---|---|
| SubscriptionCancelSurveyResult |
CountryCode
ISO 3166-1 alpha-2 billing country/region code of the user at the time the subscription was granted.
Declaration
public virtual string CountryCode { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
DeveloperPayload
A developer-specified string that contains supplemental information about an order.
Declaration
public virtual string DeveloperPayload { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
EmailAddress
The email address of the user when the subscription was purchased. Only present for purchases made with 'Subscribe with Google'.
Declaration
public virtual string EmailAddress { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
ETag
The ETag of the item.
Declaration
public virtual string ETag { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
ExpiryTimeMillis
Time at which the subscription will expire, in milliseconds since the Epoch.
Declaration
public virtual Nullable<long> ExpiryTimeMillis { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Int64> |
FamilyName
The family name of the user when the subscription was purchased. Only present for purchases made with 'Subscribe with Google'.
Declaration
public virtual string FamilyName { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
GivenName
The given name of the user when the subscription was purchased. Only present for purchases made with 'Subscribe with Google'.
Declaration
public virtual string GivenName { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Kind
This kind represents a subscriptionPurchase object in the androidpublisher service.
Declaration
public virtual string Kind { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
LinkedPurchaseToken
The purchase token of the originating purchase if this subscription is one of the following: - Re- signup of a canceled but non-lapsed subscription - Upgrade/downgrade from a previous subscription For example, suppose a user originally signs up and you receive purchase token X, then the user cancels and goes through the resignup flow (before their subscription lapses) and you receive purchase token Y, and finally the user upgrades their subscription and you receive purchase token Z. If you call this API with purchase token Z, this field will be set to Y. If you call this API with purchase token Y, this field will be set to X. If you call this API with purchase token X, this field will not be set.
Declaration
public virtual string LinkedPurchaseToken { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
OrderId
The order id of the latest recurring order associated with the purchase of the subscription.
Declaration
public virtual string OrderId { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
PaymentState
The payment state of the subscription. Possible values are: - Payment pending - Payment received - Free trial - Pending deferred upgrade/downgrade
Declaration
public virtual Nullable<int> PaymentState { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Int32> |
PriceAmountMicros
Price of the subscription, not including tax. Price is expressed in micro-units, where 1,000,000 micro-units represents one unit of the currency. For example, if the subscription price is €1.99, price_amount_micros is 1990000.
Declaration
public virtual Nullable<long> PriceAmountMicros { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Int64> |
PriceChange
The latest price change information available. This is present only when there is an upcoming price change for the subscription yet to be applied.
Once the subscription renews with the new price or the subscription is canceled, no price change information will be returned.
Declaration
public virtual SubscriptionPriceChange PriceChange { get; set; }
Property Value
| Type | Description |
|---|---|
| SubscriptionPriceChange |
PriceCurrencyCode
ISO 4217 currency code for the subscription price. For example, if the price is specified in British pounds sterling, price_currency_code is "GBP".
Declaration
public virtual string PriceCurrencyCode { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
ProfileId
The Google profile id of the user when the subscription was purchased. Only present for purchases made with 'Subscribe with Google'.
Declaration
public virtual string ProfileId { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
ProfileName
The profile name of the user when the subscription was purchased. Only present for purchases made with 'Subscribe with Google'.
Declaration
public virtual string ProfileName { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
PurchaseType
The type of purchase of the subscription. 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)
Declaration
public virtual Nullable<int> PurchaseType { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Int32> |
StartTimeMillis
Time at which the subscription was granted, in milliseconds since the Epoch.
Declaration
public virtual Nullable<long> StartTimeMillis { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Int64> |
UserCancellationTimeMillis
The time at which the subscription was canceled by the user, in milliseconds since the epoch. Only present if cancelReason is 0.
Declaration
public virtual Nullable<long> UserCancellationTimeMillis { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Int64> |