Skip to content

Commit b6c6183

Browse files
authored
Merge pull request #137 from square/release/38.2.0.20241017
Generated PR for Release: 38.2.0.20241017
2 parents ff819fc + a2a35bd commit b6c6183

37 files changed

+213
-137
lines changed

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*: `'2024-09-19'` |
8+
| `square_version` | `str` | Square Connect API versions<br>*Default*: `'2024-10-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,7 +24,7 @@ The API client can be initialized as follows:
2424

2525
```python
2626
client = Client(
27-
square_version='2024-09-19',
27+
square_version='2024-10-17',
2828
bearer_auth_credentials=BearerAuthCredentials(
2929
access_token='AccessToken'
3030
),
@@ -53,7 +53,7 @@ from square.http.auth.o_auth_2 import BearerAuthCredentials
5353
from square.client import Client
5454

5555
client = Client(
56-
square_version='2024-09-19',
56+
square_version='2024-10-17',
5757
bearer_auth_credentials=BearerAuthCredentials(
5858
access_token='AccessToken'
5959
),
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
# Destination Details Cash Refund Details
3+
4+
Stores details about a cash refund. Contains only non-confidential information.
5+
6+
## Structure
7+
8+
`Destination Details Cash Refund Details`
9+
10+
## Fields
11+
12+
| Name | Type | Tags | Description |
13+
| --- | --- | --- | --- |
14+
| `seller_supplied_money` | [`Money`](../../doc/models/money.md) | Required | Represents an amount of money. `Money` fields can be signed or unsigned.<br>Fields that do not explicitly define whether they are signed or unsigned are<br>considered unsigned and can only hold positive amounts. For signed fields, the<br>sign of the value indicates the purpose of the money transfer. See<br>[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)<br>for more information. |
15+
| `change_back_money` | [`Money`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.<br>Fields that do not explicitly define whether they are signed or unsigned are<br>considered unsigned and can only hold positive amounts. For signed fields, the<br>sign of the value indicates the purpose of the money transfer. See<br>[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)<br>for more information. |
16+
17+
## Example (as JSON)
18+
19+
```json
20+
{
21+
"seller_supplied_money": {
22+
"amount": 36,
23+
"currency": "AZN"
24+
},
25+
"change_back_money": {
26+
"amount": 78,
27+
"currency": "DJF"
28+
}
29+
}
30+
```
31+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
# Destination Details External Refund Details
3+
4+
Stores details about an external refund. Contains only non-confidential information.
5+
6+
## Structure
7+
8+
`Destination Details External Refund Details`
9+
10+
## Fields
11+
12+
| Name | Type | Tags | Description |
13+
| --- | --- | --- | --- |
14+
| `type` | `str` | Required | The type of external refund the seller paid to the buyer. It can be one of the<br>following:<br><br>- CHECK - Refunded using a physical check.<br>- BANK_TRANSFER - Refunded using external bank transfer.<br>- OTHER\_GIFT\_CARD - Refunded using a non-Square gift card.<br>- CRYPTO - Refunded using a crypto currency.<br>- SQUARE_CASH - Refunded using Square Cash App.<br>- SOCIAL - Refunded using peer-to-peer payment applications.<br>- EXTERNAL - A third-party application gathered this refund outside of Square.<br>- EMONEY - Refunded using an E-money provider.<br>- CARD - A credit or debit card that Square does not support.<br>- STORED_BALANCE - Use for house accounts, store credit, and so forth.<br>- FOOD_VOUCHER - Restaurant voucher provided by employers to employees to pay for meals<br>- OTHER - A type not listed here.<br>**Constraints**: *Maximum Length*: `50` |
15+
| `source` | `str` | Required | A description of the external refund source. For example,<br>"Food Delivery Service".<br>**Constraints**: *Maximum Length*: `255` |
16+
| `source_id` | `str` | Optional | An ID to associate the refund to its originating source.<br>**Constraints**: *Maximum Length*: `255` |
17+
18+
## Example (as JSON)
19+
20+
```json
21+
{
22+
"type": "type4",
23+
"source": "source2",
24+
"source_id": "source_id0"
25+
}
26+
```
27+

doc/models/destination-details.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Details about a refund's destination.
1212
| Name | Type | Tags | Description |
1313
| --- | --- | --- | --- |
1414
| `card_details` | [`Destination Details Card Refund Details`](../../doc/models/destination-details-card-refund-details.md) | Optional | - |
15+
| `cash_details` | [`Destination Details Cash Refund Details`](../../doc/models/destination-details-cash-refund-details.md) | Optional | Stores details about a cash refund. Contains only non-confidential information. |
16+
| `external_details` | [`Destination Details External Refund Details`](../../doc/models/destination-details-external-refund-details.md) | Optional | Stores details about an external refund. Contains only non-confidential information. |
1517

1618
## Example (as JSON)
1719

@@ -27,6 +29,21 @@ Details about a refund's destination.
2729
},
2830
"entry_method": "entry_method8",
2931
"auth_result_code": "auth_result_code0"
32+
},
33+
"cash_details": {
34+
"seller_supplied_money": {
35+
"amount": 36,
36+
"currency": "AZN"
37+
},
38+
"change_back_money": {
39+
"amount": 78,
40+
"currency": "DJF"
41+
}
42+
},
43+
"external_details": {
44+
"type": "type6",
45+
"source": "source0",
46+
"source_id": "source_id8"
3047
}
3148
}
3249
```

doc/models/get-payment-refund-response.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,21 @@ present or it might be present in a FAILED state.
5757
},
5858
"entry_method": "entry_method8",
5959
"auth_result_code": "auth_result_code0"
60+
},
61+
"cash_details": {
62+
"seller_supplied_money": {
63+
"amount": 36,
64+
"currency": "AZN"
65+
},
66+
"change_back_money": {
67+
"amount": 78,
68+
"currency": "DJF"
69+
}
70+
},
71+
"external_details": {
72+
"type": "type6",
73+
"source": "source0",
74+
"source_id": "source_id8"
6075
}
6176
}
6277
},

doc/models/list-payment-refunds-response.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,21 @@ Either `errors` or `refunds` is present in a given response (never both).
5959
},
6060
"entry_method": "entry_method8",
6161
"auth_result_code": "auth_result_code0"
62+
},
63+
"cash_details": {
64+
"seller_supplied_money": {
65+
"amount": 36,
66+
"currency": "AZN"
67+
},
68+
"change_back_money": {
69+
"amount": 78,
70+
"currency": "DJF"
71+
}
72+
},
73+
"external_details": {
74+
"type": "type6",
75+
"source": "source0",
76+
"source_id": "source_id8"
6277
}
6378
}
6479
}

doc/models/payment-refund.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,21 @@ the original payment and the amount of money refunded.
4848
},
4949
"entry_method": "entry_method8",
5050
"auth_result_code": "auth_result_code0"
51+
},
52+
"cash_details": {
53+
"seller_supplied_money": {
54+
"amount": 36,
55+
"currency": "AZN"
56+
},
57+
"change_back_money": {
58+
"amount": 78,
59+
"currency": "DJF"
60+
}
61+
},
62+
"external_details": {
63+
"type": "type6",
64+
"source": "source0",
65+
"source_id": "source_id8"
5166
}
5267
},
5368
"amount_money": {

doc/models/refund-payment-request.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@ Describes a request to refund a payment using [RefundPayment](../../doc/api/refu
1515
| `amount_money` | [`Money`](../../doc/models/money.md) | Required | Represents an amount of money. `Money` fields can be signed or unsigned.<br>Fields that do not explicitly define whether they are signed or unsigned are<br>considered unsigned and can only hold positive amounts. For signed fields, the<br>sign of the value indicates the purpose of the money transfer. See<br>[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)<br>for more information. |
1616
| `app_fee_money` | [`Money`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.<br>Fields that do not explicitly define whether they are signed or unsigned are<br>considered unsigned and can only hold positive amounts. For signed fields, the<br>sign of the value indicates the purpose of the money transfer. See<br>[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)<br>for more information. |
1717
| `payment_id` | `str` | Optional | The unique ID of the payment being refunded.<br>Required when unlinked=false, otherwise must not be set. |
18-
| `destination_id` | `str` | Optional | The ID indicating where funds will be refunded to, if this is an unlinked refund.<br>This can be any of the following: A token generated by Web Payments SDK;<br>a card-on-file identifier.<br>Required for requests specifying unlinked=true.<br>Otherwise, if included when `unlinked=false`, will throw an error. |
18+
| `destination_id` | `str` | Optional | The ID indicating where funds will be refunded to. Required for unlinked refunds. For more<br>information, see [Create an unlinked refund](https://developer.squareup.com/docs/payments-api/refund-payments#create-an-unlinked-refund).<br><br>For refunds linked to Square payments, destination_id is usually omitted; in this case, funds<br>will be returned to the original payment source. The field may be specified in order to request<br>a cross-method refund to a gift card. For more information,<br>see [Cross-method refunds to gift cards](https://developer.squareup.com/docs/payments-api/refund-payments#cross-method-refunds-to-gift-cards). |
1919
| `unlinked` | `bool` | Optional | Indicates that the refund is not linked to a Square payment.<br>If set to true, `destination_id` and `location_id` must be supplied while `payment_id` must not<br>be provided. |
2020
| `location_id` | `str` | Optional | The location ID associated with the unlinked refund.<br>Required for requests specifying `unlinked=true`.<br>Otherwise, if included when `unlinked=false`, will throw an error.<br>**Constraints**: *Maximum Length*: `50` |
2121
| `customer_id` | `str` | Optional | The [Customer](entity:Customer) ID of the customer associated with the refund.<br>This is required if the `destination_id` refers to a card on file created using the Cards<br>API. Only allowed when `unlinked=true`. |
2222
| `reason` | `str` | Optional | A description of the reason for the refund.<br>**Constraints**: *Maximum Length*: `192` |
2323
| `payment_version_token` | `str` | Optional | Used for optimistic concurrency. This opaque token identifies the current `Payment`<br>version that the caller expects. If the server has a different version of the Payment,<br>the update fails and a response with a VERSION_MISMATCH error is returned.<br>If the versions match, or the field is not provided, the refund proceeds as normal. |
2424
| `team_member_id` | `str` | Optional | An optional [TeamMember](entity:TeamMember) ID to associate with this refund.<br>**Constraints**: *Maximum Length*: `192` |
25+
| `cash_details` | [`Destination Details Cash Refund Details`](../../doc/models/destination-details-cash-refund-details.md) | Optional | Stores details about a cash refund. Contains only non-confidential information. |
26+
| `external_details` | [`Destination Details External Refund Details`](../../doc/models/destination-details-external-refund-details.md) | Optional | Stores details about an external refund. Contains only non-confidential information. |
2527

2628
## Example (as JSON)
2729

doc/models/refund-payment-response.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,21 @@ present, or it might be present with a status of `FAILED`.
5252
},
5353
"entry_method": "entry_method8",
5454
"auth_result_code": "auth_result_code0"
55+
},
56+
"cash_details": {
57+
"seller_supplied_money": {
58+
"amount": 36,
59+
"currency": "AZN"
60+
},
61+
"change_back_money": {
62+
"amount": 78,
63+
"currency": "DJF"
64+
}
65+
},
66+
"external_details": {
67+
"type": "type6",
68+
"source": "source0",
69+
"source_id": "source_id8"
5570
}
5671
}
5772
},

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ 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 = "38.1.0.20240919"
7+
version = "38.2.0.20241017"
88
readme = "README.md"
99
requires-python = ">=3.7"
1010
authors = [{name = "Square Developer Platform", email = "developers@squareup.com"}]

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/38.1.0.20240919 ({api-version}) {engine}/{engine-version} ({os-info}) {detail}'
25+
return 'Square-Python-SDK/38.2.0.20241017 ({api-version}) {engine}/{engine-version} ({os-info}) {detail}'
2626

2727
@staticmethod
2828
def user_agent_parameters():

square/api/booking_custom_attributes_api.py

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@ def create_booking_custom_attribute_definition(self,
8383
To call this endpoint with buyer-level permissions, set
8484
`APPOINTMENTS_WRITE` for the OAuth scope.
8585
To call this endpoint with seller-level permissions, set
86-
`APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth
87-
scope.
86+
`APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope.
8887
For calls to this endpoint with seller-level permissions to succeed,
8988
the seller must have subscribed to *Appointments Plus*
9089
or *Appointments Premium*.
@@ -135,8 +134,7 @@ def delete_booking_custom_attribute_definition(self,
135134
To call this endpoint with buyer-level permissions, set
136135
`APPOINTMENTS_WRITE` for the OAuth scope.
137136
To call this endpoint with seller-level permissions, set
138-
`APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth
139-
scope.
137+
`APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope.
140138
For calls to this endpoint with seller-level permissions to succeed,
141139
the seller must have subscribed to *Appointments Plus*
142140
or *Appointments Premium*.
@@ -241,8 +239,7 @@ def update_booking_custom_attribute_definition(self,
241239
To call this endpoint with buyer-level permissions, set
242240
`APPOINTMENTS_WRITE` for the OAuth scope.
243241
To call this endpoint with seller-level permissions, set
244-
`APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth
245-
scope.
242+
`APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope.
246243
For calls to this endpoint with seller-level permissions to succeed,
247244
the seller must have subscribed to *Appointments Plus*
248245
or *Appointments Premium*.
@@ -298,8 +295,7 @@ def bulk_delete_booking_custom_attributes(self,
298295
To call this endpoint with buyer-level permissions, set
299296
`APPOINTMENTS_WRITE` for the OAuth scope.
300297
To call this endpoint with seller-level permissions, set
301-
`APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth
302-
scope.
298+
`APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope.
303299
For calls to this endpoint with seller-level permissions to succeed,
304300
the seller must have subscribed to *Appointments Plus*
305301
or *Appointments Premium*.
@@ -350,8 +346,7 @@ def bulk_upsert_booking_custom_attributes(self,
350346
To call this endpoint with buyer-level permissions, set
351347
`APPOINTMENTS_WRITE` for the OAuth scope.
352348
To call this endpoint with seller-level permissions, set
353-
`APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth
354-
scope.
349+
`APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope.
355350
For calls to this endpoint with seller-level permissions to succeed,
356351
the seller must have subscribed to *Appointments Plus*
357352
or *Appointments Premium*.
@@ -479,8 +474,7 @@ def delete_booking_custom_attribute(self,
479474
To call this endpoint with buyer-level permissions, set
480475
`APPOINTMENTS_WRITE` for the OAuth scope.
481476
To call this endpoint with seller-level permissions, set
482-
`APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth
483-
scope.
477+
`APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope.
484478
For calls to this endpoint with seller-level permissions to succeed,
485479
the seller must have subscribed to *Appointments Plus*
486480
or *Appointments Premium*.
@@ -612,8 +606,7 @@ def upsert_booking_custom_attribute(self,
612606
To call this endpoint with buyer-level permissions, set
613607
`APPOINTMENTS_WRITE` for the OAuth scope.
614608
To call this endpoint with seller-level permissions, set
615-
`APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth
616-
scope.
609+
`APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope.
617610
For calls to this endpoint with seller-level permissions to succeed,
618611
the seller must have subscribed to *Appointments Plus*
619612
or *Appointments Premium*.

square/api/bookings_api.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,7 @@ def create_booking(self,
116116
To call this endpoint with buyer-level permissions, set
117117
`APPOINTMENTS_WRITE` for the OAuth scope.
118118
To call this endpoint with seller-level permissions, set
119-
`APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth
120-
scope.
119+
`APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope.
121120
For calls to this endpoint with seller-level permissions to succeed,
122121
the seller must have subscribed to *Appointments Plus*
123122
or *Appointments Premium*.
@@ -575,8 +574,7 @@ def update_booking(self,
575574
To call this endpoint with buyer-level permissions, set
576575
`APPOINTMENTS_WRITE` for the OAuth scope.
577576
To call this endpoint with seller-level permissions, set
578-
`APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth
579-
scope.
577+
`APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope.
580578
For calls to this endpoint with seller-level permissions to succeed,
581579
the seller must have subscribed to *Appointments Plus*
582580
or *Appointments Premium*.
@@ -634,8 +632,7 @@ def cancel_booking(self,
634632
To call this endpoint with buyer-level permissions, set
635633
`APPOINTMENTS_WRITE` for the OAuth scope.
636634
To call this endpoint with seller-level permissions, set
637-
`APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth
638-
scope.
635+
`APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope.
639636
For calls to this endpoint with seller-level permissions to succeed,
640637
the seller must have subscribed to *Appointments Plus*
641638
or *Appointments Premium*.

square/api/cards_api.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ def list_cards(self,
3737
with the customer supplied. By default, all cards owned by the
3838
merchant are returned.
3939
include_disabled (bool, optional): Includes disabled cards. By
40-
default, all enabled cards owned by the merchant are
41-
returned.
40+
default, all enabled cards owned by the merchant are returned.
4241
reference_id (str, optional): Limit results to cards associated
4342
with the reference_id supplied.
4443
sort_order (SortOrder, optional): Sorts the returned list by when

0 commit comments

Comments
 (0)