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 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]
fn subscriptions_revoke(
&self,
package_name: &str,
subscription_id: &str,
token: &str
) -> PurchaseSubscriptionRevokeCall<'a, C, A>
&self,
package_name: &str,
subscription_id: &str,
token: &str
) -> PurchaseSubscriptionRevokeCall<'a, C, A>
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.
fn products_get(
&self,
package_name: &str,
product_id: &str,
token: &str
) -> PurchaseProductGetCall<'a, C, A>
&self,
package_name: &str,
product_id: &str,
token: &str
) -> PurchaseProductGetCall<'a, C, A>
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.
fn subscriptions_get(
&self,
package_name: &str,
subscription_id: &str,
token: &str
) -> PurchaseSubscriptionGetCall<'a, C, A>
&self,
package_name: &str,
subscription_id: &str,
token: &str
) -> PurchaseSubscriptionGetCall<'a, C, A>
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.
fn voidedpurchases_list(
&self,
package_name: &str
) -> PurchaseVoidedpurchaseListCall<'a, C, A>
&self,
package_name: &str
) -> PurchaseVoidedpurchaseListCall<'a, C, A>
Create a builder to help you perform the following task:
Lists the purchases that were cancelled, 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').
fn subscriptions_cancel(
&self,
package_name: &str,
subscription_id: &str,
token: &str
) -> PurchaseSubscriptionCancelCall<'a, C, A>
&self,
package_name: &str,
subscription_id: &str,
token: &str
) -> PurchaseSubscriptionCancelCall<'a, C, A>
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.
fn subscriptions_refund(
&self,
package_name: &str,
subscription_id: &str,
token: &str
) -> PurchaseSubscriptionRefundCall<'a, C, A>
&self,
package_name: &str,
subscription_id: &str,
token: &str
) -> PurchaseSubscriptionRefundCall<'a, C, A>
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.
fn subscriptions_defer(
&self,
request: SubscriptionPurchasesDeferRequest,
package_name: &str,
subscription_id: &str,
token: &str
) -> PurchaseSubscriptionDeferCall<'a, C, A>
&self,
request: SubscriptionPurchasesDeferRequest,
package_name: &str,
subscription_id: &str,
token: &str
) -> PurchaseSubscriptionDeferCall<'a, C, A>
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.