pub struct CreateCatalogImageRequest {
pub idempotency_key: String,
pub object_id: Option<String>,
pub image: CatalogObject,
pub is_primary: Option<bool>,
}
Expand description
This is a model class for CreateCatalogImageRequest type.
Fields
idempotency_key: String
A unique string that identifies this CreateCatalogImage request. Keys can be any valid string but must be unique for every CreateCatalogImage request.
See Idempotency keys for more information.
object_id: Option<String>
Unique ID of the CatalogObject
to attach this CatalogImage
object to. Leave this field
empty to create unattached images, for example if you are building an integration where an
image can be attached to catalog items at a later time.
image: CatalogObject
The new CatalogObject
of the IMAGE
type, namely, a CatalogImage
object, to encapsulate
the specified image file.
is_primary: Option<bool>
If this is set to true
, the image created will be the primary, or first image of the
object referenced by object_id
. If the CatalogObject
already has a primary
CatalogImage
, setting this field to true
will replace the primary image. If this is set
to false
and you use the Square API version 2021-12-15 or later, the image id will be
appended to the list of image_ids
on the object.
With Square API version 2021-12-15 or later, the default value is false
. Otherwise, the
effective default value is true
.
Trait Implementations
sourceimpl Clone for CreateCatalogImageRequest
impl Clone for CreateCatalogImageRequest
sourcefn clone(&self) -> CreateCatalogImageRequest
fn clone(&self) -> CreateCatalogImageRequest
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for CreateCatalogImageRequest
impl Debug for CreateCatalogImageRequest
sourceimpl Default for CreateCatalogImageRequest
impl Default for CreateCatalogImageRequest
sourcefn default() -> CreateCatalogImageRequest
fn default() -> CreateCatalogImageRequest
sourceimpl PartialEq<CreateCatalogImageRequest> for CreateCatalogImageRequest
impl PartialEq<CreateCatalogImageRequest> for CreateCatalogImageRequest
sourcefn eq(&self, other: &CreateCatalogImageRequest) -> bool
fn eq(&self, other: &CreateCatalogImageRequest) -> bool
sourceimpl Serialize for CreateCatalogImageRequest
impl Serialize for CreateCatalogImageRequest
impl Eq for CreateCatalogImageRequest
impl StructuralEq for CreateCatalogImageRequest
impl StructuralPartialEq for CreateCatalogImageRequest
Auto Trait Implementations
impl RefUnwindSafe for CreateCatalogImageRequest
impl Send for CreateCatalogImageRequest
impl Sync for CreateCatalogImageRequest
impl Unpin for CreateCatalogImageRequest
impl UnwindSafe for CreateCatalogImageRequest
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.