Struct stripe::Client [−][src]
pub struct Client { /* fields omitted */ }
Methods
impl Client
[src]
impl Client
pub fn new<Str: Into<String>>(secret_key: Str) -> Client
[src]
pub fn new<Str: Into<String>>(secret_key: Str) -> Client
pub fn with(&self, params: Params) -> Client
[src]
pub fn with(&self, params: Params) -> Client
Clones a new client with different params.
This is the recommended way to send requests for many different Stripe accounts or with different Meta, Extra, and Expand params while using the same secret key.
pub fn set_stripe_account<Str: Into<String>>(&mut self, account_id: Str)
[src]
pub fn set_stripe_account<Str: Into<String>>(&mut self, account_id: Str)
Sets a value for the Stripe-Account header
This is recommended if you are acting as only one Account for the lifetime of the client.
Otherwise, prefer client.with(Params{stripe_account: "acct_ABC", ..})
.
pub fn get<T: DeserializeOwned>(&self, path: &str) -> Result<T, Error>
[src]
pub fn get<T: DeserializeOwned>(&self, path: &str) -> Result<T, Error>
pub fn post<T: DeserializeOwned, P: Serialize>(
&self,
path: &str,
params: P
) -> Result<T, Error>
[src]
pub fn post<T: DeserializeOwned, P: Serialize>(
&self,
path: &str,
params: P
) -> Result<T, Error>
pub fn post_empty<T: DeserializeOwned>(&self, path: &str) -> Result<T, Error>
[src]
pub fn post_empty<T: DeserializeOwned>(&self, path: &str) -> Result<T, Error>
pub fn delete<T: DeserializeOwned>(&self, path: &str) -> Result<T, Error>
[src]
pub fn delete<T: DeserializeOwned>(&self, path: &str) -> Result<T, Error>