pub struct ProductsList<'a> { /* private fields */ }
Expand description
Request builder for fetching products from Paddle API.
Implementations§
Source§impl<'a> ProductsList<'a>
impl<'a> ProductsList<'a>
pub fn new(client: &'a Paddle) -> Self
Sourcepub fn after(&mut self, product_id: impl Into<ProductID>) -> &mut Self
pub fn after(&mut self, product_id: impl Into<ProductID>) -> &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,
product_ids: impl IntoIterator<Item = impl Into<ProductID>>,
) -> &mut Self
pub fn ids( &mut self, product_ids: impl IntoIterator<Item = impl Into<ProductID>>, ) -> &mut Self
Return only the IDs specified.
Sourcepub fn include(
&mut self,
entities: impl IntoIterator<Item = impl AsRef<str>>,
) -> &mut Self
pub fn include( &mut self, entities: impl IntoIterator<Item = impl AsRef<str>>, ) -> &mut Self
Include related entities in the response. Valid values are: “prices”.
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: created_at
, custom_data
, description
, id
, image_url
, name
, status
, tax_category
, and updated_at
.
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: created_at
, custom_data
, description
, id
, image_url
, name
, status
, tax_category
, and updated_at
.
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 status(&mut self, status: Status) -> &mut Self
pub fn status(&mut self, status: Status) -> &mut Self
Return entities that match the specified status.
Sourcepub fn tax_category(
&mut self,
tax_categories: impl IntoIterator<Item = TaxCategory>,
) -> &mut Self
pub fn tax_category( &mut self, tax_categories: impl IntoIterator<Item = TaxCategory>, ) -> &mut Self
Return entities that match the specified tax categories.
Sourcepub fn catalog_type(&mut self, catalog_type: CatalogType) -> &mut Self
pub fn catalog_type(&mut self, catalog_type: CatalogType) -> &mut Self
Return entities that match the specified catalog type.