[][src]Struct stripe::Customer

pub struct Customer {
    pub id: String,
    pub account_balance: i64,
    pub business_vat_id: Option<String>,
    pub created: u64,
    pub currency: Option<Currency>,
    pub default_source: Option<PaymentSourceId>,
    pub delinquent: bool,
    pub desc: Option<String>,
    pub discount: Option<Discount>,
    pub email: Option<String>,
    pub livemode: bool,
    pub metadata: Metadata,
    pub shipping: Option<CustomerShippingDetails>,
    pub sources: List<PaymentSource>,
    pub subscriptions: List<Subscription>,
}

The resource representing a Stripe customer.

For more details see https://stripe.com/docs/api#customers.

Fields

id: Stringaccount_balance: i64business_vat_id: Option<String>created: u64currency: Option<Currency>default_source: Option<PaymentSourceId>delinquent: booldesc: Option<String>discount: Option<Discount>email: Option<String>livemode: boolmetadata: Metadatashipping: Option<CustomerShippingDetails>sources: List<PaymentSource>subscriptions: List<Subscription>

Methods

impl Customer[src]

pub fn create(client: &Client, params: CustomerParams) -> Response<Customer>[src]

Creates a new customer.

For more details see https://stripe.com/docs/api#create_customer.

pub fn retrieve(client: &Client, customer_id: &str) -> Response<Customer>[src]

Retrieves the details of a customer.

For more details see https://stripe.com/docs/api#retrieve_customer.

pub fn update(
    client: &Client,
    customer_id: &str,
    params: CustomerParams
) -> Response<Customer>
[src]

Updates a customer's properties.

For more details see https://stripe.com/docs/api#update_customer.

pub fn delete(client: &Client, customer_id: &str) -> Response<Deleted>[src]

Deletes a customer.

For more details see https://stripe.com/docs/api#delete_customer.

pub fn list(
    client: &Client,
    params: CustomerListParams
) -> Response<List<Customer>>
[src]

List customers.

For more details see https://stripe.com/docs/api#list_customers.

pub fn attach_source(
    client: &Client,
    customer_id: &str,
    source: PaymentSourceParams
) -> Response<PaymentSource>
[src]

Attaches a source to a customer, does not change default Source for the Customer

For more details see https://stripe.com/docs/api#attach_source.

pub fn detach_source(
    client: &Client,
    customer_id: &str,
    source_id: &PaymentSourceId
) -> Response<DetachedSource>
[src]

Detaches a source from a customer

For more details see https://stripe.com/docs/api#detach_source.

pub fn retrieve_source(
    client: &Client,
    customer_id: &str,
    source_id: &PaymentSourceId
) -> Response<PaymentSource>
[src]

Retrieves a Card, BankAccount, or Source for a Customer

pub fn verify_bank_account(
    client: &Client,
    customer_id: &str,
    bank_account_id: &BankAccountId,
    params: BankAccountVerifyParams
) -> Response<BankAccount>
[src]

Verifies a Bank Account for a Customer.

For more details see https://stripe.com/docs/api/customer_bank_accounts/verify.

Trait Implementations

impl Clone for Customer[src]

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

Performs copy-assignment from source. Read more

impl Debug for Customer[src]

impl Serialize for Customer[src]

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

Auto Trait Implementations

impl Send for Customer

impl Sync for Customer

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