Skip to content

Commit aa9d943

Browse files
authored
Merge pull request #76 from square/release/19.0.0.20220420
Generated PR for Release: 19.0.0.20220420
2 parents 37e6ba5 + c126736 commit aa9d943

File tree

181 files changed

+7348
-694
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

181 files changed

+7348
-694
lines changed

doc/api/catalog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ BatchRetrieveCatalogObjectsRequest body = new BatchRetrieveCatalogObjectsRequest
107107
bodyObjectIds)
108108
.includeRelatedObjects(true)
109109
.catalogVersion(118L)
110+
.includeDeletedObjects(false)
110111
.build();
111112

112113
catalogApi.batchRetrieveCatalogObjectsAsync(body).thenAccept(result -> {

doc/api/locations.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ locationsApi.listLocationsAsync().thenAccept(result -> {
4545

4646
Creates a [location](https://developer.squareup.com/docs/locations-api).
4747
Creating new locations allows for separate configuration of receipt layouts, item prices,
48-
and sales reports. Developers can use locations to separate sales activity via applications
48+
and sales reports. Developers can use locations to separate sales activity through applications
4949
that integrate with Square from sales activity elsewhere in a seller's account.
50-
Locations created programmatically with the Locations API will last forever and
51-
are visible to the seller for their own management, so ensure that
50+
Locations created programmatically with the Locations API last forever and
51+
are visible to the seller for their own management. Therefore, ensure that
5252
each location has a sensible and unique name.
5353

5454
```java

doc/api/orders.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,12 @@ OrderQuantityUnit orderQuantityUnit = new OrderQuantityUnit.Builder()
104104
.build();
105105
List<OrderLineItemModifier> bodyOrderLineItems1Modifiers = new LinkedList<>();
106106

107-
Money money = new Money.Builder()
108-
.amount(53L)
109-
.currency("TTD")
110-
.build();
111107
OrderLineItemModifier bodyOrderLineItems1Modifiers0 = new OrderLineItemModifier.Builder()
112108
.uid("uid1")
113109
.catalogObjectId("CHQX7Y4KY6N5KINJKZCFURPZ")
114110
.catalogVersion(69L)
115111
.name("name1")
116-
.basePriceMoney(bodyOrderLineItems1Modifiers0BasePriceMoney)
112+
.quantity("quantity7")
117113
.build();
118114
bodyOrderLineItems1Modifiers.add(bodyOrderLineItems1Modifiers0);
119115

@@ -729,7 +725,7 @@ To be used with `PayOrder`, a payment must:
729725
- Reference the order by specifying the `order_id` when [creating the payment](../../doc/api/payments.md#create-payment).
730726
Any approved payments that reference the same `order_id` not specified in the
731727
`payment_ids` is canceled.
732-
- Be approved with [delayed capture](https://developer.squareup.com/docs/payments-api/take-payments#delayed-capture).
728+
- Be approved with [delayed capture](https://developer.squareup.com/docs/payments-api/take-payments/card-payments/delayed-capture).
733729
Using a delayed capture payment with `PayOrder` completes the approved payment.
734730

735731
```java

doc/api/payouts.md

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
# Payouts
2+
3+
```java
4+
PayoutsApi payoutsApi = client.getPayoutsApi();
5+
```
6+
7+
## Class Name
8+
9+
`PayoutsApi`
10+
11+
## Methods
12+
13+
* [List Payouts](../../doc/api/payouts.md#list-payouts)
14+
* [Get Payout](../../doc/api/payouts.md#get-payout)
15+
* [List Payout Entries](../../doc/api/payouts.md#list-payout-entries)
16+
17+
18+
# List Payouts
19+
20+
Retrieves a list of all payouts for the default location.
21+
You can filter payouts by location ID, status, time range, and order them in ascending or descending order.
22+
To call this endpoint, set `PAYOUTS_READ` for the OAuth scope.
23+
24+
```java
25+
CompletableFuture<ListPayoutsResponse> listPayoutsAsync(
26+
final String locationId,
27+
final String status,
28+
final String beginTime,
29+
final String endTime,
30+
final String sortOrder,
31+
final String cursor,
32+
final Integer limit)
33+
```
34+
35+
## Parameters
36+
37+
| Parameter | Type | Tags | Description |
38+
| --- | --- | --- | --- |
39+
| `locationId` | `String` | Query, Optional | The ID of the location for which to list the payouts.<br>By default, payouts are returned for the default (main) location associated with the seller. |
40+
| `status` | [`String`](../../doc/models/payout-status.md) | Query, Optional | If provided, only payouts with the given status are returned. |
41+
| `beginTime` | `String` | Query, Optional | The timestamp for the beginning of the payout creation time, in RFC 3339 format.<br>Inclusive. Default: The current time minus one year. |
42+
| `endTime` | `String` | Query, Optional | The timestamp for the end of the payout creation time, in RFC 3339 format.<br>Default: The current time. |
43+
| `sortOrder` | [`String`](../../doc/models/sort-order.md) | Query, Optional | The order in which payouts are listed. |
44+
| `cursor` | `String` | Query, Optional | A pagination cursor returned by a previous call to this endpoint.<br>Provide this cursor to retrieve the next set of results for the original query.<br>For more information, see [Pagination](https://developer.squareup.com/docs/basics/api101/pagination).<br>If request parameters change between requests, subsequent results may contain duplicates or missing records. |
45+
| `limit` | `Integer` | Query, Optional | The maximum number of results to be returned in a single page.<br>It is possible to receive fewer results than the specified limit on a given page.<br>The default value of 100 is also the maximum allowed value. If the provided value is<br>greater than 100, it is ignored and the default value is used instead.<br>Default: `100` |
46+
47+
## Response Type
48+
49+
[`ListPayoutsResponse`](../../doc/models/list-payouts-response.md)
50+
51+
## Example Usage
52+
53+
```java
54+
String locationId = "location_id4";
55+
String status = "PAID";
56+
String beginTime = "begin_time2";
57+
String endTime = "end_time2";
58+
String sortOrder = "DESC";
59+
String cursor = "cursor6";
60+
Integer limit = 172;
61+
62+
payoutsApi.listPayoutsAsync(locationId, status, beginTime, endTime, sortOrder, cursor, limit).thenAccept(result -> {
63+
// TODO success callback handler
64+
}).exceptionally(exception -> {
65+
// TODO failure callback handler
66+
return null;
67+
});
68+
```
69+
70+
71+
# Get Payout
72+
73+
Retrieves details of a specific payout identified by a payout ID.
74+
To call this endpoint, set `PAYOUTS_READ` for the OAuth scope.
75+
76+
```java
77+
CompletableFuture<GetPayoutResponse> getPayoutAsync(
78+
final String payoutId)
79+
```
80+
81+
## Parameters
82+
83+
| Parameter | Type | Tags | Description |
84+
| --- | --- | --- | --- |
85+
| `payoutId` | `String` | Template, Required | The ID of the payout to retrieve the information for. |
86+
87+
## Response Type
88+
89+
[`GetPayoutResponse`](../../doc/models/get-payout-response.md)
90+
91+
## Example Usage
92+
93+
```java
94+
String payoutId = "payout_id6";
95+
96+
payoutsApi.getPayoutAsync(payoutId).thenAccept(result -> {
97+
// TODO success callback handler
98+
}).exceptionally(exception -> {
99+
// TODO failure callback handler
100+
return null;
101+
});
102+
```
103+
104+
105+
# List Payout Entries
106+
107+
Retrieves a list of all payout entries for a specific payout.
108+
To call this endpoint, set `PAYOUTS_READ` for the OAuth scope.
109+
110+
```java
111+
CompletableFuture<ListPayoutEntriesResponse> listPayoutEntriesAsync(
112+
final String payoutId,
113+
final String sortOrder,
114+
final String cursor,
115+
final Integer limit)
116+
```
117+
118+
## Parameters
119+
120+
| Parameter | Type | Tags | Description |
121+
| --- | --- | --- | --- |
122+
| `payoutId` | `String` | Template, Required | The ID of the payout to retrieve the information for. |
123+
| `sortOrder` | [`String`](../../doc/models/sort-order.md) | Query, Optional | The order in which payout entries are listed. |
124+
| `cursor` | `String` | Query, Optional | A pagination cursor returned by a previous call to this endpoint.<br>Provide this cursor to retrieve the next set of results for the original query.<br>For more information, see [Pagination](https://developer.squareup.com/docs/basics/api101/pagination).<br>If request parameters change between requests, subsequent results may contain duplicates or missing records. |
125+
| `limit` | `Integer` | Query, Optional | The maximum number of results to be returned in a single page.<br>It is possible to receive fewer results than the specified limit on a given page.<br>The default value of 100 is also the maximum allowed value. If the provided value is<br>greater than 100, it is ignored and the default value is used instead.<br>Default: `100` |
126+
127+
## Response Type
128+
129+
[`ListPayoutEntriesResponse`](../../doc/models/list-payout-entries-response.md)
130+
131+
## Example Usage
132+
133+
```java
134+
String payoutId = "payout_id6";
135+
String sortOrder = "DESC";
136+
String cursor = "cursor6";
137+
Integer limit = 172;
138+
139+
payoutsApi.listPayoutEntriesAsync(payoutId, sortOrder, cursor, limit).thenAccept(result -> {
140+
// TODO success callback handler
141+
}).exceptionally(exception -> {
142+
// TODO failure callback handler
143+
return null;
144+
});
145+
```
146+

doc/api/subscriptions.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,7 @@ subscriptionsApi.cancelSubscriptionAsync(subscriptionId).thenAccept(result -> {
313313

314314
# List Subscription Events
315315

316-
Lists all events for a specific subscription.
317-
In the current implementation, only `START_SUBSCRIPTION` and `STOP_SUBSCRIPTION` (when the subscription was canceled) events are returned.
316+
Lists all events for a specific subscription.
318317

319318
```java
320319
CompletableFuture<ListSubscriptionEventsResponse> listSubscriptionEventsAsync(

doc/api/terminal.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ TipSettings tipSettings = new TipSettings.Builder()
6161
DeviceCheckoutOptions deviceCheckoutOptions = new DeviceCheckoutOptions.Builder(
6262
"dbb5d83a-7838-11ea-bc55-0242ac130003")
6363
.skipReceiptScreen(false)
64+
.collectSignature(false)
6465
.tipSettings(deviceCheckoutOptionsTipSettings)
6566
.build();
6667
TerminalCheckout terminalCheckout = new TerminalCheckout.Builder(
@@ -88,7 +89,7 @@ terminalApi.createTerminalCheckoutAsync(body).thenAccept(result -> {
8889

8990
# Search Terminal Checkouts
9091

91-
Retrieves a filtered list of Terminal checkout requests created by the account making the request.
92+
Returns a filtered list of Terminal checkout requests created by the application making the request. Only Terminal checkout requests created for the merchant scoped to the OAuth token are returned. Terminal checkout requests are available for 30 days.
9293

9394
```java
9495
CompletableFuture<SearchTerminalCheckoutsResponse> searchTerminalCheckoutsAsync(
@@ -141,7 +142,7 @@ terminalApi.searchTerminalCheckoutsAsync(body).thenAccept(result -> {
141142

142143
# Get Terminal Checkout
143144

144-
Retrieves a Terminal checkout request by `checkout_id`.
145+
Retrieves a Terminal checkout request by `checkout_id`. Terminal checkout requests are available for 30 days.
145146

146147
```java
147148
CompletableFuture<GetTerminalCheckoutResponse> getTerminalCheckoutAsync(
@@ -207,7 +208,7 @@ terminalApi.cancelTerminalCheckoutAsync(checkoutId).thenAccept(result -> {
207208

208209
# Create Terminal Refund
209210

210-
Creates a request to refund an Interac payment completed on a Square Terminal.
211+
Creates a request to refund an Interac payment completed on a Square Terminal. Refunds for Interac payments on a Square Terminal are supported only for Interac debit cards in Canada. Other refunds for Terminal payments should use the Refunds API. For more information, see [Refunds API](../../doc/api/refunds.md).
211212

212213
```java
213214
CompletableFuture<CreateTerminalRefundResponse> createTerminalRefundAsync(
@@ -233,12 +234,14 @@ Money money = new Money.Builder()
233234
.build();
234235
TerminalRefund terminalRefund = new TerminalRefund.Builder(
235236
"5O5OvgkcNUhl7JBuINflcjKqUzXZY",
236-
amountMoney)
237+
amountMoney,
238+
"Returning items",
239+
"f72dfb8e-4d65-4e56-aade-ec3fb8d33291")
237240
.id("id4")
238241
.refundId("refund_id8")
239242
.orderId("order_id8")
240-
.reason("Returning items")
241-
.deviceId("f72dfb8e-4d65-4e56-aade-ec3fb8d33291")
243+
.deadlineDuration("deadline_duration6")
244+
.status("status6")
242245
.build();
243246
CreateTerminalRefundRequest body = new CreateTerminalRefundRequest.Builder(
244247
"402a640b-b26f-401f-b406-46f839590c04")
@@ -256,7 +259,7 @@ terminalApi.createTerminalRefundAsync(body).thenAccept(result -> {
256259

257260
# Search Terminal Refunds
258261

259-
Retrieves a filtered list of Interac Terminal refund requests created by the seller making the request.
262+
Retrieves a filtered list of Interac Terminal refund requests created by the seller making the request. Terminal refund requests are available for 30 days.
260263

261264
```java
262265
CompletableFuture<SearchTerminalRefundsResponse> searchTerminalRefundsAsync(
@@ -309,7 +312,7 @@ terminalApi.searchTerminalRefundsAsync(body).thenAccept(result -> {
309312

310313
# Get Terminal Refund
311314

312-
Retrieves an Interac Terminal refund object by ID.
315+
Retrieves an Interac Terminal refund object by ID. Terminal refund objects are available for 30 days.
313316

314317
```java
315318
CompletableFuture<GetTerminalRefundResponse> getTerminalRefundAsync(

doc/client.md

Lines changed: 4 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*: `"2022-03-16"` |
8+
| `squareVersion` | `String` | Square Connect API versions<br>*Default*: `"2022-04-20"` |
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
| `httpClientConfig` | `ReadonlyHttpClientConfiguration` | Http Client Configuration instance. |
@@ -19,7 +19,7 @@ The API client can be initialized as follows:
1919
SquareClient client = new SquareClient.Builder()
2020
.httpClientConfig(configBuilder -> configBuilder
2121
.timeout(0))
22-
.squareVersion("2022-03-16")
22+
.squareVersion("2022-04-20")
2323
.accessToken("AccessToken")
2424
.environment(Environment.PRODUCTION)
2525
.customUrl("https://connect.squareup.com")
@@ -45,7 +45,7 @@ public class Program {
4545
SquareClient client = new SquareClient.Builder()
4646
.httpClientConfig(configBuilder -> configBuilder
4747
.timeout(0))
48-
.squareVersion("2022-03-16")
48+
.squareVersion("2022-04-20")
4949
.accessToken("AccessToken")
5050
.build();
5151

@@ -96,6 +96,7 @@ The gateway for the SDK. This class acts as a factory for the Apis and also hold
9696
| `getMerchantsApi()` | Provides access to Merchants controller. | `MerchantsApi` |
9797
| `getOrdersApi()` | Provides access to Orders controller. | `OrdersApi` |
9898
| `getPaymentsApi()` | Provides access to Payments controller. | `PaymentsApi` |
99+
| `getPayoutsApi()` | Provides access to Payouts controller. | `PayoutsApi` |
99100
| `getRefundsApi()` | Provides access to Refunds controller. | `RefundsApi` |
100101
| `getSitesApi()` | Provides access to Sites controller. | `SitesApi` |
101102
| `getSnippetsApi()` | Provides access to Snippets controller. | `SnippetsApi` |

doc/models/activity-type.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
2+
# Activity Type
3+
4+
## Enumeration
5+
6+
`ActivityType`
7+
8+
## Fields
9+
10+
| Name | Description |
11+
| --- | --- |
12+
| `ADJUSTMENT` | A manual adjustment applied to the seller's account by Square. |
13+
| `APP_FEE_REFUND` | A refund for an application fee on a payment. |
14+
| `APP_FEE_REVENUE` | Revenue generated from an application fee on a payment. |
15+
| `AUTOMATIC_SAVINGS` | An automatic transfer from the payment processing balance to the Square Savings account.<br>These are, generally, proportional to the seller's sales. |
16+
| `AUTOMATIC_SAVINGS_REVERSED` | An automatic transfer from the Square Savings account back to the processing balance.<br>These are, generally, proportional to the seller's refunds. |
17+
| `CHARGE` | A credit card payment capture. |
18+
| `DEPOSIT_FEE` | Any fees involved with deposits such as instant deposits. |
19+
| `DISPUTE` | The balance change due to a dispute event. |
20+
| `ESCHEATMENT` | An escheatment entry for remittance. |
21+
| `FEE` | The Square processing fee. |
22+
| `FREE_PROCESSING` | Square offers free payments processing for a variety of business scenarios, including seller<br>referrals or when Square wants to apologize (for example, for a bug, customer service, or repricing complication).<br>This entry represents a credit to the seller for the purposes of free processing. |
23+
| `HOLD_ADJUSTMENT` | An adjustment made by Square related to holding a payment. |
24+
| `INITIAL_BALANCE_CHANGE` | An external change to a seller's balance. Initial, in the sense that it<br>causes the creation of the other activity types, such as hold and refund. |
25+
| `MONEY_TRANSFER` | The balance change from a money transfer. |
26+
| `MONEY_TRANSFER_REVERSAL` | The reversal of a money transfer. |
27+
| `OPEN_DISPUTE` | The balance change for a chargeback that has been filed. |
28+
| `OTHER` | Any other type that does not belong in the rest of the types. |
29+
| `OTHER_ADJUSTMENT` | Any other type of adjustment that does not fall under existing types. |
30+
| `PAID_SERVICE_FEE` | A fee paid to a third-party merchant. |
31+
| `PAID_SERVICE_FEE_REFUND` | A fee paid to a third-party merchant. |
32+
| `REDEMPTION_CODE` | Repayment for a redemption code. |
33+
| `REFUND` | A refund for an existing card payment. |
34+
| `RELEASE_ADJUSTMENT` | An adjustment made by Square related to releasing a payment. |
35+
| `RESERVE_HOLD` | Fees paid for funding risk reserve. |
36+
| `RESERVE_RELEASE` | Fees released from risk reserve. |
37+
| `RETURNED_PAYOUT` | An entry created when Square receives a response for the ACH file that Square sent indicating that the<br>settlement of the original entry failed. |
38+
| `SQUARE_CAPITAL_PAYMENT` | A capital merchant cash advance (MCA) assessment. These are, generally,<br>proportional to the merchant's sales but can be issued for other reasons related to the MCA. |
39+
| `SQUARE_CAPITAL_REVERSED_PAYMENT` | A capital merchant cash advance (MCA) assessment refund. These are, generally,<br>proportional to the merchant's refunds but can be issued for other reasons related to the MCA. |
40+
| `SUBSCRIPTION_FEE` | A fee charged for subscription to a Square product. |
41+
| `SUBSCRIPTION_FEE_PAID_REFUND` | A Square subscription fee that has been refunded. |
42+
| `SUBSCRIPTION_FEE_REFUND` | The refund of a previously charged Square product subscription fee. |
43+
| `TAX_ON_FEE` | The tax paid on fee amounts. |
44+
| `THIRD_PARTY_FEE` | Fees collected by a third-party platform. |
45+
| `THIRD_PARTY_FEE_REFUND` | Refunded fees from a third-party platform. |
46+

doc/models/batch-retrieve-catalog-objects-request.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
| `ObjectIds` | `List<String>` | Required | The IDs of the CatalogObjects to be retrieved. | List<String> getObjectIds() |
1313
| `IncludeRelatedObjects` | `Boolean` | Optional | If `true`, the response will include additional objects that are related to the<br>requested objects. Related objects are defined as any objects referenced by ID by the results in the `objects` field<br>of the response. These objects are put in the `related_objects` field. Setting this to `true` is<br>helpful when the objects are needed for immediate display to a user.<br>This process only goes one level deep. Objects referenced by the related objects will not be included. For example,<br><br>if the `objects` field of the response contains a CatalogItem, its associated<br>CatalogCategory objects, CatalogTax objects, CatalogImage objects and<br>CatalogModifierLists will be returned in the `related_objects` field of the<br>response. If the `objects` field of the response contains a CatalogItemVariation,<br>its parent CatalogItem will be returned in the `related_objects` field of<br>the response.<br><br>Default value: `false` | Boolean getIncludeRelatedObjects() |
1414
| `CatalogVersion` | `Long` | Optional | The specific version of the catalog objects to be included in the response.<br>This allows you to retrieve historical versions of objects. The specified version value is matched against<br>the [CatalogObject](../../doc/models/catalog-object.md)s' `version` attribute. If not included, results will<br>be from the current version of the catalog. | Long getCatalogVersion() |
15+
| `IncludeDeletedObjects` | `Boolean` | Optional | Indicates whether to include (`true`) or not (`false`) in the response deleted objects, namely, those with the `is_deleted` attribute set to `true`. | Boolean getIncludeDeletedObjects() |
1516

1617
## Example (as JSON)
1718

0 commit comments

Comments
 (0)