예제 #1
0
 /// <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&#39;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&#39;s &#x60;is_deleted&#x60; field must not be set to &#x60;true&#x60;. When creating a new object, the object&#39;s ID must either start with a &#x60;#&#x60; 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;
 }
예제 #3
0
 /// <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 &#x60;CatalogImage&#x60; 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 &#x60;CatalogObject&#x60; to attach to this &#x60;CatalogImage&#x60;. 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 &#x60;IMAGE&#x60;-type &#x60;CatalogObject&#x60; to be attached to this &#x60;CatalogImage&#x60;. If the &#x60;CatalogObject&#x60; already has a &#x60;CatalogImage&#x60;, 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 &#x60;object&#x60; 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;
 }