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 = "[email protected]"}]

0 commit comments

Comments
 (0)