Skip to content

Commit ba74639

Browse files
authored
Merge pull request #53 from square/release/8.1.0.20210121
Generated PR for Release: 8.1.0.20210121
2 parents e46d0d8 + b4729a4 commit ba74639

193 files changed

Lines changed: 650 additions & 473 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: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,45 @@
11
# Change Log
22

3+
## Version 8.1.0.20210121 (2021-01-21T00:00)
4+
## Existing API updates
5+
6+
* **Invoices API:** (beta)
7+
8+
The `InvoicePaymentRequest.request_method` field is deprecated, and its current options are separated into two new fields that better represent their scope:
9+
* `Invoice.delivery_method` specifies how Square should send invoices, reminders, and receipts to the customer.
10+
* `InvoicePaymentRequest.automatic_payment_source` specifies the payment method for an automatic payment.
11+
12+
As part of this change, the [InvoiceDeliveryMethod](https://developer.squareup.com/reference/square_2021-01-21/enums/InvoiceDeliveryMethod) and [InvoiceAutomaticPaymentSource](https://developer.squareup.com/reference/square_2021-01-21/enums/InvoiceAutomaticPaymentSource) enums are added and the `InvoiceRequestMethod` enum is deprecated.
13+
14+
The Invoices API will continue to accept `request_method` in create and update requests until the field is retired, but starting in this version, `request_method` is not included in returned `Invoice` objects. For more information, see the [migration notes.](https://developer.squareup.com/docs/invoices-api/overview#migrate-InvoicePaymentRequest.request_method)
15+
16+
17+
* **Locations API:**
18+
* The [Locations.MCC](https://developer.squareup.com/reference/square_2021-01-21/objects/Location#definition__property-mcc) field is now updatable (beta). You can use the `UpdateLocation` endpoint to update the merchant category code (MCC) associated with a seller location. For more information, see [Initialize a merchant category code.](https://developer.squareup.com/docs/locations-api#initialize-a-merchant-category-code)
19+
20+
21+
22+
23+
## SDKs
24+
* **Connect Node.js SDK:** (deprecated)
25+
26+
The deprecated Connect Node.js SDK is in the security [maintenance state.](https://developer.squareup.com/docs/build-basics/api-lifecycle#maintenance) It will not receive any bug fixes or API updates from the Square version 2021-01-21 release. However, the SDK will receive support and security patches until it is retired (EOL) in Q2, 2021. For more information, including steps for migrating to the [Square Node.js SDK,](https://github.com/square/square-nodejs-sdk) see the [Connect SDK README.](https://github.com/square/connect-nodejs-sdk/blob/master/README.md)
27+
28+
## Documentation updates
29+
* **Catalog API:**
30+
* The [Use Item Options to Manage Item Variations](https://developer.squareup.com/docs/catalog-api/item-options-migration) topic is added. It demonstrates how item variations are usually used and how item options can be used to enable random access to item variations.
31+
32+
* **Inventory API:**
33+
* The [Inventory API](inventory-api/what-it-does) content is updated. It provides clearer guidance about how to use the API, with a task-oriented TOC and improved code examples.
34+
35+
36+
337
## Version 8.0.0.20201216 (2020-12-16T00:00)
438
## Existing API updates
539

640
* **Orders API:**
7-
* [OrderLineItemPricingBlocklists.](https://developer.squareup.com/reference/square_2020_12_16/objects/OrderLineItemPricingBlocklists) You can explicitly specify taxes and discounts in an order or automatically apply preconfigured taxes and discounts to an order. In addition, you can now block applying these taxes and discounts to a specific [OrderLineItem](https://developer.squareup.com/reference/square_2020_12_16/objects/OrderLineItem) in an [order](https://developer.squareup.com/reference/square_2020_12_16/objects/Order). You add the `pricing_blocklists` attribute to individual line items and specify the `blocked_discounts` and `blocked_taxes` that you do not want to apply. For more information, see [Apply Taxes and Discounts.](orders-api/apply-taxes-and-discounts) For example walkthroughs, see [Automatically Apply Discounts](orders-api/apply-taxes-and-discounts/auto-apply-discounts) and [Automatically Apply Taxes.](orders-api/apply-taxes-and-discounts/auto-apply-taxes)
8-
* [OrderPricingOptions](https://developer.squareup.com/reference/square_2020_12_16/objects/OrderPricingOptions). Previously, the `pricing_options` field in an [order](https://developer.squareup.com/reference/square_2020_12_16/objects/OrderPricingOptions) supported only `auto_apply_discounts` to enable the automatic application of preconfigured discounts. Now it also supports `auto_apply_taxes` to enable the automatic application of preconfigured taxes. For more information, see [Automatically apply preconfigured catalog taxes or discounts.](orders-api/apply-taxes-and-discounts#automatically-apply-preconfigured-catalog-taxes-or-discounts)
41+
* [OrderLineItemPricingBlocklists.](https://developer.squareup.com/reference/square_2020_12_16/objects/OrderLineItemPricingBlocklists) You can explicitly specify taxes and discounts in an order or automatically apply preconfigured taxes and discounts to an order. In addition, you can now block applying these taxes and discounts to a specific [OrderLineItem](https://developer.squareup.com/reference/square_2020_12_16/objects/OrderLineItem) in an [order](https://developer.squareup.com/reference/square_2020_12_16/objects/Order). You add the `pricing_blocklists` attribute to individual line items and specify the `blocked_discounts` and `blocked_taxes` that you do not want to apply. For more information, see [Apply Taxes and Discounts.](https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts) For example walkthroughs, see [Automatically Apply Discounts](https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts/auto-apply-discounts) and [Automatically Apply Taxes.](https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts/auto-apply-taxes)
42+
* [OrderPricingOptions](https://developer.squareup.com/reference/square_2020_12_16/objects/OrderPricingOptions). Previously, the `pricing_options` field in an [order](https://developer.squareup.com/reference/square_2020_12_16/objects/OrderPricingOptions) supported only `auto_apply_discounts` to enable the automatic application of preconfigured discounts. Now it also supports `auto_apply_taxes` to enable the automatic application of preconfigured taxes. For more information, see [Automatically apply preconfigured catalog taxes or discounts.](https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts#automatically-apply-preconfigured-catalog-taxes-or-discounts)
943

1044
* [OrderLineItemTax](https://developer.squareup.com/reference/square_2020_12_16/objects/OrderLineItemTax). It now includes the new `auto_applied` field. It indicates whether the tax was automatically applied using a preconfigured [CatalogTax](https://developer.squareup.com/reference/square_2020_12_16/objects/CatalogTax).
1145

@@ -378,7 +412,7 @@ Square is excited to announce the public release of customized SDKs for [Java](h
378412

379413
* __Beta release:__ SDKs updated to support the new [CashDrawerShifts](cashdrawershift-api/reporting) API.
380414

381-
* Square now follows the semantic versioning scheme for all SDKs except PHP and Node.js. This versioning scheme uses three numbers to delineate MAJOR, MINOR, and PATCH versions of our SDK. In addition, the SDK version also includes the API version so you know what Square API version the SDK is related to. For more information, see [Versioning and SDKs](build-basics/versioning-overview#versioning-and-sdks).
415+
* Square now follows the semantic versioning scheme for all SDKs except PHP and Node.js. This versioning scheme uses three numbers to delineate MAJOR, MINOR, and PATCH versions of our SDK. In addition, the SDK version also includes the API version so you know what Square API version the SDK is related to. For more information, see [Versioning and SDKs](https://developer.squareup.com/docs/build-basics/versioning-overview#versioning-and-sdks).
382416
* Java, .Net, Python, and Ruby SDKs are now version 4.0.0. Java and .Net SDKs have breaking changes in version 4.0.0. Ruby and Python do not have breaking changes.
383417

384418
## Version 3.20191120.0 (2019-11-20)

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2020 Square, Inc.
1+
Copyright 2121 Square, Inc.
22
Licensed under the Apache License, Version 2.0 (the "License");
33
you may not use this file except in compliance with the License.
44
You may obtain a copy of the License at

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Square Python SDK
44

5-
[![Travis status](https://travis-ci.com/square/square-python-sdk.svg?branch=master)](https://travis-ci.com/square/square-python-sdk)
5+
[![Travis status](https://travis-ci.org/square/square-python-sdk.svg?branch=master)](https://travis-ci.org/square/square-python-sdk)
66
[![PyPi version](https://badge.fury.io/py/squareup.svg?new)](https://badge.fury.io/py/squareup)
77
[![Apache-2 license](https://img.shields.io/badge/license-Apache2-brightgreen.svg)](https://www.apache.org/licenses/LICENSE-2.0)
88

doc/api/bookings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def list_team_member_booking_profiles(self,
156156

157157
| Parameter | Type | Tags | Description |
158158
| --- | --- | --- | --- |
159-
| `bookable_only` | `bool` | Query, Optional | Indicates whether to include only bookable team members in the returned result (`true`) or not (`false`). |
159+
| `bookable_only` | `bool` | Query, Optional | Indicates whether to include only bookable team members in the returned result (`true`) or not (`false`).<br>**Default**: `False` |
160160
| `limit` | `int` | Query, Optional | The maximum number of results to return. |
161161
| `cursor` | `string` | Query, Optional | The cursor for paginating through the results. |
162162
| `location_id` | `string` | Query, Optional | Indicates whether to include only team members enabled at the given location in the returned result. |

doc/api/catalog.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ def retrieve_catalog_object(self,
589589
| Parameter | Type | Tags | Description |
590590
| --- | --- | --- | --- |
591591
| `object_id` | `string` | Template, Required | The object ID of any type of catalog objects to be retrieved. |
592-
| `include_related_objects` | `bool` | Query, Optional | If `true`, the response will include additional objects that are related to the<br>requested object, as follows:<br><br>If the `object` field of the response contains a `CatalogItem`, its associated<br>`CatalogCategory`, `CatalogTax`, `CatalogImage` and `CatalogModifierList` objects will<br>be returned in the `related_objects` field of the response. If the `object` field of<br>the response contains a `CatalogItemVariation`, its parent `CatalogItem` will be returned<br>in the `related_objects` field of the response.<br><br>Default value: `false` |
592+
| `include_related_objects` | `bool` | Query, Optional | If `true`, the response will include additional objects that are related to the<br>requested object, as follows:<br><br>If the `object` field of the response contains a `CatalogItem`, its associated<br>`CatalogCategory`, `CatalogTax`, `CatalogImage` and `CatalogModifierList` objects will<br>be returned in the `related_objects` field of the response. If the `object` field of<br>the response contains a `CatalogItemVariation`, its parent `CatalogItem` will be returned<br>in the `related_objects` field of the response.<br><br>Default value: `false`<br>**Default**: `False` |
593593
| `catalog_version` | `long|int` | Query, Optional | Requests objects as of a specific version of the catalog. This allows you to retrieve historical<br>versions of objects. The value to retrieve a specific version of an object can be found<br>in the version field of [CatalogObject](#type-catalogobject)s. |
594594

595595
## Response Type
@@ -614,8 +614,8 @@ elif result.is_error():
614614

615615
# Search Catalog Objects
616616

617-
Searches for [CatalogObject](#type-CatalogObject) of any types against supported search attribute values,
618-
excluding custom attribute values on items or item variations, against one or more of the specified query expressions,
617+
Searches for [CatalogObject](#type-CatalogObject) of any type by matching supported search attribute values,
618+
excluding custom attribute values on items or item variations, against one or more of the specified query expressions.
619619

620620
This (`SearchCatalogObjects`) endpoint differs from the [SearchCatalogItems](#endpoint-Catalog-SearchCatalogItems)
621621
endpoint in the following aspects:
@@ -681,7 +681,7 @@ elif result.is_error():
681681
# Search Catalog Items
682682

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

686686
This (`SearchCatalogItems`) endpoint differs from the [SearchCatalogObjects](#endpoint-Catalog-SearchCatalogObjects)
687687
endpoint in the following aspects:

doc/api/employees.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ employees_api = client.employees
1616

1717
# List Employees
1818

19+
**This endpoint is deprecated. **
20+
1921
ListEmployees
2022

2123
```python
@@ -58,6 +60,8 @@ elif result.is_error():
5860

5961
# Retrieve Employee
6062

63+
**This endpoint is deprecated. **
64+
6165
RetrieveEmployee
6266

6367
```python

doc/api/invoices.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,14 @@ body['invoice']['payment_requests'] = []
108108

109109
body['invoice']['payment_requests'].append({})
110110
body['invoice']['payment_requests'][0]['uid'] = 'uid4'
111-
body['invoice']['payment_requests'][0]['request_method'] = 'EMAIL'
111+
body['invoice']['payment_requests'][0]['request_method'] = 'SHARE_MANUALLY'
112112
body['invoice']['payment_requests'][0]['request_type'] = 'BALANCE'
113113
body['invoice']['payment_requests'][0]['due_date'] = '2030-01-24'
114114
body['invoice']['payment_requests'][0]['fixed_amount_requested_money'] = {}
115115
body['invoice']['payment_requests'][0]['fixed_amount_requested_money']['amount'] = 52
116116
body['invoice']['payment_requests'][0]['fixed_amount_requested_money']['currency'] = 'USS'
117117
body['invoice']['payment_requests'][0]['tipping_enabled'] = True
118+
body['invoice']['payment_requests'][0]['automatic_payment_source'] = 'NONE'
118119
body['invoice']['payment_requests'][0]['reminders'] = []
119120

120121
body['invoice']['payment_requests'][0]['reminders'].append({})
@@ -125,6 +126,7 @@ body['invoice']['payment_requests'][0]['reminders'][0]['status'] = 'PENDING'
125126
body['invoice']['payment_requests'][0]['reminders'][0]['sent_at'] = 'sent_at2'
126127

127128

129+
body['invoice']['delivery_method'] = 'EMAIL'
128130
body['invoice']['invoice_number'] = 'inv-100'
129131
body['invoice']['title'] = 'Event Planning Services'
130132
body['invoice']['description'] = 'We appreciate your business!'
@@ -333,7 +335,7 @@ elif result.is_error():
333335
Cancels an invoice. The seller cannot collect payments for
334336
the canceled invoice.
335337

336-
You cannot cancel an invoice in a terminal state: `PAID`, `REFUNDED`, `CANCELED`, or `FAILED`.
338+
You cannot cancel an invoice in the `DRAFT` state or in a terminal state: `PAID`, `REFUNDED`, `CANCELED`, or `FAILED`.
337339

338340
```python
339341
def cancel_invoice(self,

doc/api/labor.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,8 @@ elif result.is_error():
238238

239239
# List Employee Wages
240240

241+
**This endpoint is deprecated. **
242+
241243
Returns a paginated list of `EmployeeWage` instances for a business.
242244

243245
```python
@@ -277,6 +279,8 @@ elif result.is_error():
277279

278280
# Get Employee Wage
279281

282+
**This endpoint is deprecated. **
283+
280284
Returns a single `EmployeeWage` specified by id.
281285

282286
```python

doc/api/o-auth.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ o_auth_api = client.o_auth
1717

1818
# Renew Token
1919

20+
**This endpoint is deprecated. **
21+
2022
`RenewToken` is deprecated. For information about refreshing OAuth access tokens, see
2123
[Renew OAuth Token](https://developer.squareup.com/docs/oauth-api/cookbook/renew-oauth-tokens).
2224

doc/api/transactions.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ transactions_api = client.transactions
2121

2222
# List Refunds
2323

24+
**This endpoint is deprecated. **
25+
2426
Lists refunds for one of a business's locations.
2527

2628
In addition to full or partial tender refunds processed through Square APIs,
@@ -75,6 +77,8 @@ elif result.is_error():
7577

7678
# List Transactions
7779

80+
**This endpoint is deprecated. **
81+
7882
Lists transactions for a particular location.
7983

8084
Transactions include payment information from sales and exchanges and refund
@@ -125,6 +129,8 @@ elif result.is_error():
125129

126130
# Charge
127131

132+
**This endpoint is deprecated. **
133+
128134
Charges a card represented by a card nonce or a customer's card on file.
129135

130136
Your request to this endpoint must include _either_:
@@ -216,6 +222,8 @@ elif result.is_error():
216222

217223
# Retrieve Transaction
218224

225+
**This endpoint is deprecated. **
226+
219227
Retrieves details for a single transaction.
220228

221229
```python
@@ -252,6 +260,8 @@ elif result.is_error():
252260

253261
# Capture Transaction
254262

263+
**This endpoint is deprecated. **
264+
255265
Captures a transaction that was created with the [Charge](#endpoint-charge)
256266
endpoint with a `delay_capture` value of `true`.
257267

@@ -292,6 +302,8 @@ elif result.is_error():
292302

293303
# Create Refund
294304

305+
**This endpoint is deprecated. **
306+
295307
Initiates a refund for a previously charged tender.
296308

297309
You must issue a refund within 120 days of the associated payment. See
@@ -345,6 +357,8 @@ elif result.is_error():
345357

346358
# Void Transaction
347359

360+
**This endpoint is deprecated. **
361+
348362
Cancels a transaction that was created with the [Charge](#endpoint-charge)
349363
endpoint with a `delay_capture` value of `true`.
350364

0 commit comments

Comments
 (0)