Skip to content

Commit dc9750c

Browse files
authored
Merge pull request #73 from square/release/14.1.0.20210915
Generated PR for Release: 14.1.0.20210915
2 parents cc1f910 + 5d8159a commit dc9750c

157 files changed

Lines changed: 986 additions & 1708 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Change Log
22

3-
## Version 14.0.0.20210915 (2021-09-15)
3+
## Version 14.1.0.20210915 (2021-09-15)
44
## API updates
55

66
* **Invoices API:**
@@ -22,36 +22,6 @@
2222
* 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)
2323

2424

25-
## Version 13.1.0.20210818 (2021-08-18)
26-
## API updates
27-
28-
* **Customers API:**
29-
* [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)
30-
* [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.
31-
32-
* **Customer Groups API:**
33-
* [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.
34-
35-
* **Customer Segments API:**
36-
* [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.
37-
38-
* **Invoices API:**
39-
* 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)
40-
41-
* **Loyalty API:**
42-
* [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)
43-
44-
## Documentation updates
45-
46-
* [App Marketplace.](https://developer.squareup.com/docs/app-marketplace) Added the following topics:
47-
* [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.
48-
* [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.
49-
50-
* [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.
51-
52-
* [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.
53-
54-
5525
## Version 12.0.0.20210616 (2021-06-16)
5626
## New API releases
5727
* **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)

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Use this Python library to manage Square resources (payments, orders, items, inv
1212

1313
The SDK supports the following versions of Python:
1414
* Python 2 versions 2.7.9 and later
15-
* Python 3 versions 3.4 and later
15+
* Python 3 versions 3.7 and later
1616

1717
## Installation
1818

@@ -46,6 +46,9 @@ pip install -r test-requirements.txt
4646
* [Disputes]
4747
* [Checkout]
4848
* [Apple Pay]
49+
* [Cards]
50+
51+
### Terminal
4952
* [Terminal]
5053

5154
### Orders
@@ -69,19 +72,22 @@ pip install -r test-requirements.txt
6972
### Loyalty
7073
* [Loyalty]
7174

75+
### Gift Cards
76+
* [Gift Cards]
77+
* [Gift Card Activities]
78+
7279
### Bookings
7380
* [Bookings]
7481

7582
### Business
7683
* [Merchants]
7784
* [Locations]
7885
* [Devices]
86+
* [Cash Drawers]
7987

8088
### Team
8189
* [Team]
82-
* [Employees]
8390
* [Labor]
84-
* [Cash Drawers]
8591

8692
### Financials
8793
* [Bank Accounts]
@@ -95,6 +101,7 @@ pip install -r test-requirements.txt
95101
* [OAuth]
96102

97103
### Deprecated APIs
104+
* [Employees]
98105
* [V1 Employees]
99106
* [V1 Transactions]
100107
* [V1 Items]
@@ -409,3 +416,6 @@ You can also use the Square API to create applications or services that work wit
409416
[OAuth overview]: https://developer.squareup.com/docs/oauth-api/what-it-does
410417
[Sites]: doc/api/sites.md
411418
[Snippets]: doc/api/snippets.md
419+
[Cards]: doc/api/cards.md
420+
[Gift Cards]: doc/api/gift-cards.md
421+
[Gift Card Activities]: doc/api/gift-card-activities.md

doc/api/catalog.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ elif result.is_error():
670670
# Search Catalog Objects
671671

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

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

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

741741
This (`SearchCatalogItems`) endpoint differs from the [SearchCatalogObjects](/doc/api/catalog.md#search-catalog-objects)
742742
endpoint in the following aspects:

doc/api/checkout.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ body['order']['order']['line_items'][0]['quantity_unit']['measurement_unit']['le
5959
body['order']['order']['line_items'][0]['quantity_unit']['measurement_unit']['volume_unit'] = 'GENERIC_SHOT'
6060
body['order']['order']['line_items'][0]['quantity_unit']['measurement_unit']['weight_unit'] = 'METRIC_MILLIGRAM'
6161
body['order']['order']['line_items'][0]['quantity_unit']['precision'] = 191
62+
body['order']['order']['line_items'][0]['quantity_unit']['catalog_object_id'] = 'catalog_object_id7'
6263
body['order']['order']['line_items'][0]['quantity_unit']['catalog_version'] = 131
6364
body['order']['order']['line_items'][0]['note'] = 'note1'
6465
body['order']['order']['line_items'][0]['catalog_object_id'] = 'catalog_object_id3'
@@ -95,6 +96,7 @@ body['order']['order']['line_items'][1]['quantity_unit']['measurement_unit']['le
9596
body['order']['order']['line_items'][1]['quantity_unit']['measurement_unit']['volume_unit'] = 'GENERIC_CUP'
9697
body['order']['order']['line_items'][1]['quantity_unit']['measurement_unit']['weight_unit'] = 'IMPERIAL_STONE'
9798
body['order']['order']['line_items'][1]['quantity_unit']['precision'] = 192
99+
body['order']['order']['line_items'][1]['quantity_unit']['catalog_object_id'] = 'catalog_object_id6'
98100
body['order']['order']['line_items'][1]['quantity_unit']['catalog_version'] = 130
99101
body['order']['order']['line_items'][1]['note'] = 'note0'
100102
body['order']['order']['line_items'][1]['catalog_object_id'] = 'catalog_object_id2'
@@ -113,6 +115,7 @@ body['order']['order']['line_items'][2]['quantity_unit']['measurement_unit']['le
113115
body['order']['order']['line_items'][2]['quantity_unit']['measurement_unit']['volume_unit'] = 'GENERIC_PINT'
114116
body['order']['order']['line_items'][2]['quantity_unit']['measurement_unit']['weight_unit'] = 'IMPERIAL_POUND'
115117
body['order']['order']['line_items'][2]['quantity_unit']['precision'] = 193
118+
body['order']['order']['line_items'][2]['quantity_unit']['catalog_object_id'] = 'catalog_object_id5'
116119
body['order']['order']['line_items'][2]['quantity_unit']['catalog_version'] = 129
117120
body['order']['order']['line_items'][2]['note'] = 'note9'
118121
body['order']['order']['line_items'][2]['catalog_object_id'] = 'catalog_object_id1'

doc/api/customer-groups.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,16 @@ Retrieves the list of customer groups of a business.
2323

2424
```python
2525
def list_customer_groups(self,
26-
cursor=None)
26+
cursor=None,
27+
limit=None)
2728
```
2829

2930
## Parameters
3031

3132
| Parameter | Type | Tags | Description |
3233
| --- | --- | --- | --- |
3334
| `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). |
35+
| `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). |
3436

3537
## Response Type
3638

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

4143
```python
4244
cursor = 'cursor6'
45+
limit = 172
4346

44-
result = customer_groups_api.list_customer_groups(cursor)
47+
result = customer_groups_api.list_customer_groups(cursor, limit)
4548

4649
if result.is_success():
4750
print(result.body)

doc/api/customer-segments.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,16 @@ Retrieves the list of customer segments of a business.
2020

2121
```python
2222
def list_customer_segments(self,
23-
cursor=None)
23+
cursor=None,
24+
limit=None)
2425
```
2526

2627
## Parameters
2728

2829
| Parameter | Type | Tags | Description |
2930
| --- | --- | --- | --- |
3031
| `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). |
32+
| `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). |
3133

3234
## Response Type
3335

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

3840
```python
3941
cursor = 'cursor6'
42+
limit = 172
4043

41-
result = customer_segments_api.list_customer_segments(cursor)
44+
result = customer_segments_api.list_customer_segments(cursor, limit)
4245

4346
if result.is_success():
4447
print(result.body)

doc/api/customers.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ profiles can take closer to one minute or longer, especially during network inci
3333
```python
3434
def list_customers(self,
3535
cursor=None,
36+
limit=None,
3637
sort_field=None,
3738
sort_order=None)
3839
```
@@ -42,8 +43,9 @@ def list_customers(self,
4243
| Parameter | Type | Tags | Description |
4344
| --- | --- | --- | --- |
4445
| `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). |
45-
| `sort_field` | [`str (Customer Sort Field)`](/doc/models/customer-sort-field.md) | Query, Optional | Indicates how customers should be sorted.<br><br>Default: `DEFAULT`. |
46-
| `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`. |
46+
| `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). |
47+
| `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`. |
48+
| `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`. |
4749

4850
## Response Type
4951

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

5456
```python
5557
cursor = 'cursor6'
58+
limit = 172
5659
sort_field = 'DEFAULT'
5760
sort_order = 'DESC'
5861

59-
result = customers_api.list_customers(cursor, sort_field, sort_order)
62+
result = customers_api.list_customers(cursor, limit, sort_field, sort_order)
6063

6164
if result.is_success():
6265
print(result.body)

doc/api/gift-cards.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ elif result.is_error():
6767

6868
# Create Gift Card
6969

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

7474
```python

doc/api/invoices.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ body['invoice']['custom_fields'][1]['label'] = 'Terms of Service'
147147
body['invoice']['custom_fields'][1]['value'] = 'The terms of service are...'
148148
body['invoice']['custom_fields'][1]['placement'] = 'BELOW_LINE_ITEMS'
149149

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

152153
result = invoices_api.create_invoice(body)

0 commit comments

Comments
 (0)