Struct stripe::Client
[−]
[src]
pub struct Client { /* fields omitted */ }
Methods
impl Client
[src]
fn new<Str: Into<String>>(secret_key: Str) -> Client
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.
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", ..})
.
fn get<T: Deserialize>(&self, path: &str) -> Result<T, Error>
fn post<T: Deserialize, P: Serialize>(
&self,
path: &str,
params: P
) -> Result<T, Error>
&self,
path: &str,
params: P
) -> Result<T, Error>
fn post_empty<T: Deserialize>(&self, path: &str) -> Result<T, Error>
fn delete<T: Deserialize>(&self, path: &str) -> Result<T, Error>
Trait Implementations
impl Clone for Client
[src]
fn clone(&self) -> Self
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more