pub struct SubscriptionPurchase {Show 21 fields
pub auto_renewing: Option<bool>,
pub cancel_reason: Option<i32>,
pub cancel_survey_result: Option<SubscriptionCancelSurveyResult>,
pub country_code: Option<String>,
pub developer_payload: Option<String>,
pub email_address: Option<String>,
pub expiry_time_millis: Option<i64>,
pub family_name: Option<String>,
pub given_name: Option<String>,
pub kind: Option<String>,
pub linked_purchase_token: Option<String>,
pub order_id: Option<String>,
pub payment_state: Option<i32>,
pub price_amount_micros: Option<i64>,
pub price_change: Option<SubscriptionPriceChange>,
pub price_currency_code: Option<String>,
pub profile_id: Option<String>,
pub profile_name: Option<String>,
pub purchase_type: Option<i32>,
pub start_time_millis: Option<i64>,
pub user_cancellation_time_millis: Option<i64>,
}Expand description
A SubscriptionPurchase resource indicates the status of a user’s subscription purchase.
§Activities
This type is used in activities, which are methods you may call on this type or where this type is involved in. The list links the activity name, along with information about where it is used (one of request and response).
- subscriptions get purchases (response)
Fields§
§auto_renewing: Option<bool>Whether the subscription will automatically be renewed when it reaches its current expiry time.
cancel_reason: Option<i32>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
cancel_survey_result: Option<SubscriptionCancelSurveyResult>Information provided by the user when they complete the subscription cancellation flow (cancellation reason survey).
country_code: Option<String>ISO 3166-1 alpha-2 billing country/region code of the user at the time the subscription was granted.
developer_payload: Option<String>A developer-specified string that contains supplemental information about an order.
email_address: Option<String>The email address of the user when the subscription was purchased. Only present for purchases made with ‘Subscribe with Google’.
expiry_time_millis: Option<i64>Time at which the subscription will expire, in milliseconds since the Epoch.
family_name: Option<String>The family name of the user when the subscription was purchased. Only present for purchases made with ‘Subscribe with Google’.
given_name: Option<String>The given name of the user when the subscription was purchased. Only present for purchases made with ‘Subscribe with Google’.
kind: Option<String>This kind represents a subscriptionPurchase object in the androidpublisher service.
linked_purchase_token: Option<String>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.
order_id: Option<String>The order id of the latest recurring order associated with the purchase of the subscription.
payment_state: Option<i32>The payment state of the subscription. Possible values are:
- Payment pending
- Payment received
- Free trial
- Pending deferred upgrade/downgrade
price_amount_micros: Option<i64>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.
price_change: Option<SubscriptionPriceChange>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.
price_currency_code: Option<String>ISO 4217 currency code for the subscription price. For example, if the price is specified in British pounds sterling, price_currency_code is “GBP”.
profile_id: Option<String>The Google profile id of the user when the subscription was purchased. Only present for purchases made with ‘Subscribe with Google’.
profile_name: Option<String>The profile name of the user when the subscription was purchased. Only present for purchases made with ‘Subscribe with Google’.
purchase_type: Option<i32>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)
start_time_millis: Option<i64>Time at which the subscription was granted, in milliseconds since the Epoch.
user_cancellation_time_millis: Option<i64>The time at which the subscription was canceled by the user, in milliseconds since the epoch. Only present if cancelReason is 0.
Trait Implementations§
Source§impl Clone for SubscriptionPurchase
impl Clone for SubscriptionPurchase
Source§fn clone(&self) -> SubscriptionPurchase
fn clone(&self) -> SubscriptionPurchase
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more