pub struct AmountBreakdown {
pub item_total: Option<Money>,
pub shipping: Option<Money>,
pub handling: Option<Money>,
pub tax_total: Option<Money>,
pub insurance: Option<Money>,
pub shipping_discount: Option<Money>,
pub discount: Option<Money>,
}
Fields§
§item_total: Option<Money>
The subtotal for all items. Required if the request includes purchase_units[].items[].unit_amount. Must equal the sum of (items[].unit_amount * items[].quantity) for all items. item_total.value can not be a negative number.
shipping: Option<Money>
The shipping fee for all items within a given purchase_unit. shipping.value can not be a negative number.
handling: Option<Money>
The handling fee for all items within a given purchase_unit. handling.value can not be a negative number.
tax_total: Option<Money>
The total tax for all items. Required if the request includes purchase_units.items.tax. Must equal the sum of (items[].tax * items[].quantity) for all items. tax_total.value can not be a negative number.
insurance: Option<Money>
The insurance fee for all items within a given purchase_unit. insurance.value can not be a negative number.
shipping_discount: Option<Money>
The shipping discount for all items within a given purchase_unit. shipping_discount.value can not be a negative number.
discount: Option<Money>
The discount for all items within a given purchase_unit. discount.value can not be a negative number.
Implementations§
Source§impl AmountBreakdown
impl AmountBreakdown
pub const fn new() -> Self
pub fn item_total(self, item_total: Money) -> Self
pub fn shipping(self, shipping: Money) -> Self
pub fn handling(self, handling: Money) -> Self
pub fn tax_total(self, tax_total: Money) -> Self
pub fn insurance(self, insurance: Money) -> Self
pub fn shipping_discount(self, shipping_discount: Money) -> Self
pub fn discount(self, discount: Money) -> Self
Trait Implementations§
Source§impl Clone for AmountBreakdown
impl Clone for AmountBreakdown
Source§fn clone(&self) -> AmountBreakdown
fn clone(&self) -> AmountBreakdown
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read more