pub struct CreateClimateOrder { /* private fields */ }
Expand description
Creates a Climate order object for a given Climate product. The order will be processed immediately after creation and payment will be deducted your Stripe balance.
Implementations§
Source§impl CreateClimateOrder
impl CreateClimateOrder
Sourcepub fn amount(self, amount: impl Into<i64>) -> Self
pub fn amount(self, amount: impl Into<i64>) -> Self
Requested amount of carbon removal units. Either this or metric_tons
must be specified.
Sourcepub fn beneficiary(self, beneficiary: impl Into<BeneficiaryParams>) -> Self
pub fn beneficiary(self, beneficiary: impl Into<BeneficiaryParams>) -> Self
Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set.
Sourcepub fn currency(self, currency: impl Into<Currency>) -> Self
pub fn currency(self, currency: impl Into<Currency>) -> Self
Request currency for the order as a three-letter ISO currency code, in lowercase. Must be a supported settlement currency for your account. If omitted, the account’s default currency will be used.
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
.
Sourcepub fn metric_tons(self, metric_tons: impl Into<String>) -> Self
pub fn metric_tons(self, metric_tons: impl Into<String>) -> Self
Requested number of tons for the order. Either this or amount
must be specified.
Source§impl CreateClimateOrder
impl CreateClimateOrder
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 CreateClimateOrder
impl Clone for CreateClimateOrder
Source§fn clone(&self) -> CreateClimateOrder
fn clone(&self) -> CreateClimateOrder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more