square_api_client/models/
catalog_image.rs

1//! Model struct for CatalogImage type.
2
3use serde::{Deserialize, Serialize};
4
5/// An image file to use in Square catalogs.
6///
7/// It can be associated with `CatalogItem`, `CatalogItemVariation`, `CatalogCategory`, and
8/// `CatalogModifierList` objects. Only the images on items and item variations are exposed in
9/// Dashboard. Only the first image on an item is displayed in Square Point of Sale (SPOS). Images
10/// on items and variations are displayed through Square Online Store. Images on other object types
11/// are for use by 3rd party application developers.
12#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
13pub struct CatalogImage {
14    /// The internal name to identify this image in calls to the Square API. This is a searchable
15    /// attribute for use in applicable query filters using the
16    /// [SearchCatalogObjects](https://developer.squareup.com/reference/square/catalog-api/search-catalog-objects).
17    /// It is not unique and should not be shown in a buyer facing context.
18    pub name: Option<String>,
19    /// The URL of this image, generated by Square after an image is uploaded using the
20    /// [CreateCatalogImage](https://developer.squareup.com/reference/square/catalog-api/create-catalog-image)
21    /// endpoint. To modify the image, use the UpdateCatalogImage endpoint. Do not change the URL
22    /// field.
23    pub url: Option<String>,
24    /// A caption that describes what is shown in the image. Displayed in the Square Online Store.
25    /// This is a searchable attribute for use in applicable query filters using the
26    /// [SearchCatalogObjects](https://developer.squareup.com/reference/square/catalog-api/search-catalog-objects).
27    pub caption: Option<String>,
28    /// The immutable order ID for this image object created by the Photo Studio service in Square
29    /// Online Store.
30    pub photo_studio_order_id: Option<String>,
31}