Skip to content

Commit cf78496

Browse files
author
autobot
committed
Generated PR for Release: 33.1.0.20231213
1 parent 8708795 commit cf78496

File tree

49 files changed

+1859
-71
lines changed

Some content is hidden

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

49 files changed

+1859
-71
lines changed

doc/api/catalog.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ body = {
168168
'present_at_all_locations': True,
169169
'item_data': {
170170
'name': 'Tea',
171-
'category_id': '#Beverages',
172171
'tax_ids': [
173172
'#SalesTax'
174173
],
@@ -188,6 +187,11 @@ body = {
188187
}
189188
}
190189
],
190+
'categories': [
191+
{
192+
'id': '#Beverages'
193+
}
194+
],
191195
'description_html': '<p><strong>Hot</strong> Leaf Juice</p>'
192196
}
193197
},
@@ -197,7 +201,6 @@ body = {
197201
'present_at_all_locations': True,
198202
'item_data': {
199203
'name': 'Coffee',
200-
'category_id': '#Beverages',
201204
'tax_ids': [
202205
'#SalesTax'
203206
],
@@ -231,6 +234,11 @@ body = {
231234
}
232235
}
233236
],
237+
'categories': [
238+
{
239+
'id': '#Beverages'
240+
}
241+
],
234242
'description_html': '<p>Hot <em>Bean Juice</em></p>'
235243
}
236244
},
@@ -570,7 +578,8 @@ any [CatalogTax](../../doc/models/catalog-tax.md) objects that apply to it.
570578
def retrieve_catalog_object(self,
571579
object_id,
572580
include_related_objects=False,
573-
catalog_version=None)
581+
catalog_version=None,
582+
include_category_path_to_root=False)
574583
```
575584

576585
## Parameters
@@ -580,6 +589,7 @@ def retrieve_catalog_object(self,
580589
| `object_id` | `str` | Template, Required | The object ID of any type of catalog objects to be retrieved. |
581590
| `include_related_objects` | `bool` | Query, Optional | If `true`, the response will include additional objects that are related to the<br>requested objects. Related objects are defined as any objects referenced by ID by the results in the `objects` field<br>of the response. These objects are put in the `related_objects` field. Setting this to `true` is<br>helpful when the objects are needed for immediate display to a user.<br>This process only goes one level deep. Objects referenced by the related objects will not be included. For example,<br><br>if the `objects` field of the response contains a CatalogItem, its associated<br>CatalogCategory objects, CatalogTax objects, CatalogImage objects and<br>CatalogModifierLists will be returned in the `related_objects` field of the<br>response. If the `objects` field of the response contains a CatalogItemVariation,<br>its parent CatalogItem will be returned in the `related_objects` field of<br>the response.<br><br>Default value: `false`<br>**Default**: `False` |
582591
| `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. If not included, results will<br>be from the current version of the catalog. |
592+
| `include_category_path_to_root` | `bool` | Query, Optional | Specifies whether or not to include the `path_to_root` list for each returned category instance. The `path_to_root` list consists<br>of `CategoryPathToRootNode` objects and specifies the path that starts with the immediate parent category of the returned category<br>and ends with its root category. If the returned category is a top-level category, the `path_to_root` list is empty and is not returned<br>in the response payload.<br>**Default**: `False` |
583593

584594
## Response Type
585595

@@ -592,9 +602,12 @@ object_id = 'object_id8'
592602

593603
include_related_objects = False
594604

605+
include_category_path_to_root = False
606+
595607
result = catalog_api.retrieve_catalog_object(
596608
object_id,
597-
include_related_objects=include_related_objects
609+
include_related_objects=include_related_objects,
610+
include_category_path_to_root=include_category_path_to_root
598611
)
599612
print(result)
600613

doc/api/checkout.md

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ checkout_api = client.checkout
1111
## Methods
1212

