Skip to content

Commit

Permalink
Merge pull request #106 from square/release/31.0.0.20230720
Browse files Browse the repository at this point in the history
Generated PR for Release: 31.0.0.20230720
  • Loading branch information
jguze authored Jul 19, 2023
2 parents 21fff2c + ed4ef34 commit 667dc7e
Show file tree
Hide file tree
Showing 379 changed files with 2,525 additions and 2,139 deletions.
8 changes: 6 additions & 2 deletions doc/api/customers.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ CompletableFuture<ListCustomersResponse> listCustomersAsync(
final String cursor,
final Integer limit,
final String sortField,
final String sortOrder)
final String sortOrder,
final Boolean count)
```

## Parameters
Expand All @@ -46,6 +47,7 @@ CompletableFuture<ListCustomersResponse> listCustomersAsync(
| `limit` | `Integer` | Query, Optional | The maximum number of results to return in a single page. This limit is advisory. The response might contain more or fewer results.<br>If the specified limit is less than 1 or greater than 100, Square returns a `400 VALUE_TOO_LOW` or `400 VALUE_TOO_HIGH` error. The default value is 100.<br><br>For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). |
| `sortField` | [`String`](../../doc/models/customer-sort-field.md) | Query, Optional | Indicates how customers should be sorted.<br><br>The default value is `DEFAULT`. |
| `sortOrder` | [`String`](../../doc/models/sort-order.md) | Query, Optional | Indicates whether customers should be sorted in ascending (`ASC`) or<br>descending (`DESC`) order.<br><br>The default value is `ASC`. |
| `count` | `Boolean` | Query, Optional | Indicates whether to return the total count of customers in the `count` field of the response.<br><br>The default value is `false`.<br>**Default**: `false` |

## Response Type

Expand All @@ -54,7 +56,9 @@ CompletableFuture<ListCustomersResponse> listCustomersAsync(
## Example Usage

```java
customersApi.listCustomersAsync(null, null, null, null).thenAccept(result -> {
Boolean count = false;

customersApi.listCustomersAsync(null, null, null, null, count).thenAccept(result -> {
// TODO success callback handler
System.out.println(result);
}).exceptionally(exception -> {
Expand Down
1 change: 1 addition & 0 deletions doc/api/invoices.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ CreateInvoiceRequest body = new CreateInvoiceRequest.Builder(
.squareGiftCard(false)
.bankAccount(false)
.buyNowPayLater(false)
.cashAppPay(false)
.build())
.customFields(Arrays.asList(
new InvoiceCustomField.Builder()
Expand Down
2 changes: 1 addition & 1 deletion doc/api/refunds.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ CompletableFuture<ListPaymentRefundsResponse> listPaymentRefundsAsync(

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `beginTime` | `String` | Query, Optional | Indicates the start of the time range to retrieve each PaymentRefund`for, in RFC 3339 format. The range is determined using the`created_at`field for each`PaymentRefund`.<br><br>Default: The current time minus one year. |
| `beginTime` | `String` | Query, Optional | Indicates the start of the time range to retrieve each `PaymentRefund` for, in RFC 3339<br>format. The range is determined using the `created_at` field for each `PaymentRefund`.<br><br>Default: The current time minus one year. |
| `endTime` | `String` | Query, Optional | Indicates the end of the time range to retrieve each `PaymentRefund` for, in RFC 3339<br>format. The range is determined using the `created_at` field for each `PaymentRefund`.<br><br>Default: The current time. |
| `sortOrder` | `String` | Query, Optional | The order in which results are listed by `PaymentRefund.created_at`:<br><br>- `ASC` - Oldest to newest.<br>- `DESC` - Newest to oldest (default). |
| `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><br>For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). |
Expand Down
25 changes: 17 additions & 8 deletions doc/api/subscriptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,19 @@ CreateSubscriptionRequest body = new CreateSubscriptionRequest.Builder(
"CHFGVKYY8RSV93M5KCYTG4PN0G"
)
.idempotencyKey("8193148c-9586-11e6-99f9-28cfe92138cf")
.planId("6JHXF3B2CW3YKHDV4XEM674H")
.startDate("2021-10-20")
.taxPercentage("5")
.priceOverrideMoney(new Money.Builder()
.amount(100L)
.currency("USD")
.build())
.planVariationId("6JHXF3B2CW3YKHDV4XEM674H")
.startDate("2023-06-20")
.cardId("ccof:qy5x8hHGYsgLrp4Q4GB")
.timezone("America/Los_Angeles")
.source(new SubscriptionSource.Builder()
.name("My App")
.name("My Application")
.build())
.phases(Arrays.asList(
new Phase.Builder()
.ordinal(0)
.orderTemplateId("U2NaowWxzXwpsZU697x7ZHOAnCNZY")
.build()
))
.build();

subscriptionsApi.createSubscriptionAsync(body).thenAccept(result -> {
Expand Down Expand Up @@ -441,6 +442,14 @@ CompletableFuture<SwapPlanResponse> swapPlanAsync(
```java
String subscriptionId = "subscription_id0";
SwapPlanRequest body = new SwapPlanRequest.Builder()
.newPlanVariationId("FQ7CDXXWSLUJRPM3GFJSJGZ7")
.phases(Arrays.asList(
new PhaseInput.Builder(
0
)
.orderTemplateId("uhhnjH9osVv3shUADwaC0b3hNxQZY")
.build()
))
.build();

subscriptionsApi.swapPlanAsync(subscriptionId, body).thenAccept(result -> {
Expand Down
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 |
| --- | --- | --- |
| `squareVersion` | `String` | Square Connect API versions<br>*Default*: `"2023-06-08"` |
| `squareVersion` | `String` | Square Connect API versions<br>*Default*: `"2023-07-20"` |
| `customUrl` | `String` | 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`** |
| `httpClientConfig` | [`ReadonlyHttpClientConfiguration`](http-client-configuration.md) | Http Client Configuration instance. |
Expand All @@ -19,7 +19,7 @@ The API client can be initialized as follows:
SquareClient client = new SquareClient.Builder()
.httpClientConfig(configBuilder -> configBuilder
.timeout(0))
.squareVersion("2023-06-08")
.squareVersion("2023-07-20")
.accessToken("AccessToken")
.environment(Environment.PRODUCTION)
.customUrl("https://connect.squareup.com")
Expand All @@ -40,7 +40,7 @@ public class Program {
SquareClient client = new SquareClient.Builder()
.httpClientConfig(configBuilder -> configBuilder
.timeout(0))
.squareVersion("2023-06-08")
.squareVersion("2023-07-20")
.accessToken("AccessToken")
.build();

Expand Down
12 changes: 6 additions & 6 deletions doc/models/accept-dispute-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,20 @@ Defines the fields in an `AcceptDispute` response.
},
"errors": [
{
"category": "AUTHENTICATION_ERROR",
"code": "REFUND_ALREADY_PENDING",
"category": "REFUND_ERROR",
"code": "MERCHANT_SUBSCRIPTION_NOT_FOUND",
"detail": "detail1",
"field": "field9"
},
{
"category": "INVALID_REQUEST_ERROR",
"code": "PAYMENT_NOT_REFUNDABLE",
"category": "MERCHANT_SUBSCRIPTION_ERROR",
"code": "BAD_REQUEST",
"detail": "detail2",
"field": "field0"
},
{
"category": "RATE_LIMIT_ERROR",
"code": "REFUND_DECLINED",
"category": "EXTERNAL_VENDOR_ERROR",
"code": "MISSING_REQUIRED_PARAMETER",
"detail": "detail3",
"field": "field1"
}
Expand Down
12 changes: 6 additions & 6 deletions doc/models/accumulate-loyalty-points-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,20 @@ Represents an [AccumulateLoyaltyPoints](../../doc/api/loyalty.md#accumulate-loya
],
"errors": [
{
"category": "AUTHENTICATION_ERROR",
"code": "REFUND_ALREADY_PENDING",
"category": "REFUND_ERROR",
"code": "MERCHANT_SUBSCRIPTION_NOT_FOUND",
"detail": "detail1",
"field": "field9"
},
{
"category": "INVALID_REQUEST_ERROR",
"code": "PAYMENT_NOT_REFUNDABLE",
"category": "MERCHANT_SUBSCRIPTION_ERROR",
"code": "BAD_REQUEST",
"detail": "detail2",
"field": "field0"
},
{
"category": "RATE_LIMIT_ERROR",
"code": "REFUND_DECLINED",
"category": "EXTERNAL_VENDOR_ERROR",
"code": "MISSING_REQUIRED_PARAMETER",
"detail": "detail3",
"field": "field1"
}
Expand Down
12 changes: 6 additions & 6 deletions doc/models/add-group-to-customer-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ a request to the [AddGroupToCustomer](../../doc/api/customers.md#add-group-to-cu
{
"errors": [
{
"category": "AUTHENTICATION_ERROR",
"code": "REFUND_ALREADY_PENDING",
"category": "REFUND_ERROR",
"code": "MERCHANT_SUBSCRIPTION_NOT_FOUND",
"detail": "detail1",
"field": "field9"
},
{
"category": "INVALID_REQUEST_ERROR",
"code": "PAYMENT_NOT_REFUNDABLE",
"category": "MERCHANT_SUBSCRIPTION_ERROR",
"code": "BAD_REQUEST",
"detail": "detail2",
"field": "field0"
},
{
"category": "RATE_LIMIT_ERROR",
"code": "REFUND_DECLINED",
"category": "EXTERNAL_VENDOR_ERROR",
"code": "MISSING_REQUIRED_PARAMETER",
"detail": "detail3",
"field": "field1"
}
Expand Down
2 changes: 1 addition & 1 deletion doc/models/additional-recipient.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Represents an additional recipient (other than the merchant) receiving a portion
"description": "description0",
"amount_money": {
"amount": 186,
"currency": "NGN"
"currency": "TZS"
},
"receivable_id": "receivable_id0"
}
Expand Down
12 changes: 6 additions & 6 deletions doc/models/adjust-loyalty-points-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,20 @@ Represents an [AdjustLoyaltyPoints](../../doc/api/loyalty.md#adjust-loyalty-poin
},
"errors": [
{
"category": "AUTHENTICATION_ERROR",
"code": "REFUND_ALREADY_PENDING",
"category": "REFUND_ERROR",
"code": "MERCHANT_SUBSCRIPTION_NOT_FOUND",
"detail": "detail1",
"field": "field9"
},
{
"category": "INVALID_REQUEST_ERROR",
"code": "PAYMENT_NOT_REFUNDABLE",
"category": "MERCHANT_SUBSCRIPTION_ERROR",
"code": "BAD_REQUEST",
"detail": "detail2",
"field": "field0"
},
{
"category": "RATE_LIMIT_ERROR",
"code": "REFUND_DECLINED",
"category": "EXTERNAL_VENDOR_ERROR",
"code": "MISSING_REQUIRED_PARAMETER",
"detail": "detail3",
"field": "field1"
}
Expand Down
2 changes: 1 addition & 1 deletion doc/models/bank-account.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ linking a bank account to a Square account, see
"id": "id0",
"account_number_suffix": "account_number_suffix8",
"country": "FO",
"currency": "YER",
"currency": "SLL",
"account_type": "BUSINESS_CHECKING",
"holder_name": "holder_name4",
"primary_bank_identification_number": "primary_bank_identification_number8",
Expand Down
12 changes: 6 additions & 6 deletions doc/models/batch-delete-catalog-objects-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@
],
"errors": [
{
"category": "AUTHENTICATION_ERROR",
"code": "REFUND_ALREADY_PENDING",
"category": "REFUND_ERROR",
"code": "MERCHANT_SUBSCRIPTION_NOT_FOUND",
"detail": "detail1",
"field": "field9"
},
{
"category": "INVALID_REQUEST_ERROR",
"code": "PAYMENT_NOT_REFUNDABLE",
"category": "MERCHANT_SUBSCRIPTION_ERROR",
"code": "BAD_REQUEST",
"detail": "detail2",
"field": "field0"
},
{
"category": "RATE_LIMIT_ERROR",
"code": "REFUND_DECLINED",
"category": "EXTERNAL_VENDOR_ERROR",
"code": "MISSING_REQUIRED_PARAMETER",
"detail": "detail3",
"field": "field1"
}
Expand Down
12 changes: 6 additions & 6 deletions doc/models/batch-retrieve-catalog-objects-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,20 +236,20 @@
],
"errors": [
{
"category": "AUTHENTICATION_ERROR",
"code": "REFUND_ALREADY_PENDING",
"category": "REFUND_ERROR",
"code": "MERCHANT_SUBSCRIPTION_NOT_FOUND",
"detail": "detail1",
"field": "field9"
},
{
"category": "INVALID_REQUEST_ERROR",
"code": "PAYMENT_NOT_REFUNDABLE",
"category": "MERCHANT_SUBSCRIPTION_ERROR",
"code": "BAD_REQUEST",
"detail": "detail2",
"field": "field0"
},
{
"category": "RATE_LIMIT_ERROR",
"code": "REFUND_DECLINED",
"category": "EXTERNAL_VENDOR_ERROR",
"code": "MISSING_REQUIRED_PARAMETER",
"detail": "detail3",
"field": "field1"
}
Expand Down
12 changes: 6 additions & 6 deletions doc/models/batch-retrieve-orders-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,20 +98,20 @@ a request to the `BatchRetrieveOrders` endpoint.
],
"errors": [
{
"category": "AUTHENTICATION_ERROR",
"code": "REFUND_ALREADY_PENDING",
"category": "REFUND_ERROR",
"code": "MERCHANT_SUBSCRIPTION_NOT_FOUND",
"detail": "detail1",
"field": "field9"
},
{
"category": "INVALID_REQUEST_ERROR",
"code": "PAYMENT_NOT_REFUNDABLE",
"category": "MERCHANT_SUBSCRIPTION_ERROR",
"code": "BAD_REQUEST",
"detail": "detail2",
"field": "field0"
},
{
"category": "RATE_LIMIT_ERROR",
"code": "REFUND_DECLINED",
"category": "EXTERNAL_VENDOR_ERROR",
"code": "MISSING_REQUIRED_PARAMETER",
"detail": "detail3",
"field": "field1"
}
Expand Down
12 changes: 6 additions & 6 deletions doc/models/batch-upsert-catalog-objects-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,20 +273,20 @@
],
"errors": [
{
"category": "AUTHENTICATION_ERROR",
"code": "REFUND_ALREADY_PENDING",
"category": "REFUND_ERROR",
"code": "MERCHANT_SUBSCRIPTION_NOT_FOUND",
"detail": "detail1",
"field": "field9"
},
{
"category": "INVALID_REQUEST_ERROR",
"code": "PAYMENT_NOT_REFUNDABLE",
"category": "MERCHANT_SUBSCRIPTION_ERROR",
"code": "BAD_REQUEST",
"detail": "detail2",
"field": "field0"
},
{
"category": "RATE_LIMIT_ERROR",
"code": "REFUND_DECLINED",
"category": "EXTERNAL_VENDOR_ERROR",
"code": "MISSING_REQUIRED_PARAMETER",
"detail": "detail3",
"field": "field1"
}
Expand Down
12 changes: 6 additions & 6 deletions doc/models/booking-custom-attribute-upsert-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,20 @@ Represents a response for an individual upsert request in a [BulkUpsertBookingCu
},
"errors": [
{
"category": "AUTHENTICATION_ERROR",
"code": "REFUND_ALREADY_PENDING",
"category": "REFUND_ERROR",
"code": "MERCHANT_SUBSCRIPTION_NOT_FOUND",
"detail": "detail1",
"field": "field9"
},
{
"category": "INVALID_REQUEST_ERROR",
"code": "PAYMENT_NOT_REFUNDABLE",
"category": "MERCHANT_SUBSCRIPTION_ERROR",
"code": "BAD_REQUEST",
"detail": "detail2",
"field": "field0"
},
{
"category": "RATE_LIMIT_ERROR",
"code": "REFUND_DECLINED",
"category": "EXTERNAL_VENDOR_ERROR",
"code": "MISSING_REQUIRED_PARAMETER",
"detail": "detail3",
"field": "field1"
}
Expand Down
Loading

0 comments on commit 667dc7e

Please sign in to comment.