[][src]Struct stripe::Client

pub struct Client { /* fields omitted */ }

Methods

impl Client[src]

pub fn new<S: Into<String>>(secret_key: S) -> Client[src]

pub fn with_headers(&self, headers: Headers) -> Client[src]

Clones a new client with different headers.

This is the recommended way to send requests for many different Stripe accounts or with different Meta, Extra, and Expand headers while using the same secret key.

pub fn set_stripe_account<S: Into<String>>(&mut self, account_id: S)[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(Headers{stripe_account: "acct_ABC", ..}).

pub fn get<T: DeserializeOwned>(&self, path: &str) -> Response<T>[src]

Make a GET http request with just a path

pub fn get_query<T: DeserializeOwned, P: Serialize>(
    &self,
    path: &str,
    params: P
) -> Response<T>
[src]

Make a GET http request with url query parameters

pub fn delete<T: DeserializeOwned>(&self, path: &str) -> Response<T>[src]

Make a DELETE http request with just a path

pub fn delete_query<T: DeserializeOwned, P: Serialize>(
    &self,
    path: &str,
    params: P
) -> Response<T>
[src]

Make a DELETE http request with url query parameters

pub fn post<T: DeserializeOwned>(&self, path: &str) -> Response<T>[src]

Make a POST http request with just a path

pub fn post_form<T: DeserializeOwned, F: Serialize>(
    &self,
    path: &str,
    form: F
) -> Response<T>
[src]

Make a POST http request with urlencoded body

Trait Implementations

impl Clone for Client[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Client

impl Sync for Client

Blanket Implementations

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

impl<T> Erased for T

impl<T> Same for T

type Output = T

Should always be Self