Struct stripe::generated::core::shipping_rate::ShippingRate
source · pub struct ShippingRate {
pub id: ShippingRateId,
pub active: bool,
pub created: Timestamp,
pub delivery_estimate: Option<ShippingRateDeliveryEstimate>,
pub display_name: Option<String>,
pub fixed_amount: Option<ShippingRateFixedAmount>,
pub livemode: bool,
pub metadata: Metadata,
pub tax_behavior: Option<ShippingRateTaxBehavior>,
pub tax_code: Option<Expandable<TaxCode>>,
pub type_: ShippingRateType,
}
Expand description
The resource representing a Stripe “ShippingRate”.
For more details see https://stripe.com/docs/api/shipping_rates/object
Fields§
§id: ShippingRateId
Unique identifier for the object.
active: bool
Whether the shipping rate can be used for new purchases.
Defaults to true
.
created: Timestamp
Time at which the object was created.
Measured in seconds since the Unix epoch.
delivery_estimate: Option<ShippingRateDeliveryEstimate>
The estimated range for how long shipping will take, meant to be displayable to the customer.
This will appear on CheckoutSessions.
display_name: Option<String>
The name of the shipping rate, meant to be displayable to the customer.
This will appear on CheckoutSessions.
fixed_amount: Option<ShippingRateFixedAmount>
§livemode: bool
Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
metadata: Metadata
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.
tax_behavior: Option<ShippingRateTaxBehavior>
Specifies whether the rate is considered inclusive of taxes or exclusive of taxes.
One of inclusive
, exclusive
, or unspecified
.
tax_code: Option<Expandable<TaxCode>>
A tax code ID.
The Shipping tax code is txcd_92010001
.
type_: ShippingRateType
The type of calculation to use on the shipping rate.
Can only be fixed_amount
for now.
Implementations§
source§impl ShippingRate
impl ShippingRate
sourcepub fn list(
client: &Client,
params: &ListShippingRates<'_>,
) -> Response<List<ShippingRate>>
pub fn list( client: &Client, params: &ListShippingRates<'_>, ) -> Response<List<ShippingRate>>
Returns a list of your shipping rates.
sourcepub fn create(
client: &Client,
params: CreateShippingRate<'_>,
) -> Response<ShippingRate>
pub fn create( client: &Client, params: CreateShippingRate<'_>, ) -> Response<ShippingRate>
Creates a new shipping rate object.
sourcepub fn retrieve(
client: &Client,
id: &ShippingRateId,
expand: &[&str],
) -> Response<ShippingRate>
pub fn retrieve( client: &Client, id: &ShippingRateId, expand: &[&str], ) -> Response<ShippingRate>
Returns the shipping rate object with the given ID.
sourcepub fn update(
client: &Client,
id: &ShippingRateId,
params: UpdateShippingRate<'_>,
) -> Response<ShippingRate>
pub fn update( client: &Client, id: &ShippingRateId, params: UpdateShippingRate<'_>, ) -> Response<ShippingRate>
Updates an existing shipping rate object.
Trait Implementations§
source§impl Clone for ShippingRate
impl Clone for ShippingRate
source§fn clone(&self) -> ShippingRate
fn clone(&self) -> ShippingRate
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ShippingRate
impl Debug for ShippingRate
source§impl Default for ShippingRate
impl Default for ShippingRate
source§fn default() -> ShippingRate
fn default() -> ShippingRate
source§impl<'de> Deserialize<'de> for ShippingRate
impl<'de> Deserialize<'de> for ShippingRate
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Object for ShippingRate
impl Object for ShippingRate
Auto Trait Implementations§
impl Freeze for ShippingRate
impl RefUnwindSafe for ShippingRate
impl Send for ShippingRate
impl Sync for ShippingRate
impl Unpin for ShippingRate
impl UnwindSafe for ShippingRate
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)