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

Commit

Permalink
Release 2.9.0 (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssung88 authored Jun 28, 2018
1 parent ded9345 commit c52274c
Show file tree
Hide file tree
Showing 50 changed files with 1,834 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ node_js:
- '6'
- '6.1'
before_install:
- openssl aes-256-cbc -K $encrypted_0dfb31adf922_key -iv $encrypted_0dfb31adf922_iv
- openssl aes-256-cbc -K $encrypted_17d5860a9a31_key -iv $encrypted_17d5860a9a31_iv
-in ./travis-ci/accounts.enc -out ./travis-ci/accounts.json -d
cache:
directories:
Expand Down
20 changes: 20 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Change Log

## Version 2.9.0 (2018-06-28)

We have added search functionality to the Connect v2 Customer API.

### New features and Improvements: Customer API (Connect v2)

* `SearchCustomers` endpoint — retrieves groups of customer profiles
based on a related characteristic. For example, retrieving all customers
created in the past 24 hours.
* `creation_source` field is now available on `Customer` entities. The creation
source exposes the process that created a customer profile. For example, if
a customer is created using the API, the creation source will be
`THIRD_PARTY`.
* **Instant Profiles** are now exposed in the following endpoints:
`RetrieveCustomer`, `SearchCustomers`, `UpdateCustomer`, `DeleteCustomer`.

### Fixes: Inventory SDK (Connect v1)

* Fix SDK request property `adjustment_type` in V1 Adjust Inventory.

## Version 2.8.0 (2018-05-24)

We have added sorting functionality to the Connect v2 Customer API, updated
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ Class | Method | HTTP request | Description
*SquareConnect.CustomersApi* | [**deleteCustomerCard**](docs/CustomersApi.md#deleteCustomerCard) | **DELETE** /v2/customers/{customer_id}/cards/{card_id} | DeleteCustomerCard
*SquareConnect.CustomersApi* | [**listCustomers**](docs/CustomersApi.md#listCustomers) | **GET** /v2/customers | ListCustomers
*SquareConnect.CustomersApi* | [**retrieveCustomer**](docs/CustomersApi.md#retrieveCustomer) | **GET** /v2/customers/{customer_id} | RetrieveCustomer
*SquareConnect.CustomersApi* | [**searchCustomers**](docs/CustomersApi.md#searchCustomers) | **POST** /v2/customers/search | SearchCustomers
*SquareConnect.CustomersApi* | [**updateCustomer**](docs/CustomersApi.md#updateCustomer) | **PUT** /v2/customers/{customer_id} | UpdateCustomer
*SquareConnect.LocationsApi* | [**listLocations**](docs/LocationsApi.md#listLocations) | **GET** /v2/locations | ListLocations
*SquareConnect.OrdersApi* | [**batchRetrieveOrders**](docs/OrdersApi.md#batchRetrieveOrders) | **POST** /v2/locations/{location_id}/orders/batch-retrieve | BatchRetrieveOrders
Expand Down Expand Up @@ -215,8 +216,14 @@ Class | Method | HTTP request | Description
- [SquareConnect.CreateRefundResponse](docs/CreateRefundResponse.md)
- [SquareConnect.Currency](docs/Currency.md)
- [SquareConnect.Customer](docs/Customer.md)
- [SquareConnect.CustomerCreationSource](docs/CustomerCreationSource.md)
- [SquareConnect.CustomerCreationSourceFilter](docs/CustomerCreationSourceFilter.md)
- [SquareConnect.CustomerFilter](docs/CustomerFilter.md)
- [SquareConnect.CustomerGroupInfo](docs/CustomerGroupInfo.md)
- [SquareConnect.CustomerInclusionExclusion](docs/CustomerInclusionExclusion.md)
- [SquareConnect.CustomerPreferences](docs/CustomerPreferences.md)
- [SquareConnect.CustomerQuery](docs/CustomerQuery.md)
- [SquareConnect.CustomerSort](docs/CustomerSort.md)
- [SquareConnect.CustomerSortField](docs/CustomerSortField.md)
- [SquareConnect.DeleteCatalogObjectRequest](docs/DeleteCatalogObjectRequest.md)
- [SquareConnect.DeleteCatalogObjectResponse](docs/DeleteCatalogObjectResponse.md)
Expand Down Expand Up @@ -270,6 +277,8 @@ Class | Method | HTTP request | Description
- [SquareConnect.RetrieveTransactionResponse](docs/RetrieveTransactionResponse.md)
- [SquareConnect.SearchCatalogObjectsRequest](docs/SearchCatalogObjectsRequest.md)
- [SquareConnect.SearchCatalogObjectsResponse](docs/SearchCatalogObjectsResponse.md)
- [SquareConnect.SearchCustomersRequest](docs/SearchCustomersRequest.md)
- [SquareConnect.SearchCustomersResponse](docs/SearchCustomersResponse.md)
- [SquareConnect.SortOrder](docs/SortOrder.md)
- [SquareConnect.TaxCalculationPhase](docs/TaxCalculationPhase.md)
- [SquareConnect.TaxInclusionType](docs/TaxInclusionType.md)
Expand All @@ -279,6 +288,7 @@ Class | Method | HTTP request | Description
- [SquareConnect.TenderCardDetailsStatus](docs/TenderCardDetailsStatus.md)
- [SquareConnect.TenderCashDetails](docs/TenderCashDetails.md)
- [SquareConnect.TenderType](docs/TenderType.md)
- [SquareConnect.TimeRange](docs/TimeRange.md)
- [SquareConnect.Transaction](docs/Transaction.md)
- [SquareConnect.TransactionProduct](docs/TransactionProduct.md)
- [SquareConnect.UpdateCustomerRequest](docs/UpdateCustomerRequest.md)
Expand Down
46 changes: 46 additions & 0 deletions docs/Customer.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,51 @@ Name | Type | Description | Notes
**note** | **String** | A note to associate with the customer. | [optional]
**preferences** | [**CustomerPreferences**](CustomerPreferences.md) | The customer's preferences. | [optional]
**groups** | [**[CustomerGroupInfo]**](CustomerGroupInfo.md) | The groups the customer belongs to. | [optional]
**creationSource** | **String** | A creation source represents the method used to create the customer profile. | [optional]


<a name="CreationSourceEnum"></a>
## Enum: CreationSourceEnum


* `OTHER` (value: `"OTHER"`)

* `APPOINTMENTS` (value: `"APPOINTMENTS"`)

* `COUPON` (value: `"COUPON"`)

* `DELETION_RECOVERY` (value: `"DELETION_RECOVERY"`)

* `DIRECTORY` (value: `"DIRECTORY"`)

* `EGIFTING` (value: `"EGIFTING"`)

* `EMAIL_COLLECTION` (value: `"EMAIL_COLLECTION"`)

* `FEEDBACK` (value: `"FEEDBACK"`)

* `IMPORT` (value: `"IMPORT"`)

* `INVOICES` (value: `"INVOICES"`)

* `LOYALTY` (value: `"LOYALTY"`)

* `MARKETING` (value: `"MARKETING"`)

* `MERGE` (value: `"MERGE"`)

* `ONLINE_STORE` (value: `"ONLINE_STORE"`)

* `INSTANT_PROFILE` (value: `"INSTANT_PROFILE"`)

* `TERMINAL` (value: `"TERMINAL"`)

* `THIRD_PARTY` (value: `"THIRD_PARTY"`)

* `THIRD_PARTY_IMPORT` (value: `"THIRD_PARTY_IMPORT"`)

* `UNMERGE_RECOVERY` (value: `"UNMERGE_RECOVERY"`)




44 changes: 44 additions & 0 deletions docs/CustomerCreationSource.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# SquareConnect.CustomerCreationSource

## Enum


* `OTHER` (value: `"OTHER"`)

* `APPOINTMENTS` (value: `"APPOINTMENTS"`)

* `COUPON` (value: `"COUPON"`)

* `DELETION_RECOVERY` (value: `"DELETION_RECOVERY"`)

* `DIRECTORY` (value: `"DIRECTORY"`)

* `EGIFTING` (value: `"EGIFTING"`)

* `EMAIL_COLLECTION` (value: `"EMAIL_COLLECTION"`)

* `FEEDBACK` (value: `"FEEDBACK"`)

* `IMPORT` (value: `"IMPORT"`)

* `INVOICES` (value: `"INVOICES"`)

* `LOYALTY` (value: `"LOYALTY"`)

* `MARKETING` (value: `"MARKETING"`)

* `MERGE` (value: `"MERGE"`)

* `ONLINE_STORE` (value: `"ONLINE_STORE"`)

* `INSTANT_PROFILE` (value: `"INSTANT_PROFILE"`)

* `TERMINAL` (value: `"TERMINAL"`)

* `THIRD_PARTY` (value: `"THIRD_PARTY"`)

* `THIRD_PARTY_IMPORT` (value: `"THIRD_PARTY_IMPORT"`)

* `UNMERGE_RECOVERY` (value: `"UNMERGE_RECOVERY"`)


65 changes: 65 additions & 0 deletions docs/CustomerCreationSourceFilter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# SquareConnect.CustomerCreationSourceFilter

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**values** | **[String]** | The list of creation sources used as filtering criteria. | [optional]
**rule** | **String** | Indicates whether a customer profile matching the filter criteria should be included in the result or excluded from the result. Default: &#x60;INCLUDE&#x60;. See [CustomerInclusionExclusion](#type-customerinclusionexclusion) for possible values. | [optional]


<a name="[ValuesEnum]"></a>
## Enum: [ValuesEnum]


* `OTHER` (value: `"OTHER"`)

* `APPOINTMENTS` (value: `"APPOINTMENTS"`)

* `COUPON` (value: `"COUPON"`)

* `DELETION_RECOVERY` (value: `"DELETION_RECOVERY"`)

* `DIRECTORY` (value: `"DIRECTORY"`)

* `EGIFTING` (value: `"EGIFTING"`)

* `EMAIL_COLLECTION` (value: `"EMAIL_COLLECTION"`)

* `FEEDBACK` (value: `"FEEDBACK"`)

* `IMPORT` (value: `"IMPORT"`)

* `INVOICES` (value: `"INVOICES"`)

* `LOYALTY` (value: `"LOYALTY"`)

* `MARKETING` (value: `"MARKETING"`)

* `MERGE` (value: `"MERGE"`)

* `ONLINE_STORE` (value: `"ONLINE_STORE"`)

* `INSTANT_PROFILE` (value: `"INSTANT_PROFILE"`)

* `TERMINAL` (value: `"TERMINAL"`)

* `THIRD_PARTY` (value: `"THIRD_PARTY"`)

* `THIRD_PARTY_IMPORT` (value: `"THIRD_PARTY_IMPORT"`)

* `UNMERGE_RECOVERY` (value: `"UNMERGE_RECOVERY"`)




<a name="RuleEnum"></a>
## Enum: RuleEnum


* `INCLUDE` (value: `"INCLUDE"`)

* `EXCLUDE` (value: `"EXCLUDE"`)




10 changes: 10 additions & 0 deletions docs/CustomerFilter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# SquareConnect.CustomerFilter

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**creationSource** | [**CustomerCreationSourceFilter**](CustomerCreationSourceFilter.md) | A filter to select customers based on their creation source. | [optional]
**createdAt** | [**TimeRange**](TimeRange.md) | A filter to select customers based on when they were created. | [optional]
**updatedAt** | [**TimeRange**](TimeRange.md) | A filter to select customers based on when they were updated. | [optional]


10 changes: 10 additions & 0 deletions docs/CustomerInclusionExclusion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# SquareConnect.CustomerInclusionExclusion

## Enum


* `INCLUDE` (value: `"INCLUDE"`)

* `EXCLUDE` (value: `"EXCLUDE"`)


9 changes: 9 additions & 0 deletions docs/CustomerQuery.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# SquareConnect.CustomerQuery

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**filter** | [**CustomerFilter**](CustomerFilter.md) | A list of filter criteria. | [optional]
**sort** | [**CustomerSort**](CustomerSort.md) | Sort criteria for query results. The default sort behavior is to order customers alphabetically by &#x60;given_name&#x60; and &#x60;last_name&#x60;. | [optional]


31 changes: 31 additions & 0 deletions docs/CustomerSort.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# SquareConnect.CustomerSort

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**field** | **String** | The field to sort the results on. It could be the total money spent at the merchant, the date of the first visit (etc). Default value: &#x60;DEFAULT&#x60;. | [optional]
**order** | **String** | Indicates the order in which results should be displayed based on the value of the sort field. String comparisons use standard alphabetic comparison to determine order. Strings representing numbers are sorted as strings. Default value: &#x60;ASC&#x60;. | [optional]


<a name="FieldEnum"></a>
## Enum: FieldEnum


* `DEFAULT` (value: `"DEFAULT"`)

* `CREATED_AT` (value: `"CREATED_AT"`)




<a name="OrderEnum"></a>
## Enum: OrderEnum


* `DESC` (value: `"DESC"`)

* `ASC` (value: `"ASC"`)




57 changes: 53 additions & 4 deletions docs/CustomersApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Method | HTTP request | Description
[**deleteCustomerCard**](CustomersApi.md#deleteCustomerCard) | **DELETE** /v2/customers/{customer_id}/cards/{card_id} | DeleteCustomerCard
[**listCustomers**](CustomersApi.md#listCustomers) | **GET** /v2/customers | ListCustomers
[**retrieveCustomer**](CustomersApi.md#retrieveCustomer) | **GET** /v2/customers/{customer_id} | RetrieveCustomer
[**searchCustomers**](CustomersApi.md#searchCustomers) | **POST** /v2/customers/search | SearchCustomers
[**updateCustomer**](CustomersApi.md#updateCustomer) | **PUT** /v2/customers/{customer_id} | UpdateCustomer


Expand Down Expand Up @@ -232,8 +233,8 @@ var apiInstance = new SquareConnect.CustomersApi();

var opts = {
'cursor': "cursor_example", // String | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See [Paginating results](#paginatingresults) for more information.
'sortField': "sortField_example", // String | Indicates how Customers should be sorted. Default: `DEFAULT`.
'sortOrder': "sortOrder_example" // String | Indicates whether Customers should be sorted in ascending (`ASC`) or descending (`DESC`) order. Default: `ASC`.
'sortField': "sortField_example", // String | Indicates how Customers should be sorted. Default: `DEFAULT`. See [CustomerSortField](#type-customersortfield) for possible values.
'sortOrder': "sortOrder_example" // String | Indicates whether Customers should be sorted in ascending (`ASC`) or descending (`DESC`) order. Default: `ASC`. See [SortOrder](#type-sortorder) for possible values.
};
apiInstance.listCustomers(opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
Expand All @@ -248,8 +249,8 @@ apiInstance.listCustomers(opts).then(function(data) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**cursor** | **String**| A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See [Paginating results](#paginatingresults) for more information. | [optional]
**sortField** | **String**| Indicates how Customers should be sorted. Default: &#x60;DEFAULT&#x60;. | [optional]
**sortOrder** | **String**| Indicates whether Customers should be sorted in ascending (&#x60;ASC&#x60;) or descending (&#x60;DESC&#x60;) order. Default: &#x60;ASC&#x60;. | [optional]
**sortField** | **String**| Indicates how Customers should be sorted. Default: &#x60;DEFAULT&#x60;. See [CustomerSortField](#type-customersortfield) for possible values. | [optional]
**sortOrder** | **String**| Indicates whether Customers should be sorted in ascending (&#x60;ASC&#x60;) or descending (&#x60;DESC&#x60;) order. Default: &#x60;ASC&#x60;. See [SortOrder](#type-sortorder) for possible values. | [optional]

### Return type

Expand Down Expand Up @@ -307,6 +308,54 @@ Name | Type | Description | Notes

[oauth2](../README.md#oauth2)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

<a name="searchCustomers"></a>
# **searchCustomers**
> SearchCustomersResponse searchCustomers(body)
SearchCustomers

Searches a business&#39;s customers.

### Example
```javascript
var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new SquareConnect.CustomersApi();

var body = new SquareConnect.SearchCustomersRequest(); // SearchCustomersRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.

apiInstance.searchCustomers(body).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});

```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**SearchCustomersRequest**](SearchCustomersRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |

### Return type

[**SearchCustomersResponse**](SearchCustomersResponse.md)

### Authorization

[oauth2](../README.md#oauth2)

### HTTP request headers

- **Content-Type**: application/json
Expand Down
Loading

0 comments on commit c52274c

Please sign in to comment.