pub struct CreateTransfer { /* private fields */ }
Expand description
To send funds from your Stripe account to a connected account, you create a new transfer object. Your Stripe balance must be able to cover the transfer amount, or you’ll receive an “Insufficient Funds” error.
Implementations§
Source§impl CreateTransfer
impl CreateTransfer
Sourcepub fn new(
currency: impl Into<Currency>,
destination: impl Into<String>,
) -> Self
pub fn new( currency: impl Into<Currency>, destination: impl Into<String>, ) -> Self
Construct a new CreateTransfer
.
Sourcepub fn amount(self, amount: impl Into<i64>) -> Self
pub fn amount(self, amount: impl Into<i64>) -> Self
A positive integer in cents (or local equivalent) representing how much to transfer.
Sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
An arbitrary string attached to the object. Often useful for displaying to users.
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 metadata(self, metadata: impl Into<HashMap<String, String>>) -> Self
pub fn metadata(self, metadata: impl Into<HashMap<String, String>>) -> Self
Set of key-value pairs that you can attach to an object.
This can be useful for storing additional information about the object in a structured format.
Individual keys can be unset by posting an empty value to them.
All keys can be unset by posting an empty value to metadata
.
Sourcepub fn source_transaction(self, source_transaction: impl Into<String>) -> Self
pub fn source_transaction(self, source_transaction: impl Into<String>) -> Self
You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. See the Connect documentation for details.
Sourcepub fn source_type(
self,
source_type: impl Into<CreateTransferSourceType>,
) -> Self
pub fn source_type( self, source_type: impl Into<CreateTransferSourceType>, ) -> Self
The source balance to use for this transfer.
One of bank_account
, card
, or fpx
.
For most users, this will default to card
.
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. See the Connect documentation for details.
Source§impl CreateTransfer
impl CreateTransfer
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 CreateTransfer
impl Clone for CreateTransfer
Source§fn clone(&self) -> CreateTransfer
fn clone(&self) -> CreateTransfer
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more