pub struct CancelSetupIntent { /* private fields */ }
Expand description
You can cancel a SetupIntent object when it’s in one of these statuses: requires_payment_method
, requires_confirmation
, or requires_action
.
After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. You can’t cancel the SetupIntent for a Checkout Session. Expire the Checkout Session instead.
Implementations§
Source§impl CancelSetupIntent
impl CancelSetupIntent
Sourcepub fn new(intent: impl Into<SetupIntentId>) -> Self
pub fn new(intent: impl Into<SetupIntentId>) -> Self
Construct a new CancelSetupIntent
.
Sourcepub fn cancellation_reason(
self,
cancellation_reason: impl Into<SetupIntentCancellationReason>,
) -> Self
pub fn cancellation_reason( self, cancellation_reason: impl Into<SetupIntentCancellationReason>, ) -> Self
Reason for canceling this SetupIntent.
Possible values are: abandoned
, requested_by_customer
, or duplicate
.
Source§impl CancelSetupIntent
impl CancelSetupIntent
Sourcepub async fn send<C: StripeClient>(
&self,
client: &C,
) -> Result<<Self as StripeRequest>::Output, C::Err>
pub async fn send<C: StripeClient>( &self, client: &C, ) -> Result<<Self as StripeRequest>::Output, C::Err>
Send the request and return the deserialized response.
Sourcepub fn send_blocking<C: StripeBlockingClient>(
&self,
client: &C,
) -> Result<<Self as StripeRequest>::Output, C::Err>
pub fn send_blocking<C: StripeBlockingClient>( &self, client: &C, ) -> Result<<Self as StripeRequest>::Output, C::Err>
Send the request and return the deserialized response, blocking until completion.
Trait Implementations§
Source§impl Clone for CancelSetupIntent
impl Clone for CancelSetupIntent
Source§fn clone(&self) -> CancelSetupIntent
fn clone(&self) -> CancelSetupIntent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CancelSetupIntent
impl Debug for CancelSetupIntent
Source§impl Serialize for CancelSetupIntent
impl Serialize for CancelSetupIntent
Source§impl StripeRequest for CancelSetupIntent
impl StripeRequest for CancelSetupIntent
Source§type Output = SetupIntent
type Output = SetupIntent
The data returned from the eventual API call.
Source§fn build(&self) -> RequestBuilder
fn build(&self) -> RequestBuilder
Convert the struct into library-agnostic data that can be used by compatible
clients to make API calls.
Source§fn customize(&self) -> CustomizableStripeRequest<Self::Output>
fn customize(&self) -> CustomizableStripeRequest<Self::Output>
Convert to a builder allowing per-request customization.
Auto Trait Implementations§
impl Freeze for CancelSetupIntent
impl RefUnwindSafe for CancelSetupIntent
impl Send for CancelSetupIntent
impl Sync for CancelSetupIntent
impl Unpin for CancelSetupIntent
impl UnwindSafe for CancelSetupIntent
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