pub struct UpdateCharge { /* private fields */ }
Expand description
Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
Implementations§
Source§impl UpdateCharge
impl UpdateCharge
Sourcepub fn customer(self, customer: impl Into<String>) -> Self
pub fn customer(self, customer: impl Into<String>) -> Self
The ID of an existing customer that will be associated with this request. This field may only be updated if there is no existing associated customer with this charge.
Sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
An arbitrary string which you can attach to a charge object.
It is displayed when in the web interface alongside the charge.
Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the description
of the charge(s) that they are describing.
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 fraud_details(
self,
fraud_details: impl Into<UpdateChargeFraudDetails>,
) -> Self
pub fn fraud_details( self, fraud_details: impl Into<UpdateChargeFraudDetails>, ) -> Self
A set of key-value pairs you can attach to a charge giving information about its riskiness.
If you believe a charge is fraudulent, include a user_report
key with a value of fraudulent
.
If you believe a charge is safe, include a user_report
key with a value of safe
.
Stripe will use the information you send to improve our fraud detection algorithms.
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
.
Sourcepub fn receipt_email(self, receipt_email: impl Into<String>) -> Self
pub fn receipt_email(self, receipt_email: impl Into<String>) -> Self
This is the email address that the receipt for this charge will be sent to. If this field is updated, then a new email receipt will be sent to the updated address.
Sourcepub fn shipping(self, shipping: impl Into<OptionalFieldsShipping>) -> Self
pub fn shipping(self, shipping: impl Into<OptionalFieldsShipping>) -> Self
Shipping information for the charge. Helps prevent fraud on charges for physical goods.
Sourcepub fn transfer_group(self, transfer_group: impl Into<String>) -> Self
pub fn transfer_group(self, transfer_group: impl Into<String>) -> Self
A string that identifies this transaction as part of a group.
transfer_group
may only be provided if it has not been set.
See the Connect documentation for details.
Source§impl UpdateCharge
impl UpdateCharge
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 UpdateCharge
impl Clone for UpdateCharge
Source§fn clone(&self) -> UpdateCharge
fn clone(&self) -> UpdateCharge
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more