[−][src]Struct stripe::Source
The resource representing a Stripe "Source".
For more details see https://stripe.com/docs/api/sources/object.
Fields
id: SourceIdUnique identifier for the object.
ach_credit_transfer: Option<SourceTypeAchCreditTransfer>ach_debit: Option<SourceTypeAchDebit>alipay: Option<SourceTypeAlipay>amount: Option<i64>A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source.
This is the amount for which the source will be chargeable once ready.
Required for single_use sources.
bancontact: Option<SourceTypeBancontact>card: Option<SourceTypeCard>card_present: Option<SourceTypeCardPresent>client_secret: StringThe client secret of the source.
Used for client-side retrieval using a publishable key.
code_verification: Option<SourceCodeVerificationFlow>created: TimestampTime at which the object was created.
Measured in seconds since the Unix epoch.
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.
Required for single_use sources.
customer: Option<String>The ID of the customer to which this source is attached.
This will not be present when the source has not been attached to a customer.
eps: Option<SourceTypeEps>flow: SourceFlowThe authentication flow of the source.
flow is one of redirect, receiver, code_verification, none.
giropay: Option<SourceTypeGiropay>ideal: Option<SourceTypeIdeal>klarna: Option<SourceTypeKlarna>livemode: boolHas the value true if the object exists in live mode or the value false if the object exists in test mode.
metadata: MetadataSet 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.
multibanco: Option<SourceTypeMultibanco>owner: Option<SourceOwner>Information about the owner of the payment instrument that may be used or required by particular source types.
p24: Option<SourceTypeP24>receiver: Option<SourceReceiverFlow>redirect: Option<SourceRedirectFlow>sepa_debit: Option<SourceTypeSepaDebit>sofort: Option<SourceTypeSofort>source_order: Option<SourceOrder>statement_descriptor: Option<String>Extra information about a source.
This will appear on your customer's statement every time you charge the source.
status: SourceStatusThe status of the source, one of canceled, chargeable, consumed, failed, or pending.
Only chargeable sources can be used to create a charge.
three_d_secure: Option<SourceTypeThreeDSecure>type_: SourceTypeThe type of the source.
The type is a payment method, one of ach_credit_transfer, ach_debit, alipay, bancontact, card, card_present, eps, giropay, ideal, multibanco, klarna, p24, sepa_debit, sofort, three_d_secure, or wechat.
An additional hash is included on the source with a name matching this value.
It contains additional information specific to the payment method used.
usage: Option<SourceUsage>Either reusable or single_use.
Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned.
wechat: Option<SourceTypeWechat>Implementations
impl Source[src]
pub fn create(client: &Client, params: CreateSource) -> Response<Source>[src]
Creates a new source object.
pub fn retrieve(
client: &Client,
id: &SourceId,
expand: &[&str]
) -> Response<Source>[src]
client: &Client,
id: &SourceId,
expand: &[&str]
) -> Response<Source>
Retrieves an existing source object.
Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information.
pub fn update(
client: &Client,
id: &SourceId,
params: UpdateSource
) -> Response<Source>[src]
client: &Client,
id: &SourceId,
params: UpdateSource
) -> Response<Source>
Updates the specified source by setting the values of the parameters passed.
Any parameters not provided will be left unchanged. This request accepts the metadata and owner as arguments.
It is also possible to update type specific information for selected payment methods.
Please refer to our payment method guides for more detail.
Trait Implementations
impl Clone for Source[src]
impl Debug for Source[src]
impl<'de> Deserialize<'de> for Source[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
__D: Deserializer<'de>,
impl Object for Source[src]
type Id = SourceId
The canonical id type for this object.
fn id(&self) -> Self::Id[src]
fn object(&self) -> &'static str[src]
impl Serialize for Source[src]
Auto Trait Implementations
impl RefUnwindSafe for Source
impl Send for Source
impl Sync for Source
impl Unpin for Source
impl UnwindSafe for Source
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>, [src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,