/// <summary> /// Initializes a new instance of the <see cref="UpsertCatalogObjectRequest" /> class. /// </summary> /// <param name="IdempotencyKey">A value you specify that uniquely identifies this request among all your requests. A common way to create a valid idempotency key is to use a Universally unique identifier (UUID). If you're unsure whether a particular request was successful, you can reattempt it with the same idempotency key without worrying about creating duplicate objects. See [Idempotency](/basics/api101/idempotency) for more information. (required).</param> /// <param name="_Object">A [CatalogObject](#type-catalogobject) to be created or updated. The object's `is_deleted` field must not be set to `true`. When creating a new object, the object's ID must either start with a `#` character or be left blank. In either case it will be replaced with a server-generated ID. (required).</param> public UpsertCatalogObjectRequest(string IdempotencyKey = default(string), CatalogObject _Object = default(CatalogObject)) { // to ensure "IdempotencyKey" is required (not null) if (IdempotencyKey == null) { throw new InvalidDataException("IdempotencyKey is a required property for UpsertCatalogObjectRequest and cannot be null"); } else { this.IdempotencyKey = IdempotencyKey; } // to ensure "_Object" is required (not null) if (_Object == null) { throw new InvalidDataException("_Object is a required property for UpsertCatalogObjectRequest and cannot be null"); } else { this._Object = _Object; } }
/// <summary> /// Initializes a new instance of the <see cref="UpsertCatalogObjectResponse" /> class. /// </summary> /// <param name="Errors">The set of [Error](#type-error)s encountered..</param> /// <param name="CatalogObject">The created [CatalogObject](#type-catalogobject)..</param> /// <param name="IdMappings">The mapping between client and server IDs for this Upsert..</param> public UpsertCatalogObjectResponse(List <Error> Errors = default(List <Error>), CatalogObject CatalogObject = default(CatalogObject), List <CatalogIdMapping> IdMappings = default(List <CatalogIdMapping>)) { this.Errors = Errors; this.CatalogObject = CatalogObject; this.IdMappings = IdMappings; }
/// <summary> /// Initializes a new instance of the <see cref="CreateCatalogImageResponse" /> class. /// </summary> /// <param name="Errors">Information on any errors encountered..</param> /// <param name="Image">The newly created `CatalogImage` including a Square-generated URL for each image..</param> public CreateCatalogImageResponse(List <Error> Errors = default(List <Error>), CatalogObject Image = default(CatalogObject)) { this.Errors = Errors; this.Image = Image; }
/// <summary> /// Initializes a new instance of the <see cref="CreateCatalogImageRequest" /> class. /// </summary> /// <param name="IdempotencyKey">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](https://developer.squareup.com/docs/basics/api101/idempotency) for more information. (required).</param> /// <param name="ObjectId">Unique ID of the `CatalogObject` to attach to this `CatalogImage`. Leave this field empty to create unattached images, for example if you are building an integration where these images can be attached to catalog items at a later time..</param> /// <param name="Image">The new `IMAGE`-type `CatalogObject` to be attached to this `CatalogImage`. If the `CatalogObject` already has a `CatalogImage`, this call will overwrite it..</param> public CreateCatalogImageRequest(string IdempotencyKey = default(string), string ObjectId = default(string), CatalogObject Image = default(CatalogObject)) { // to ensure "IdempotencyKey" is required (not null) if (IdempotencyKey == null) { throw new InvalidDataException("IdempotencyKey is a required property for CreateCatalogImageRequest and cannot be null"); } else { this.IdempotencyKey = IdempotencyKey; } this.ObjectId = ObjectId; this.Image = Image; }
/// <summary> /// Initializes a new instance of the <see cref="RetrieveCatalogObjectResponse" /> class. /// </summary> /// <param name="Errors">The set of [Error](#type-error)s encountered..</param> /// <param name="_Object">The [CatalogObject](#type-catalogobject)s returned..</param> /// <param name="RelatedObjects">A list of [CatalogObject](#type-catalogobject)s referenced by the object in the `object` field..</param> public RetrieveCatalogObjectResponse(List <Error> Errors = default(List <Error>), CatalogObject _Object = default(CatalogObject), List <CatalogObject> RelatedObjects = default(List <CatalogObject>)) { this.Errors = Errors; this._Object = _Object; this.RelatedObjects = RelatedObjects; }