Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

Commit

Permalink
Merge pull request #93 from square/release/3.20200422.1
Browse files Browse the repository at this point in the history
Release 3.20200422.1
  • Loading branch information
lindzeng authored Apr 22, 2020
2 parents b3b7465 + c356e0f commit 13d02d2
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 30 deletions.
8 changes: 8 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/CustomerGroupsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions docs/CustomerSegmentsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions docs/CustomersApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion docs/ListCustomerSegmentsRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]


2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/ApiClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var HeaderUtils = require('./lib/HeaderUtils');

/**
* @module ApiClient
* @version 3.20200422.0
* @version 3.20200422.1
*/

/**
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/api/CustomerGroupsApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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}
*/
Expand Down
5 changes: 1 addition & 4 deletions src/api/CustomerSegmentsApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -49,8 +48,7 @@ module.exports = function(apiClient) {
var pathParams = {
};
var queryParams = {
'cursor': opts['cursor'],
'limit': opts['limit']
'cursor': opts['cursor']
};
var headerParams = {
};
Expand All @@ -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) {
Expand Down
8 changes: 4 additions & 4 deletions src/api/CustomersApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ var V1TransactionsApi = require('./api/V1TransactionsApi');
* </pre>
* </p>
* @module index
* @version 3.20200422.0
* @version 3.20200422.1
*/
module.exports = {
/**
Expand Down
9 changes: 0 additions & 9 deletions src/model/ListCustomerSegmentsRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ var exports = function() {
var _this = this;



};

/**
Expand All @@ -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;
Expand All @@ -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;



Expand Down

0 comments on commit 13d02d2

Please sign in to comment.