Skip to content

Commit

Permalink
Generated PR for Release: 37.0.0.20240515
Browse files Browse the repository at this point in the history
  • Loading branch information
autobot committed May 14, 2024
1 parent 1f3ecd0 commit 941aea9
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 18 deletions.
6 changes: 3 additions & 3 deletions doc/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The following parameters are configurable for the API Client:

| Parameter | Type | Description |
| --- | --- | --- |
| `square_version` | `str` | Square Connect API versions<br>*Default*: `'2024-04-17'` |
| `square_version` | `str` | Square Connect API versions<br>*Default*: `'2024-05-15'` |
| `custom_url` | `str` | Sets the base URL requests are made to. Defaults to `https://connect.squareup.com`<br>*Default*: `'https://connect.squareup.com'` |
| `environment` | `string` | The API environment. <br> **Default: `production`** |
| `http_client_instance` | `HttpClient` | The Http Client passed from the sdk user for making requests |
Expand All @@ -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'
)
Expand All @@ -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'
)
Expand Down
3 changes: 2 additions & 1 deletion doc/models/catalog-item.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.<br><br>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<br>of the [CatalogItem](entity:CatalogItem) instance. The `description` and `description_html` field values are kept in sync. If you try to<br>set the both fields, the `description_html` text value overwrites the `description` value. Updates in one field are also reflected in the other,<br>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<br>does not nullify `description_html`.<br>**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.<br>This attribute is searchable, and its value length is of Unicode code points.<br>**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. |
Expand Down Expand Up @@ -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
}
```

4 changes: 3 additions & 1 deletion doc/models/destination-details-card-refund-details.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| --- | --- | --- | --- |
| `card` | [`Card`](../../doc/models/card.md) | Optional | Represents the payment details of a card to be used for payments. These<br>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<br>`KEYED`, `SWIPED`, `EMV`, `ON_FILE`, or `CONTACTLESS`.<br>**Constraints**: *Maximum Length*: `50` |
| `auth_result_code` | `str` | Optional | The authorization code provided by the issuer when a refund is approved.<br>**Constraints**: *Maximum Length*: `10` |

## Example (as JSON)

Expand All @@ -23,7 +24,8 @@
"exp_month": 228,
"exp_year": 68
},
"entry_method": "entry_method4"
"entry_method": "entry_method4",
"auth_result_code": "auth_result_code6"
}
```

3 changes: 2 additions & 1 deletion doc/models/destination-details.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
```
Expand Down
3 changes: 2 additions & 1 deletion doc/models/get-payment-refund-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
},
Expand Down
3 changes: 2 additions & 1 deletion doc/models/list-payment-refunds-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion doc/models/payment-refund.md
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
1 change: 1 addition & 0 deletions doc/models/payment.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Represents a payment processed by the Square API.
| `receipt_url` | `str` | Optional | The URL for the payment's receipt.<br>The field is only populated for COMPLETED payments.<br>**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<br>`Payment` object. |

## Example (as JSON)
Expand Down
3 changes: 2 additions & 1 deletion doc/models/refund-payment-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"}]
Expand Down
2 changes: 1 addition & 1 deletion square/api/base_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
6 changes: 3 additions & 3 deletions square/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
8 changes: 5 additions & 3 deletions square/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,18 @@ 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']

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
Expand Down

0 comments on commit 941aea9

Please sign in to comment.