pub struct TransactionItemNonCatalogPrice { /* private fields */ }Expand description
Price object for a non-catalog item to charge for.
Can be for existing products, or you can pass a product object as part of your price to charge for a non-catalog product.
Implementations§
Source§impl TransactionItemNonCatalogPrice
impl TransactionItemNonCatalogPrice
Sourcepub fn new(
description: impl Into<String>,
amount: u64,
currency: CurrencyCode,
) -> Self
pub fn new( description: impl Into<String>, amount: u64, currency: CurrencyCode, ) -> Self
Create new price object for non-catalog item.
description- Internal description for this price, not shown to customers. Typically notes for your team.amount- Amount in the lowest denomination for the currency, e.g. 10 USD = 1000 (cents). Although represented as a string, this value must be a valid integer.currency- Currency code.
Sourcepub fn name(self, name: impl Into<String>) -> Self
pub fn name(self, name: impl Into<String>) -> Self
Name of this price, shown to customers at checkout and on invoices. Typically describes how often the related product bills.
Sourcepub fn billing_cycle(self, billing_cycle: Duration) -> Self
pub fn billing_cycle(self, billing_cycle: Duration) -> Self
How often this price should be charged.
Sourcepub fn trial_period(self, trial_period: Duration) -> Self
pub fn trial_period(self, trial_period: Duration) -> Self
Trial period for the product related to this price. The billing cycle begins once the trial period is over.
Sourcepub fn add_unit_price_override(
self,
country_codes: impl IntoIterator<Item = CountryCodeSupported>,
amount: u64,
currency: CurrencyCode,
) -> Self
pub fn add_unit_price_override( self, country_codes: impl IntoIterator<Item = CountryCodeSupported>, amount: u64, currency: CurrencyCode, ) -> Self
Use to override the base price with a custom price and currency for a country or group of countries. See UnitPriceOverride for more information. See CountryCodeSupported for more information. See Money for more information. See CurrencyCode for more information.
Sourcepub fn set_unit_price_overrides(self, overrides: Vec<UnitPriceOverride>) -> Self
pub fn set_unit_price_overrides(self, overrides: Vec<UnitPriceOverride>) -> Self
Use to override the base price with a custom price and currency for a country or group of countries.
This will replace any existing overrides.
Use add_unit_price_override to add additional overrides.
See UnitPriceOverride for more information.
See CountryCodeSupported for more information.
See Money for more information.
See CurrencyCode for more information.
Sourcepub fn quantity(self, quantity: PriceQuantity) -> Self
pub fn quantity(self, quantity: PriceQuantity) -> Self
Limits on how many times the related product can be purchased at this price. Useful for discount campaigns. If omitted, defaults to 1-100.
Sourcepub fn custom_data(self, custom_data: Value) -> Self
pub fn custom_data(self, custom_data: Value) -> Self
Your own structured key-value data.
Sourcepub fn product_id(self, product_id: impl Into<ProductID>) -> Self
pub fn product_id(self, product_id: impl Into<ProductID>) -> Self
Paddle ID of the product that this price is for, prefixed with prd_.
Sourcepub fn product(self, product: TransactionSubscriptionProductCreate) -> Self
pub fn product(self, product: TransactionSubscriptionProductCreate) -> Self
Product object for a non-catalog item to charge for.
Setting a non-catalog product to this price will override the catalog product id.