square_api_client/models/
upsert_catalog_object_request.rs

1//! Request struct for the Upsert Catalog Object API
2
3use serde::Serialize;
4
5use super::CatalogObject;
6
7/// This is a model struct for UpsertCatalogObjectRequest type.
8#[derive(Clone, Debug, Default, Eq, PartialEq, Serialize)]
9pub struct UpsertCatalogObjectRequest {
10    /// A value you specify that uniquely identifies this request among all your requests. A common
11    /// way to create a valid idempotency key is to use a Universally unique identifier (UUID).
12    ///
13    /// If you're unsure whether a particular request was successful, you can reattempt it with the
14    /// same idempotency key without worrying about creating duplicate objects.
15    ///
16    /// See [Idempotency](https://developer.squareup.com/docs/basics/api101/idempotency) for more
17    /// information.
18    pub idempotency_key: String,
19    /// A CatalogObject to be created or updated.
20    ///
21    /// * For updates, the object must be active (the `is_deleted` field is not `true`).
22    /// * For creates, the object ID must start with `#`. The provided ID is replaced with a
23    ///   server-generated ID.
24    pub object: CatalogObject,
25}