[][src]Struct google_androidpublisher2::PurchaseMethods

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 hyper_rustls;
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::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())),
                              <MemoryStorage as Default>::default(), None);
let mut hub = AndroidPublisher::new(hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::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(...)`, `subscriptions_revoke(...)` and `voidedpurchases_list(...)`
// to build up your call.
let rb = hub.purchases();

Methods

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

pub fn subscriptions_revoke(
    &self,
    package_name: &str,
    subscription_id: &str,
    token: &str
) -> PurchaseSubscriptionRevokeCall<'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.

pub fn products_get(
    &self,
    package_name: &str,
    product_id: &str,
    token: &str
) -> PurchaseProductGetCall<'a, C, A>
[src]

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.

pub fn subscriptions_get(
    &self,
    package_name: &str,
    subscription_id: &str,
    token: &str
) -> PurchaseSubscriptionGetCall<'a, C, A>
[src]

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.

pub fn voidedpurchases_list(
    &self,
    package_name: &str
) -> PurchaseVoidedpurchaseListCall<'a, C, A>
[src]

Create a builder to help you perform the following task:

Lists the purchases that were canceled, refunded or charged-back.

Arguments

  • packageName - The package name of the application for which voided purchases need to be returned (for example, 'com.some.thing').

pub fn subscriptions_cancel(
    &self,
    package_name: &str,
    subscription_id: &str,
    token: &str
) -> PurchaseSubscriptionCancelCall<'a, C, A>
[src]

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.

pub fn subscriptions_refund(
    &self,
    package_name: &str,
    subscription_id: &str,
    token: &str
) -> PurchaseSubscriptionRefundCall<'a, C, A>
[src]

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.

pub fn subscriptions_defer(
    &self,
    request: SubscriptionPurchasesDeferRequest,
    package_name: &str,
    subscription_id: &str,
    token: &str
) -> PurchaseSubscriptionDeferCall<'a, C, A>
[src]

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]

Auto Trait Implementations

impl<'a, C, A> !RefUnwindSafe for PurchaseMethods<'a, C, A>

impl<'a, C, A> !Send for PurchaseMethods<'a, C, A>

impl<'a, C, A> !Sync for PurchaseMethods<'a, C, A>

impl<'a, C, A> Unpin for PurchaseMethods<'a, C, A>

impl<'a, C, A> !UnwindSafe for PurchaseMethods<'a, C, A>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Typeable for T where
    T: Any