pub struct Catalog<'a> { /* private fields */ }Implementations§
Source§impl<'a> Catalog<'a>
impl<'a> Catalog<'a>
Sourcepub async fn list(
self,
list_parameters: Option<Vec<(String, String)>>,
) -> Result<SquareResponse, SquareError>
pub async fn list( self, list_parameters: Option<Vec<(String, String)>>, ) -> Result<SquareResponse, SquareError>
Returns a list of all CatalogObjectss of the specified types in the catalog.
Sourcepub async fn upsert_object(
self,
object: ObjectUpsertRequest,
) -> Result<SquareResponse, SquareError>
pub async fn upsert_object( self, object: ObjectUpsertRequest, ) -> Result<SquareResponse, SquareError>
Creates or updates the target CatalogObject.
Sourcepub async fn delete_object(
self,
object_id: String,
) -> Result<SquareResponse, SquareError>
pub async fn delete_object( self, object_id: String, ) -> Result<SquareResponse, SquareError>
Deletes a single CatalogObject based on the provided ID and returns the set of successfully deleted IDs in the response.
Sourcepub async fn retrieve_object(
self,
object_id: String,
parameters: Option<Vec<(String, String)>>,
) -> Result<SquareResponse, SquareError>
pub async fn retrieve_object( self, object_id: String, parameters: Option<Vec<(String, String)>>, ) -> Result<SquareResponse, SquareError>
Returns a single CatalogItem as a CatalogObject based on the provided ID.
Sourcepub async fn batch_retrieve_object(
self,
body: BatchRetrieveObjects,
) -> Result<SquareResponse, SquareError>
pub async fn batch_retrieve_object( self, body: BatchRetrieveObjects, ) -> Result<SquareResponse, SquareError>
Returns a set of CatalogObjects based on the provided ID. Open in API Reference
Sourcepub async fn search_objects(
self,
search_body: SearchCatalogObjectsBody,
) -> Result<SquareResponse, SquareError>
pub async fn search_objects( self, search_body: SearchCatalogObjectsBody, ) -> Result<SquareResponse, SquareError>
Searches for CatalogObject of any type by matching supported search attribute values, excluding custom attribute values on items or item variations, against one or more of the specified query filters.
Sourcepub async fn info(self) -> Result<SquareResponse, SquareError>
pub async fn info(self) -> Result<SquareResponse, SquareError>
Retrieves information about the Square Catalog API, such
as batch size limits that can be used by the BatchUpsertCatalogObjects endpoint.
Sourcepub async fn search_items(
self,
search_query: SearchCatalogItemsBody,
) -> Result<SquareResponse, SquareError>
pub async fn search_items( self, search_query: SearchCatalogItemsBody, ) -> Result<SquareResponse, SquareError>
Retrieves information about the Square Catalog API, such
as batch size limits that can be used by the BatchUpsertCatalogObjects endpoint.