pub struct CreateTopup { /* private fields */ }
Expand description
Top up the balance of an account
Implementations§
Source§impl CreateTopup
impl CreateTopup
Sourcepub fn new(amount: impl Into<i64>, currency: impl Into<Currency>) -> Self
pub fn new(amount: impl Into<i64>, currency: impl Into<Currency>) -> Self
Construct a new CreateTopup
.
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(self, source: impl Into<String>) -> Self
pub fn source(self, source: impl Into<String>) -> Self
The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see Testing Top-ups).
Sourcepub fn statement_descriptor(
self,
statement_descriptor: impl Into<String>,
) -> Self
pub fn statement_descriptor( self, statement_descriptor: impl Into<String>, ) -> Self
Extra information about a top-up for the source’s bank statement. Limited to 15 ASCII characters.
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 top-up as part of a group.
Source§impl CreateTopup
impl CreateTopup
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 CreateTopup
impl Clone for CreateTopup
Source§fn clone(&self) -> CreateTopup
fn clone(&self) -> CreateTopup
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more