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

Commit

Permalink
Release 2.20181205.0 (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssung88 authored Dec 5, 2018
1 parent 7f9c9e1 commit 8691afa
Show file tree
Hide file tree
Showing 35 changed files with 251 additions and 71 deletions.
12 changes: 12 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Change Log

## Version 2.20181205.0 (2018-12-05)

## New feature: Idempotent customer profile creation in Connect v2

Requests to the CreateCustomer endpoint now include a `idempotency_key` field to
ensure idempotent creation of new profiles.

## New feature: Refund Adjustment fields for Refunds in Connect v1

The Connect SDK now supports refund adjustments for the Connect v1
Refunds API with the addition of multiple new fields in the `Refund` data type

## Version 2.20180918.1 (2018-10-24)

### New feature: Support for Partial Payments in Connect v1
Expand Down
12 changes: 6 additions & 6 deletions docs/Card.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | The card's unique ID, if any. | [optional]
**id** | **String** | Unique ID for this card. Generated by Square. | [optional]
**card_brand** | **String** | The card's brand (such as `VISA`). See [CardBrand](#type-cardbrand) for all possible values. | [optional]
**last_4** | **String** | The last 4 digits of the card's number. | [optional]
**exp_month** | **Number** | The month of the card's expiration date. This value is always between `1` and `12`, inclusive. | [optional]
**last_4** | **String** | The last 4 digits of the card number. | [optional]
**exp_month** | **Number** | The expiration month of the associated card as an integer between 1 and 12. | [optional]
**exp_year** | **Number** | The four-digit year of the card's expiration date. | [optional]
**cardholder_name** | **String** | The cardholder name. This value is present only if this object represents a customer's card on file. | [optional]
**billing_address** | [**Address**](Address.md) | The card's billing address. This value is present only if this object represents a customer's card on file. | [optional]
**fingerprint** | **String** | The unique string fingerprint for the card. The fingerprint is based on the credit card number and is unique to the merchant. If a card is used at multiple locations for the same merchant, it will have the same fingerprint in each case. Note: Fingerprint may not exist on old transactions. | [optional]
**cardholder_name** | **String** | The name of the cardholder. | [optional]
**billing_address** | [**Address**](Address.md) | The billing address for this card. | [optional]
**fingerprint** | **String** | __Not currently set.__ Intended as a Square-assigned identifier, based on the card number, to identify the card across multiple locations within a single application. | [optional]


<a name="CardBrandEnum"></a>
Expand Down
1 change: 1 addition & 0 deletions docs/CreateCustomerRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**idempotency_key** | **String** | The idempotency key for the request. See the [Idempotency](/basics/api101/idempotency) guide for more information. | [optional]
**given_name** | **String** | The customer&#39;s given (i.e., first) name. | [optional]
**family_name** | **String** | The customer&#39;s family (i.e., last) name. | [optional]
**company_name** | **String** | The name of the customer&#39;s company. | [optional]
Expand Down
2 changes: 1 addition & 1 deletion docs/Customer.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Name | Type | Description | Notes
**id** | **String** | The customer&#39;s unique ID. |
**created_at** | **String** | The time when the customer was created, in RFC 3339 format. |
**updated_at** | **String** | The time when the customer was last updated, in RFC 3339 format. |
**cards** | [**[Card]**](Card.md) | The non-confidential details of the customer&#39;s cards on file. | [optional]
**cards** | [**[Card]**](Card.md) | The payment details of the customer&#39;s cards on file. | [optional]
**given_name** | **String** | The customer&#39;s given (i.e., first) name. | [optional]
**family_name** | **String** | The customer&#39;s family (i.e., last) name. | [optional]
**nickname** | **String** | The customer&#39;s nickname. | [optional]
Expand Down
2 changes: 1 addition & 1 deletion docs/CustomersApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Name | Type | Description | Notes
CreateCustomerCard

Adds a card on file to an existing customer. In the United States Square takes care of automatically updating any cards on file that might have expired since you first attached them to a customer. As with charges, calls to &#x60;CreateCustomerCard&#x60; are idempotent. Multiple calls with the same card nonce return the same card record that was created with the provided nonce during the _first_ call.
Adds a card on file to an existing customer. As with charges, calls to &#x60;CreateCustomerCard&#x60; are idempotent. Multiple calls with the same card nonce return the same card record that was created with the provided nonce during the _first_ call.

### Example
```javascript
Expand Down
4 changes: 4 additions & 0 deletions docs/Error.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ Name | Type | Description | Notes

* `EXPECTED_ARRAY` (value: `"EXPECTED_ARRAY"`)

* `EXPECTED_MAP` (value: `"EXPECTED_MAP"`)

* `EXPECTED_BASE64_ENCODED_BYTE_ARRAY` (value: `"EXPECTED_BASE64_ENCODED_BYTE_ARRAY"`)

* `INVALID_ARRAY_VALUE` (value: `"INVALID_ARRAY_VALUE"`)
Expand Down Expand Up @@ -132,6 +134,8 @@ Name | Type | Description | Notes

* `UNSUPPORTED_ENTRY_METHOD` (value: `"UNSUPPORTED_ENTRY_METHOD"`)

* `INVALID_ENCRYPTED_CARD` (value: `"INVALID_ENCRYPTED_CARD"`)

* `INVALID_CARD` (value: `"INVALID_CARD"`)

* `DELAYED_TRANSACTION_EXPIRED` (value: `"DELAYED_TRANSACTION_EXPIRED"`)
Expand Down
4 changes: 4 additions & 0 deletions docs/ErrorCode.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@

* `EXPECTED_ARRAY` (value: `"EXPECTED_ARRAY"`)

* `EXPECTED_MAP` (value: `"EXPECTED_MAP"`)

* `EXPECTED_BASE64_ENCODED_BYTE_ARRAY` (value: `"EXPECTED_BASE64_ENCODED_BYTE_ARRAY"`)

* `INVALID_ARRAY_VALUE` (value: `"INVALID_ARRAY_VALUE"`)
Expand Down Expand Up @@ -103,6 +105,8 @@

* `UNSUPPORTED_ENTRY_METHOD` (value: `"UNSUPPORTED_ENTRY_METHOD"`)

* `INVALID_ENCRYPTED_CARD` (value: `"INVALID_ENCRYPTED_CARD"`)

* `INVALID_CARD` (value: `"INVALID_CARD"`)

* `DELAYED_TRANSACTION_EXPIRED` (value: `"DELAYED_TRANSACTION_EXPIRED"`)
Expand Down
2 changes: 1 addition & 1 deletion docs/InventoryApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Name | Type | Description | Notes
BatchRetrieveInventoryCounts

Returns current counts for the provided [CatalogObject](#type-catalogobject)s at the requested [Location](#type-location)s. Results are paginated and sorted in descending order according to their &#x60;calculated_at&#x60; timestamp (newest first). When &#x60;updated_at&#x60; is specified, only counts that have changed since that time (based on the server timestamp for the most recent change) are returned. This allows clients to perform a \&quot;sync\&quot; operation, for example in response to receiving a Webhook notification.
Returns current counts for the provided [CatalogObject](#type-catalogobject)s at the requested [Location](#type-location)s. Results are paginated and sorted in descending order according to their &#x60;calculated_at&#x60; timestamp (newest first). When &#x60;updated_after&#x60; is specified, only counts that have changed since that time (based on the server timestamp for the most recent change) are returned. This allows clients to perform a \&quot;sync\&quot; operation, for example in response to receiving a Webhook notification.

### Example
```javascript
Expand Down
4 changes: 4 additions & 0 deletions docs/Product.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@

* `PAYROLL` (value: `"PAYROLL"`)

* `DASHBOARD` (value: `"DASHBOARD"`)

* `ITEM_LIBRARY_IMPORT` (value: `"ITEM_LIBRARY_IMPORT"`)

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


4 changes: 4 additions & 0 deletions docs/SourceApplication.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ Name | Type | Description | Notes

* `PAYROLL` (value: `"PAYROLL"`)

* `DASHBOARD` (value: `"DASHBOARD"`)

* `ITEM_LIBRARY_IMPORT` (value: `"ITEM_LIBRARY_IMPORT"`)

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


Expand Down
2 changes: 1 addition & 1 deletion docs/V1Payment.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | The payment&#39;s unique identifier. | [optional]
**merchant_id** | **String** | The unique identifier of the merchant that took the payment. | [optional]
**created_at** | **String** | The time when the payment was created, in ISO 8601 format. | [optional]
**created_at** | **String** | The time when the payment was created, in ISO 8601 format. Reflects the time of the first payment if the object represents an incomplete partial payment, and the time of the last or complete payment otherwise. | [optional]
**creator_id** | **String** | The unique identifier of the Square account that took the payment. | [optional]
**device** | [**Device**](Device.md) | The device that took the payment. | [optional]
**payment_url** | **String** | The URL of the payment&#39;s detail page in the merchant dashboard. The merchant must be signed in to the merchant dashboard to view this page. | [optional]
Expand Down
10 changes: 10 additions & 0 deletions docs/V1Refund.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ Name | Type | Description | Notes
**type** | **String** | The type of refund | [optional]
**reason** | **String** | The merchant-specified reason for the refund. | [optional]
**refunded_money** | [**V1Money**](V1Money.md) | The amount of money refunded. This amount is always negative. | [optional]
**refunded_processing_fee_money** | [**V1Money**](V1Money.md) | The amount of processing fee money refunded. This amount is always positive. | [optional]
**refunded_tax_money** | [**V1Money**](V1Money.md) | The total amount of tax money refunded. This amount is always negative. | [optional]
**refunded_additive_tax_money** | [**V1Money**](V1Money.md) | The amount of additive tax money refunded. This amount is always negative. | [optional]
**refunded_additive_tax** | [**[V1PaymentTax]**](V1PaymentTax.md) | All of the additive taxes associated with the refund. | [optional]
**refunded_inclusive_tax_money** | [**V1Money**](V1Money.md) | The amount of inclusive tax money refunded. This amount is always negative. | [optional]
**refunded_inclusive_tax** | [**[V1PaymentTax]**](V1PaymentTax.md) | All of the inclusive taxes associated with the refund. | [optional]
**refunded_tip_money** | [**V1Money**](V1Money.md) | The amount of tip money refunded. This amount is always negative. | [optional]
**refunded_discount_money** | [**V1Money**](V1Money.md) | The amount of discount money refunded. This amount is always positive. | [optional]
**refunded_surcharge_money** | [**V1Money**](V1Money.md) | The amount of surcharge money refunded. This amount is always negative. | [optional]
**refunded_surcharges** | [**[V1PaymentSurcharge]**](V1PaymentSurcharge.md) | A list of all surcharges associated with the refund. | [optional]
**created_at** | **String** | The time when the merchant initiated the refund for Square to process, in ISO 8601 format. | [optional]
**processed_at** | **String** | The time when Square processed the refund on behalf of the merchant, in ISO 8601 format. | [optional]
**payment_id** | **String** | A Square-issued ID associated with the refund. For single-tender refunds, payment_id is the ID of the original payment ID. For split-tender refunds, payment_id is the ID of the original tender. For exchange-based refunds (is_exchange &#x3D;&#x3D; true), payment_id is the ID of the original payment ID even if the payment includes other tenders. | [optional]
Expand Down
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": "2.20180918.1",
"version": "2.20181205.0",
"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 @@ -16,7 +16,7 @@ var querystring = require('querystring');

/**
* @module ApiClient
* @version 2.20180918.1
* @version 2.20181205.0
*/

/**
Expand Down Expand Up @@ -48,7 +48,7 @@ var exports = function() {
* @default {}
*/
this.defaultHeaders = {
'User-Agent': 'Square-Connect-Javascript/2.20180918.1'
'User-Agent': 'Square-Connect-Javascript/2.20181205.0'
};
/**
* The default HTTP timeout for all API calls.
Expand Down
2 changes: 1 addition & 1 deletion src/api/ApplePayApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
headerParams['Square-Version'] = '2018-09-18';
headerParams['Square-Version'] = '2018-12-05';

var formParams = {
};
Expand Down
22 changes: 11 additions & 11 deletions src/api/CatalogApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
headerParams['Square-Version'] = '2018-09-18';
headerParams['Square-Version'] = '2018-12-05';

var formParams = {
};
Expand Down Expand Up @@ -121,7 +121,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
headerParams['Square-Version'] = '2018-09-18';
headerParams['Square-Version'] = '2018-12-05';

var formParams = {
};
Expand Down Expand Up @@ -173,7 +173,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
headerParams['Square-Version'] = '2018-09-18';
headerParams['Square-Version'] = '2018-12-05';

var formParams = {
};
Expand Down Expand Up @@ -219,7 +219,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
headerParams['Square-Version'] = '2018-09-18';
headerParams['Square-Version'] = '2018-12-05';

var formParams = {
};
Expand Down Expand Up @@ -271,7 +271,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
headerParams['Square-Version'] = '2018-09-18';
headerParams['Square-Version'] = '2018-12-05';

var formParams = {
};
Expand Down Expand Up @@ -323,7 +323,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
headerParams['Square-Version'] = '2018-09-18';
headerParams['Square-Version'] = '2018-12-05';

var formParams = {
};
Expand Down Expand Up @@ -382,7 +382,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
headerParams['Square-Version'] = '2018-09-18';
headerParams['Square-Version'] = '2018-12-05';

var formParams = {
};
Expand Down Expand Up @@ -436,7 +436,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
headerParams['Square-Version'] = '2018-09-18';
headerParams['Square-Version'] = '2018-12-05';

var formParams = {
};
Expand Down Expand Up @@ -488,7 +488,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
headerParams['Square-Version'] = '2018-09-18';
headerParams['Square-Version'] = '2018-12-05';

var formParams = {
};
Expand Down Expand Up @@ -540,7 +540,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
headerParams['Square-Version'] = '2018-09-18';
headerParams['Square-Version'] = '2018-12-05';

var formParams = {
};
Expand Down Expand Up @@ -592,7 +592,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
headerParams['Square-Version'] = '2018-09-18';
headerParams['Square-Version'] = '2018-12-05';

var formParams = {
};
Expand Down
2 changes: 1 addition & 1 deletion src/api/CheckoutApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
headerParams['Square-Version'] = '2018-09-18';
headerParams['Square-Version'] = '2018-12-05';

var formParams = {
};
Expand Down
20 changes: 10 additions & 10 deletions src/api/CustomersApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
headerParams['Square-Version'] = '2018-09-18';
headerParams['Square-Version'] = '2018-12-05';

var formParams = {
};
Expand Down Expand Up @@ -96,7 +96,7 @@ module.exports = function(apiClient) {

/**
* CreateCustomerCard
* Adds a card on file to an existing customer. In the United States Square takes care of automatically updating any cards on file that might have expired since you first attached them to a customer. As with charges, calls to &#x60;CreateCustomerCard&#x60; are idempotent. Multiple calls with the same card nonce return the same card record that was created with the provided nonce during the _first_ call.
* Adds a card on file to an existing customer. As with charges, calls to &#x60;CreateCustomerCard&#x60; are idempotent. Multiple calls with the same card nonce return the same card record that was created with the provided nonce during the _first_ call.
* @param {String} customerId The ID of the customer to link the card on file to.
* @param {module:model/CreateCustomerCardRequest} 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/CreateCustomerCardResponse} and HTTP response
Expand All @@ -122,7 +122,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
headerParams['Square-Version'] = '2018-09-18';
headerParams['Square-Version'] = '2018-12-05';

var formParams = {
};
Expand All @@ -141,7 +141,7 @@ module.exports = function(apiClient) {

/**
* CreateCustomerCard
* Adds a card on file to an existing customer. In the United States Square takes care of automatically updating any cards on file that might have expired since you first attached them to a customer. As with charges, calls to &#x60;CreateCustomerCard&#x60; are idempotent. Multiple calls with the same card nonce return the same card record that was created with the provided nonce during the _first_ call.
* Adds a card on file to an existing customer. As with charges, calls to &#x60;CreateCustomerCard&#x60; are idempotent. Multiple calls with the same card nonce return the same card record that was created with the provided nonce during the _first_ call.
* @param {String} customerId The ID of the customer to link the card on file to.
* @param {module:model/CreateCustomerCardRequest} 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/CreateCustomerCardResponse}
Expand Down Expand Up @@ -176,7 +176,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
headerParams['Square-Version'] = '2018-09-18';
headerParams['Square-Version'] = '2018-12-05';

var formParams = {
};
Expand Down Expand Up @@ -236,7 +236,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
headerParams['Square-Version'] = '2018-09-18';
headerParams['Square-Version'] = '2018-12-05';

var formParams = {
};
Expand Down Expand Up @@ -291,7 +291,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
headerParams['Square-Version'] = '2018-09-18';
headerParams['Square-Version'] = '2018-12-05';

var formParams = {
};
Expand Down Expand Up @@ -347,7 +347,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
headerParams['Square-Version'] = '2018-09-18';
headerParams['Square-Version'] = '2018-12-05';

var formParams = {
};
Expand Down Expand Up @@ -399,7 +399,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
headerParams['Square-Version'] = '2018-09-18';
headerParams['Square-Version'] = '2018-12-05';

var formParams = {
};
Expand Down Expand Up @@ -458,7 +458,7 @@ module.exports = function(apiClient) {
};
var headerParams = {
};
headerParams['Square-Version'] = '2018-09-18';
headerParams['Square-Version'] = '2018-12-05';

var formParams = {
};
Expand Down
Loading

0 comments on commit 8691afa

Please sign in to comment.