pub struct CaptureCharge { /* private fields */ }
Expand description
Capture the payment of an existing, uncaptured charge that was created with the capture
option set to false.
Uncaptured payments expire a set number of days after they are created (7 by default), after which they are marked as refunded and capture attempts will fail.
Don’t use this method to capture a PaymentIntent-initiated charge. Use Capture a PaymentIntent.
Implementations§
Source§impl CaptureCharge
impl CaptureCharge
Sourcepub fn amount(self, amount: impl Into<i64>) -> Self
pub fn amount(self, amount: impl Into<i64>) -> Self
The amount to capture, which must be less than or equal to the original amount.
Sourcepub fn application_fee(self, application_fee: impl Into<i64>) -> Self
pub fn application_fee(self, application_fee: impl Into<i64>) -> Self
An application fee to add on to this charge.
Sourcepub fn application_fee_amount(
self,
application_fee_amount: impl Into<i64>,
) -> Self
pub fn application_fee_amount( self, application_fee_amount: impl Into<i64>, ) -> Self
An application fee amount to add on to this charge, which must be less than or equal to the original amount.
Sourcepub fn expand(self, expand: impl Into<Vec<String>>) -> Self
pub fn expand(self, expand: impl Into<Vec<String>>) -> Self
Specifies which fields in the response should be expanded.
Sourcepub fn receipt_email(self, receipt_email: impl Into<String>) -> Self
pub fn receipt_email(self, receipt_email: impl Into<String>) -> Self
The email address to send this charge’s receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts will not be sent in test mode.
Sourcepub fn statement_descriptor(
self,
statement_descriptor: impl Into<String>,
) -> Self
pub fn statement_descriptor( self, statement_descriptor: impl Into<String>, ) -> Self
For a non-card charge, text that appears on the customer’s statement as the statement descriptor. This value overrides the account’s default statement descriptor. For information about requirements, including the 22-character limit, see the Statement Descriptor docs.
For a card charge, this value is ignored unless you don’t specify a statement_descriptor_suffix
, in which case this value is used as the suffix.
Sourcepub fn statement_descriptor_suffix(
self,
statement_descriptor_suffix: impl Into<String>,
) -> Self
pub fn statement_descriptor_suffix( self, statement_descriptor_suffix: impl Into<String>, ) -> Self
Provides information about a card charge. Concatenated to the account’s statement descriptor prefix to form the complete statement descriptor that appears on the customer’s statement. If the account has no prefix value, the suffix is concatenated to the account’s statement descriptor.
Sourcepub fn transfer_data(
self,
transfer_data: impl Into<CaptureChargeTransferData>,
) -> Self
pub fn transfer_data( self, transfer_data: impl Into<CaptureChargeTransferData>, ) -> Self
An optional dictionary including the account to automatically transfer to as part of a destination charge. See the Connect documentation for details.
Sourcepub fn transfer_group(self, transfer_group: impl Into<String>) -> Self
pub fn transfer_group(self, transfer_group: impl Into<String>) -> Self
A string that identifies this transaction as part of a group.
transfer_group
may only be provided if it has not been set.
See the Connect documentation for details.
Source§impl CaptureCharge
impl CaptureCharge
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 CaptureCharge
impl Clone for CaptureCharge
Source§fn clone(&self) -> CaptureCharge
fn clone(&self) -> CaptureCharge
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more