Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [2.7, 3.5]
python-version: [2.7, 3.6]

steps:
- uses: actions/checkout@v2
Expand Down
48 changes: 48 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,53 @@
# Change Log

## Version 13.0.0.20210721 (2021-07-21)
## SDK updates
* 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.

## API updates

* **Orders API:**
* [OrderServiceCharge](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderServiceCharge) object. Added a new field, `type`. It identifies the service charge type.

* [OrderQuantityUnit](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderQuantityUnit),
[OrderLineItem](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderLineItem),
[OrderLineItemDiscount](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderLineItemDiscount),
[OrderLineItemModifier](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderLineItemModifier),
[OrderLineItemTax](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderLineItemTax),
[OrderServiceCharge](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderServiceCharge),
[OrderReturnLineItem](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderReturnLineItem),
[OrderReturnLineItemModifier](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderReturnLineItemModifier),
[OrderReturnServiceCharge](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderReturnServiceCharge),
[OrderReturnTax](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderReturnTax), and
[OrderReturnDiscount](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderReturnDiscount) objects. Added a new field, `catalog_version`.
* **Locations API:**
* [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.

* **Loyalty API:**
* 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)

* **Payments API:**
* [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).

* **Subscriptions API:**
* 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.
* [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.

* **Inventory API:**
* [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.
* [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.
* 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)
* [RetrieveInventoryAdjustment](https://developer.squareup.com/reference/square_2021-07-21/inventory-api/Retrieve-Inventory-Adjustment)
* [BatchChangeInventory](https://developer.squareup.com/reference/square_2021-07-21/inventory-api/Batch-Change-Inventory)
* [BatchRetrieveInventoryChanges](https://developer.squareup.com/reference/square_2021-07-21/inventory-api/Batch-Retrieve-Inventory-Changes)
* [BatchRetrieveInventoryCounts](https://developer.squareup.com/reference/square_2021-07-21/inventory-api/Batch-Retrieve-Inventory-Counts)
* [RetrieveInventoryPhysicalCount](https://developer.squareup.com/reference/square_2021-07-21/inventory-api/Retrieve-Inventory-Physical-Count)

## Documentation updates
* **Webhooks.** Revised the steps and descriptions for creating and using webhooks. For more information, see [Webhooks Overview.](https://developer.squareup.com/docs/webhooks/overview)



## 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
2 changes: 1 addition & 1 deletion 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
6 changes: 5 additions & 1 deletion 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_version'] = 131
body['order']['order']['line_items'][0]['note'] = 'note1'
body['order']['order']['line_items'][0]['catalog_object_id'] = 'catalog_object_id3'
body['order']['order']['line_items'][0]['applied_taxes'] = []
Expand Down Expand Up @@ -94,6 +95,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_version'] = 130
body['order']['order']['line_items'][1]['note'] = 'note0'
body['order']['order']['line_items'][1]['catalog_object_id'] = 'catalog_object_id2'
body['order']['order']['line_items'][1]['base_price_money'] = {}
Expand All @@ -111,6 +113,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_version'] = 129
body['order']['order']['line_items'][2]['note'] = 'note9'
body['order']['order']['line_items'][2]['catalog_object_id'] = 'catalog_object_id1'
body['order']['order']['line_items'][2]['base_price_money'] = {}
Expand All @@ -122,6 +125,7 @@ body['order']['order']['taxes'] = []
body['order']['order']['taxes'].append({})
body['order']['order']['taxes'][0]['uid'] = '38ze1696-z1e3-5628-af6d-f1e04d947fg3'
body['order']['order']['taxes'][0]['catalog_object_id'] = 'catalog_object_id7'
body['order']['order']['taxes'][0]['catalog_version'] = 47
body['order']['order']['taxes'][0]['name'] = 'name9'
body['order']['order']['taxes'][0]['type'] = 'INCLUSIVE'
body['order']['order']['taxes'][0]['percentage'] = '7.75'
Expand All @@ -132,9 +136,9 @@ body['order']['order']['discounts'] = []
body['order']['order']['discounts'].append({})
body['order']['order']['discounts'][0]['uid'] = '56ae1696-z1e3-9328-af6d-f1e04d947gd4'
body['order']['order']['discounts'][0]['catalog_object_id'] = 'catalog_object_id1'
body['order']['order']['discounts'][0]['catalog_version'] = 73
body['order']['order']['discounts'][0]['name'] = 'name7'
body['order']['order']['discounts'][0]['type'] = 'FIXED_AMOUNT'
body['order']['order']['discounts'][0]['percentage'] = 'percentage5'
body['order']['order']['discounts'][0]['amount_money'] = {}
body['order']['order']['discounts'][0]['amount_money']['amount'] = 100
body['order']['order']['discounts'][0]['amount_money']['currency'] = 'USD'
Expand Down
Loading