Skip to content

Commit bb7bddd

Browse files
authored
Merge pull request #139 from square/release/38.2.0.20241017
Generated PR for Release: 38.2.0.20241017
2 parents 438c9c3 + 273794b commit bb7bddd

20 files changed

+720
-24
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "square/square",
33
"description": "Use Square APIs to manage and run business including payment, customer, product, inventory, and employee management.",
4-
"version": "38.1.0.20240919",
4+
"version": "38.2.0.20241017",
55
"type": "library",
66
"keywords": [
77
"Square",

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-
| `squareVersion` | `string` | Square Connect API versions<br>*Default*: `'2024-09-19'` |
8+
| `squareVersion` | `string` | Square Connect API versions<br>*Default*: `'2024-10-17'` |
99
| `customUrl` | `string` | 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
| `timeout` | `int` | Timeout for API calls in seconds.<br>*Default*: `60` |
@@ -30,7 +30,7 @@ $client = SquareClientBuilder::init()
3030
'AccessToken'
3131
)
3232
)
33-
->squareVersion('2024-09-19')
33+
->squareVersion('2024-10-17')
3434
->environment(Environment::PRODUCTION)
3535
->customUrl('https://connect.squareup.com')
3636
->build();
@@ -61,7 +61,7 @@ $client = SquareClientBuilder::init()
6161
'AccessToken'
6262
)
6363
)
64-
->squareVersion('2024-09-19')
64+
->squareVersion('2024-10-17')
6565
->environment(Environment::PRODUCTION)
6666
->customUrl('https://connect.squareup.com')
6767
->build();
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+
`DestinationDetailsCashRefundDetails`
9+
10+
## Fields
11+
12+
| Name | Type | Tags | Description | Getter | Setter |
13+
| --- | --- | --- | --- | --- | --- |
14+
| `sellerSuppliedMoney` | [`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. | getSellerSuppliedMoney(): Money | setSellerSuppliedMoney(Money sellerSuppliedMoney): void |
15+
| `changeBackMoney` | [`?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. | getChangeBackMoney(): ?Money | setChangeBackMoney(?Money changeBackMoney): void |
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+
`DestinationDetailsExternalRefundDetails`
9+
10+
## Fields
11+
12+
| Name | Type | Tags | Description | Getter | Setter |
13+
| --- | --- | --- | --- | --- | --- |
14+
| `type` | `string` | 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` | getType(): string | setType(string type): void |
15+
| `source` | `string` | Required | A description of the external refund source. For example,<br>"Food Delivery Service".<br>**Constraints**: *Maximum Length*: `255` | getSource(): string | setSource(string source): void |
16+
| `sourceId` | `?string` | Optional | An ID to associate the refund to its originating source.<br>**Constraints**: *Maximum Length*: `255` | getSourceId(): ?string | setSourceId(?string sourceId): void |
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 | Getter | Setter |
1313
| --- | --- | --- | --- | --- | --- |
1414
| `cardDetails` | [`?DestinationDetailsCardRefundDetails`](../../doc/models/destination-details-card-refund-details.md) | Optional | - | getCardDetails(): ?DestinationDetailsCardRefundDetails | setCardDetails(?DestinationDetailsCardRefundDetails cardDetails): void |
15+
| `cashDetails` | [`?DestinationDetailsCashRefundDetails`](../../doc/models/destination-details-cash-refund-details.md) | Optional | Stores details about a cash refund. Contains only non-confidential information. | getCashDetails(): ?DestinationDetailsCashRefundDetails | setCashDetails(?DestinationDetailsCashRefundDetails cashDetails): void |
16+
| `externalDetails` | [`?DestinationDetailsExternalRefundDetails`](../../doc/models/destination-details-external-refund-details.md) | Optional | Stores details about an external refund. Contains only non-confidential information. | getExternalDetails(): ?DestinationDetailsExternalRefundDetails | setExternalDetails(?DestinationDetailsExternalRefundDetails externalDetails): void |
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/apis/ref
1515
| `amountMoney` | [`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. | getAmountMoney(): Money | setAmountMoney(Money amountMoney): void |
1616
| `appFeeMoney` | [`?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. | getAppFeeMoney(): ?Money | setAppFeeMoney(?Money appFeeMoney): void |
1717
| `paymentId` | `?string` | Optional | The unique ID of the payment being refunded.<br>Required when unlinked=false, otherwise must not be set. | getPaymentId(): ?string | setPaymentId(?string paymentId): void |
18-
| `destinationId` | `?string` | 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. | getDestinationId(): ?string | setDestinationId(?string destinationId): void |
18+
| `destinationId` | `?string` | 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). | getDestinationId(): ?string | setDestinationId(?string destinationId): void |
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. | getUnlinked(): ?bool | setUnlinked(?bool unlinked): void |
2020
| `locationId` | `?string` | 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` | getLocationId(): ?string | setLocationId(?string locationId): void |
2121
| `customerId` | `?string` | 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`. | getCustomerId(): ?string | setCustomerId(?string customerId): void |
2222
| `reason` | `?string` | Optional | A description of the reason for the refund.<br>**Constraints**: *Maximum Length*: `192` | getReason(): ?string | setReason(?string reason): void |
2323
| `paymentVersionToken` | `?string` | 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. | getPaymentVersionToken(): ?string | setPaymentVersionToken(?string paymentVersionToken): void |
2424
| `teamMemberId` | `?string` | Optional | An optional [TeamMember](entity:TeamMember) ID to associate with this refund.<br>**Constraints**: *Maximum Length*: `192` | getTeamMemberId(): ?string | setTeamMemberId(?string teamMemberId): void |
25+
| `cashDetails` | [`?DestinationDetailsCashRefundDetails`](../../doc/models/destination-details-cash-refund-details.md) | Optional | Stores details about a cash refund. Contains only non-confidential information. | getCashDetails(): ?DestinationDetailsCashRefundDetails | setCashDetails(?DestinationDetailsCashRefundDetails cashDetails): void |
26+
| `externalDetails` | [`?DestinationDetailsExternalRefundDetails`](../../doc/models/destination-details-external-refund-details.md) | Optional | Stores details about an external refund. Contains only non-confidential information. | getExternalDetails(): ?DestinationDetailsExternalRefundDetails | setExternalDetails(?DestinationDetailsExternalRefundDetails externalDetails): void |
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
},

0 commit comments

Comments
 (0)