1313
* [Create Checkout](../../doc/api/checkout.md#create-checkout)
14+
* [Retrieve Location Settings](../../doc/api/checkout.md#retrieve-location-settings)
15+
* [Update Location Settings](../../doc/api/checkout.md#update-location-settings)
16+
* [Retrieve Merchant Settings](../../doc/api/checkout.md#retrieve-merchant-settings)
17+
* [Update Merchant Settings](../../doc/api/checkout.md#update-merchant-settings)
1418
* [List Payment Links](../../doc/api/checkout.md#list-payment-links)
1519
* [Create Payment Link](../../doc/api/checkout.md#create-payment-link)
1620
* [Delete Payment Link](../../doc/api/checkout.md#delete-payment-link)
@@ -155,6 +159,144 @@ elif result.is_error():
155159
```
156160

157161

162+
# Retrieve Location Settings
163+
164+
Retrieves the location-level settings for a Square-hosted checkout page.
165+
166+
```python
167+
def retrieve_location_settings(self,
168+
location_id)
169+
```
170+
171+
## Parameters
172+
173+
| Parameter | Type | Tags | Description |
174+
| --- | --- | --- | --- |
175+
| `location_id` | `str` | Template, Required | The ID of the location for which to retrieve settings. |
176+
177+
## Response Type
178+
179+
This method returns a `ApiResponse` instance. The `body` property of this instance returns the response data which is of type [`Retrieve Location Settings Response`](../../doc/models/retrieve-location-settings-response.md).
180+
181+
## Example Usage
182+
183+
```python
184+
location_id = 'location_id4'
185+
186+
result = checkout_api.retrieve_location_settings(location_id)
187+
print(result)
188+
189+
if result.is_success():
190+
print(result.body)
191+
elif result.is_error():
192+
print(result.errors)
193+
```
194+
195+
196+
# Update Location Settings
197+
198+
Updates the location-level settings for a Square-hosted checkout page.
199+
200+
```python
201+
def update_location_settings(self,
202+
location_id,
203+
body)
204+
```
205+
206+
## Parameters
207+
208+
| Parameter | Type | Tags | Description |
209+
| --- | --- | --- | --- |
210+
| `location_id` | `str` | Template, Required | The ID of the location for which to retrieve settings. |
211+
| `body` | [`Update Location Settings Request`](../../doc/models/update-location-settings-request.md) | Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |
212+
213+
## Response Type
214+
215+
This method returns a `ApiResponse` instance. The `body` property of this instance returns the response data which is of type [`Update Location Settings Response`](../../doc/models/update-location-settings-response.md).
216+
217+
## Example Usage
218+
219+
```python
220+
location_id = 'location_id4'
221+
222+
body = {
223+
'location_settings': {}
224+
}
225+
226+
result = checkout_api.update_location_settings(
227+
location_id,
228+
body
229+
)
230+
print(result)
231+
232+
if result.is_success():
233+
print(result.body)
234+
elif result.is_error():
235+
print(result.errors)
236+
```
237+
238+
239+
# Retrieve Merchant Settings
240+
241+
Retrieves the merchant-level settings for a Square-hosted checkout page.
242+
243+
```python
244+
def retrieve_merchant_settings(self)
245+
```
246+
247+
## Response Type
248+
249+
This method returns a `ApiResponse` instance. The `body` property of this instance returns the response data which is of type [`Retrieve Merchant Settings Response`](../../doc/models/retrieve-merchant-settings-response.md).
250+
251+
## Example Usage
252+
253+
```python
254+
result = checkout_api.retrieve_merchant_settings()
255+
print(result)
256+
257+
if result.is_success():
258+
print(result.body)
259+
elif result.is_error():
260+
print(result.errors)
261+
```
262+
263+
264+
# Update Merchant Settings
265+
266+
Updates the merchant-level settings for a Square-hosted checkout page.
267+
268+
```python
269+
def update_merchant_settings(self,
270+
body)
271+
```
272+
273+
## Parameters
274+
275+
| Parameter | Type | Tags | Description |
276+
| --- | --- | --- | --- |
277+
| `body` | [`Update Merchant Settings Request`](../../doc/models/update-merchant-settings-request.md) | Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |
278+
279+
## Response Type
280+
281+
This method returns a `ApiResponse` instance. The `body` property of this instance returns the response data which is of type [`Update Merchant Settings Response`](../../doc/models/update-merchant-settings-response.md).
282+
283+
## Example Usage
284+
285+
```python
286+
body = {
287+
'merchant_settings': {}
288+
}
289+
290+
result = checkout_api.update_merchant_settings(body)
291+
print(result)
292+
293+
if result.is_success():
294+
print(result.body)
295+
elif result.is_error():
296+
print(result.errors)
297+
```
298+
299+
158300
# List Payment Links
159301

160302
Lists all payment links.

doc/api/terminal.md

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ terminal_api = client.terminal
1919
* [Search Terminal Checkouts](../../doc/api/terminal.md#search-terminal-checkouts)
2020
* [Get Terminal Checkout](../../doc/api/terminal.md#get-terminal-checkout)
2121
* [Cancel Terminal Checkout](../../doc/api/terminal.md#cancel-terminal-checkout)
22+
* [Dismiss Terminal Checkout](../../doc/api/terminal.md#dismiss-terminal-checkout)
2223
* [Create Terminal Refund](../../doc/api/terminal.md#create-terminal-refund)
2324
* [Search Terminal Refunds](../../doc/api/terminal.md#search-terminal-refunds)
2425
* [Get Terminal Refund](../../doc/api/terminal.md#get-terminal-refund)
2526
* [Cancel Terminal Refund](../../doc/api/terminal.md#cancel-terminal-refund)
27+
* [Dismiss Terminal Refund](../../doc/api/terminal.md#dismiss-terminal-refund)
2628

2729

2830
# Create Terminal Action
@@ -199,7 +201,7 @@ def dismiss_terminal_action(self,
199201

200202
| Parameter | Type | Tags | Description |
201203
| --- | --- | --- | --- |
202-
| `action_id` | `str` | Template, Required | Unique ID for the `TerminalAction` associated with the waiting dialog to be dismissed. |
204+
| `action_id` | `str` | Template, Required | Unique ID for the `TerminalAction` associated with the action to be dismissed. |
203205

204206
## Response Type
205207

@@ -377,6 +379,40 @@ elif result.is_error():
377379
```
378380

379381

382+
# Dismiss Terminal Checkout
383+
384+
Dismisses a Terminal checkout request if the status and type of the request permits it.
385+
386+
```python
387+
def dismiss_terminal_checkout(self,
388+
checkout_id)
389+
```
390+
391+
## Parameters
392+
393+
| Parameter | Type | Tags | Description |
394+
| --- | --- | --- | --- |
395+
| `checkout_id` | `str` | Template, Required | Unique ID for the `TerminalCheckout` associated with the checkout to be dismissed. |
396+
397+
## Response Type
398+
399+
This method returns a `ApiResponse` instance. The `body` property of this instance returns the response data which is of type [`Dismiss Terminal Checkout Response`](../../doc/models/dismiss-terminal-checkout-response.md).
400+
401+
## Example Usage
402+
403+
```python
404+
checkout_id = 'checkout_id8'
405+
406+
result = terminal_api.dismiss_terminal_checkout(checkout_id)
407+
print(result)
408+
409+
if result.is_success():
410+
print(result.body)
411+
elif result.is_error():
412+
print(result.errors)
413+
```
414+
415+
380416
# Create Terminal Refund
381417

382418
Creates a request to refund an Interac payment completed on a Square Terminal. Refunds for Interac payments on a Square Terminal are supported only for Interac debit cards in Canada. Other refunds for Terminal payments should use the Refunds API. For more information, see [Refunds API](../../doc/api/refunds.md).
@@ -530,3 +566,37 @@ elif result.is_error():
530566
print(result.errors)
531567
```
532568

569+
570+
# Dismiss Terminal Refund
571+
572+
Dismisses a Terminal refund request if the status and type of the request permits it.
573+
574+
```python
575+
def dismiss_terminal_refund(self,
576+
terminal_refund_id)
577+
```
578+
579+
## Parameters
580+
581+
| Parameter | Type | Tags | Description |
582+
| --- | --- | --- | --- |
583+
| `terminal_refund_id` | `str` | Template, Required | Unique ID for the `TerminalRefund` associated with the refund to be dismissed. |
584+
585+
## Response Type
586+
587+
This method returns a `ApiResponse` instance. The `body` property of this instance returns the response data which is of type [`Dismiss Terminal Refund Response`](../../doc/models/dismiss-terminal-refund-response.md).
588+
589+
## Example Usage
590+
591+
```python
592+
terminal_refund_id = 'terminal_refund_id0'
593+
594+
result = terminal_api.dismiss_terminal_refund(terminal_refund_id)
595+
print(result)
596+
597+
if result.is_success():
598+
print(result.body)
599+
elif result.is_error():
600+
print(result.errors)
601+
```
602+

doc/client.md

Lines changed: 3 additions & 3 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*: `'2023-11-15'` |
8+
| `square_version` | `str` | Square Connect API versions<br>*Default*: `'2023-12-13'` |
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 |
@@ -25,7 +25,7 @@ The API client can be initialized as follows:
2525
```python
2626
from square.client import Client
2727
client = Client(
28-
square_version='2023-11-15',
28+
square_version='2023-12-13',
2929
access_token='AccessToken'
3030
)
3131
```
@@ -48,7 +48,7 @@ API calls return an `ApiResponse` object that includes the following fields:
4848
```python
4949
from square.client import Client
5050
client = Client(
51-
square_version='2023-11-15',
51+
square_version='2023-12-13',
5252
access_token='AccessToken'
5353
)
5454

doc/models/batch-retrieve-catalog-objects-request.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
| `include_related_objects` | `bool` | Optional | If `true`, the response will include additional objects that are related to the<br>requested objects. Related objects are defined as any objects referenced by ID by the results in the `objects` field<br>of the response. These objects are put in the `related_objects` field. Setting this to `true` is<br>helpful when the objects are needed for immediate display to a user.<br>This process only goes one level deep. Objects referenced by the related objects will not be included. For example,<br><br>if the `objects` field of the response contains a CatalogItem, its associated<br>CatalogCategory objects, CatalogTax objects, CatalogImage objects and<br>CatalogModifierLists will be returned in the `related_objects` field of the<br>response. If the `objects` field of the response contains a CatalogItemVariation,<br>its parent CatalogItem will be returned in the `related_objects` field of<br>the response.<br><br>Default value: `false` |
1414
| `catalog_version` | `long\|int` | Optional | The specific version of the catalog objects to be included in the response.<br>This allows you to retrieve historical versions of objects. The specified version value is matched against<br>the [CatalogObject](../../doc/models/catalog-object.md)s' `version` attribute. If not included, results will<br>be from the current version of the catalog. |
1515
| `include_deleted_objects` | `bool` | Optional | Indicates whether to include (`true`) or not (`false`) in the response deleted objects, namely, those with the `is_deleted` attribute set to `true`. |
16+
| `include_category_path_to_root` | `bool` | Optional | Specifies whether or not to include the `path_to_root` list for each returned category instance. The `path_to_root` list consists<br>of `CategoryPathToRootNode` objects and specifies the path that starts with the immediate parent category of the returned category<br>and ends with its root category. If the returned category is a top-level category, the `path_to_root` list is empty and is not returned<br>in the response payload. |
1617

1718
## Example (as JSON)
1819

@@ -24,7 +25,8 @@
2425
"AA27W3M2GGTF3H6AVPNB77CK"
2526
],
2627
"catalog_version": 190,
27-
"include_deleted_objects": false
28+
"include_deleted_objects": false,
29+
"include_category_path_to_root": false
2830
}
2931
```
3032

0 commit comments

Comments
 (0)