Struct stripe::PaymentMethod[][src]

pub struct PaymentMethod {
    pub id: PaymentMethodId,
    pub alipay: Option<PaymentFlowsPrivatePaymentMethodsAlipay>,
    pub au_becs_debit: Option<PaymentMethodAuBecsDebit>,
    pub bacs_debit: Option<PaymentMethodBacsDebit>,
    pub bancontact: Option<PaymentMethodBancontact>,
    pub billing_details: BillingDetails,
    pub card: Option<CardDetails>,
    pub card_present: Option<CardPresent>,
    pub created: Timestamp,
    pub customer: Option<Expandable<Customer>>,
    pub eps: Option<PaymentMethodEps>,
    pub fpx: Option<PaymentMethodFpx>,
    pub giropay: Option<PaymentMethodGiropay>,
    pub grabpay: Option<PaymentMethodGrabpay>,
    pub ideal: Option<PaymentMethodIdeal>,
    pub interac_present: Option<PaymentMethodInteracPresent>,
    pub livemode: bool,
    pub metadata: Metadata,
    pub oxxo: Option<PaymentMethodOxxo>,
    pub p24: Option<PaymentMethodP24>,
    pub sepa_debit: Option<PaymentMethodSepaDebit>,
    pub sofort: Option<PaymentMethodSofort>,
    pub type_: PaymentMethodType,
}

The resource representing a Stripe "PaymentMethod".

For more details see https://stripe.com/docs/api/payment_methods/object.

Fields

id: PaymentMethodId

Unique identifier for the object.

alipay: Option<PaymentFlowsPrivatePaymentMethodsAlipay>au_becs_debit: Option<PaymentMethodAuBecsDebit>bacs_debit: Option<PaymentMethodBacsDebit>bancontact: Option<PaymentMethodBancontact>billing_details: BillingDetailscard: Option<CardDetails>card_present: Option<CardPresent>created: Timestamp

Time at which the object was created.

Measured in seconds since the Unix epoch.

customer: Option<Expandable<Customer>>

The ID of the Customer to which this PaymentMethod is saved.

This will not be set when the PaymentMethod has not been saved to a Customer.

eps: Option<PaymentMethodEps>fpx: Option<PaymentMethodFpx>giropay: Option<PaymentMethodGiropay>grabpay: Option<PaymentMethodGrabpay>ideal: Option<PaymentMethodIdeal>interac_present: Option<PaymentMethodInteracPresent>livemode: bool

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

metadata: Metadata

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.

oxxo: Option<PaymentMethodOxxo>p24: Option<PaymentMethodP24>sepa_debit: Option<PaymentMethodSepaDebit>sofort: Option<PaymentMethodSofort>type_: PaymentMethodType

The type of the PaymentMethod.

An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.

Implementations

impl PaymentMethod[src]

pub fn list(
    client: &Client,
    params: ListPaymentMethods<'_>
) -> Response<List<PaymentMethod>>
[src]

Returns a list of PaymentMethods for a given Customer.

pub fn create(
    client: &Client,
    params: CreatePaymentMethod<'_>
) -> Response<PaymentMethod>
[src]

Creates a PaymentMethod object.

Read the Stripe.js reference to learn how to create PaymentMethods via Stripe.js.

pub fn retrieve(
    client: &Client,
    id: &PaymentMethodId,
    expand: &[&str]
) -> Response<PaymentMethod>
[src]

Retrieves a PaymentMethod object.

pub fn update(
    client: &Client,
    id: &PaymentMethodId,
    params: UpdatePaymentMethod<'_>
) -> Response<PaymentMethod>
[src]

Updates a PaymentMethod object.

A PaymentMethod must be attached a customer to be updated.

impl PaymentMethod[src]

pub fn attach(
    client: &Client,
    payment_method_id: &PaymentMethodId,
    params: AttachPaymentMethod
) -> Response<PaymentMethod>
[src]

Attach a payment method to a customer

For more details see https://stripe.com/docs/api/payment_methods/attach.

Trait Implementations

impl Clone for PaymentMethod[src]

impl Debug for PaymentMethod[src]

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

impl Object for PaymentMethod[src]

type Id = PaymentMethodId

The canonical id type for this object.

impl Serialize for PaymentMethod[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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

type Owned = T

The resulting type after obtaining ownership.

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<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]