pub struct CreateToken { /* private fields */ }
Expand description
Creates a single-use token that represents a bank account’s details.
You can use this token with any v1 API method in place of a bank account dictionary.
You can only use this token once.
To do so, attach it to a connected account where controller.requirement_collection is application
, which includes Custom accounts.
Implementations§
Source§impl CreateToken
impl CreateToken
Sourcepub fn account(self, account: impl Into<CreateTokenAccount>) -> Self
pub fn account(self, account: impl Into<CreateTokenAccount>) -> Self
Information for the account this token represents.
Sourcepub fn bank_account(
self,
bank_account: impl Into<CreateTokenBankAccount>,
) -> Self
pub fn bank_account( self, bank_account: impl Into<CreateTokenBankAccount>, ) -> Self
The bank account this token will represent.
Sourcepub fn card(self, card: impl Into<CreateTokenCard>) -> Self
pub fn card(self, card: impl Into<CreateTokenCard>) -> Self
The card this token will represent. If you also pass in a customer, the card must be the ID of a card belonging to the customer. Otherwise, if you do not pass in a customer, this is a dictionary containing a user’s credit card details, with the options described below.
Sourcepub fn customer(self, customer: impl Into<String>) -> Self
pub fn customer(self, customer: impl Into<String>) -> Self
Create a token for the customer, which is owned by the application’s account. You can only use this with an OAuth access token or Stripe-Account header. Learn more about cloning saved payment methods.
Sourcepub fn cvc_update(self, cvc_update: impl Into<CreateTokenCvcUpdate>) -> Self
pub fn cvc_update(self, cvc_update: impl Into<CreateTokenCvcUpdate>) -> Self
The updated CVC value this token represents.
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 person(self, person: impl Into<CreateTokenPerson>) -> Self
pub fn person(self, person: impl Into<CreateTokenPerson>) -> Self
Information for the person this token represents.
Sourcepub fn pii(self, pii: impl Into<CreateTokenPii>) -> Self
pub fn pii(self, pii: impl Into<CreateTokenPii>) -> Self
The PII this token represents.
Source§impl CreateToken
impl CreateToken
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 CreateToken
impl Clone for CreateToken
Source§fn clone(&self) -> CreateToken
fn clone(&self) -> CreateToken
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more