pub struct PricesList<'a> { /* private fields */ }Expand description
Request builder for fetching prices from Paddle API.
Implementations§
Source§impl<'a> PricesList<'a>
impl<'a> PricesList<'a>
pub fn new(client: &'a Paddle) -> Self
Sourcepub fn after(&mut self, price_id: impl Into<PriceID>) -> &mut Self
pub fn after(&mut self, price_id: impl Into<PriceID>) -> &mut Self
Return entities after the specified Paddle ID when working with paginated endpoints. Used in the meta.pagination.next URL in responses for list operations.
Sourcepub fn ids(
&mut self,
price_ids: impl IntoIterator<Item = impl Into<PriceID>>,
) -> &mut Self
pub fn ids( &mut self, price_ids: impl IntoIterator<Item = impl Into<PriceID>>, ) -> &mut Self
Return only the IDs specified.
Sourcepub fn include(
&mut self,
includes: impl IntoIterator<Item = impl Into<String>>,
) -> &mut Self
pub fn include( &mut self, includes: impl IntoIterator<Item = impl Into<String>>, ) -> &mut Self
Include related entities in the response. Valid values are: “product”.
Sourcepub fn order_by_asc(&mut self, field: &str) -> &mut Self
pub fn order_by_asc(&mut self, field: &str) -> &mut Self
Order returned entities by the specified field. Valid fields for ordering: billing_cycle.frequency, billing_cycle.interval, id, product_id, quantity.maximum, quantity.minimum, status, tax_mode, unit_price.amount, and unit_price.currency_code
Sourcepub fn order_by_desc(&mut self, field: &str) -> &mut Self
pub fn order_by_desc(&mut self, field: &str) -> &mut Self
Order returned entities by the specified field. Valid fields for ordering: billing_cycle.frequency, billing_cycle.interval, id, product_id, quantity.maximum, quantity.minimum, status, tax_mode, unit_price.amount, and unit_price.currency_code
Sourcepub fn per_page(&mut self, entities_per_page: usize) -> &mut Self
pub fn per_page(&mut self, entities_per_page: usize) -> &mut Self
Set how many entities are returned per page. Paddle returns the maximum number of results if a number greater than the maximum is requested.
Check meta.pagination.per_page in the response to see how many were returned.
Default: 50; Maximum: 200.
Sourcepub fn product_ids(
&mut self,
product_ids: impl IntoIterator<Item = impl Into<ProductID>>,
) -> &mut Self
pub fn product_ids( &mut self, product_ids: impl IntoIterator<Item = impl Into<ProductID>>, ) -> &mut Self
Return only prices for the specified product IDs.
Sourcepub fn status(&mut self, status: Status) -> &mut Self
pub fn status(&mut self, status: Status) -> &mut Self
Return only prices with the specified status.
Sourcepub fn recurring(&mut self, value: bool) -> &mut Self
pub fn recurring(&mut self, value: bool) -> &mut Self
Determine whether returned entities are for recurring prices (true) or one-time prices (false)
Sourcepub fn type(&mut self, catalog_type: CatalogType) -> &mut Self
pub fn type(&mut self, catalog_type: CatalogType) -> &mut Self
Return only prices with the specified type.