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§
Source§impl AmountWithBreakdown
impl AmountWithBreakdown
pub fn new(currency_code: CurrencyCode, value: String) -> Self
pub fn breakdown(self, breakdown: AmountBreakdown) -> Self
Trait Implementations§
Source§impl Clone for AmountWithBreakdown
impl Clone for AmountWithBreakdown
Source§fn clone(&self) -> AmountWithBreakdown
fn clone(&self) -> AmountWithBreakdown
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for AmountWithBreakdown
impl Debug for AmountWithBreakdown
Source§impl Default for AmountWithBreakdown
impl Default for AmountWithBreakdown
Source§fn default() -> AmountWithBreakdown
fn default() -> AmountWithBreakdown
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AmountWithBreakdown
impl<'de> Deserialize<'de> for AmountWithBreakdown
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AmountWithBreakdown
impl RefUnwindSafe for AmountWithBreakdown
impl Send for AmountWithBreakdown
impl Sync for AmountWithBreakdown
impl Unpin for AmountWithBreakdown
impl UnwindSafe for AmountWithBreakdown
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