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,
) -> TransactionItemNonCatalogPrice
pub fn new( description: impl Into<String>, amount: u64, currency: CurrencyCode, ) -> TransactionItemNonCatalogPrice
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>) -> TransactionItemNonCatalogPrice
pub fn name(self, name: impl Into<String>) -> TransactionItemNonCatalogPrice
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,
) -> TransactionItemNonCatalogPrice
pub fn billing_cycle( self, billing_cycle: Duration, ) -> TransactionItemNonCatalogPrice
How often this price should be charged.
Sourcepub fn trial_period(
self,
trial_period: Duration,
) -> TransactionItemNonCatalogPrice
pub fn trial_period( self, trial_period: Duration, ) -> TransactionItemNonCatalogPrice
Trial period for the product related to this price. The billing cycle begins once the trial period is over.
Sourcepub fn tax_mode(self, tax_mode: TaxMode) -> TransactionItemNonCatalogPrice
pub fn tax_mode(self, tax_mode: TaxMode) -> TransactionItemNonCatalogPrice
How tax is calculated for this price.
Sourcepub fn add_unit_price_override(
self,
country_codes: impl IntoIterator<Item = CountryCodeSupported>,
amount: u64,
currency: CurrencyCode,
) -> TransactionItemNonCatalogPrice
pub fn add_unit_price_override( self, country_codes: impl IntoIterator<Item = CountryCodeSupported>, amount: u64, currency: CurrencyCode, ) -> TransactionItemNonCatalogPrice
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>,
) -> TransactionItemNonCatalogPrice
pub fn set_unit_price_overrides( self, overrides: Vec<UnitPriceOverride>, ) -> TransactionItemNonCatalogPrice
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) -> TransactionItemNonCatalogPrice
pub fn quantity(self, quantity: PriceQuantity) -> TransactionItemNonCatalogPrice
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) -> TransactionItemNonCatalogPrice
pub fn custom_data(self, custom_data: Value) -> TransactionItemNonCatalogPrice
Your own structured key-value data.
Sourcepub fn product_id(
self,
product_id: impl Into<ProductID>,
) -> TransactionItemNonCatalogPrice
pub fn product_id( self, product_id: impl Into<ProductID>, ) -> TransactionItemNonCatalogPrice
Paddle ID of the product that this price is for, prefixed with prd_.
Sourcepub fn product(
self,
product: TransactionSubscriptionProductCreate,
) -> TransactionItemNonCatalogPrice
pub fn product( self, product: TransactionSubscriptionProductCreate, ) -> TransactionItemNonCatalogPrice
Product object for a non-catalog item to charge for.
Setting a non-catalog product to this price will override the catalog product id.