Struct stripe::Client
[−]
[src]
pub struct Client { /* fields omitted */ }
Methods
impl Client
[src]
fn new<Str: Into<String>>(secret_key: Str) -> Client
[src]
fn with(&self, params: Params) -> Client
[src]
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.
fn set_stripe_account<Str: Into<String>>(&mut self, account_id: Str)
[src]
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", ..})
.
fn get<T: DeserializeOwned>(&self, path: &str) -> Result<T, Error>
[src]
fn post<T: DeserializeOwned, P: Serialize>(
&self,
path: &str,
params: P
) -> Result<T, Error>
[src]
&self,
path: &str,
params: P
) -> Result<T, Error>