From c356e0f0dffa9afb0a343dbf832a8bda4f197ec8 Mon Sep 17 00:00:00 2001 From: Connect API Specification Generator <devplat-external-sdk-accounts@squareup.com> Date: Wed, 22 Apr 2020 22:16:09 +0000 Subject: [PATCH] Release 3.20200422.1 --- CHANGES.md | 8 ++++++++ docs/CustomerGroupsApi.md | 2 +- docs/CustomerSegmentsApi.md | 4 +--- docs/CustomersApi.md | 4 ++-- docs/ListCustomerSegmentsRequest.md | 1 - package.json | 2 +- src/ApiClient.js | 4 ++-- src/api/CustomerGroupsApi.js | 4 ++-- src/api/CustomerSegmentsApi.js | 5 +---- src/api/CustomersApi.js | 8 ++++---- src/index.js | 2 +- src/model/ListCustomerSegmentsRequest.js | 9 --------- 12 files changed, 23 insertions(+), 30 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index c2b7146..a81e3b9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,13 @@ # Change Log +## Version 3.20200422.1 (2020-04-22) +## API releases +* **Customer Segments API (beta).** `limit` field removed from **ListCustomerSegments** endpoint. + + +**Note:** This release fixes a bug introduced on the [April 22, 2020](changelog/connect-logs/2020-04-22) release of the Square API. + + ## Version 3.20200422.0 (2020-04-22) ## API releases * **Terminal API.** The new Terminal API lets a custom third-party POS app integrate with the Square Terminal to send terminal checkout requests to collect payments. diff --git a/docs/CustomerGroupsApi.md b/docs/CustomerGroupsApi.md index 2977d27..bdbbb0a 100644 --- a/docs/CustomerGroupsApi.md +++ b/docs/CustomerGroupsApi.md @@ -18,7 +18,7 @@ Method | HTTP request | Description CreateCustomerGroup -Creates a new customer group for a business. The request must include at least the `name` value of the group. +Creates a new customer group for a business. The request must include the `name` value of the group. ### Example ```javascript diff --git a/docs/CustomerSegmentsApi.md b/docs/CustomerSegmentsApi.md index ee32a69..5156a9a 100644 --- a/docs/CustomerSegmentsApi.md +++ b/docs/CustomerSegmentsApi.md @@ -29,8 +29,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new SquareConnect.CustomerSegmentsApi(); var opts = { - 'cursor': "cursor_example", // String | A pagination cursor returned by previous calls to __ListCustomerSegments__. Used to retrieve the next set of query results. See the [Pagination guide](https://developer.squareup.com/docs/docs/working-with-apis/pagination) for more information. - 'limit': 789 // Number | Sets the maximum number of results to be returned in a single page. Limit values outside the supported range are ignored. Minimum value: `1` Maximum value: `1,000` + 'cursor': "cursor_example" // String | A pagination cursor returned by previous calls to __ListCustomerSegments__. Used to retrieve the next set of query results. See the [Pagination guide](https://developer.squareup.com/docs/docs/working-with-apis/pagination) for more information. }; apiInstance.listCustomerSegments(opts).then(function(data) { console.log('API called successfully. Returned data: ' + data); @@ -45,7 +44,6 @@ apiInstance.listCustomerSegments(opts).then(function(data) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **cursor** | **String**| A pagination cursor returned by previous calls to __ListCustomerSegments__. Used to retrieve the next set of query results. See the [Pagination guide](https://developer.squareup.com/docs/docs/working-with-apis/pagination) for more information. | [optional] - **limit** | **Number**| Sets the maximum number of results to be returned in a single page. Limit values outside the supported range are ignored. Minimum value: `1` Maximum value: `1,000` | [optional] ### Return type diff --git a/docs/CustomersApi.md b/docs/CustomersApi.md index 6646306..5859fde 100644 --- a/docs/CustomersApi.md +++ b/docs/CustomersApi.md @@ -23,7 +23,7 @@ Method | HTTP request | Description AddGroupToCustomer -Adds a customer membership to a customer group. The customer is identified by the `customer_id` value and the customer group is identified by the `group_id` value. +Adds a group membership to a customer. The customer is identified by the `customer_id` value and the customer group is identified by the `group_id` value. ### Example ```javascript @@ -326,7 +326,7 @@ Name | Type | Description | Notes RemoveGroupFromCustomer -Removes a customer membership from a customer group. The customer is identified by the `customer_id` value and the customer group is identified by the `group_id` value. +Removes a group membership from a customer. The customer is identified by the `customer_id` value and the customer group is identified by the `group_id` value. ### Example ```javascript diff --git a/docs/ListCustomerSegmentsRequest.md b/docs/ListCustomerSegmentsRequest.md index 1cc8856..60d3190 100644 --- a/docs/ListCustomerSegmentsRequest.md +++ b/docs/ListCustomerSegmentsRequest.md @@ -9,6 +9,5 @@ Defines the valid parameters for requests to __ListCustomerSegments__. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **cursor** | **String** | A pagination cursor returned by previous calls to __ListCustomerSegments__. Used to retrieve the next set of query results. See the [Pagination guide](https://developer.squareup.com/docs/docs/working-with-apis/pagination) for more information. | [optional] -**limit** | **Number** | Sets the maximum number of results to be returned in a single page. Limit values outside the supported range are ignored. Minimum value: `1` Maximum value: `1,000` | [optional] diff --git a/package.json b/package.json index 95f28ab..5233be7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "square-connect", - "version": "3.20200422.0", + "version": "3.20200422.1", "description": "JavaScript client library for the Square Connect v2 API", "keywords": [ "square", diff --git a/src/ApiClient.js b/src/ApiClient.js index 6ce378e..55db7ad 100644 --- a/src/ApiClient.js +++ b/src/ApiClient.js @@ -17,7 +17,7 @@ var HeaderUtils = require('./lib/HeaderUtils'); /** * @module ApiClient - * @version 3.20200422.0 + * @version 3.20200422.1 */ /** @@ -49,7 +49,7 @@ var exports = function() { * @default {} */ this.defaultHeaders = { - 'User-Agent': 'Square-Connect-Javascript/3.20200422.0' + 'User-Agent': 'Square-Connect-Javascript/3.20200422.1' }; /** * The default HTTP timeout for all API calls. diff --git a/src/api/CustomerGroupsApi.js b/src/api/CustomerGroupsApi.js index ec7169d..b45aa06 100644 --- a/src/api/CustomerGroupsApi.js +++ b/src/api/CustomerGroupsApi.js @@ -40,7 +40,7 @@ module.exports = function(apiClient) { /** * CreateCustomerGroup * Note: This endpoint is in beta. - * Creates a new customer group for a business. The request must include at least the `name` value of the group. + * Creates a new customer group for a business. The request must include the `name` value of the group. * @param {module:model/CreateCustomerGroupRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CreateCustomerGroupResponse} and HTTP response */ @@ -78,7 +78,7 @@ module.exports = function(apiClient) { /** * CreateCustomerGroup - * Creates a new customer group for a business. The request must include at least the `name` value of the group. + * Creates a new customer group for a business. The request must include the `name` value of the group. * @param {module:model/CreateCustomerGroupRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CreateCustomerGroupResponse} */ diff --git a/src/api/CustomerSegmentsApi.js b/src/api/CustomerSegmentsApi.js index f1e9d98..dfa42c5 100644 --- a/src/api/CustomerSegmentsApi.js +++ b/src/api/CustomerSegmentsApi.js @@ -38,7 +38,6 @@ module.exports = function(apiClient) { * Retrieves the list of customer segments of a business. * @param {Object} opts Optional parameters * @param {String} opts.cursor A pagination cursor returned by previous calls to __ListCustomerSegments__. Used to retrieve the next set of query results. See the [Pagination guide](https://developer.squareup.com/docs/docs/working-with-apis/pagination) for more information. - * @param {Number} opts.limit Sets the maximum number of results to be returned in a single page. Limit values outside the supported range are ignored. Minimum value: `1` Maximum value: `1,000` * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListCustomerSegmentsResponse} and HTTP response */ this.listCustomerSegmentsWithHttpInfo = function(opts) { @@ -49,8 +48,7 @@ module.exports = function(apiClient) { var pathParams = { }; var queryParams = { - 'cursor': opts['cursor'], - 'limit': opts['limit'] + 'cursor': opts['cursor'] }; var headerParams = { }; @@ -76,7 +74,6 @@ module.exports = function(apiClient) { * Retrieves the list of customer segments of a business. * @param {Object} opts Optional parameters * @param {String} opts.cursor A pagination cursor returned by previous calls to __ListCustomerSegments__. Used to retrieve the next set of query results. See the [Pagination guide](https://developer.squareup.com/docs/docs/working-with-apis/pagination) for more information. - * @param {Number} opts.limit Sets the maximum number of results to be returned in a single page. Limit values outside the supported range are ignored. Minimum value: `1` Maximum value: `1,000` * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListCustomerSegmentsResponse} */ this.listCustomerSegments = function(opts) { diff --git a/src/api/CustomersApi.js b/src/api/CustomersApi.js index 6601885..4550612 100644 --- a/src/api/CustomersApi.js +++ b/src/api/CustomersApi.js @@ -47,7 +47,7 @@ module.exports = function(apiClient) { /** * AddGroupToCustomer * Note: This endpoint is in beta. - * Adds a customer membership to a customer group. The customer is identified by the `customer_id` value and the customer group is identified by the `group_id` value. + * Adds a group membership to a customer. The customer is identified by the `customer_id` value and the customer group is identified by the `group_id` value. * @param {String} customerId The ID of the customer to add to a group. * @param {String} groupId The ID of the customer group to add the customer to. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AddGroupToCustomerResponse} and HTTP response @@ -93,7 +93,7 @@ module.exports = function(apiClient) { /** * AddGroupToCustomer - * Adds a customer membership to a customer group. The customer is identified by the `customer_id` value and the customer group is identified by the `group_id` value. + * Adds a group membership to a customer. The customer is identified by the `customer_id` value and the customer group is identified by the `group_id` value. * @param {String} customerId The ID of the customer to add to a group. * @param {String} groupId The ID of the customer group to add the customer to. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AddGroupToCustomerResponse} @@ -392,7 +392,7 @@ module.exports = function(apiClient) { /** * RemoveGroupFromCustomer * Note: This endpoint is in beta. - * Removes a customer membership from a customer group. The customer is identified by the `customer_id` value and the customer group is identified by the `group_id` value. + * Removes a group membership from a customer. The customer is identified by the `customer_id` value and the customer group is identified by the `group_id` value. * @param {String} customerId The ID of the customer to remove from the group. * @param {String} groupId The ID of the customer group to remove the customer from. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RemoveGroupFromCustomerResponse} and HTTP response @@ -438,7 +438,7 @@ module.exports = function(apiClient) { /** * RemoveGroupFromCustomer - * Removes a customer membership from a customer group. The customer is identified by the `customer_id` value and the customer group is identified by the `group_id` value. + * Removes a group membership from a customer. The customer is identified by the `customer_id` value and the customer group is identified by the `group_id` value. * @param {String} customerId The ID of the customer to remove from the group. * @param {String} groupId The ID of the customer group to remove the customer from. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RemoveGroupFromCustomerResponse} diff --git a/src/index.js b/src/index.js index 2524a0b..ef470b4 100644 --- a/src/index.js +++ b/src/index.js @@ -688,7 +688,7 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * </pre> * </p> * @module index - * @version 3.20200422.0 + * @version 3.20200422.1 */ module.exports = { /** diff --git a/src/model/ListCustomerSegmentsRequest.js b/src/model/ListCustomerSegmentsRequest.js index d80ad5b..6ff0599 100644 --- a/src/model/ListCustomerSegmentsRequest.js +++ b/src/model/ListCustomerSegmentsRequest.js @@ -32,7 +32,6 @@ var exports = function() { var _this = this; - }; /** @@ -48,9 +47,6 @@ exports.constructFromObject = function(data, obj) { if (data.hasOwnProperty('cursor')) { obj['cursor'] = ApiClient.convertToType(data['cursor'], 'String'); - } - if (data.hasOwnProperty('limit')) { - obj['limit'] = ApiClient.convertToType(data['limit'], 'Number'); } } return obj; @@ -61,11 +57,6 @@ exports.constructFromObject = function(data, obj) { * @member {String} cursor */ exports.prototype['cursor'] = undefined; -/** - * Sets the maximum number of results to be returned in a single page. Limit values outside the supported range are ignored. Minimum value: `1` Maximum value: `1,000` - * @member {Number} limit - */ -exports.prototype['limit'] = undefined;