Struct google_androidpublisher2::PurchaseMethods [] [src]

pub struct PurchaseMethods<'a, C, A> where C: 'a, A: 'a { /* fields omitted */ }

A builder providing access to all methods supported on purchase resources. It is not used directly, but through the AndroidPublisher hub.

Example

Instantiate a resource builder

extern crate hyper;
extern crate yup_oauth2 as oauth2;
extern crate google_androidpublisher2 as androidpublisher2;
 
use std::default::Default;
use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage};
use androidpublisher2::AndroidPublisher;
 
let secret: ApplicationSecret = Default::default();
let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate,
                              hyper::Client::new(),
                              <MemoryStorage as Default>::default(), None);
let mut hub = AndroidPublisher::new(hyper::Client::new(), auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `products_get(...)`, `subscriptions_cancel(...)`, `subscriptions_defer(...)`, `subscriptions_get(...)`, `subscriptions_refund(...)` and `subscriptions_revoke(...)`
// to build up your call.
let rb = hub.purchases();

Methods

impl<'a, C, A> PurchaseMethods<'a, C, A>
[src]

Create a builder to help you perform the following task:

Refunds and immediately revokes a user's subscription purchase. Access to the subscription will be terminated immediately and it will stop recurring.

Arguments

  • packageName - The package name of the application for which this subscription was purchased (for example, 'com.some.thing').
  • subscriptionId - The purchased subscription ID (for example, 'monthly001').
  • token - The token provided to the user's device when the subscription was purchased.

Create a builder to help you perform the following task:

Checks the purchase and consumption status of an inapp item.

Arguments

  • packageName - The package name of the application the inapp product was sold in (for example, 'com.some.thing').
  • productId - The inapp product SKU (for example, 'com.some.thing.inapp1').
  • token - The token provided to the user's device when the inapp product was purchased.

Create a builder to help you perform the following task:

Checks whether a user's subscription purchase is valid and returns its expiry time.

Arguments

  • packageName - The package name of the application for which this subscription was purchased (for example, 'com.some.thing').
  • subscriptionId - The purchased subscription ID (for example, 'monthly001').
  • token - The token provided to the user's device when the subscription was purchased.

Create a builder to help you perform the following task:

Cancels a user's subscription purchase. The subscription remains valid until its expiration time.

Arguments

  • packageName - The package name of the application for which this subscription was purchased (for example, 'com.some.thing').
  • subscriptionId - The purchased subscription ID (for example, 'monthly001').
  • token - The token provided to the user's device when the subscription was purchased.

Create a builder to help you perform the following task:

Refunds a user's subscription purchase, but the subscription remains valid until its expiration time and it will continue to recur.

Arguments

  • packageName - The package name of the application for which this subscription was purchased (for example, 'com.some.thing').
  • subscriptionId - The purchased subscription ID (for example, 'monthly001').
  • token - The token provided to the user's device when the subscription was purchased.

Create a builder to help you perform the following task:

Defers a user's subscription purchase until a specified future expiration time.

Arguments

  • request - No description provided.
  • packageName - The package name of the application for which this subscription was purchased (for example, 'com.some.thing').
  • subscriptionId - The purchased subscription ID (for example, 'monthly001').
  • token - The token provided to the user's device when the subscription was purchased.

Trait Implementations

impl<'a, C, A> MethodsBuilder for PurchaseMethods<'a, C, A>
[src]