From fe7741bd6a6f626dc9b3198e32b449ba83680280 Mon Sep 17 00:00:00 2001
From: Connect API Specification Generator
Date: Wed, 24 Apr 2019 00:05:19 +0000
Subject: [PATCH] Release 2.20190410.1
---
CHANGES.md | 9 +++
README.md | 1 +
docs/CatalogApi.md | 4 +-
docs/CatalogItem.md | 2 +-
docs/CatalogObject.md | 4 +-
docs/CatalogQuery.md | 2 +-
docs/ChargeRequest.md | 2 +-
docs/Employee.md | 2 +
docs/ListCatalogRequest.md | 2 +-
docs/ObtainTokenResponse.md | 2 +-
docs/UpsertCatalogObjectRequest.md | 2 +-
docs/V1Tender.md | 4 +-
docs/V1TenderCardBrand.md | 24 ++++++++
package.json | 2 +-
src/ApiClient.js | 4 +-
src/api/CatalogApi.js | 4 +-
src/index.js | 8 ++-
src/model/CatalogItem.js | 2 +-
src/model/CatalogObject.js | 4 +-
src/model/CatalogQuery.js | 2 +-
src/model/ChargeRequest.js | 2 +-
src/model/Employee.js | 18 ++++++
src/model/ListCatalogRequest.js | 2 +-
src/model/ObtainTokenResponse.js | 2 +-
src/model/UpsertCatalogObjectRequest.js | 4 +-
src/model/V1Tender.js | 6 +-
src/model/V1TenderCardBrand.js | 80 +++++++++++++++++++++++++
test/model/V1TenderCardBrand.spec.js | 26 ++++++++
28 files changed, 196 insertions(+), 30 deletions(-)
create mode 100644 docs/V1TenderCardBrand.md
create mode 100644 src/model/V1TenderCardBrand.js
create mode 100644 test/model/V1TenderCardBrand.spec.js
diff --git a/CHANGES.md b/CHANGES.md
index 173c548..d52d275 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,5 +1,14 @@
# Change Log
+## Version 2.20190410.1 (2019-04-24)
+
+## Details
+
+* **New functionality**: Employees API (Connect v2) — New fields to
+ capture contact information for employee profiles.
+* **New functionality**: `V1Tender.CardBrand` — New V1 enum to represent
+ brand information for credit cars.
+
## Version 2.20190410.0 (2019-04-10)
## New features: Orders API beta
diff --git a/README.md b/README.md
index 9d1d83f..ad1958e 100644
--- a/README.md
+++ b/README.md
@@ -550,6 +550,7 @@ Class | Method | HTTP request | Description
- [SquareConnect.V1SettlementEntryType](docs/V1SettlementEntryType.md)
- [SquareConnect.V1SettlementStatus](docs/V1SettlementStatus.md)
- [SquareConnect.V1Tender](docs/V1Tender.md)
+ - [SquareConnect.V1TenderCardBrand](docs/V1TenderCardBrand.md)
- [SquareConnect.V1TenderEntryMethod](docs/V1TenderEntryMethod.md)
- [SquareConnect.V1TenderType](docs/V1TenderType.md)
- [SquareConnect.V1Timecard](docs/V1Timecard.md)
diff --git a/docs/CatalogApi.md b/docs/CatalogApi.md
index 3cee9a3..34c5712 100644
--- a/docs/CatalogApi.md
+++ b/docs/CatalogApi.md
@@ -272,7 +272,7 @@ var apiInstance = new SquareConnect.CatalogApi();
var opts = {
'cursor': "cursor_example", // String | The pagination cursor returned in the previous response. Leave unset for an initial request. See [Pagination](/basics/api101/pagination) for more information.
- 'types': "types_example" // String | An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY`. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `\"ITEM\"`, `\"ITEM_VARIATION\"`, `\"CATEGORY\"`, `\"DISCOUNT\"`, `\"TAX\"`, `\"MODIFIER\"`, or `\"MODIFIER_LIST\"`.
+ 'types': "types_example" // String | An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY,IMAGE`. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `ITEM`, `ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`, `MODIFIER`, `MODIFIER_LIST`, or `IMAGE`.
};
apiInstance.listCatalog(opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
@@ -287,7 +287,7 @@ apiInstance.listCatalog(opts).then(function(data) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**cursor** | **String**| The pagination cursor returned in the previous response. Leave unset for an initial request. See [Pagination](/basics/api101/pagination) for more information. | [optional]
- **types** | **String**| An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY`. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `\"ITEM\"`, `\"ITEM_VARIATION\"`, `\"CATEGORY\"`, `\"DISCOUNT\"`, `\"TAX\"`, `\"MODIFIER\"`, or `\"MODIFIER_LIST\"`. | [optional]
+ **types** | **String**| An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY,IMAGE`. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `ITEM`, `ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`, `MODIFIER`, `MODIFIER_LIST`, or `IMAGE`. | [optional]
### Return type
diff --git a/docs/CatalogItem.md b/docs/CatalogItem.md
index f3e813c..3795227 100644
--- a/docs/CatalogItem.md
+++ b/docs/CatalogItem.md
@@ -9,7 +9,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | The item's name. Searchable. This field must not be empty. This field has max length of 512 Unicode code points. | [optional]
**description** | **String** | The item's description. Searchable. This field has max length of 4096 Unicode code points. | [optional]
-**abbreviation** | **String** | The text of the item's display label in the Square Point of Sale app. Only up to the first five characters of the string are used. Searchable. This field has max length of 24 Unicode code points. | [optional]
+**abbreviation** | **String** | The text of the item's display label in the Square Point of Sale app. Only up to the first five characters of the string are used. Searchable. This field has max length of 24 Unicode code points. | [optional]
**label_color** | **String** | The color of the item's display label in the Square Point of Sale app. This must be a valid hex color code. | [optional]
**available_online** | **Boolean** | If `true`, the item can be added to shipping orders from the merchant's online store. | [optional]
**available_for_pickup** | **Boolean** | If `true`, the item can be added to pickup orders from the merchant's online store. | [optional]
diff --git a/docs/CatalogObject.md b/docs/CatalogObject.md
index 1a08f7a..e755692 100644
--- a/docs/CatalogObject.md
+++ b/docs/CatalogObject.md
@@ -2,7 +2,7 @@
### Description
-The wrapper object for object types in the Catalog data model. The type of a particular `CatalogObject` is determined by the value of `type` and only the corresponding data field may be set. - if type = `ITEM`, only `item_data` will be populated and it will contain a valid [CatalogItem](#type-catalogitem) object. - if type = `ITEM_VARIATION`, only `item_variation_data` will be populated and it will contain a valid [CatalogItemVariation](#type-catalogitemvariation) object. - if type = `MODIFIER`, only `modifier_data` will be populated and it will contain a valid [CatalogModifier](#type-catalogmodifier) object. - if type = `MODIFIER_LIST`, only `modifier_list_data` will be populated and it will contain a valid [CatalogModifierList](#type-catalogmodifierlist) object. - if type = `CATEGORY`, only `category_data` will be populated and it will contain a valid [CatalogCategory](#type-catalogcategory) object. - if type = `DISCOUNT`, only `discount_data` will be populated and it will contain a valid [CatalogDiscount](#type-catalogdiscount) object. - if type = `TAX`, only `tax_data` will be populated and it will contain a valid [CatalogTax](#type-catalogtax) object. For a more detailed discussion of the Catalog data model, please see the [Catalog Overview](/products/catalog/overview).
+The wrapper object for object types in the Catalog data model. The type of a particular `CatalogObject` is determined by the value of `type` and only the corresponding data field may be set. - if type = `ITEM`, only `item_data` will be populated and it will contain a valid [CatalogItem](#type-catalogitem) object. - if type = `ITEM_VARIATION`, only `item_variation_data` will be populated and it will contain a valid [CatalogItemVariation](#type-catalogitemvariation) object. - if type = `MODIFIER`, only `modifier_data` will be populated and it will contain a valid [CatalogModifier](#type-catalogmodifier) object. - if type = `MODIFIER_LIST`, only `modifier_list_data` will be populated and it will contain a valid [CatalogModifierList](#type-catalogmodifierlist) object. - if type = `CATEGORY`, only `category_data` will be populated and it will contain a valid [CatalogCategory](#type-catalogcategory) object. - if type = `DISCOUNT`, only `discount_data` will be populated and it will contain a valid [CatalogDiscount](#type-catalogdiscount) object. - if type = `TAX`, only `tax_data` will be populated and it will contain a valid [CatalogTax](#type-catalogtax) object. - if type = `IMAGE`, only `image_data` will be populated and it will contain a valid [CatalogImage](#type-catalogimage) object. For a more detailed discussion of the Catalog data model, please see the [Catalog Overview](/products/catalog/overview).
## Properties
Name | Type | Description | Notes
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
**type** | **String** | The type of this object. Each object type has expected properties expressed in a structured format within its corresponding `*_data` field below. See [CatalogObjectType](#type-catalogobjecttype) for possible values |
**id** | **String** | An identifier to reference this object in the catalog. When a new CatalogObject is inserted, the client should set the id to a temporary identifier starting with a `'#'` character. Other objects being inserted or updated within the same request may use this identifier to refer to the new object. When the server receives the new object, it will supply a unique identifier that replaces the temporary identifier for all future references. |
**updated_at** | **String** | Last modification [timestamp](#workingwithdates) in RFC 3339 format, e.g., `\"2016-08-15T23:59:33.123Z\"` would indicate the UTC time (denoted by `Z`) of August 15, 2016 at 23:59:33 and 123 milliseconds. | [optional]
-**version** | **Number** | The version of the object. When updating an object, the version supplied by the must match the version in the database, otherwise the write will be rejected as conflicting. | [optional]
+**version** | **Number** | The version of the object. When updating an object, the version supplied must match the version in the database, otherwise the write will be rejected as conflicting. | [optional]
**is_deleted** | **Boolean** | If `true`, the object has been deleted from the database. Must be `false` for new objects being inserted. When deleted, the `updated_at` field will equal the deletion time. | [optional]
**catalog_v1_ids** | [**[CatalogV1Id]**](CatalogV1Id.md) | The Connect V1 IDs for this object at each [location](#type-location) where it is present, where they differ from the object's Connect V2 ID. The field will only be present for objects that have been created or modified by legacy APIs. | [optional]
**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]
diff --git a/docs/CatalogQuery.md b/docs/CatalogQuery.md
index a8a4d69..4879618 100644
--- a/docs/CatalogQuery.md
+++ b/docs/CatalogQuery.md
@@ -2,7 +2,7 @@
### Description
-A query to be applied to a SearchCatalogObjects request. Only one query field may be present. Where an attribute name is required, it should be specified as the name of any field marked \"searchable\" from the structured data types for the desired result object type(s) ([CatalogItem](#type-catalogitem), [CatalogItemVariation](#type-catalogitemvariation), [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax), [CatalogDiscount](#type-catalogdiscount), [CatalogModifierList](#type-catalogmodifierlist), [CatalogModifier](#type-catalogmodifier)). For example, a query that should return Items may specify attribute names from any of the searchable fields of the [CatalogItem](#type-catalogitem) data type, namely `\"name\"`, `\"description\"`, and `\"abbreviation\"`.
+A query to be applied to a [SearchCatalogObjectsRequest](#type-searchcatalogobjectsrequest). Only one query field may be present. Where an attribute name is required, it should be specified as the name of any field marked \"searchable\" from the structured data types for the desired result object type(s) ([CatalogItem](#type-catalogitem), [CatalogItemVariation](#type-catalogitemvariation), [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax), [CatalogDiscount](#type-catalogdiscount), [CatalogModifierList](#type-catalogmodifierlist), [CatalogModifier](#type-catalogmodifier)). For example, a query that should return Items may specify attribute names from any of the searchable fields of the [CatalogItem](#type-catalogitem) data type, namely `\"name\"`, `\"description\"`, and `\"abbreviation\"`.
## Properties
Name | Type | Description | Notes
diff --git a/docs/ChargeRequest.md b/docs/ChargeRequest.md
index ade3d40..9b0a61b 100644
--- a/docs/ChargeRequest.md
+++ b/docs/ChargeRequest.md
@@ -13,7 +13,7 @@ Name | Type | Description | Notes
**customer_card_id** | **String** | The ID of the customer card on file to charge. Do not provide a value for this field if you provide a value for `card_nonce`. If you provide this value, you _must_ also provide a value for `customer_id`. | [optional]
**delay_capture** | **Boolean** | If `true`, the request will only perform an Auth on the provided card. You can then later perform either a Capture (with the [CaptureTransaction](#endpoint-capturetransaction) endpoint) or a Void (with the [VoidTransaction](#endpoint-voidtransaction) endpoint). Default value: `false` | [optional]
**reference_id** | **String** | An optional ID you can associate with the transaction for your own purposes (such as to associate the transaction with an entity ID in your own database). This value cannot exceed 40 characters. | [optional]
-**note** | **String** | | [optional]
+**note** | **String** | An optional note to associate with the transaction. This value cannot exceed 60 characters. | [optional]
**customer_id** | **String** | The ID of the customer to associate this transaction with. This field is required if you provide a value for `customer_card_id`, and optional otherwise. | [optional]
**billing_address** | [**Address**](Address.md) | The buyer's billing address. This value is optional, but this transaction is ineligible for chargeback protection if neither this parameter nor `shipping_address` is provided. | [optional]
**shipping_address** | [**Address**](Address.md) | The buyer's shipping address, if available. This value is optional, but this transaction is ineligible for chargeback protection if neither this parameter nor `billing_address` is provided. | [optional]
diff --git a/docs/Employee.md b/docs/Employee.md
index 83e7655..b69a19c 100644
--- a/docs/Employee.md
+++ b/docs/Employee.md
@@ -10,6 +10,8 @@ Name | Type | Description | Notes
**id** | **String** | UUID for this `Employee`. | [optional]
**first_name** | **String** | Given (first) name of the employee. | [optional]
**last_name** | **String** | Family (last) name of the employee | [optional]
+**email** | **String** | Email of the employee | [optional]
+**phone_number** | **String** | Phone number of the employee in E.164 format, i.e. \"+12125554250\" | [optional]
**location_ids** | **[String]** | A list of location IDs where this employee has access. | [optional]
**status** | **String** | Specifies the status of the employee being fetched. See [EmployeeStatus](#type-employeestatus) for possible values | [optional]
**created_at** | **String** | A read-only timestamp in RFC 3339 format. | [optional]
diff --git a/docs/ListCatalogRequest.md b/docs/ListCatalogRequest.md
index a286efb..e6ffa36 100644
--- a/docs/ListCatalogRequest.md
+++ b/docs/ListCatalogRequest.md
@@ -8,6 +8,6 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**cursor** | **String** | The pagination cursor returned in the previous response. Leave unset for an initial request. See [Pagination](/basics/api101/pagination) for more information. | [optional]
-**types** | **String** | An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY`. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `\"ITEM\"`, `\"ITEM_VARIATION\"`, `\"CATEGORY\"`, `\"DISCOUNT\"`, `\"TAX\"`, `\"MODIFIER\"`, or `\"MODIFIER_LIST\"`. | [optional]
+**types** | **String** | An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY,IMAGE`. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `ITEM`, `ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`, `MODIFIER`, `MODIFIER_LIST`, or `IMAGE`. | [optional]
diff --git a/docs/ObtainTokenResponse.md b/docs/ObtainTokenResponse.md
index 3af8370..6af7f39 100644
--- a/docs/ObtainTokenResponse.md
+++ b/docs/ObtainTokenResponse.md
@@ -7,7 +7,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**access_token** | **String** | A valid OAuth access token. Provide the access token in a header with every request to Connect API endpoints. See the [Build with OAuth](/authz/oauth/build-with-the-api) guide for more information. | [optional]
+**access_token** | **String** | A valid OAuth access token. OAuth access tokens are 64 bytes long. Provide the access token in a header with every request to Connect API endpoints. See the [Build with OAuth](/authz/oauth/build-with-the-api) guide for more information. | [optional]
**token_type** | **String** | This value is always _bearer_. | [optional]
**expires_at** | **String** | The date when access_token expires, in [ISO 8601](http://www.iso.org/iso/home/standards/iso8601.htm) format. | [optional]
**merchant_id** | **String** | The ID of the authorizing merchant's business. | [optional]
diff --git a/docs/UpsertCatalogObjectRequest.md b/docs/UpsertCatalogObjectRequest.md
index 3357692..b84aa8a 100644
--- a/docs/UpsertCatalogObjectRequest.md
+++ b/docs/UpsertCatalogObjectRequest.md
@@ -8,6 +8,6 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**idempotency_key** | **String** | 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. |
-**object** | [**CatalogObject**](CatalogObject.md) | 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. |
+**object** | [**CatalogObject**](CatalogObject.md) | A [CatalogObject](#type-catalogobject) to be created or updated. - For updates, the object must be active (the `is_deleted` field is not `true`). - For creates, the object ID must start with `#`. The provided ID is replaced with a server-generated ID. |
diff --git a/docs/V1Tender.md b/docs/V1Tender.md
index 668d26c..2385fe7 100644
--- a/docs/V1Tender.md
+++ b/docs/V1Tender.md
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
**name** | **String** | A human-readable description of the tender. | [optional]
**employee_id** | **String** | The ID of the employee that processed the tender. | [optional]
**receipt_url** | **String** | The URL of the receipt for the tender. | [optional]
-**card_brand** | **String** | The brand of credit card provided. See [CardBrand](#type-cardbrand) for possible values | [optional]
+**card_brand** | **String** | The brand of credit card provided. See [V1TenderCardBrand](#type-v1tendercardbrand) for possible values | [optional]
**pan_suffix** | **String** | The last four digits of the provided credit card's account number. | [optional]
**entry_method** | **String** | The tender's unique ID. See [V1TenderEntryMethod](#type-v1tenderentrymethod) for possible values | [optional]
**payment_note** | **String** | Notes entered by the merchant about the tender at the time of payment, if any. Typically only present for tender with the type: OTHER. | [optional]
@@ -56,7 +56,7 @@ Name | Type | Description | Notes
* `VISA` (value: `"VISA"`)
-* `MASTERCARD` (value: `"MASTERCARD"`)
+* `MASTER_CARD` (value: `"MASTER_CARD"`)
* `AMERICAN_EXPRESS` (value: `"AMERICAN_EXPRESS"`)
diff --git a/docs/V1TenderCardBrand.md b/docs/V1TenderCardBrand.md
new file mode 100644
index 0000000..d57c90a
--- /dev/null
+++ b/docs/V1TenderCardBrand.md
@@ -0,0 +1,24 @@
+# SquareConnect.V1TenderCardBrand
+
+## Enum
+
+
+* `OTHER_BRAND` (value: `"OTHER_BRAND"`)
+
+* `VISA` (value: `"VISA"`)
+
+* `MASTER_CARD` (value: `"MASTER_CARD"`)
+
+* `AMERICAN_EXPRESS` (value: `"AMERICAN_EXPRESS"`)
+
+* `DISCOVER` (value: `"DISCOVER"`)
+
+* `DISCOVER_DINERS` (value: `"DISCOVER_DINERS"`)
+
+* `JCB` (value: `"JCB"`)
+
+* `CHINA_UNIONPAY` (value: `"CHINA_UNIONPAY"`)
+
+* `SQUARE_GIFT_CARD` (value: `"SQUARE_GIFT_CARD"`)
+
+
diff --git a/package.json b/package.json
index 09f07ea..d160256 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "square-connect",
- "version": "2.20190410.0",
+ "version": "2.20190410.1",
"description": "JavaScript client library for the Square Connect v2 API",
"keywords": [
"square",
diff --git a/src/ApiClient.js b/src/ApiClient.js
index bc03ee6..0110715 100644
--- a/src/ApiClient.js
+++ b/src/ApiClient.js
@@ -16,7 +16,7 @@ var querystring = require('querystring');
/**
* @module ApiClient
- * @version 2.20190410.0
+ * @version 2.20190410.1
*/
/**
@@ -48,7 +48,7 @@ var exports = function() {
* @default {}
*/
this.defaultHeaders = {
- 'User-Agent': 'Square-Connect-Javascript/2.20190410.0'
+ 'User-Agent': 'Square-Connect-Javascript/2.20190410.1'
};
/**
* The default HTTP timeout for all API calls.
diff --git a/src/api/CatalogApi.js b/src/api/CatalogApi.js
index e1b2f37..a6d6a64 100644
--- a/src/api/CatalogApi.js
+++ b/src/api/CatalogApi.js
@@ -307,7 +307,7 @@ module.exports = function(apiClient) {
* Returns a list of [CatalogObject](#type-catalogobject)s that includes all objects of a set of desired types (for example, all [CatalogItem](#type-catalogitem) and [CatalogTax](#type-catalogtax) objects) in the catalog. The types parameter is specified as a comma-separated list of valid [CatalogObject](#type-catalogobject) types: `ITEM`, `ITEM_VARIATION`, `MODIFIER`, `MODIFIER_LIST`, `CATEGORY`, `DISCOUNT`, `TAX`.
* @param {Object} opts Optional parameters
* @param {String} opts.cursor The pagination cursor returned in the previous response. Leave unset for an initial request. See [Pagination](/basics/api101/pagination) for more information.
- * @param {String} opts.types An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY`. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `\"ITEM\"`, `\"ITEM_VARIATION\"`, `\"CATEGORY\"`, `\"DISCOUNT\"`, `\"TAX\"`, `\"MODIFIER\"`, or `\"MODIFIER_LIST\"`.
+ * @param {String} opts.types An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY,IMAGE`. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `ITEM`, `ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`, `MODIFIER`, `MODIFIER_LIST`, or `IMAGE`.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListCatalogResponse} and HTTP response
*/
this.listCatalogWithHttpInfo = function(opts) {
@@ -345,7 +345,7 @@ module.exports = function(apiClient) {
* Returns a list of [CatalogObject](#type-catalogobject)s that includes all objects of a set of desired types (for example, all [CatalogItem](#type-catalogitem) and [CatalogTax](#type-catalogtax) objects) in the catalog. The types parameter is specified as a comma-separated list of valid [CatalogObject](#type-catalogobject) types: `ITEM`, `ITEM_VARIATION`, `MODIFIER`, `MODIFIER_LIST`, `CATEGORY`, `DISCOUNT`, `TAX`.
* @param {Object} opts Optional parameters
* @param {String} opts.cursor The pagination cursor returned in the previous response. Leave unset for an initial request. See [Pagination](/basics/api101/pagination) for more information.
- * @param {String} opts.types An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY`. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `\"ITEM\"`, `\"ITEM_VARIATION\"`, `\"CATEGORY\"`, `\"DISCOUNT\"`, `\"TAX\"`, `\"MODIFIER\"`, or `\"MODIFIER_LIST\"`.
+ * @param {String} opts.types An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY,IMAGE`. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `ITEM`, `ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`, `MODIFIER`, `MODIFIER_LIST`, or `IMAGE`.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListCatalogResponse}
*/
this.listCatalog = function(opts) {
diff --git a/src/index.js b/src/index.js
index b9c42c1..aa9ec39 100644
--- a/src/index.js
+++ b/src/index.js
@@ -386,6 +386,7 @@ var V1SettlementEntry = require('./model/V1SettlementEntry');
var V1SettlementEntryType = require('./model/V1SettlementEntryType');
var V1SettlementStatus = require('./model/V1SettlementStatus');
var V1Tender = require('./model/V1Tender');
+var V1TenderCardBrand = require('./model/V1TenderCardBrand');
var V1TenderEntryMethod = require('./model/V1TenderEntryMethod');
var V1TenderType = require('./model/V1TenderType');
var V1Timecard = require('./model/V1Timecard');
@@ -462,7 +463,7 @@ var V1TransactionsApi = require('./api/V1TransactionsApi');
*
*
* @module index
- * @version 2.20190410.0
+ * @version 2.20190410.1
*/
module.exports = {
/**
@@ -2335,6 +2336,11 @@ var V1TransactionsApi = require('./api/V1TransactionsApi');
* @property {module:model/V1Tender}
*/
V1Tender: V1Tender,
+ /**
+ * The V1TenderCardBrand model constructor.
+ * @property {module:model/V1TenderCardBrand}
+ */
+ V1TenderCardBrand: V1TenderCardBrand,
/**
* The V1TenderEntryMethod model constructor.
* @property {module:model/V1TenderEntryMethod}
diff --git a/src/model/CatalogItem.js b/src/model/CatalogItem.js
index 0264024..4543144 100644
--- a/src/model/CatalogItem.js
+++ b/src/model/CatalogItem.js
@@ -116,7 +116,7 @@ exports.prototype['name'] = undefined;
*/
exports.prototype['description'] = undefined;
/**
- * The text of the item's display label in the Square Point of Sale app. Only up to the first five characters of the string are used. Searchable. This field has max length of 24 Unicode code points.
+ * The text of the item's display label in the Square Point of Sale app. Only up to the first five characters of the string are used. Searchable. This field has max length of 24 Unicode code points.
* @member {String} abbreviation
*/
exports.prototype['abbreviation'] = undefined;
diff --git a/src/model/CatalogObject.js b/src/model/CatalogObject.js
index 1c60bc6..b08e0b8 100644
--- a/src/model/CatalogObject.js
+++ b/src/model/CatalogObject.js
@@ -32,7 +32,7 @@ var CatalogV1Id = require('./CatalogV1Id');
/**
* Constructs a new CatalogObject
.
- * The wrapper object for object types in the Catalog data model. The type of a particular `CatalogObject` is determined by the value of `type` and only the corresponding data field may be set. - if type = `ITEM`, only `item_data` will be populated and it will contain a valid [CatalogItem](#type-catalogitem) object. - if type = `ITEM_VARIATION`, only `item_variation_data` will be populated and it will contain a valid [CatalogItemVariation](#type-catalogitemvariation) object. - if type = `MODIFIER`, only `modifier_data` will be populated and it will contain a valid [CatalogModifier](#type-catalogmodifier) object. - if type = `MODIFIER_LIST`, only `modifier_list_data` will be populated and it will contain a valid [CatalogModifierList](#type-catalogmodifierlist) object. - if type = `CATEGORY`, only `category_data` will be populated and it will contain a valid [CatalogCategory](#type-catalogcategory) object. - if type = `DISCOUNT`, only `discount_data` will be populated and it will contain a valid [CatalogDiscount](#type-catalogdiscount) object. - if type = `TAX`, only `tax_data` will be populated and it will contain a valid [CatalogTax](#type-catalogtax) object. For a more detailed discussion of the Catalog data model, please see the [Catalog Overview](/products/catalog/overview).
+ * The wrapper object for object types in the Catalog data model. The type of a particular `CatalogObject` is determined by the value of `type` and only the corresponding data field may be set. - if type = `ITEM`, only `item_data` will be populated and it will contain a valid [CatalogItem](#type-catalogitem) object. - if type = `ITEM_VARIATION`, only `item_variation_data` will be populated and it will contain a valid [CatalogItemVariation](#type-catalogitemvariation) object. - if type = `MODIFIER`, only `modifier_data` will be populated and it will contain a valid [CatalogModifier](#type-catalogmodifier) object. - if type = `MODIFIER_LIST`, only `modifier_list_data` will be populated and it will contain a valid [CatalogModifierList](#type-catalogmodifierlist) object. - if type = `CATEGORY`, only `category_data` will be populated and it will contain a valid [CatalogCategory](#type-catalogcategory) object. - if type = `DISCOUNT`, only `discount_data` will be populated and it will contain a valid [CatalogDiscount](#type-catalogdiscount) object. - if type = `TAX`, only `tax_data` will be populated and it will contain a valid [CatalogTax](#type-catalogtax) object. - if type = `IMAGE`, only `image_data` will be populated and it will contain a valid [CatalogImage](#type-catalogimage) object. For a more detailed discussion of the Catalog data model, please see the [Catalog Overview](/products/catalog/overview).
* @alias module:model/CatalogObject
* @class
* @param type {module:model/CatalogObject.TypeEnum} The type of this object. Each object type has expected properties expressed in a structured format within its corresponding `*_data` field below. See [CatalogObjectType](#type-catalogobjecttype) for possible values
@@ -146,7 +146,7 @@ exports.prototype['id'] = undefined;
*/
exports.prototype['updated_at'] = undefined;
/**
- * The version of the object. When updating an object, the version supplied by the must match the version in the database, otherwise the write will be rejected as conflicting.
+ * The version of the object. When updating an object, the version supplied must match the version in the database, otherwise the write will be rejected as conflicting.
* @member {Number} version
*/
exports.prototype['version'] = undefined;
diff --git a/src/model/CatalogQuery.js b/src/model/CatalogQuery.js
index addb1cf..6716bc6 100644
--- a/src/model/CatalogQuery.js
+++ b/src/model/CatalogQuery.js
@@ -30,7 +30,7 @@ var CatalogQueryText = require('./CatalogQueryText');
/**
* Constructs a new CatalogQuery
.
- * A query to be applied to a SearchCatalogObjects request. Only one query field may be present. Where an attribute name is required, it should be specified as the name of any field marked \"searchable\" from the structured data types for the desired result object type(s) ([CatalogItem](#type-catalogitem), [CatalogItemVariation](#type-catalogitemvariation), [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax), [CatalogDiscount](#type-catalogdiscount), [CatalogModifierList](#type-catalogmodifierlist), [CatalogModifier](#type-catalogmodifier)). For example, a query that should return Items may specify attribute names from any of the searchable fields of the [CatalogItem](#type-catalogitem) data type, namely `\"name\"`, `\"description\"`, and `\"abbreviation\"`.
+ * A query to be applied to a [SearchCatalogObjectsRequest](#type-searchcatalogobjectsrequest). Only one query field may be present. Where an attribute name is required, it should be specified as the name of any field marked \"searchable\" from the structured data types for the desired result object type(s) ([CatalogItem](#type-catalogitem), [CatalogItemVariation](#type-catalogitemvariation), [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax), [CatalogDiscount](#type-catalogdiscount), [CatalogModifierList](#type-catalogmodifierlist), [CatalogModifier](#type-catalogmodifier)). For example, a query that should return Items may specify attribute names from any of the searchable fields of the [CatalogItem](#type-catalogitem) data type, namely `\"name\"`, `\"description\"`, and `\"abbreviation\"`.
* @alias module:model/CatalogQuery
* @class
*/
diff --git a/src/model/ChargeRequest.js b/src/model/ChargeRequest.js
index 2c4dcc4..aea84f2 100644
--- a/src/model/ChargeRequest.js
+++ b/src/model/ChargeRequest.js
@@ -135,7 +135,7 @@ exports.prototype['delay_capture'] = undefined;
*/
exports.prototype['reference_id'] = undefined;
/**
- *
+ * An optional note to associate with the transaction. This value cannot exceed 60 characters.
* @member {String} note
*/
exports.prototype['note'] = undefined;
diff --git a/src/model/Employee.js b/src/model/Employee.js
index 05f5ad0..eb3151f 100644
--- a/src/model/Employee.js
+++ b/src/model/Employee.js
@@ -37,6 +37,8 @@ var exports = function() {
+
+
};
/**
@@ -58,6 +60,12 @@ exports.constructFromObject = function(data, obj) {
}
if (data.hasOwnProperty('last_name')) {
obj['last_name'] = ApiClient.convertToType(data['last_name'], 'String');
+ }
+ if (data.hasOwnProperty('email')) {
+ obj['email'] = ApiClient.convertToType(data['email'], 'String');
+ }
+ if (data.hasOwnProperty('phone_number')) {
+ obj['phone_number'] = ApiClient.convertToType(data['phone_number'], 'String');
}
if (data.hasOwnProperty('location_ids')) {
obj['location_ids'] = ApiClient.convertToType(data['location_ids'], ['String']);
@@ -90,6 +98,16 @@ exports.prototype['first_name'] = undefined;
* @member {String} last_name
*/
exports.prototype['last_name'] = undefined;
+/**
+ * Email of the employee
+ * @member {String} email
+ */
+exports.prototype['email'] = undefined;
+/**
+ * Phone number of the employee in E.164 format, i.e. \"+12125554250\"
+ * @member {String} phone_number
+ */
+exports.prototype['phone_number'] = undefined;
/**
* A list of location IDs where this employee has access.
* @member {Array.} location_ids
diff --git a/src/model/ListCatalogRequest.js b/src/model/ListCatalogRequest.js
index 993b9d7..edbf018 100644
--- a/src/model/ListCatalogRequest.js
+++ b/src/model/ListCatalogRequest.js
@@ -61,7 +61,7 @@ exports.constructFromObject = function(data, obj) {
*/
exports.prototype['cursor'] = undefined;
/**
- * An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY`. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `\"ITEM\"`, `\"ITEM_VARIATION\"`, `\"CATEGORY\"`, `\"DISCOUNT\"`, `\"TAX\"`, `\"MODIFIER\"`, or `\"MODIFIER_LIST\"`.
+ * An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY,IMAGE`. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `ITEM`, `ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`, `MODIFIER`, `MODIFIER_LIST`, or `IMAGE`.
* @member {String} types
*/
exports.prototype['types'] = undefined;
diff --git a/src/model/ObtainTokenResponse.js b/src/model/ObtainTokenResponse.js
index 7878e48..790fdf6 100644
--- a/src/model/ObtainTokenResponse.js
+++ b/src/model/ObtainTokenResponse.js
@@ -80,7 +80,7 @@ exports.constructFromObject = function(data, obj) {
}
/**
- * A valid OAuth access token. Provide the access token in a header with every request to Connect API endpoints. See the [Build with OAuth](/authz/oauth/build-with-the-api) guide for more information.
+ * A valid OAuth access token. OAuth access tokens are 64 bytes long. Provide the access token in a header with every request to Connect API endpoints. See the [Build with OAuth](/authz/oauth/build-with-the-api) guide for more information.
* @member {String} access_token
*/
exports.prototype['access_token'] = undefined;
diff --git a/src/model/UpsertCatalogObjectRequest.js b/src/model/UpsertCatalogObjectRequest.js
index a2399c6..4ec4804 100644
--- a/src/model/UpsertCatalogObjectRequest.js
+++ b/src/model/UpsertCatalogObjectRequest.js
@@ -28,7 +28,7 @@ var CatalogObject = require('./CatalogObject');
* @alias module:model/UpsertCatalogObjectRequest
* @class
* @param idempotencyKey {String} 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.
- * @param _object {module:model/CatalogObject} 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.
+ * @param _object {module:model/CatalogObject} A [CatalogObject](#type-catalogobject) to be created or updated. - For updates, the object must be active (the `is_deleted` field is not `true`). - For creates, the object ID must start with `#`. The provided ID is replaced with a server-generated ID.
*/
var exports = function(idempotencyKey, _object) {
var _this = this;
@@ -64,7 +64,7 @@ exports.constructFromObject = function(data, obj) {
*/
exports.prototype['idempotency_key'] = undefined;
/**
- * 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.
+ * A [CatalogObject](#type-catalogobject) to be created or updated. - For updates, the object must be active (the `is_deleted` field is not `true`). - For creates, the object ID must start with `#`. The provided ID is replaced with a server-generated ID.
* @member {module:model/CatalogObject} object
*/
exports.prototype['object'] = undefined;
diff --git a/src/model/V1Tender.js b/src/model/V1Tender.js
index 76a9d1c..051ad50 100644
--- a/src/model/V1Tender.js
+++ b/src/model/V1Tender.js
@@ -138,7 +138,7 @@ exports.prototype['employee_id'] = undefined;
*/
exports.prototype['receipt_url'] = undefined;
/**
- * The brand of credit card provided. See [CardBrand](#type-cardbrand) for possible values
+ * The brand of credit card provided. See [V1TenderCardBrand](#type-v1tendercardbrand) for possible values
* @member {module:model/V1Tender.CardBrandEnum} card_brand
*/
exports.prototype['card_brand'] = undefined;
@@ -258,10 +258,10 @@ exports.prototype['is_exchange'] = undefined;
*/
"VISA": "VISA",
/**
- * value: "MASTERCARD"
+ * value: "MASTER_CARD"
* @const
*/
- "MASTERCARD": "MASTERCARD",
+ "MASTER_CARD": "MASTER_CARD",
/**
* value: "AMERICAN_EXPRESS"
* @const
diff --git a/src/model/V1TenderCardBrand.js b/src/model/V1TenderCardBrand.js
new file mode 100644
index 0000000..754e476
--- /dev/null
+++ b/src/model/V1TenderCardBrand.js
@@ -0,0 +1,80 @@
+/**
+ * Square Connect API
+ * Client library for accessing the Square Connect APIs
+ *
+ * OpenAPI spec version: 2.0
+ * Contact: developers@squareup.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+
+
+/**
+ * Enum class V1TenderCardBrand.
+ * @enum {}
+ * @readonly
+ */
+var exports = {
+ /**
+ * value: "OTHER_BRAND"
+ * @const
+ */
+ "OTHER_BRAND": "OTHER_BRAND",
+ /**
+ * value: "VISA"
+ * @const
+ */
+ "VISA": "VISA",
+ /**
+ * value: "MASTER_CARD"
+ * @const
+ */
+ "MASTER_CARD": "MASTER_CARD",
+ /**
+ * value: "AMERICAN_EXPRESS"
+ * @const
+ */
+ "AMERICAN_EXPRESS": "AMERICAN_EXPRESS",
+ /**
+ * value: "DISCOVER"
+ * @const
+ */
+ "DISCOVER": "DISCOVER",
+ /**
+ * value: "DISCOVER_DINERS"
+ * @const
+ */
+ "DISCOVER_DINERS": "DISCOVER_DINERS",
+ /**
+ * value: "JCB"
+ * @const
+ */
+ "JCB": "JCB",
+ /**
+ * value: "CHINA_UNIONPAY"
+ * @const
+ */
+ "CHINA_UNIONPAY": "CHINA_UNIONPAY",
+ /**
+ * value: "SQUARE_GIFT_CARD"
+ * @const
+ */
+ "SQUARE_GIFT_CARD": "SQUARE_GIFT_CARD"};
+
+/**
+ * Returns a V1TenderCardBrand
enum value from a Javascript object name.
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
+ * @return {module:model/V1TenderCardBrand} The enum V1TenderCardBrand
value.
+ */
+exports.constructFromObject = function(object) {
+ return object;
+}
+
+module.exports = exports;
+
+
diff --git a/test/model/V1TenderCardBrand.spec.js b/test/model/V1TenderCardBrand.spec.js
new file mode 100644
index 0000000..0c434a9
--- /dev/null
+++ b/test/model/V1TenderCardBrand.spec.js
@@ -0,0 +1,26 @@
+/**
+ * Square Connect API
+ * Client library for accessing the Square Connect APIs
+ *
+ * OpenAPI spec version: 2.0
+ * Contact: developers@squareup.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+const SquareConnect = require('../../src/index');
+
+describe('V1TenderCardBrand', function() {
+ beforeEach(function() {
+ });
+
+ it('should create an instance of V1TenderCardBrand', function() {
+ // uncomment below and update the code to test V1TenderCardBrand
+ //var instane = new SquareConnect.V1TenderCardBrand();
+ //expect(instance).to.be.a(SquareConnect.V1TenderCardBrand);
+ });
+
+});