pub struct AmountWithBreakdown {
pub currency_code: String,
pub value: String,
pub breakdown: Option<AmountBreakdown>,
}
Fields
currency_code: String
The three-character ISO-4217 currency code that identifies the currency.
value: String
The value, which might be: An integer for currencies like JPY that are not typically fractional. A decimal fraction for currencies like TND that are subdivided into thousandths.
breakdown: Option<AmountBreakdown>
The breakdown of the amount. Breakdown provides details such as total item amount, total tax amount, shipping, handling, insurance, and discounts, if any.
Implementations
sourceimpl AmountWithBreakdown
impl AmountWithBreakdown
pub fn new(currency_code: CurrencyCode, value: String) -> AmountWithBreakdown
pub fn breakdown(self, breakdown: AmountBreakdown) -> Self
Trait Implementations
sourceimpl Clone for AmountWithBreakdown
impl Clone for AmountWithBreakdown
sourcefn clone(&self) -> AmountWithBreakdown
fn clone(&self) -> AmountWithBreakdown
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for AmountWithBreakdown
impl Debug for AmountWithBreakdown
sourceimpl Default for AmountWithBreakdown
impl Default for AmountWithBreakdown
sourcefn default() -> AmountWithBreakdown
fn default() -> AmountWithBreakdown
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for AmountWithBreakdown
impl<'de> Deserialize<'de> for AmountWithBreakdown
sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for AmountWithBreakdown
impl Serialize for AmountWithBreakdown
Auto Trait Implementations
impl RefUnwindSafe for AmountWithBreakdown
impl Send for AmountWithBreakdown
impl Sync for AmountWithBreakdown
impl Unpin for AmountWithBreakdown
impl UnwindSafe for AmountWithBreakdown
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more