Skip to content

Commit

Permalink
Merge pull request #73 from square/release/14.1.0.20210915
Browse files Browse the repository at this point in the history
Generated PR for Release: 14.1.0.20210915
  • Loading branch information
joanc-sq authored Sep 16, 2021
2 parents cc1f910 + 5d8159a commit dc9750c
Show file tree
Hide file tree
Showing 157 changed files with 986 additions and 1,708 deletions.
32 changes: 1 addition & 31 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Change Log

## Version 14.0.0.20210915 (2021-09-15)
## Version 14.1.0.20210915 (2021-09-15)
## API updates

* **Invoices API:**
Expand All @@ -22,36 +22,6 @@
* Revised API descriptions for the ObtainToken and Authorize endpoints. Clarified that the Authorize endpoint is not a callable API but is used to direct the seller to the Square authorization page. For more information about the Authorize endpoint, see [Create the Redirect URL and Square Authorization Page URL.](https://developer.squareup.com/docs/oauth-api/create-urls-for-square-authorization)


## Version 13.1.0.20210818 (2021-08-18)
## API updates

* **Customers API:**
* [Customer](https://developer.squareup.com/reference/square_2021-08-18/objects/Customer) object. The `version` field has moved to the [general availability](https://developer.squareup.com/docs/build-basics/api-lifecycle#general-availability) (GA) state. This field represents the current version of the customer profile and enables optimistic concurrency control. For more information, see [Customer profile versions and optimistic concurrency support.](https://developer.squareup.com/docs/customers-api/what-it-does#customer-profile-versions-and-optimistic-concurrency-support)
* [ListCustomers](https://developer.squareup.com/reference/square_2021-08-18/customers-api/list-customers) endpoint. The new, optional `limit` query parameter can be used to specify the maximum number of results in a paginated response.

* **Customer Groups API:**
* [ListCustomerGroups](https://developer.squareup.com/reference/square_2021-08-18/customer-groups-api/list-customer-groups) endpoint. The new, optional `limit` query parameter can be used to specify the maximum number of results in a paginated response.

* **Customer Segments API:**
* [ListCustomerSegments](https://developer.squareup.com/reference/square_2021-08-18/customer-segments-api/list-customer-segments) endpoint. The new, optional `limit` query parameter can be used to specify the maximum number of results in a paginated response.

* **Invoices API:**
* Square Invoices Plus is a monthly subscription plan that allows access to premium invoice features. After Invoices Plus is launched in September 2021, a subscription will be required to create invoices with custom fields and installment payments. For more information, including how to handle new errors, see [Premium features available with Invoices Plus.](https://developer.squareup.com/docs/invoices-api/overview#invoices-plus-subscription)

* **Loyalty API:**
* [LoyaltyAccount](https://developer.squareup.com/reference/square_2021-08-18/objects/LoyaltyAccount) object. Added a new `expiring_point_deadlines` field that specifies when points in the account balance are scheduled to expire. This field contains a list of [LoyaltyAccountExpiringPointDeadline](https://developer.squareup.com/reference/square_2021-08-18/objects/LoyaltyAccountExpiringPointDeadline) objects. For more information, see [Expiring points.](https://developer.squareup.com/docs/loyalty-api/overview#expiring-points)

## Documentation updates

* [App Marketplace.](https://developer.squareup.com/docs/app-marketplace) Added the following topics:
* [How to apply.](https://developer.squareup.com/docs/app-marketplace#how-to-apply) Documented the process to list an application on the Square App Marketplace.
* [App Marketplace API Usage Requirements.](https://developer.squareup.com/docs/app-marketplace/requirements) Added a topic that describes a set of API usage requirements and recommendations for partner applications.

* [Automatic communications from Square about invoices.](https://developer.squareup.com/docs/invoices-api/overview#automatic-communication-from-square-to-customers) Documented the invoice-related communications sent from Square to customers and sellers.

* [Snippets best practices.](https://developer.squareup.com/docs/snippets-api/overview#best-practices) Documented best practices and additional requirements for snippets and applications that integrate with the Snippets API.


## Version 12.0.0.20210616 (2021-06-16)
## New API releases
* **Gift Cards API and Gift Card Activities API.** Gift card support is integrated in the [Square Seller Dashboard](https://squareup.com/dashboard/) and the [Square Point of Sale](https://squareup.com/us/en/point-of-sale) application. Sellers can sell, redeem, track, and reload Square gift cards. Now developers can use the [Gift Cards API](https://developer.squareup.com/reference/square_2021-06-16/gift-cards-api) and the [Gift Card Activities API](https://developer.squareup.com/reference/square_2021-06-16/gift-card-activities-api) to integrate Square gift cards into third-party applications. For more information, see [Gift Cards API Overview.](https://developer.squareup.com/docs/gift-cards/using-gift-cards-api)
Expand Down
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Use this Python library to manage Square resources (payments, orders, items, inv

The SDK supports the following versions of Python:
* Python 2 versions 2.7.9 and later
* Python 3 versions 3.4 and later
* Python 3 versions 3.7 and later

## Installation

Expand Down Expand Up @@ -46,6 +46,9 @@ pip install -r test-requirements.txt
* [Disputes]
* [Checkout]
* [Apple Pay]
* [Cards]

### Terminal
* [Terminal]

### Orders
Expand All @@ -69,19 +72,22 @@ pip install -r test-requirements.txt
### Loyalty
* [Loyalty]

### Gift Cards
* [Gift Cards]
* [Gift Card Activities]

### Bookings
* [Bookings]

### Business
* [Merchants]
* [Locations]
* [Devices]
* [Cash Drawers]

### Team
* [Team]
* [Employees]
* [Labor]
* [Cash Drawers]

### Financials
* [Bank Accounts]
Expand All @@ -95,6 +101,7 @@ pip install -r test-requirements.txt
* [OAuth]

### Deprecated APIs
* [Employees]
* [V1 Employees]
* [V1 Transactions]
* [V1 Items]
Expand Down Expand Up @@ -409,3 +416,6 @@ You can also use the Square API to create applications or services that work wit
[OAuth overview]: https://developer.squareup.com/docs/oauth-api/what-it-does
[Sites]: doc/api/sites.md
[Snippets]: doc/api/snippets.md
[Cards]: doc/api/cards.md
[Gift Cards]: doc/api/gift-cards.md
[Gift Card Activities]: doc/api/gift-card-activities.md
4 changes: 2 additions & 2 deletions doc/api/catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ elif result.is_error():
# Search Catalog Objects

Searches for [CatalogObject](/doc/models/catalog-object.md) of any type by matching supported search attribute values,
excluding custom attribute values on items or item variations, against one or more of the specified query expressions.
excluding custom attribute values on items or item variations, against one or more of the specified query filters.

This (`SearchCatalogObjects`) endpoint differs from the [SearchCatalogItems](/doc/api/catalog.md#search-catalog-items)
endpoint in the following aspects:
Expand Down Expand Up @@ -736,7 +736,7 @@ elif result.is_error():
# Search Catalog Items

Searches for catalog items or item variations by matching supported search attribute values, including
custom attribute values, against one or more of the specified query expressions.
custom attribute values, against one or more of the specified query filters.

This (`SearchCatalogItems`) endpoint differs from the [SearchCatalogObjects](/doc/api/catalog.md#search-catalog-objects)
endpoint in the following aspects:
Expand Down
3 changes: 3 additions & 0 deletions doc/api/checkout.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ body['order']['order']['line_items'][0]['quantity_unit']['measurement_unit']['le
body['order']['order']['line_items'][0]['quantity_unit']['measurement_unit']['volume_unit'] = 'GENERIC_SHOT'
body['order']['order']['line_items'][0]['quantity_unit']['measurement_unit']['weight_unit'] = 'METRIC_MILLIGRAM'
body['order']['order']['line_items'][0]['quantity_unit']['precision'] = 191
body['order']['order']['line_items'][0]['quantity_unit']['catalog_object_id'] = 'catalog_object_id7'
body['order']['order']['line_items'][0]['quantity_unit']['catalog_version'] = 131
body['order']['order']['line_items'][0]['note'] = 'note1'
body['order']['order']['line_items'][0]['catalog_object_id'] = 'catalog_object_id3'
Expand Down Expand Up @@ -95,6 +96,7 @@ body['order']['order']['line_items'][1]['quantity_unit']['measurement_unit']['le
body['order']['order']['line_items'][1]['quantity_unit']['measurement_unit']['volume_unit'] = 'GENERIC_CUP'
body['order']['order']['line_items'][1]['quantity_unit']['measurement_unit']['weight_unit'] = 'IMPERIAL_STONE'
body['order']['order']['line_items'][1]['quantity_unit']['precision'] = 192
body['order']['order']['line_items'][1]['quantity_unit']['catalog_object_id'] = 'catalog_object_id6'
body['order']['order']['line_items'][1]['quantity_unit']['catalog_version'] = 130
body['order']['order']['line_items'][1]['note'] = 'note0'
body['order']['order']['line_items'][1]['catalog_object_id'] = 'catalog_object_id2'
Expand All @@ -113,6 +115,7 @@ body['order']['order']['line_items'][2]['quantity_unit']['measurement_unit']['le
body['order']['order']['line_items'][2]['quantity_unit']['measurement_unit']['volume_unit'] = 'GENERIC_PINT'
body['order']['order']['line_items'][2]['quantity_unit']['measurement_unit']['weight_unit'] = 'IMPERIAL_POUND'
body['order']['order']['line_items'][2]['quantity_unit']['precision'] = 193
body['order']['order']['line_items'][2]['quantity_unit']['catalog_object_id'] = 'catalog_object_id5'
body['order']['order']['line_items'][2]['quantity_unit']['catalog_version'] = 129
body['order']['order']['line_items'][2]['note'] = 'note9'
body['order']['order']['line_items'][2]['catalog_object_id'] = 'catalog_object_id1'
Expand Down
7 changes: 5 additions & 2 deletions doc/api/customer-groups.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@ Retrieves the list of customer groups of a business.

```python
def list_customer_groups(self,
cursor=None)
cursor=None,
limit=None)
```

## Parameters

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `cursor` | `string` | Query, Optional | A pagination cursor returned by a previous call to this endpoint.<br>Provide this cursor to retrieve the next set of results for your original query.<br><br>For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). |
| `limit` | `int` | Query, Optional | The maximum number of results to return in a single page. This limit is advisory. The response might contain more or fewer results.<br>The limit is ignored if it is less than 1 or greater than 50. The default value is 50.<br><br>For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). |

## Response Type

Expand All @@ -40,8 +42,9 @@ def list_customer_groups(self,

```python
cursor = 'cursor6'
limit = 172

result = customer_groups_api.list_customer_groups(cursor)
result = customer_groups_api.list_customer_groups(cursor, limit)

if result.is_success():
print(result.body)
Expand Down
7 changes: 5 additions & 2 deletions doc/api/customer-segments.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ Retrieves the list of customer segments of a business.

```python
def list_customer_segments(self,
cursor=None)
cursor=None,
limit=None)
```

## Parameters

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `cursor` | `string` | Query, Optional | A pagination cursor returned by previous calls to `ListCustomerSegments`.<br>This cursor is used to retrieve the next set of query results.<br><br>For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). |
| `limit` | `int` | Query, Optional | The maximum number of results to return in a single page. This limit is advisory. The response might contain more or fewer results.<br>The limit is ignored if it is less than 1 or greater than 50. The default value is 50.<br><br>For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). |

## Response Type

Expand All @@ -37,8 +39,9 @@ def list_customer_segments(self,

```python
cursor = 'cursor6'
limit = 172

result = customer_segments_api.list_customer_segments(cursor)
result = customer_segments_api.list_customer_segments(cursor, limit)

if result.is_success():
print(result.body)
Expand Down
9 changes: 6 additions & 3 deletions doc/api/customers.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ profiles can take closer to one minute or longer, especially during network inci
```python
def list_customers(self,
cursor=None,
limit=None,
sort_field=None,
sort_order=None)
```
Expand All @@ -42,8 +43,9 @@ def list_customers(self,
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `cursor` | `string` | Query, Optional | A pagination cursor returned by a previous call to this endpoint.<br>Provide this cursor to retrieve the next set of results for your original query.<br><br>For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). |
| `sort_field` | [`str (Customer Sort Field)`](/doc/models/customer-sort-field.md) | Query, Optional | Indicates how customers should be sorted.<br><br>Default: `DEFAULT`. |
| `sort_order` | [`str (Sort Order)`](/doc/models/sort-order.md) | Query, Optional | Indicates whether customers should be sorted in ascending (`ASC`) or<br>descending (`DESC`) order.<br><br>Default: `ASC`. |
| `limit` | `int` | Query, Optional | The maximum number of results to return in a single page. This limit is advisory. The response might contain more or fewer results.<br>The limit is ignored if it is less than 1 or greater than 100. The default value is 100.<br><br>For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). |
| `sort_field` | [`str (Customer Sort Field)`](/doc/models/customer-sort-field.md) | Query, Optional | Indicates how customers should be sorted.<br><br>The default value is `DEFAULT`. |
| `sort_order` | [`str (Sort Order)`](/doc/models/sort-order.md) | Query, Optional | Indicates whether customers should be sorted in ascending (`ASC`) or<br>descending (`DESC`) order.<br><br>The default value is `ASC`. |

## Response Type

Expand All @@ -53,10 +55,11 @@ def list_customers(self,

```python
cursor = 'cursor6'
limit = 172
sort_field = 'DEFAULT'
sort_order = 'DESC'

result = customers_api.list_customers(cursor, sort_field, sort_order)
result = customers_api.list_customers(cursor, limit, sort_field, sort_order)

if result.is_success():
print(result.body)
Expand Down
4 changes: 2 additions & 2 deletions doc/api/gift-cards.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ elif result.is_error():

# Create Gift Card

Creates a digital gift card. You must activate the gift card before
it can be used. For more information, see
Creates a digital gift card or registers a physical (plastic) gift card. You must activate the gift card before
it can be used for payment. For more information, see
[Selling gift cards](https://developer.squareup.com/docs/gift-cards/using-gift-cards-api#selling-square-gift-cards).

```python
Expand Down
1 change: 1 addition & 0 deletions doc/api/invoices.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ body['invoice']['custom_fields'][1]['label'] = 'Terms of Service'
body['invoice']['custom_fields'][1]['value'] = 'The terms of service are...'
body['invoice']['custom_fields'][1]['placement'] = 'BELOW_LINE_ITEMS'

body['invoice']['sale_or_service_date'] = '2030-01-24'
body['idempotency_key'] = 'ce3748f9-5fc1-4762-aa12-aae5e843f1f4'

result = invoices_api.create_invoice(body)
Expand Down
Loading

0 comments on commit dc9750c

Please sign in to comment.