pub struct CreateCustomerPaymentSource { /* private fields */ }
Expand description
When you create a new credit card, you must specify a customer or recipient on which to create it.
If the card’s owner has no default card, then the new card will become the default.
However, if the owner already has a default, then it will not change.
To change the default, you should update the customer to have a new default_source
.
Implementations§
Source§impl CreateCustomerPaymentSource
impl CreateCustomerPaymentSource
Sourcepub fn new(customer: impl Into<CustomerId>, source: impl Into<String>) -> Self
pub fn new(customer: impl Into<CustomerId>, source: impl Into<String>) -> Self
Construct a new CreateCustomerPaymentSource
.
Sourcepub fn expand(self, expand: impl Into<Vec<String>>) -> Self
pub fn expand(self, expand: impl Into<Vec<String>>) -> Self
Specifies which fields in the response should be expanded.
Sourcepub fn metadata(self, metadata: impl Into<HashMap<String, String>>) -> Self
pub fn metadata(self, metadata: impl Into<HashMap<String, String>>) -> Self
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.
Individual keys can be unset by posting an empty value to them.
All keys can be unset by posting an empty value to metadata
.
pub fn validate(self, validate: impl Into<bool>) -> Self
Source§impl CreateCustomerPaymentSource
impl CreateCustomerPaymentSource
Sourcepub async fn send<C: StripeClient>(
&self,
client: &C,
) -> Result<<Self as StripeRequest>::Output, C::Err>
pub async fn send<C: StripeClient>( &self, client: &C, ) -> Result<<Self as StripeRequest>::Output, C::Err>
Send the request and return the deserialized response.
Sourcepub fn send_blocking<C: StripeBlockingClient>(
&self,
client: &C,
) -> Result<<Self as StripeRequest>::Output, C::Err>
pub fn send_blocking<C: StripeBlockingClient>( &self, client: &C, ) -> Result<<Self as StripeRequest>::Output, C::Err>
Send the request and return the deserialized response, blocking until completion.
Trait Implementations§
Source§impl Clone for CreateCustomerPaymentSource
impl Clone for CreateCustomerPaymentSource
Source§fn clone(&self) -> CreateCustomerPaymentSource
fn clone(&self) -> CreateCustomerPaymentSource
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more