Skip to content

Commit ea4fa62

Browse files
author
autobot
committed
Generated PR for Release: 37.1.1.20240717
1 parent 3933f81 commit ea4fa62

File tree

13 files changed

+72
-47
lines changed

13 files changed

+72
-47
lines changed

doc/api/apple-pay.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@ an Apple Pay enabled domain.
1818
This endpoint provides an easy way for platform developers to bulk activate
1919
Apple Pay on the Web with Square for merchants using their platform.
2020

21-
Note: The SqPaymentForm library is deprecated as of May 13, 2021, and will only receive critical security updates until it is retired on October 31, 2022.
22-
You must migrate your payment form code to the Web Payments SDK to continue using your domain for Apple Pay. For more information on migrating to the Web Payments SDK, see [Migrate to the Web Payments SDK](https://developer.squareup.com/docs/web-payments/migrate).
21+
Note: You will need to host a valid domain verification file on your domain to support Apple Pay. The
22+
current version of this file is always available at https://app.squareup.com/digital-wallets/apple-pay/apple-developer-merchantid-domain-association,
23+
and should be hosted at `.well_known/apple-developer-merchantid-domain-association` on your
24+
domain. This file is subject to change; we strongly recommend checking for updates regularly and avoiding
25+
long-lived caches that might not keep in sync with the correct file version.
2326

2427
To learn more about the Web Payments SDK and how to add Apple Pay, see [Take an Apple Pay Payment](https://developer.squareup.com/docs/web-payments/apple-pay).
2528

doc/api/invoices.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -278,10 +278,10 @@ elif result.is_error():
278278

279279
# Update Invoice
280280

281-
Updates an invoice by modifying fields, clearing fields, or both. For most updates, you can use a sparse
282-
`Invoice` object to add fields or change values and use the `fields_to_clear` field to specify fields to clear.
283-
However, some restrictions apply. For example, you cannot change the `order_id` or `location_id` field and you
284-
must provide the complete `custom_fields` list to update a custom field. Published invoices have additional restrictions.
281+
Updates an invoice. This endpoint supports sparse updates, so you only need
282+
to specify the fields you want to change along with the required `version` field.
283+
Some restrictions apply to updating invoices. For example, you cannot change the
284+
`order_id` or `location_id` field.
285285

286286
```python
287287
def update_invoice(self,
@@ -311,14 +311,16 @@ body = {
311311
'payment_requests': [
312312
{
313313
'uid': '2da7964f-f3d2-4f43-81e8-5aa220bf3355',
314-
'tipping_enabled': False
314+
'tipping_enabled': False,
315+
'reminders': [
316+
{},
317+
{},
318+
{}
319+
]
315320
}
316321
]
317322
},
318-
'idempotency_key': '4ee82288-0910-499e-ab4c-5d0071dad1be',
319-
'fields_to_clear': [
320-
'payments_requests[2da7964f-f3d2-4f43-81e8-5aa220bf3355].reminders'
321-
]
323+
'idempotency_key': '4ee82288-0910-499e-ab4c-5d0071dad1be'
322324
}
323325

324326
result = invoices_api.update_invoice(

doc/client.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The following parameters are configurable for the API Client:
55

66
| Parameter | Type | Description |
77
| --- | --- | --- |
8-
| `square_version` | `str` | Square Connect API versions<br>*Default*: `'2024-06-04'` |
8+
| `square_version` | `str` | Square Connect API versions<br>*Default*: `'2024-07-17'` |
99
| `custom_url` | `str` | Sets the base URL requests are made to. Defaults to `https://connect.squareup.com`<br>*Default*: `'https://connect.squareup.com'` |
1010
| `environment` | `string` | The API environment. <br> **Default: `production`** |
1111
| `http_client_instance` | `HttpClient` | The Http Client passed from the sdk user for making requests |
@@ -24,10 +24,11 @@ The API client can be initialized as follows:
2424

2525
```python
2626
client = Client(
27-
square_version='2024-06-04',
27+
square_version='2024-07-17',
2828
bearer_auth_credentials=BearerAuthCredentials(
2929
access_token='AccessToken'
30-
)
30+
),
31+
custom_url='https://connect.squareup.com'
3132
)
3233
```
3334

@@ -51,7 +52,7 @@ from square.http.auth.o_auth_2 import BearerAuthCredentials
5152
from square.client import Client
5253

5354
client = Client(
54-
square_version='2024-06-04',
55+
square_version='2024-07-17',
5556
bearer_auth_credentials=BearerAuthCredentials(
5657
access_token='AccessToken'
5758
)

doc/models/update-invoice-request.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,17 @@ Describes a `UpdateInvoice` request.
1313
| --- | --- | --- | --- |
1414
| `invoice` | [`Invoice`](../../doc/models/invoice.md) | Required | Stores information about an invoice. You use the Invoices API to create and manage<br>invoices. For more information, see [Invoices API Overview](https://developer.squareup.com/docs/invoices-api/overview). |
1515
| `idempotency_key` | `str` | Optional | A unique string that identifies the `UpdateInvoice` request. If you do not<br>provide `idempotency_key` (or provide an empty string as the value), the endpoint<br>treats each request as independent.<br><br>For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).<br>**Constraints**: *Maximum Length*: `128` |
16-
| `fields_to_clear` | `List[str]` | Optional | The list of fields to clear.<br>For examples, see [Update an Invoice](https://developer.squareup.com/docs/invoices-api/update-invoices). |
16+
| `fields_to_clear` | `List[str]` | Optional | The list of fields to clear. Although this field is currently supported, we<br>recommend using null values or the `remove` field when possible. For examples, see<br>[Update an Invoice](https://developer.squareup.com/docs/invoices-api/update-invoices). |
1717

1818
## Example (as JSON)
1919

2020
```json
2121
{
22-
"fields_to_clear": [
23-
"payments_requests[2da7964f-f3d2-4f43-81e8-5aa220bf3355].reminders"
24-
],
2522
"idempotency_key": "4ee82288-0910-499e-ab4c-5d0071dad1be",
2623
"invoice": {
2724
"payment_requests": [
2825
{
26+
"reminders": null,
2927
"tipping_enabled": false,
3028
"uid": "2da7964f-f3d2-4f43-81e8-5aa220bf3355"
3129
}
@@ -47,7 +45,12 @@ Describes a `UpdateInvoice` request.
4745
"sublocality": "sublocality6"
4846
}
4947
}
50-
}
48+
},
49+
"fields_to_clear": [
50+
"fields_to_clear1",
51+
"fields_to_clear2",
52+
"fields_to_clear3"
53+
]
5154
}
5255
```
5356

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ requires = ["setuptools>=61.0"]
44
[project]
55
name = "squareup"
66
description = "Use Square APIs to manage and run business including payment, customer, product, inventory, and employee management."
7-
version = "37.1.0.20240604"
7+
version = "37.1.1.20240717"
88
readme = "README.md"
99
requires-python = ">=3.7"
1010
authors = [{name = "Square Developer Platform", email = "[email protected]"}]
11-
dependencies = ["apimatic-core~=0.2.0", "apimatic-core-interfaces~=0.1.0", "apimatic-requests-client-adapter~=0.1.0", "deprecation~=2.1"]
11+
dependencies = ["apimatic-core~=0.2.0, >= 0.2.15", "apimatic-core-interfaces~=0.1.0, >= 0.1.5", "apimatic-requests-client-adapter~=0.1.0, >= 0.1.6", "deprecation~=2.1"]
1212
[project.optional-dependencies]
1313
testutils = ["pytest>=7.2.2"]
1414
[tool.setuptools.packages.find]

requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apimatic-core~=0.2.0
2-
apimatic-core-interfaces~=0.1.0
3-
apimatic-requests-client-adapter~=0.1.0
1+
apimatic-core~=0.2.0, >= 0.2.15
2+
apimatic-core-interfaces~=0.1.0, >= 0.1.5
3+
apimatic-requests-client-adapter~=0.1.0, >= 0.1.6
44
deprecation~=2.1

square/api/apple_pay_api.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,17 @@ def register_domain(self,
2828
This endpoint provides an easy way for platform developers to bulk
2929
activate
3030
Apple Pay on the Web with Square for merchants using their platform.
31-
Note: The SqPaymentForm library is deprecated as of May 13, 2021, and
32-
will only receive critical security updates until it is retired on
33-
October 31, 2022.
34-
You must migrate your payment form code to the Web Payments SDK to
35-
continue using your domain for Apple Pay. For more information on
36-
migrating to the Web Payments SDK, see [Migrate to the Web Payments
37-
SDK](https://developer.squareup.com/docs/web-payments/migrate).
31+
Note: You will need to host a valid domain verification file on your
32+
domain to support Apple Pay. The
33+
current version of this file is always available at
34+
https://app.squareup.com/digital-wallets/apple-pay/apple-developer-merc
35+
hantid-domain-association,
36+
and should be hosted at
37+
`.well_known/apple-developer-merchantid-domain-association` on your
38+
domain. This file is subject to change; we strongly recommend
39+
checking for updates regularly and avoiding
40+
long-lived caches that might not keep in sync with the correct file
41+
version.
3842
To learn more about the Web Payments SDK and how to add Apple Pay, see
3943
[Take an Apple Pay
4044
Payment](https://developer.squareup.com/docs/web-payments/apple-pay).

square/api/base_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class BaseApi(object):
2222

2323
@staticmethod
2424
def user_agent():
25-
return 'Square-Python-SDK/37.1.0.20240604 ({api-version}) {engine}/{engine-version} ({os-info}) {detail}'
25+
return 'Square-Python-SDK/37.1.1.20240717 ({api-version}) {engine}/{engine-version} ({os-info}) {detail}'
2626

2727
@staticmethod
2828
def user_agent_parameters():

square/api/invoices_api.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -275,14 +275,13 @@ def update_invoice(self,
275275
body):
276276
"""Does a PUT request to /v2/invoices/{invoice_id}.
277277
278-
Updates an invoice by modifying fields, clearing fields, or both. For
279-
most updates, you can use a sparse
280-
`Invoice` object to add fields or change values and use the
281-
`fields_to_clear` field to specify fields to clear.
282-
However, some restrictions apply. For example, you cannot change the
283-
`order_id` or `location_id` field and you
284-
must provide the complete `custom_fields` list to update a custom
285-
field. Published invoices have additional restrictions.
278+
Updates an invoice. This endpoint supports sparse updates, so you only
279+
need
280+
to specify the fields you want to change along with the required
281+
`version` field.
282+
Some restrictions apply to updating invoices. For example, you cannot
283+
change the
284+
`order_id` or `location_id` field.
286285
287286
Args:
288287
invoice_id (str): The ID of the invoice to update.

square/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@
5555
class Client(object):
5656
@staticmethod
5757
def sdk_version():
58-
return '37.1.0.20240604'
58+
return '37.1.1.20240717'
5959

6060
@staticmethod
6161
def square_version():
62-
return '2024-06-04'
62+
return '2024-07-17'
6363

6464
def user_agent_detail(self):
6565
return self.config.user_agent_detail
@@ -238,7 +238,7 @@ def __init__(self, http_client_instance=None,
238238
retry_statuses=None, retry_methods=None,
239239
environment='production',
240240
custom_url='https://connect.squareup.com', access_token=None,
241-
bearer_auth_credentials=None, square_version='2024-06-04',
241+
bearer_auth_credentials=None, square_version='2024-07-17',
242242
additional_headers={}, user_agent_detail='', config=None):
243243
self.config = config or Configuration(
244244
http_client_instance=http_client_instance,

0 commit comments

Comments
 (0)