Struct paypal_rs::data::invoice::BreakdownBuilder
source · pub struct BreakdownBuilder { /* private fields */ }
Expand description
Builder for Breakdown
.
Implementations§
source§impl BreakdownBuilder
impl BreakdownBuilder
sourcepub fn item_total<VALUE: Into<Money>>(&mut self, value: VALUE) -> &mut Self
pub fn item_total<VALUE: Into<Money>>(&mut self, value: VALUE) -> &mut Self
The subtotal for all items. Must equal the sum of (items[].unit_amount * items[].quantity) for all items.
sourcepub fn discount<VALUE: Into<AggregatedDiscount>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn discount<VALUE: Into<AggregatedDiscount>>( &mut self, value: VALUE ) -> &mut Self
The discount can be at the item or invoice level, or both. Can be applied as a percent or amount. If you provide both amount and percent, amount takes precedent.
sourcepub fn tax_total<VALUE: Into<Money>>(&mut self, value: VALUE) -> &mut Self
pub fn tax_total<VALUE: Into<Money>>(&mut self, value: VALUE) -> &mut Self
The aggregated amount of the item and shipping taxes.
sourcepub fn shipping<VALUE: Into<ShippingCost>>(&mut self, value: VALUE) -> &mut Self
pub fn shipping<VALUE: Into<ShippingCost>>(&mut self, value: VALUE) -> &mut Self
The shipping fee for all items. Includes tax on shipping.
sourcepub fn custom<VALUE: Into<CustomAmount>>(&mut self, value: VALUE) -> &mut Self
pub fn custom<VALUE: Into<CustomAmount>>(&mut self, value: VALUE) -> &mut Self
The custom amount to apply to an invoice. If you include a label, you must include the custom amount.
Trait Implementations§
source§impl Clone for BreakdownBuilder
impl Clone for BreakdownBuilder
source§fn clone(&self) -> BreakdownBuilder
fn clone(&self) -> BreakdownBuilder
Returns a copy 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 more