pub struct RequestBuilder {
pub query: Option<String>,
pub body: Option<String>,
pub path: String,
pub method: StripeMethod,
}
Expand description
A builder for specifying the possible pieces of a Stripe API request.
Fields§
§query: Option<String>
The current query string to use, if provided.
body: Option<String>
The current form-encoded body to send, if provided.
path: String
The API endpoint to send the request to.
method: StripeMethod
The method type.
Implementations§
Source§impl RequestBuilder
impl RequestBuilder
Sourcepub fn new(method: StripeMethod, path: impl Into<String>) -> Self
pub fn new(method: StripeMethod, path: impl Into<String>) -> Self
Construct a new RequestBuilder
.
Sourcepub fn customize<T>(self) -> CustomizableStripeRequest<T>
pub fn customize<T>(self) -> CustomizableStripeRequest<T>
Convert this request into a CustomizableStripeRequest
to allow per-request
customization.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RequestBuilder
impl RefUnwindSafe for RequestBuilder
impl Send for RequestBuilder
impl Sync for RequestBuilder
impl Unpin for RequestBuilder
impl UnwindSafe for RequestBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more