From 941aea950a21aeec5b659b43b5b698545480cede Mon Sep 17 00:00:00 2001 From: autobot Date: Tue, 14 May 2024 17:01:38 +0000 Subject: [PATCH] Generated PR for Release: 37.0.0.20240515 --- doc/client.md | 6 +++--- doc/models/catalog-item.md | 3 ++- doc/models/destination-details-card-refund-details.md | 4 +++- doc/models/destination-details.md | 3 ++- doc/models/get-payment-refund-response.md | 3 ++- doc/models/list-payment-refunds-response.md | 3 ++- doc/models/payment-refund.md | 3 ++- doc/models/payment.md | 1 + doc/models/refund-payment-response.md | 3 ++- pyproject.toml | 2 +- square/api/base_api.py | 2 +- square/client.py | 6 +++--- square/configuration.py | 8 +++++--- 13 files changed, 29 insertions(+), 18 deletions(-) diff --git a/doc/client.md b/doc/client.md index bb2b1b05..810f1a6d 100644 --- a/doc/client.md +++ b/doc/client.md @@ -5,7 +5,7 @@ The following parameters are configurable for the API Client: | Parameter | Type | Description | | --- | --- | --- | -| `square_version` | `str` | Square Connect API versions
*Default*: `'2024-04-17'` | +| `square_version` | `str` | Square Connect API versions
*Default*: `'2024-05-15'` | | `custom_url` | `str` | Sets the base URL requests are made to. Defaults to `https://connect.squareup.com`
*Default*: `'https://connect.squareup.com'` | | `environment` | `string` | The API environment.
**Default: `production`** | | `http_client_instance` | `HttpClient` | The Http Client passed from the sdk user for making requests | @@ -24,7 +24,7 @@ The API client can be initialized as follows: ```python client = Client( - square_version='2024-04-17', + square_version='2024-05-15', bearer_auth_credentials=BearerAuthCredentials( access_token='AccessToken' ) @@ -51,7 +51,7 @@ from square.http.auth.o_auth_2 import BearerAuthCredentials from square.client import Client client = Client( - square_version='2024-04-17', + square_version='2024-05-15', bearer_auth_credentials=BearerAuthCredentials( access_token='AccessToken' ) diff --git a/doc/models/catalog-item.md b/doc/models/catalog-item.md index 92dd0f81..ca851806 100644 --- a/doc/models/catalog-item.md +++ b/doc/models/catalog-item.md @@ -15,6 +15,7 @@ A [CatalogObject](../../doc/models/catalog-object.md) instance of the `ITEM` typ | `description` | `str` | Optional | The item's description. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points.

Deprecated at 2022-07-20, this field is planned to retire in 6 months. You should migrate to use `description_html` to set the description
of the [CatalogItem](entity:CatalogItem) instance. The `description` and `description_html` field values are kept in sync. If you try to
set the both fields, the `description_html` text value overwrites the `description` value. Updates in one field are also reflected in the other,
except for when you use an early version before Square API 2022-07-20 and `description_html` is set to blank, setting the `description` value to null
does not nullify `description_html`.
**Constraints**: *Maximum Length*: `4096` | | `abbreviation` | `str` | Optional | The text of the item's display label in the Square Point of Sale app. Only up to the first five characters of the string are used.
This attribute is searchable, and its value length is of Unicode code points.
**Constraints**: *Maximum Length*: `24` | | `label_color` | `str` | Optional | The color of the item's display label in the Square Point of Sale app. This must be a valid hex color code. | +| `is_taxable` | `bool` | Optional | Indicates whether the item is taxable (`true`) or non-taxable (`false`). Default is `true`. | | `available_online` | `bool` | Optional | If `true`, the item can be added to shipping orders from the merchant's online store. | | `available_for_pickup` | `bool` | Optional | If `true`, the item can be added to pickup orders from the merchant's online store. | | `available_electronically` | `bool` | Optional | If `true`, the item can be added to electronically fulfilled orders from the merchant's online store. | @@ -44,7 +45,7 @@ A [CatalogObject](../../doc/models/catalog-object.md) instance of the `ITEM` typ "description": "description6", "abbreviation": "abbreviation8", "label_color": "label_color8", - "available_online": false + "is_taxable": false } ``` diff --git a/doc/models/destination-details-card-refund-details.md b/doc/models/destination-details-card-refund-details.md index 89d4d358..4e62ccdf 100644 --- a/doc/models/destination-details-card-refund-details.md +++ b/doc/models/destination-details-card-refund-details.md @@ -11,6 +11,7 @@ | --- | --- | --- | --- | | `card` | [`Card`](../../doc/models/card.md) | Optional | Represents the payment details of a card to be used for payments. These
details are determined by the payment token generated by Web Payments SDK. | | `entry_method` | `str` | Optional | The method used to enter the card's details for the refund. The method can be
`KEYED`, `SWIPED`, `EMV`, `ON_FILE`, or `CONTACTLESS`.
**Constraints**: *Maximum Length*: `50` | +| `auth_result_code` | `str` | Optional | The authorization code provided by the issuer when a refund is approved.
**Constraints**: *Maximum Length*: `10` | ## Example (as JSON) @@ -23,7 +24,8 @@ "exp_month": 228, "exp_year": 68 }, - "entry_method": "entry_method4" + "entry_method": "entry_method4", + "auth_result_code": "auth_result_code6" } ``` diff --git a/doc/models/destination-details.md b/doc/models/destination-details.md index 989c937a..74071d73 100644 --- a/doc/models/destination-details.md +++ b/doc/models/destination-details.md @@ -25,7 +25,8 @@ Details about a refund's destination. "exp_month": 228, "exp_year": 68 }, - "entry_method": "entry_method8" + "entry_method": "entry_method8", + "auth_result_code": "auth_result_code0" } } ``` diff --git a/doc/models/get-payment-refund-response.md b/doc/models/get-payment-refund-response.md index b346f05f..46091887 100644 --- a/doc/models/get-payment-refund-response.md +++ b/doc/models/get-payment-refund-response.md @@ -55,7 +55,8 @@ present or it might be present in a FAILED state. "exp_month": 228, "exp_year": 68 }, - "entry_method": "entry_method8" + "entry_method": "entry_method8", + "auth_result_code": "auth_result_code0" } } }, diff --git a/doc/models/list-payment-refunds-response.md b/doc/models/list-payment-refunds-response.md index a1697261..9bb9b480 100644 --- a/doc/models/list-payment-refunds-response.md +++ b/doc/models/list-payment-refunds-response.md @@ -57,7 +57,8 @@ Either `errors` or `refunds` is present in a given response (never both). "exp_month": 228, "exp_year": 68 }, - "entry_method": "entry_method8" + "entry_method": "entry_method8", + "auth_result_code": "auth_result_code0" } } } diff --git a/doc/models/payment-refund.md b/doc/models/payment-refund.md index a41bacca..a77cec8d 100644 --- a/doc/models/payment-refund.md +++ b/doc/models/payment-refund.md @@ -46,7 +46,8 @@ the original payment and the amount of money refunded. "exp_month": 228, "exp_year": 68 }, - "entry_method": "entry_method8" + "entry_method": "entry_method8", + "auth_result_code": "auth_result_code0" } }, "amount_money": { diff --git a/doc/models/payment.md b/doc/models/payment.md index 433ceb35..8815ac46 100644 --- a/doc/models/payment.md +++ b/doc/models/payment.md @@ -51,6 +51,7 @@ Represents a payment processed by the Square API. | `receipt_url` | `str` | Optional | The URL for the payment's receipt.
The field is only populated for COMPLETED payments.
**Constraints**: *Maximum Length*: `255` | | `device_details` | [`Device Details`](../../doc/models/device-details.md) | Optional | Details about the device that took the payment. | | `application_details` | [`Application Details`](../../doc/models/application-details.md) | Optional | Details about the application that took the payment. | +| `is_offline_payment` | `bool` | Optional | Whether or not this payment was taken offline. | | `version_token` | `str` | Optional | Used for optimistic concurrency. This opaque token identifies a specific version of the
`Payment` object. | ## Example (as JSON) diff --git a/doc/models/refund-payment-response.md b/doc/models/refund-payment-response.md index 5981b4c6..dfcd8923 100644 --- a/doc/models/refund-payment-response.md +++ b/doc/models/refund-payment-response.md @@ -50,7 +50,8 @@ present, or it might be present with a status of `FAILED`. "exp_month": 228, "exp_year": 68 }, - "entry_method": "entry_method8" + "entry_method": "entry_method8", + "auth_result_code": "auth_result_code0" } } }, diff --git a/pyproject.toml b/pyproject.toml index 109e4ac5..ea265604 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ requires = ["setuptools>=61.0"] [project] name = "squareup" description = "Use Square APIs to manage and run business including payment, customer, product, inventory, and employee management." -version = "36.0.0.20240417" +version = "37.0.0.20240515" readme = "README.md" requires-python = ">=3.7" authors = [{name = "Square Developer Platform", email = "developers@squareup.com"}] diff --git a/square/api/base_api.py b/square/api/base_api.py index 4b4e2846..b3856c9c 100644 --- a/square/api/base_api.py +++ b/square/api/base_api.py @@ -22,7 +22,7 @@ class BaseApi(object): @staticmethod def user_agent(): - return 'Square-Python-SDK/36.0.0.20240417 ({api-version}) {engine}/{engine-version} ({os-info}) {detail}' + return 'Square-Python-SDK/37.0.0.20240515 ({api-version}) {engine}/{engine-version} ({os-info}) {detail}' @staticmethod def user_agent_parameters(): diff --git a/square/client.py b/square/client.py index de032643..298ec104 100644 --- a/square/client.py +++ b/square/client.py @@ -54,11 +54,11 @@ class Client(object): @staticmethod def sdk_version(): - return '36.0.0.20240417' + return '37.0.0.20240515' @staticmethod def square_version(): - return '2024-04-17' + return '2024-05-15' def user_agent_detail(self): return self.config.user_agent_detail @@ -233,7 +233,7 @@ def __init__(self, http_client_instance=None, retry_statuses=None, retry_methods=None, environment='production', custom_url='https://connect.squareup.com', access_token=None, - bearer_auth_credentials=None, square_version='2024-04-17', + bearer_auth_credentials=None, square_version='2024-05-15', additional_headers={}, user_agent_detail='', config=None): self.config = config or Configuration( http_client_instance=http_client_instance, diff --git a/square/configuration.py b/square/configuration.py index 42587743..4c4c7062 100644 --- a/square/configuration.py +++ b/square/configuration.py @@ -45,7 +45,7 @@ def __init__(self, http_client_instance=None, retry_statuses=None, retry_methods=None, environment='production', custom_url='https://connect.squareup.com', access_token=None, - bearer_auth_credentials=None, square_version='2024-04-17', + bearer_auth_credentials=None, square_version='2024-05-15', additional_headers={}, user_agent_detail=''): if retry_methods is None: retry_methods = ['GET', 'PUT'] @@ -53,8 +53,10 @@ def __init__(self, http_client_instance=None, if retry_statuses is None: retry_statuses = [408, 413, 429, 500, 502, 503, 504, 521, 522, 524] - super().__init__(http_client_instance, override_http_client_configuration, http_call_back, timeout, max_retries, - backoff_factor, retry_statuses, retry_methods) + super().__init__(http_client_instance, + override_http_client_configuration, http_call_back, + timeout, max_retries, backoff_factor, retry_statuses, + retry_methods) # Current API environment self._environment = environment