[][src]Struct stripe::CreateSource

pub struct CreateSource<'a> {
    pub amount: Option<i64>,
    pub currency: Option<Currency>,
    pub customer: Option<CustomerId>,
    pub expand: &'a [&'a str],
    pub flow: Option<SourceFlow>,
    pub mandate: Option<SourceMandateParams>,
    pub metadata: Option<Metadata>,
    pub original_source: Option<&'a str>,
    pub owner: Option<BillingDetails>,
    pub receiver: Option<CreateSourceReceiver>,
    pub redirect: Option<CreateSourceRedirect>,
    pub statement_descriptor: Option<&'a str>,
    pub token: Option<TokenId>,
    pub type_: Option<&'a str>,
    pub usage: Option<SourceUsage>,
}

The parameters for Source::create.

Fields

amount: Option<i64>

Amount associated with the source.

This is the amount for which the source will be chargeable once ready. Required for single_use sources.

currency: Option<Currency>

Three-letter ISO code for the currency associated with the source.

This is the currency for which the source will be chargeable once ready.

customer: Option<CustomerId>

The Customer to whom the original source is attached to.

Must be set when the original source is not a Source (e.g., Card).

expand: &'a [&'a str]

Specifies which fields in the response should be expanded.

flow: Option<SourceFlow>

The authentication flow of the source to create.

flow is one of redirect, receiver, code_verification, none. It is generally inferred unless a type supports multiple flows.

mandate: Option<SourceMandateParams>

Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status.

metadata: Option<Metadata>

A set of key-value pairs that you can attach to a source object.

It can be useful for storing additional information about the source in a structured format.

original_source: Option<&'a str>

The source to share.

owner: Option<BillingDetails>

Information about the owner of the payment instrument that may be used or required by particular source types.

receiver: Option<CreateSourceReceiver>

Optional parameters for the receiver flow.

Can be set only if the source is a receiver (flow is receiver).

redirect: Option<CreateSourceRedirect>

Parameters required for the redirect flow.

Required if the source is authenticated by a redirect (flow is redirect).

statement_descriptor: Option<&'a str>

An arbitrary string to be displayed on your customer's statement.

As an example, if your website is RunClub and the item you're charging for is a race ticket, you may want to specify a statement_descriptor of RunClub 5K race ticket. While many payment types will display this information, some may not display it at all.

token: Option<TokenId>

An optional token used to create the source.

When passed, token properties will override source parameters.

type_: Option<&'a str>

The type of the source to create.

Required unless customer and original_source are specified (see the Shared card Sources guide).

usage: Option<SourceUsage>

Methods

impl<'a> CreateSource<'a>[src]

pub fn new() -> Self[src]

Trait Implementations

impl<'a> Default for CreateSource<'a>[src]

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

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

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

Auto Trait Implementations

impl<'a> Unpin for CreateSource<'a>

impl<'a> Sync for CreateSource<'a>

impl<'a> Send for CreateSource<'a>

impl<'a> UnwindSafe for CreateSource<'a>

impl<'a> RefUnwindSafe for CreateSource<'a>

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

impl<T> From<T> for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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

impl<T> Erased for T

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

impl<T> Same<T> for T

type Output = T

Should always be Self