Struct stripe::Customer [−][src]
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<String>, 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<Source>, pub subscriptions: List<Subscription>, }
The resource representing a Stripe customer.
For more details see https://stripe.com/docs/api#customers.
Fields
id: String
account_balance: i64
business_vat_id: Option<String>
created: u64
currency: Option<Currency>
default_source: Option<String>
delinquent: bool
desc: Option<String>
discount: Option<Discount>
email: Option<String>
livemode: bool
metadata: Metadata
shipping: Option<CustomerShippingDetails>
sources: List<Source>
subscriptions: List<Subscription>
Methods
impl Customer
[src]
impl Customer
pub fn create(
client: &Client,
params: CustomerParams
) -> Result<Customer, Error>
[src]
pub fn create(
client: &Client,
params: CustomerParams
) -> Result<Customer, Error>
Creates a new customer.
For more details see https://stripe.com/docs/api#create_customer.
pub fn retrieve(client: &Client, customer_id: &str) -> Result<Customer, Error>
[src]
pub fn retrieve(client: &Client, customer_id: &str) -> Result<Customer, Error>
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
) -> Result<Customer, Error>
[src]
pub fn update(
client: &Client,
customer_id: &str,
params: CustomerParams
) -> Result<Customer, Error>
Updates a customer's properties.
For more details see https://stripe.com/docs/api#update_customer.
pub fn delete(client: &Client, customer_id: &str) -> Result<Deleted, Error>
[src]
pub fn delete(client: &Client, customer_id: &str) -> Result<Deleted, Error>
Deletes a customer.
For more details see https://stripe.com/docs/api#delete_customer.
pub fn list(
client: &Client,
params: CustomerListParams
) -> Result<List<Customer>, Error>
[src]
pub fn list(
client: &Client,
params: CustomerListParams
) -> Result<List<Customer>, Error>
List customers.
For more details see https://stripe.com/docs/api#list_customers.