From f9dab7f959e066d0a1526a41808d1c2e0d3f4aee Mon Sep 17 00:00:00 2001 From: Shao-Fu Sung <20245766+shaofu88@users.noreply.github.com> Date: Fri, 29 Mar 2019 11:35:47 -0700 Subject: [PATCH] Release 2.20190327.1 (#49) --- CHANGES.md | 5 +++++ docs/CatalogItem.md | 2 +- docs/CatalogObject.md | 1 + package.json | 2 +- src/ApiClient.js | 4 ++-- src/index.js | 2 +- src/model/CatalogItem.js | 2 +- src/model/CatalogObject.js | 9 +++++++++ 8 files changed, 21 insertions(+), 6 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index a4de2ab..bb68383 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,10 @@ # Change Log +## Version 2.20190327.1 (2019-03-29) + +## Bug Fix: Catalog API +* Add `image_id` to `CatalogObject` + ## Version 2.20190327.0 (2019-03-27) ## New features: Catalog API diff --git a/docs/CatalogItem.md b/docs/CatalogItem.md index a02736e..f3e813c 100644 --- a/docs/CatalogItem.md +++ b/docs/CatalogItem.md @@ -17,7 +17,7 @@ Name | Type | Description | Notes **category_id** | **String** | The ID of the item's category, if any. | [optional] **tax_ids** | **[String]** | A set of IDs indicating the [CatalogTax](#type-catalogtax)es that are enabled for this item. When updating an item, any taxes listed here will be added to the item. [CatalogTax](#type-catalogtax)es may also be added to or deleted from an item using `UpdateItemTaxes`. | [optional] **modifier_list_info** | [**[CatalogItemModifierListInfo]**](CatalogItemModifierListInfo.md) | A set of [CatalogItemModifierListInfo](#type-catalogitemmodifierlistinfo) objects representing the modifier lists that apply to this item, along with the overrides and min and max limits that are specific to this item. [CatalogModifierList](#type-catalogmodifierlist)s may also be added to or deleted from an item using `UpdateItemModifierLists`. | [optional] -**image_url** | **String** | __Deprecated__. The URL of an image representing this item. Deprecated in favor of `image_data` in [`CatalogObject`](#type-catalogobject). | [optional] +**image_url** | **String** | __Deprecated__. The URL of an image representing this item. Deprecated in favor of `image_id` in [`CatalogObject`](#type-catalogobject). | [optional] **variations** | [**[CatalogObject]**](CatalogObject.md) | A list of [CatalogObject](#type-catalogobject)s containing the [CatalogItemVariation](#type-catalogitemvariation)s for this item. | [optional] **product_type** | **String** | The product type of the item. May not be changed once an item has been created. Only items of product type `REGULAR` may be created by this API; items with other product types are read-only. See [CatalogItemProductType](#type-catalogitemproducttype) for possible values | [optional] **skip_modifier_screen** | **Boolean** | If `false`, the Square Point of Sale app will present the [CatalogItem](#type-catalogitem)'s details screen immediately, allowing the merchant to choose [CatalogModifier](#type-catalogmodifier)s before adding the item to the cart. This is the default behavior. If `true`, the Square Point of Sale app will immediately add the item to the cart with the pre-selected modifiers, and merchants can edit modifiers by drilling down onto the item's details. Third-party clients are encouraged to implement similar behaviors. | [optional] diff --git a/docs/CatalogObject.md b/docs/CatalogObject.md index c98c7a3..1a08f7a 100644 --- a/docs/CatalogObject.md +++ b/docs/CatalogObject.md @@ -16,6 +16,7 @@ Name | Type | Description | Notes **present_at_all_locations** | **Boolean** | If `true`, this object is present at all locations (including future locations), except where specified in the `absent_at_location_ids` field. If `false`, this object is not present at any locations (including future locations), except where specified in the `present_at_location_ids` field. If not specified, defaults to `true`. | [optional] **present_at_location_ids** | **[String]** | A list of locations where the object is present, even if `present_at_all_locations` is `false`. | [optional] **absent_at_location_ids** | **[String]** | A list of locations where the object is not present, even if `present_at_all_locations` is `true`. | [optional] +**image_id** | **String** | Identifies the `CatalogImage` attached to this `CatalogObject`. | [optional] **item_data** | [**CatalogItem**](CatalogItem.md) | Structured data for a [CatalogItem](#type-catalogitem), set for CatalogObjects of type `ITEM`. | [optional] **category_data** | [**CatalogCategory**](CatalogCategory.md) | Structured data for a [CatalogCategory](#type-catalogcategory), set for CatalogObjects of type `CATEGORY`. | [optional] **item_variation_data** | [**CatalogItemVariation**](CatalogItemVariation.md) | Structured data for a [CatalogItemVariation](#type-catalogitemvariation), set for CatalogObjects of type `ITEM_VARIATION`. | [optional] diff --git a/package.json b/package.json index dccb0ed..422b9df 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "square-connect", - "version": "2.20190327.0", + "version": "2.20190327.1", "description": "JavaScript client library for the Square Connect v2 API", "keywords": [ "square", diff --git a/src/ApiClient.js b/src/ApiClient.js index a1c96ce..46c7635 100644 --- a/src/ApiClient.js +++ b/src/ApiClient.js @@ -16,7 +16,7 @@ var querystring = require('querystring'); /** * @module ApiClient - * @version 2.20190327.0 + * @version 2.20190327.1 */ /** @@ -48,7 +48,7 @@ var exports = function() { * @default {} */ this.defaultHeaders = { - 'User-Agent': 'Square-Connect-Javascript/2.20190327.0' + 'User-Agent': 'Square-Connect-Javascript/2.20190327.1' }; /** * The default HTTP timeout for all API calls. diff --git a/src/index.js b/src/index.js index af6459e..6623539 100644 --- a/src/index.js +++ b/src/index.js @@ -461,7 +461,7 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * *

* @module index - * @version 2.20190327.0 + * @version 2.20190327.1 */ module.exports = { /** diff --git a/src/model/CatalogItem.js b/src/model/CatalogItem.js index 86a5c3d..0264024 100644 --- a/src/model/CatalogItem.js +++ b/src/model/CatalogItem.js @@ -156,7 +156,7 @@ exports.prototype['tax_ids'] = undefined; */ exports.prototype['modifier_list_info'] = undefined; /** - * __Deprecated__. The URL of an image representing this item. Deprecated in favor of `image_data` in [`CatalogObject`](#type-catalogobject). + * __Deprecated__. The URL of an image representing this item. Deprecated in favor of `image_id` in [`CatalogObject`](#type-catalogobject). * @member {String} image_url */ exports.prototype['image_url'] = undefined; diff --git a/src/model/CatalogObject.js b/src/model/CatalogObject.js index 0924b2d..1c60bc6 100644 --- a/src/model/CatalogObject.js +++ b/src/model/CatalogObject.js @@ -58,6 +58,7 @@ var exports = function(type, id) { + }; /** @@ -97,6 +98,9 @@ exports.constructFromObject = function(data, obj) { } if (data.hasOwnProperty('absent_at_location_ids')) { obj['absent_at_location_ids'] = ApiClient.convertToType(data['absent_at_location_ids'], ['String']); + } + if (data.hasOwnProperty('image_id')) { + obj['image_id'] = ApiClient.convertToType(data['image_id'], 'String'); } if (data.hasOwnProperty('item_data')) { obj['item_data'] = CatalogItem.constructFromObject(data['item_data']); @@ -171,6 +175,11 @@ exports.prototype['present_at_location_ids'] = undefined; * @member {Array.} absent_at_location_ids */ exports.prototype['absent_at_location_ids'] = undefined; +/** + * Identifies the `CatalogImage` attached to this `CatalogObject`. + * @member {String} image_id + */ +exports.prototype['image_id'] = undefined; /** * Structured data for a [CatalogItem](#type-catalogitem), set for CatalogObjects of type `ITEM`. * @member {module:model/CatalogItem} item_data