Struct google_androidpublisher2::SubscriptionPurchase[][src]

pub struct SubscriptionPurchase {
    pub order_id: Option<String>,
    pub country_code: Option<String>,
    pub developer_payload: Option<String>,
    pub family_name: Option<String>,
    pub auto_renewing: Option<bool>,
    pub payment_state: Option<i32>,
    pub email_address: Option<String>,
    pub cancel_reason: Option<i32>,
    pub profile_name: Option<String>,
    pub start_time_millis: Option<String>,
    pub user_cancellation_time_millis: Option<String>,
    pub price_amount_micros: Option<String>,
    pub kind: Option<String>,
    pub price_change: Option<SubscriptionPriceChange>,
    pub purchase_type: Option<i32>,
    pub price_currency_code: Option<String>,
    pub expiry_time_millis: Option<String>,
    pub cancel_survey_result: Option<SubscriptionCancelSurveyResult>,
    pub profile_id: Option<String>,
    pub linked_purchase_token: Option<String>,
    pub given_name: Option<String>,
}

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).

Fields

The order id of the latest recurring order associated with the purchase of the subscription.

ISO 3166-1 alpha-2 billing country/region code of the user at the time the subscription was granted.

A developer-specified string that contains supplemental information about an order.

The family name of the user when the subscription was purchased. Only present for purchases made with 'Subscribe with Google'.

Whether the subscription will automatically be renewed when it reaches its current expiry time.

The payment state of the subscription. Possible values are:

  • Payment pending
  • Payment received
  • Free trial
  • Pending deferred upgrade/downgrade

The email address of the user when the subscription was purchased. Only present for purchases made with 'Subscribe with Google'.

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

The profile name of the user when the subscription was purchased. Only present for purchases made with 'Subscribe with Google'.

Time at which the subscription was granted, in milliseconds since the Epoch.

The time at which the subscription was canceled by the user, in milliseconds since the epoch. Only present if cancelReason is 0.

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.

This kind represents a subscriptionPurchase object in the androidpublisher service.

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.

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)

ISO 4217 currency code for the subscription price. For example, if the price is specified in British pounds sterling, price_currency_code is "GBP".

Time at which the subscription will expire, in milliseconds since the Epoch.

Information provided by the user when they complete the subscription cancellation flow (cancellation reason survey).

The profile id of the user when the subscription was purchased. Only present for purchases made with 'Subscribe with Google'.

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.

The given name of the user when the subscription was purchased. Only present for purchases made with 'Subscribe with Google'.

Trait Implementations

impl Default for SubscriptionPurchase
[src]

Returns the "default value" for a type. Read more

impl Clone for SubscriptionPurchase
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for SubscriptionPurchase
[src]

Formats the value using the given formatter. Read more

impl ResponseResult for SubscriptionPurchase
[src]

Auto Trait Implementations