[−][src]Struct stripe::Client
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]
&self,
path: &str,
params: P
) -> Response<T>
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]
&self,
path: &str,
params: P
) -> Response<T>
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]
&self,
path: &str,
form: F
) -> Response<T>
Make a POST http request with urlencoded body
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
impl<T> From for T[src]
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<T> Same for T
type Output = T
Should always be Self