pub struct PriceUpdate<'a> { /* private fields */ }Expand description
Request builder for updating a price in Paddle API.
Implementations§
Source§impl<'a> PriceUpdate<'a>
impl<'a> PriceUpdate<'a>
pub fn new(client: &'a Paddle, price_id: impl Into<PriceID>) -> Self
Sourcepub fn description(
&mut self,
description: impl Into<Nullable<String>>,
) -> &mut Self
pub fn description( &mut self, description: impl Into<Nullable<String>>, ) -> &mut Self
Update the price description.
Sourcepub fn catalog_type(
&mut self,
catalog_type: impl Into<Nullable<CatalogType>>,
) -> &mut Self
pub fn catalog_type( &mut self, catalog_type: impl Into<Nullable<CatalogType>>, ) -> &mut Self
Update the price type.
Sourcepub fn name(&mut self, name: impl Into<Nullable<String>>) -> &mut Self
pub fn name(&mut self, name: impl Into<Nullable<String>>) -> &mut Self
Update the price name. Name is shown to customers at checkout and on invoices. Typically describes how often the related product bills.
Sourcepub fn billing_cycle(
&mut self,
billing_cycle: impl Into<Nullable<Duration>>,
) -> &mut Self
pub fn billing_cycle( &mut self, billing_cycle: impl Into<Nullable<Duration>>, ) -> &mut Self
Update how often this price should be charged.
Sourcepub fn trial_period(
&mut self,
trial_period: impl Into<Nullable<Duration>>,
) -> &mut Self
pub fn trial_period( &mut self, trial_period: impl Into<Nullable<Duration>>, ) -> &mut Self
Update the trial period for the product related to this price.
Sourcepub fn tax_mode(&mut self, tax_mode: impl Into<Nullable<TaxMode>>) -> &mut Self
pub fn tax_mode(&mut self, tax_mode: impl Into<Nullable<TaxMode>>) -> &mut Self
Update how tax is calculated for this price.
Sourcepub fn unit_price(
&mut self,
unit_price: impl Into<Nullable<Money>>,
) -> &mut Self
pub fn unit_price( &mut self, unit_price: impl Into<Nullable<Money>>, ) -> &mut Self
Update the base price. This price applies to all customers, except for customers located in countries where you have unit_price_overrides.
Sourcepub fn add_unit_price_override(
&mut self,
country_codes: impl IntoIterator<Item = CountryCodeSupported>,
amount: u64,
currency: CurrencyCode,
) -> &mut Self
pub fn add_unit_price_override( &mut self, country_codes: impl IntoIterator<Item = CountryCodeSupported>, amount: u64, currency: CurrencyCode, ) -> &mut Self
Use to override the base price with a custom price and currency for a country or group of countries.
Sourcepub fn set_unit_price_overrides(
&mut self,
overrides: impl Into<Nullable<Vec<UnitPriceOverride>>>,
) -> &mut Self
pub fn set_unit_price_overrides( &mut self, overrides: impl Into<Nullable<Vec<UnitPriceOverride>>>, ) -> &mut Self
Use to override the base price with a custom price and currency for a country or group of countries.
Sourcepub fn quantity(
&mut self,
quantity: impl Into<Nullable<PriceQuantity>>,
) -> &mut Self
pub fn quantity( &mut self, quantity: impl Into<Nullable<PriceQuantity>>, ) -> &mut Self
Update how many times the related product can be purchased at this price.
Sourcepub fn status(&mut self, status: impl Into<Nullable<Status>>) -> &mut Self
pub fn status(&mut self, status: impl Into<Nullable<Status>>) -> &mut Self
Update whether this entity can be used in Paddle.