pub struct CreateTaxCalculation { /* private fields */ }Expand description
Calculates tax based on the input and returns a Tax Calculation object.
Implementations§
Source§impl CreateTaxCalculation
impl CreateTaxCalculation
Sourcepub fn new(
currency: impl Into<Currency>,
line_items: impl Into<Vec<CreateTaxCalculationLineItems>>,
) -> Self
pub fn new( currency: impl Into<Currency>, line_items: impl Into<Vec<CreateTaxCalculationLineItems>>, ) -> Self
Construct a new CreateTaxCalculation.
Sourcepub fn customer(self, customer: impl Into<String>) -> Self
pub fn customer(self, customer: impl Into<String>) -> Self
The ID of an existing customer to use for this calculation.
If provided, the customer’s address and tax IDs are copied to customer_details.
Sourcepub fn customer_details(
self,
customer_details: impl Into<CreateTaxCalculationCustomerDetails>,
) -> Self
pub fn customer_details( self, customer_details: impl Into<CreateTaxCalculationCustomerDetails>, ) -> Self
Details about the customer, including address and tax IDs.
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 ship_from_details(
self,
ship_from_details: impl Into<CreateTaxCalculationShipFromDetails>,
) -> Self
pub fn ship_from_details( self, ship_from_details: impl Into<CreateTaxCalculationShipFromDetails>, ) -> Self
Details about the address from which the goods are being shipped.
Sourcepub fn shipping_cost(
self,
shipping_cost: impl Into<CreateTaxCalculationShippingCost>,
) -> Self
pub fn shipping_cost( self, shipping_cost: impl Into<CreateTaxCalculationShippingCost>, ) -> Self
Shipping cost details to be used for the calculation.
Source§impl CreateTaxCalculation
impl CreateTaxCalculation
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 CreateTaxCalculation
impl Clone for CreateTaxCalculation
Source§fn clone(&self) -> CreateTaxCalculation
fn clone(&self) -> CreateTaxCalculation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CreateTaxCalculation
impl Debug for CreateTaxCalculation
Source§impl Serialize for CreateTaxCalculation
impl Serialize for CreateTaxCalculation
Source§impl StripeRequest for CreateTaxCalculation
impl StripeRequest for CreateTaxCalculation
Source§type Output = TaxCalculation
type Output = TaxCalculation
The data returned from the eventual API call.
Source§fn build(&self) -> RequestBuilder
fn build(&self) -> RequestBuilder
Convert the struct into library-agnostic data that can be used by compatible
clients to make API calls.
Source§fn customize(&self) -> CustomizableStripeRequest<Self::Output>
fn customize(&self) -> CustomizableStripeRequest<Self::Output>
Convert to a builder allowing per-request customization.
Auto Trait Implementations§
impl Freeze for CreateTaxCalculation
impl RefUnwindSafe for CreateTaxCalculation
impl Send for CreateTaxCalculation
impl Sync for CreateTaxCalculation
impl Unpin for CreateTaxCalculation
impl UnwindSafe for CreateTaxCalculation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more