square_api_client/models/search_catalog_items_request.rs
1//! Request struct for the Search Catalog Items API
2
3use serde::Serialize;
4
5use super::enums::{SearchCatalogItemsRequestStockLevel, SortOrder};
6
7/// This is a model struct for SearchCatalogItemsRequest type.
8#[derive(Clone, Debug, Default, Eq, PartialEq, Serialize)]
9pub struct SearchCatalogItemsRequest {
10 /// The text filter expression to return items or item variations containing specified text in
11 /// the `name`, `description`, or `abbreviation` attribute value of an item, or in the `name`,
12 /// `sku`, or `upc` attribute value of an item variation.
13 pub text_filter: Option<String>,
14 /// The category id query expression to return items containing the specified category IDs.
15 pub category_ids: Option<Vec<String>>,
16 /// The stock-level query expression to return item variations with the specified stock levels.
17 pub stock_levels: Option<Vec<SearchCatalogItemsRequestStockLevel>>,
18 /// The enabled-location query expression to return items and item variations having specified
19 /// enabled locations.
20 pub enabled_location_ids: Option<Vec<String>>,
21 /// The pagination token, returned in the previous response, used to fetch the next batch of
22 /// pending results.
23 pub cursor: Option<String>,
24 /// The maximum number of results to return per page. The default value is 100.
25 ///
26 /// Max 100
27 pub limit: Option<i32>,
28 /// The order to sort the results by item names. The default sort order is ascending (`ASC`).
29 pub sort_order: Option<SortOrder>,
30}