[−][src]Struct stripe::Customer
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<PaymentSourceId>
delinquent: bool
desc: Option<String>
discount: Option<Discount>
email: Option<String>
livemode: bool
metadata: Metadata
shipping: 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]
client: &Client,
customer_id: &str,
params: CustomerParams
) -> Response<Customer>
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]
client: &Client,
params: CustomerListParams
) -> Response<List<Customer>>
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]
client: &Client,
customer_id: &str,
source: PaymentSourceParams
) -> Response<PaymentSource>
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]
client: &Client,
customer_id: &str,
source_id: &PaymentSourceId
) -> Response<DetachedSource>
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]
client: &Client,
customer_id: &str,
source_id: &PaymentSourceId
) -> Response<PaymentSource>
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]
client: &Client,
customer_id: &str,
bank_account_id: &BankAccountId,
params: BankAccountVerifyParams
) -> Response<BankAccount>
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(&self) -> 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]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for Customer
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> Erased for T
impl<T> Same for T
type Output = T
Should always be Self