Skip to content

Commit 68ae7a2

Browse files
author
Xiao Hu
authored
Merge pull request #64 from square/release/13.0.0.20210721
Generated PR for Release: 13.0.0.20210721
2 parents 119649c + fd6ec44 commit 68ae7a2

57 files changed

Lines changed: 1154 additions & 265 deletions

Some content is hidden

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

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ubuntu-latest
1919
strategy:
2020
matrix:
21-
python-version: [2.7, 3.5]
21+
python-version: [2.7, 3.6]
2222

2323
steps:
2424
- uses: actions/checkout@v2

CHANGELOG.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,53 @@
11
# Change Log
22

3+
## Version 13.0.0.20210721 (2021-07-21)
4+
## SDK updates
5+
* The [Square Python SDK](https://developer.squareup.com/docs/sdks/python) now requires Python 3.7 or later, if Python 3 is used. With Python 2, the minimum version remains at 2.7.
6+
7+
## API updates
8+
9+
* **Orders API:**
10+
* [OrderServiceCharge](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderServiceCharge) object. Added a new field, `type`. It identifies the service charge type.
11+
12+
* [OrderQuantityUnit](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderQuantityUnit),
13+
[OrderLineItem](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderLineItem),
14+
[OrderLineItemDiscount](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderLineItemDiscount),
15+
[OrderLineItemModifier](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderLineItemModifier),
16+
[OrderLineItemTax](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderLineItemTax),
17+
[OrderServiceCharge](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderServiceCharge),
18+
[OrderReturnLineItem](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderReturnLineItem),
19+
[OrderReturnLineItemModifier](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderReturnLineItemModifier),
20+
[OrderReturnServiceCharge](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderReturnServiceCharge),
21+
[OrderReturnTax](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderReturnTax), and
22+
[OrderReturnDiscount](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderReturnDiscount) objects. Added a new field, `catalog_version`.
23+
* **Locations API:**
24+
* [Location](https://developer.squareup.com/reference/square_2021-07-21/objects/Location) object. Added a new field `tax_ids` of type `TaxIds`. In the current implementation, sellers in Ireland and France can configure tax IDs during the onboarding process. They can also provide the information later by updating the location information in the Seller Dashboard. These tax IDs appear in this field.
25+
26+
* **Loyalty API:**
27+
* As of July 15, 2021, the country in which the seller’s Square account is activated determines whether Square uses pretax or post-tax purchase amounts to calculate accrued points. This change supports consumption tax models, such as value-added tax (VAT). Previously, point accrual was based on pretax purchase amounts only. This change does not affect the existing point balance of loyalty accounts. For more information, see [Availability of Square Loyalty.](https://developer.squareup.com/docs/loyalty-api/overview#loyalty-market-availability)
28+
29+
* **Payments API:**
30+
* [UpdatePayment](https://developer.squareup.com/reference/square_2021-07-21/payments-api/update-payment). The endpoint has moved to the [general availability](https://developer.squareup.com/docs/build-basics/api-lifecycle#general-availability) (GA) state. Also, you can now update gift card payments (similar to card, cash, and external payments).
31+
32+
* **Subscriptions API:**
33+
* The [Subscriptions API](https://developer.squareup.com/docs/subscriptions-api/overview) has moved to the [general availability](https://developer.squareup.com/docs/build-basics/api-lifecycle#general-availability) (GA) state.
34+
* [CatalogSubscriptionPlan](https://developer.squareup.com/reference/square_2021-07-21/objects/CatalogSubscriptionPlan) object. The `name` and `price` are now write-once fields. You specify these values at the time of creating a plan. After the plan is created, these fields cannot be updated. This makes a subscription plan immutable.
35+
36+
* **Inventory API:**
37+
* [RetrieveInventoryTransfer.](https://developer.squareup.com/reference/square_2021-07-21/inventory-api/Retrieve-Inventory-Transfer) This new endpoint is introduced to support the retrieval of inventory transfer.
38+
* [RetrieveInventoryChanges.](https://developer.squareup.com/reference/square_2021-07-21/inventory-api/Retrieve-Inventory-Changes) This endpoint is deprecated. Its support ends when it is retired in about 12 months.
39+
* The following endpoints have updated URLs to conform to the standard REST API convention. For more information about migrating deprecated URLs to updated URLs in your application, see [Inventory API: Migrate to Updated API Entities.](https://developer.squareup.com/docs/inventory-api/migrate-to-updated-api-entities)
40+
* [RetrieveInventoryAdjustment](https://developer.squareup.com/reference/square_2021-07-21/inventory-api/Retrieve-Inventory-Adjustment)
41+
* [BatchChangeInventory](https://developer.squareup.com/reference/square_2021-07-21/inventory-api/Batch-Change-Inventory)
42+
* [BatchRetrieveInventoryChanges](https://developer.squareup.com/reference/square_2021-07-21/inventory-api/Batch-Retrieve-Inventory-Changes)
43+
* [BatchRetrieveInventoryCounts](https://developer.squareup.com/reference/square_2021-07-21/inventory-api/Batch-Retrieve-Inventory-Counts)
44+
* [RetrieveInventoryPhysicalCount](https://developer.squareup.com/reference/square_2021-07-21/inventory-api/Retrieve-Inventory-Physical-Count)
45+
46+
## Documentation updates
47+
* **Webhooks.** Revised the steps and descriptions for creating and using webhooks. For more information, see [Webhooks Overview.](https://developer.squareup.com/docs/webhooks/overview)
48+
49+
50+
351
## Version 12.0.0.20210616 (2021-06-16)
452
## New API releases
553
* **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: 1 addition & 1 deletion
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

doc/api/checkout.md

Lines changed: 5 additions & 1 deletion
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_version'] = 131
6263
body['order']['order']['line_items'][0]['note'] = 'note1'
6364
body['order']['order']['line_items'][0]['catalog_object_id'] = 'catalog_object_id3'
6465
body['order']['order']['line_items'][0]['applied_taxes'] = []
@@ -94,6 +95,7 @@ body['order']['order']['line_items'][1]['quantity_unit']['measurement_unit']['le
9495
body['order']['order']['line_items'][1]['quantity_unit']['measurement_unit']['volume_unit'] = 'GENERIC_CUP'
9596
body['order']['order']['line_items'][1]['quantity_unit']['measurement_unit']['weight_unit'] = 'IMPERIAL_STONE'
9697
body['order']['order']['line_items'][1]['quantity_unit']['precision'] = 192
98+
body['order']['order']['line_items'][1]['quantity_unit']['catalog_version'] = 130
9799
body['order']['order']['line_items'][1]['note'] = 'note0'
98100
body['order']['order']['line_items'][1]['catalog_object_id'] = 'catalog_object_id2'
99101
body['order']['order']['line_items'][1]['base_price_money'] = {}
@@ -111,6 +113,7 @@ body['order']['order']['line_items'][2]['quantity_unit']['measurement_unit']['le
111113
body['order']['order']['line_items'][2]['quantity_unit']['measurement_unit']['volume_unit'] = 'GENERIC_PINT'
112114
body['order']['order']['line_items'][2]['quantity_unit']['measurement_unit']['weight_unit'] = 'IMPERIAL_POUND'
113115
body['order']['order']['line_items'][2]['quantity_unit']['precision'] = 193
116+
body['order']['order']['line_items'][2]['quantity_unit']['catalog_version'] = 129
114117
body['order']['order']['line_items'][2]['note'] = 'note9'
115118
body['order']['order']['line_items'][2]['catalog_object_id'] = 'catalog_object_id1'
116119
body['order']['order']['line_items'][2]['base_price_money'] = {}
@@ -122,6 +125,7 @@ body['order']['order']['taxes'] = []
122125
body['order']['order']['taxes'].append({})
123126
body['order']['order']['taxes'][0]['uid'] = '38ze1696-z1e3-5628-af6d-f1e04d947fg3'
124127
body['order']['order']['taxes'][0]['catalog_object_id'] = 'catalog_object_id7'
128+
body['order']['order']['taxes'][0]['catalog_version'] = 47
125129
body['order']['order']['taxes'][0]['name'] = 'name9'
126130
body['order']['order']['taxes'][0]['type'] = 'INCLUSIVE'
127131
body['order']['order']['taxes'][0]['percentage'] = '7.75'
@@ -132,9 +136,9 @@ body['order']['order']['discounts'] = []
132136
body['order']['order']['discounts'].append({})
133137
body['order']['order']['discounts'][0]['uid'] = '56ae1696-z1e3-9328-af6d-f1e04d947gd4'
134138
body['order']['order']['discounts'][0]['catalog_object_id'] = 'catalog_object_id1'
139+
body['order']['order']['discounts'][0]['catalog_version'] = 73
135140
body['order']['order']['discounts'][0]['name'] = 'name7'
136141
body['order']['order']['discounts'][0]['type'] = 'FIXED_AMOUNT'
137-
body['order']['order']['discounts'][0]['percentage'] = 'percentage5'
138142
body['order']['order']['discounts'][0]['amount_money'] = {}
139143
body['order']['order']['discounts'][0]['amount_money']['amount'] = 100
140144
body['order']['order']['discounts'][0]['amount_money']['currency'] = 'USD'

0 commit comments

Comments
 (0)