Skip to content

Commit 035d46f

Browse files
author
Wolfgang Schuster
authored
Merge pull request #57 from square/release/10.0.0.20210421
Generated PR for Release: 10.0.0.20210421
2 parents 29a521f + bd715ab commit 035d46f

287 files changed

Lines changed: 1456 additions & 1029 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: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,51 @@
11
# Change Log
22

3+
## Version 10.0.0.20210421 (2021-04-21)
4+
## New API releases
5+
6+
## Existing API updates
7+
8+
* **Subscriptions API:**
9+
* [ResumeSubscription.](https://developer.squareup.com/reference/square_2021-04-21/subscriptions-api/resume-subscription) This new endpoint enables applications to resume [deactivated subscriptions.](https://developer.squareup.com/docs/subscriptions-api/overview#deactivated-subscriptions) After a subscription is created, there are events that can make a subscription non-billable, causing Square to deactivate the subscription. A seller can also resume deactivated subscriptions in the Seller Dashboard. Applications can call [ListSubscriptionEvents](https://developer.squareup.com/reference/square_2021-04-21/subscriptions-api/list-subscription-events) to determine why Square deactivated a subscription.
10+
11+
* **Customers API:**
12+
13+
* [Customer](https://developer.squareup.com/reference/square_2021-04-21/objects/Customer) object:
14+
* New `version` field (beta). This field represents the current version of the customer profile. You can include it in your `UpdateCustomer` and `DeleteCustomer` requests to enable optimistic concurrency. 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)
15+
* The `groups` field and corresponding `CustomerGroupInfo` object are retired.
16+
17+
* [Customer webhooks](https://developer.squareup.com/docs/customers-api/use-the-api/customer-webhooks) have moved to the [general availability](https://developer.squareup.com/docs/build-basics/api-lifecycle#general-availability) (GA) state. Event notifications now include the `version` field (beta).
18+
19+
* **Invoices API:**
20+
21+
* The [Invoices API](https://developer.squareup.com/docs/invoices-api/overview) has moved to the GA state.
22+
23+
* [Invoice](https://developer.squareup.com/reference/square_2021-04-21/objects/Invoice) object:
24+
* A new required `accepted_payment_methods` field that defines the methods of payment that customers can use to pay an invoice on the Square-hosted invoice page. Valid values are defined in the new [InvoiceAcceptedPaymentMethods](https://developer.squareup.com/reference/square_2021-04-21/objects/InvoiceAcceptedPaymentMethods) enum. For more information, see the [migration notes.](https://developer.squareup.com/docs/invoices-api/overview#migration-notes)
25+
* A new `subscription_id` field, which is included in invoices created for subscription billing.
26+
27+
* **Loyalty API:** (beta)
28+
29+
* [RetrieveLoyaltyProgram](https://developer.squareup.com/reference/square_2021-04-21/loyalty-api/retrieve-loyalty-program) endpoint. This new endpoint accepts a program ID or the `main` keyword and returns the loyalty program in a seller's account. For more information, see [Retrieve a loyalty program.](https://developer.squareup.com/docs/loyalty-api/overview#retrieve-loyalty-program) This endpoint is preferred over the `ListLoyaltyPrograms` endpoint.
30+
31+
* Introduced a new mapping implementation for loyalty accounts:
32+
* [LoyaltyAccount](https://developer.squareup.com/reference/square_2021-04-21/objects/LoyaltyAccount) object. Added the `mapping` field (of type `LoyaltyAccountMapping`), which is used to associate the loyalty account with a buyer. This field is recommended over the `mappings` field.
33+
* [LoyaltyAccountMapping](https://developer.squareup.com/reference/square_2021-04-21/objects/LoyaltyAccountMapping) object. Added the `phone_number` field to represent a phone number mapping. This field is recommended over the `type` and `value` fields.
34+
35+
* A new [loyalty.program.created](https://developer.squareup.com/reference/square_2021-04-21/webhooks/loyalty.program.created) webhook. Square now publishes an event notification when a loyalty program is created in the Square Seller Dashboard.
36+
37+
* **Inventory API:**
38+
* [InventoryChange](https://developer.squareup.com/reference/square_2021-04-21/objects/InventoryChange) can now have its own measurement unit.
39+
40+
* **Catalog API:**
41+
* [CatalogItem](https://developer.squareup.com/reference/square_2021-04-21/objects/CatalogItem) introduces the `sort_name` attribute that can take Japanese writing scripts to sort items by. When it is unspecified, the regular `name` attribute is used for sorting.
42+
* [CatalogPricingRule](https://developer.squareup.com/reference/square_2021-04-21/objects/CatalogCatalogPricingRule) has the new `customer_group_ids_any` attribute included to support automatic application of discounts to specified product set purchased by members of any of the customer groups identified by the `customer_group_ids_any` attribute values.
43+
* **Team API**
44+
* New [Team webhooks](https://developer.squareup.com/reference/square_2021-04-21/team-api/webhooks): `team_member.created`, `team_member.updated`, `team_member.wage_setting.updated` to notify on created and updated team members and wage settings.
45+
46+
47+
48+
349
## Version 9.1.0.20210317 (2021-03-17)
450

551
## Existing API updates

doc/api/bank-accounts.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ bank_accounts_api = client.bank_accounts
1717

1818
# List Bank Accounts
1919

20-
Returns a list of [BankAccount](#type-bankaccount) objects linked to a Square account.
20+
Returns a list of [BankAccount](/doc/models/bank-account.md) objects linked to a Square account.
2121

2222
```python
2323
def list_bank_accounts(self,
@@ -56,7 +56,7 @@ elif result.is_error():
5656

5757
# Get Bank Account by V1 Id
5858

59-
Returns details of a [BankAccount](#type-bankaccount) identified by V1 bank account ID.
59+
Returns details of a [BankAccount](/doc/models/bank-account.md) identified by V1 bank account ID.
6060

6161
```python
6262
def get_bank_account_by_v1_id(self,
@@ -89,7 +89,7 @@ elif result.is_error():
8989

9090
# Get Bank Account
9191

92-
Returns details of a [BankAccount](#type-bankaccount)
92+
Returns details of a [BankAccount](/doc/models/bank-account.md)
9393
linked to a Square account.
9494

9595
```python

doc/api/bookings.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ def retrieve_booking(self,
228228

229229
| Parameter | Type | Tags | Description |
230230
| --- | --- | --- | --- |
231-
| `booking_id` | `string` | Template, Required | The ID of the [Booking](#type-booking) object representing the to-be-retrieved booking. |
231+
| `booking_id` | `string` | Template, Required | The ID of the [Booking](/doc/models/booking.md) object representing the to-be-retrieved booking. |
232232

233233
## Response Type
234234

@@ -262,7 +262,7 @@ def update_booking(self,
262262

263263
| Parameter | Type | Tags | Description |
264264
| --- | --- | --- | --- |
265-
| `booking_id` | `string` | Template, Required | The ID of the [Booking](#type-booking) object representing the to-be-updated booking. |
265+
| `booking_id` | `string` | Template, Required | The ID of the [Booking](/doc/models/booking.md) object representing the to-be-updated booking. |
266266
| `body` | [`Update Booking Request`](/doc/models/update-booking-request.md) | Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |
267267

268268
## Response Type
@@ -305,7 +305,7 @@ def cancel_booking(self,
305305

306306
| Parameter | Type | Tags | Description |
307307
| --- | --- | --- | --- |
308-
| `booking_id` | `string` | Template, Required | The ID of the [Booking](#type-booking) object representing the to-be-cancelled booking. |
308+
| `booking_id` | `string` | Template, Required | The ID of the [Booking](/doc/models/booking.md) object representing the to-be-cancelled booking. |
309309
| `body` | [`Cancel Booking Request`](/doc/models/cancel-booking-request.md) | Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |
310310

311311
## Response Type

doc/api/cash-drawers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ elif result.is_error():
6767
# Retrieve Cash Drawer Shift
6868

6969
Provides the summary details for a single cash drawer shift. See
70-
[ListCashDrawerShiftEvents](#endpoint-CashDrawers-ListCashDrawerShiftEvents) for a list of cash drawer shift events.
70+
[ListCashDrawerShiftEvents](/doc/api/cash-drawers.md#list-cash-drawer-shift-events) for a list of cash drawer shift events.
7171

7272
```python
7373
def retrieve_cash_drawer_shift(self,

doc/api/catalog.md

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ catalog_api = client.catalog
2727

2828
# Batch Delete Catalog Objects
2929

30-
Deletes a set of [CatalogItem](#type-catalogitem)s based on the
30+
Deletes a set of [CatalogItem](/doc/models/catalog-item.md)s based on the
3131
provided list of target IDs and returns a set of successfully deleted IDs in
3232
the response. Deletion is a cascading event such that all children of the
3333
targeted object are also deleted. For example, deleting a CatalogItem will
34-
also delete all of its [CatalogItemVariation](#type-catalogitemvariation)
34+
also delete all of its [CatalogItemVariation](/doc/models/catalog-item-variation.md)
3535
children.
3636

3737
`BatchDeleteCatalogObjects` succeeds even if only a portion of the targeted
@@ -71,11 +71,11 @@ elif result.is_error():
7171
# Batch Retrieve Catalog Objects
7272

7373
Returns a set of objects based on the provided ID.
74-
Each [CatalogItem](#type-catalogitem) returned in the set includes all of its
74+
Each [CatalogItem](/doc/models/catalog-item.md) returned in the set includes all of its
7575
child information including: all of its
76-
[CatalogItemVariation](#type-catalogitemvariation) objects, references to
77-
its [CatalogModifierList](#type-catalogmodifierlist) objects, and the ids of
78-
any [CatalogTax](#type-catalogtax) objects that apply to it.
76+
[CatalogItemVariation](/doc/models/catalog-item-variation.md) objects, references to
77+
its [CatalogModifierList](/doc/models/catalog-modifier-list.md) objects, and the ids of
78+
any [CatalogTax](/doc/models/catalog-tax.md) objects that apply to it.
7979

8080
```python
8181
def batch_retrieve_catalog_objects(self,
@@ -338,8 +338,8 @@ elif result.is_error():
338338

339339
# Create Catalog Image
340340

341-
Uploads an image file to be represented by a [CatalogImage](#type-catalogimage) object linked to an existing
342-
[CatalogObject](#type-catalogobject) instance. A call to this endpoint can upload an image, link an image to
341+
Uploads an image file to be represented by a [CatalogImage](/doc/models/catalog-image.md) object linked to an existing
342+
[CatalogObject](/doc/models/catalog-object.md) instance. A call to this endpoint can upload an image, link an image to
343343
a catalog object, or do both.
344344

345345
This `CreateCatalogImage` endpoint accepts HTTP multipart/form-data requests with a JSON part and an image file part in
@@ -423,14 +423,14 @@ elif result.is_error():
423423

424424
# List Catalog
425425

426-
Returns a list of [CatalogObject](#type-catalogobject)s that includes
427-
all objects of a set of desired types (for example, all [CatalogItem](#type-catalogitem)
428-
and [CatalogTax](#type-catalogtax) objects) in the catalog. The `types` parameter
429-
is specified as a comma-separated list of valid [CatalogObject](#type-catalogobject) types:
426+
Returns a list of [CatalogObject](/doc/models/catalog-object.md)s that includes
427+
all objects of a set of desired types (for example, all [CatalogItem](/doc/models/catalog-item.md)
428+
and [CatalogTax](/doc/models/catalog-tax.md) objects) in the catalog. The `types` parameter
429+
is specified as a comma-separated list of valid [CatalogObject](/doc/models/catalog-object.md) types:
430430
`ITEM`, `ITEM_VARIATION`, `MODIFIER`, `MODIFIER_LIST`, `CATEGORY`, `DISCOUNT`, `TAX`, `IMAGE`.
431431

432432
__Important:__ ListCatalog does not return deleted catalog items. To retrieve
433-
deleted catalog items, use [SearchCatalogObjects](#endpoint-Catalog-SearchCatalogObjects)
433+
deleted catalog items, use [SearchCatalogObjects](/doc/api/catalog.md#search-catalog-objects)
434434
and set the `include_deleted_objects` attribute value to `true`.
435435

436436
```python
@@ -446,7 +446,7 @@ def list_catalog(self,
446446
| --- | --- | --- | --- |
447447
| `cursor` | `string` | Query, Optional | The pagination cursor returned in the previous response. Leave unset for an initial request.<br>See [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information. |
448448
| `types` | `string` | Query, Optional | An optional case-insensitive, comma-separated list of object types to retrieve, for example<br>`ITEM,ITEM_VARIATION,CATEGORY,IMAGE`.<br><br>The legal values are taken from the CatalogObjectType enum:<br>`ITEM`, `ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`,<br>`MODIFIER`, `MODIFIER_LIST`, or `IMAGE`. |
449-
| `catalog_version` | `long|int` | Query, Optional | The specific version of the catalog objects to be included in the response.<br>This allows you to retrieve historical<br>versions of objects. The specified version value is matched against<br>the [CatalogObject](#type-catalogobject)s' `version` attribute. |
449+
| `catalog_version` | `long|int` | Query, Optional | The specific version of the catalog objects to be included in the response.<br>This allows you to retrieve historical<br>versions of objects. The specified version value is matched against<br>the [CatalogObject](/doc/models/catalog-object.md)s' `version` attribute. |
450450

451451
## Response Type
452452

@@ -470,7 +470,7 @@ elif result.is_error():
470470

471471
# Upsert Catalog Object
472472

473-
Creates or updates the target [CatalogObject](#type-catalogobject).
473+
Creates or updates the target [CatalogObject](/doc/models/catalog-object.md).
474474

475475
```python
476476
def upsert_catalog_object(self,
@@ -531,12 +531,12 @@ elif result.is_error():
531531

532532
# Delete Catalog Object
533533

534-
Deletes a single [CatalogObject](#type-catalogobject) based on the
534+
Deletes a single [CatalogObject](/doc/models/catalog-object.md) based on the
535535
provided ID and returns the set of successfully deleted IDs in the response.
536536
Deletion is a cascading event such that all children of the targeted object
537-
are also deleted. For example, deleting a [CatalogItem](#type-catalogitem)
537+
are also deleted. For example, deleting a [CatalogItem](/doc/models/catalog-item.md)
538538
will also delete all of its
539-
[CatalogItemVariation](#type-catalogitemvariation) children.
539+
[CatalogItemVariation](/doc/models/catalog-item-variation.md) children.
540540

541541
```python
542542
def delete_catalog_object(self,
@@ -569,13 +569,13 @@ elif result.is_error():
569569

570570
# Retrieve Catalog Object
571571

572-
Returns a single [CatalogItem](#type-catalogitem) as a
573-
[CatalogObject](#type-catalogobject) based on the provided ID. The returned
574-
object includes all of the relevant [CatalogItem](#type-catalogitem)
575-
information including: [CatalogItemVariation](#type-catalogitemvariation)
572+
Returns a single [CatalogItem](/doc/models/catalog-item.md) as a
573+
[CatalogObject](/doc/models/catalog-object.md) based on the provided ID. The returned
574+
object includes all of the relevant [CatalogItem](/doc/models/catalog-item.md)
575+
information including: [CatalogItemVariation](/doc/models/catalog-item-variation.md)
576576
children, references to its
577-
[CatalogModifierList](#type-catalogmodifierlist) objects, and the ids of
578-
any [CatalogTax](#type-catalogtax) objects that apply to it.
577+
[CatalogModifierList](/doc/models/catalog-modifier-list.md) objects, and the ids of
578+
any [CatalogTax](/doc/models/catalog-tax.md) objects that apply to it.
579579

580580
```python
581581
def retrieve_catalog_object(self,
@@ -590,7 +590,7 @@ def retrieve_catalog_object(self,
590590
| --- | --- | --- | --- |
591591
| `object_id` | `string` | Template, Required | The object ID of any type of catalog objects to be retrieved. |
592592
| `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` |
593-
| `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. |
593+
| `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](/doc/models/catalog-object.md)s. |
594594

595595
## Response Type
596596

@@ -614,10 +614,10 @@ elif result.is_error():
614614

615615
# Search Catalog Objects
616616

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

620-
This (`SearchCatalogObjects`) endpoint differs from the [SearchCatalogItems](#endpoint-Catalog-SearchCatalogItems)
620+
This (`SearchCatalogObjects`) endpoint differs from the [SearchCatalogItems](/doc/api/catalog.md#search-catalog-items)
621621
endpoint in the following aspects:
622622

623623
- `SearchCatalogItems` can only search for items or item variations, whereas `SearchCatalogObjects` can search for any type of catalog objects.
@@ -683,7 +683,7 @@ elif result.is_error():
683683
Searches for catalog items or item variations by matching supported search attribute values, including
684684
custom attribute values, against one or more of the specified query expressions.
685685

686-
This (`SearchCatalogItems`) endpoint differs from the [SearchCatalogObjects](#endpoint-Catalog-SearchCatalogObjects)
686+
This (`SearchCatalogItems`) endpoint differs from the [SearchCatalogObjects](/doc/api/catalog.md#search-catalog-objects)
687687
endpoint in the following aspects:
688688

689689
- `SearchCatalogItems` can only search for items or item variations, whereas `SearchCatalogObjects` can search for any type of catalog objects.
@@ -769,8 +769,8 @@ elif result.is_error():
769769

770770
# Update Item Modifier Lists
771771

772-
Updates the [CatalogModifierList](#type-catalogmodifierlist) objects
773-
that apply to the targeted [CatalogItem](#type-catalogitem) without having
772+
Updates the [CatalogModifierList](/doc/models/catalog-modifier-list.md) objects
773+
that apply to the targeted [CatalogItem](/doc/models/catalog-item.md) without having
774774
to perform an upsert on the entire item.
775775

776776
```python
@@ -807,8 +807,8 @@ elif result.is_error():
807807

808808
# Update Item Taxes
809809

810-
Updates the [CatalogTax](#type-catalogtax) objects that apply to the
811-
targeted [CatalogItem](#type-catalogitem) without having to perform an
810+
Updates the [CatalogTax](/doc/models/catalog-tax.md) objects that apply to the
811+
targeted [CatalogItem](/doc/models/catalog-item.md) without having to perform an
812812
upsert on the entire item.
813813

814814
```python

doc/api/customer-groups.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def list_customer_groups(self,
3030

3131
| Parameter | Type | Tags | Description |
3232
| --- | --- | --- | --- |
33-
| `cursor` | `string` | Query, Optional | A pagination cursor returned by a previous call to this endpoint.<br>Provide this to retrieve the next set of results for your original query.<br><br>See the [Pagination guide](https://developer.squareup.com/docs/working-with-apis/pagination) for more information. |
33+
| `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). |
3434

3535
## Response Type
3636

doc/api/customer-segments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def list_customer_segments(self,
2727

2828
| Parameter | Type | Tags | Description |
2929
| --- | --- | --- | --- |
30-
| `cursor` | `string` | Query, Optional | A pagination cursor returned by previous calls to __ListCustomerSegments__.<br>Used to retrieve the next set of query results.<br><br>See the [Pagination guide](https://developer.squareup.com/docs/working-with-apis/pagination) for more information. |
30+
| `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). |
3131

3232
## Response Type
3333

0 commit comments

Comments
 (0)