[−][src]Struct stripe::PaymentMethod
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.
billing_details: BillingDetails
card: 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.
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.
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.
Methods
impl PaymentMethod
[src]
pub fn list(
client: &Client,
params: ListPaymentMethods
) -> Response<List<PaymentMethod>>
[src]
client: &Client,
params: ListPaymentMethods
) -> Response<List<PaymentMethod>>
Returns a list of PaymentMethods for a given Customer.
pub fn create(
client: &Client,
params: CreatePaymentMethod
) -> Response<PaymentMethod>
[src]
client: &Client,
params: CreatePaymentMethod
) -> Response<PaymentMethod>
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]
client: &Client,
id: &PaymentMethodId,
expand: &[&str]
) -> Response<PaymentMethod>
Retrieves a PaymentMethod object.
pub fn update(
client: &Client,
id: &PaymentMethodId,
params: UpdatePaymentMethod
) -> Response<PaymentMethod>
[src]
client: &Client,
id: &PaymentMethodId,
params: UpdatePaymentMethod
) -> Response<PaymentMethod>
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]
client: &Client,
payment_method_id: &PaymentMethodId,
params: AttachPaymentMethod
) -> Response<PaymentMethod>
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]
fn clone(&self) -> PaymentMethod
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for PaymentMethod
[src]
impl<'de> Deserialize<'de> for PaymentMethod
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Object for PaymentMethod
[src]
type Id = PaymentMethodId
The canonical id type for this object.
fn id(&self) -> Self::Id
[src]
fn object(&self) -> &'static str
[src]
impl Serialize for PaymentMethod
[src]
Auto Trait Implementations
impl RefUnwindSafe for PaymentMethod
impl Send for PaymentMethod
impl Sync for PaymentMethod
impl Unpin for PaymentMethod
impl UnwindSafe for PaymentMethod
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: Deserialize<'de>,
[src]
T: 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>,