[][src]Enum stripe::PaymentSourceParams

pub enum PaymentSourceParams<'a> {
    Token(TokenId),
    Source(SourceId),
    Card(CardParams<'a>),
    BankAccount(BankAccountParams<'a>),
}

A PaymentSourceParams represents all of the supported ways that can be used to creating a new customer with a payment method or creating a payment method directly for a customer via Customer::attach_source.

Not to be confused with SourceParams which is used by Source::create to create a source that is not necessarily attached to a customer.

Variants

Token(TokenId)

Creates a payment method (e.g. card or bank account) from tokenized data, using a token typically received from Stripe Elements.

Source(SourceId)

Attach an existing source to an existing customer or create a new customer from an existing source.

Card(CardParams<'a>)

Creates a Card payment method from the full card information (e.g. card number, expiration, etc).

You usually want to use a TokenId received from Stripe Elements instead.

BankAccount(BankAccountParams<'a>)

Creates a BankAccount payment method from the full bank information (e.g. account number, expiration, etc).

You usually want to use a TokenId received from Stripe Elements instead.

Trait Implementations

impl<'a> Clone for PaymentSourceParams<'a>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'a> Debug for PaymentSourceParams<'a>[src]

impl<'a> Serialize for PaymentSourceParams<'a>[src]

impl<'de> Deserialize<'de> for PaymentSourceParams<'de>[src]

Auto Trait Implementations

impl<'a> Send for PaymentSourceParams<'a>

impl<'a> Sync for PaymentSourceParams<'a>

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Erased for T

impl<T> Same for T

type Output = T

Should always be Self