* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | |
+| Parameter | Type | Required | Description |
+| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
+| `request` | [ListPayoutsRequest](../../models/operations/ListPayoutsRequest.md) | :heavy_check_mark: | The request object to use for the request. |
### Response
diff --git a/gradle.properties b/gradle.properties
index 9af89400..b981ae6b 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,4 +1,4 @@
groupId=com.gr4vy
artifactId=sdk
-version=2.16.96
+version=2.16.97
org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g
diff --git a/src/main/java/com/gr4vy/sdk/AsyncPayouts.java b/src/main/java/com/gr4vy/sdk/AsyncPayouts.java
index 82671f8f..af1b4ed6 100644
--- a/src/main/java/com/gr4vy/sdk/AsyncPayouts.java
+++ b/src/main/java/com/gr4vy/sdk/AsyncPayouts.java
@@ -20,7 +20,6 @@
import com.gr4vy.sdk.operations.ListPayouts;
import com.gr4vy.sdk.utils.Headers;
import com.gr4vy.sdk.utils.Options;
-import java.lang.Long;
import java.lang.String;
import java.util.Optional;
import java.util.concurrent.CompletableFuture;
@@ -63,12 +62,11 @@ public ListPayoutsRequestBuilder list() {
*
* Returns a list of payouts made.
*
+ * @param request The request object containing all the parameters for the API call.
* @return {@code CompletableFuture} - The async response
*/
- public CompletableFuture listDirect() {
- return list(
- JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(),
- Optional.empty());
+ public CompletableFuture list(ListPayoutsRequest request) {
+ return list(request, Optional.empty());
}
/**
@@ -76,22 +74,11 @@ public CompletableFuture listDirect() {
*
* Returns a list of payouts made.
*
- * @param cursor A pointer to the page of results to return.
- * @param limit The maximum number of items that are at returned.
- * @param merchantAccountId
+ * @param request The request object containing all the parameters for the API call.
* @param options additional options
* @return {@code CompletableFuture} - The async response
*/
- public CompletableFuture list(
- JsonNullable cursor, Optional limit,
- JsonNullable merchantAccountId, Optional options) {
- ListPayoutsRequest request =
- ListPayoutsRequest
- .builder()
- .cursor(cursor)
- .limit(limit)
- .merchantAccountId(merchantAccountId)
- .build();
+ public CompletableFuture list(ListPayoutsRequest request, Optional options) {
AsyncRequestOperation operation
= new ListPayouts.Async(
sdkConfiguration, options, sdkConfiguration.retryScheduler(),
diff --git a/src/main/java/com/gr4vy/sdk/Payouts.java b/src/main/java/com/gr4vy/sdk/Payouts.java
index 4bc5c22a..db7a6f5f 100644
--- a/src/main/java/com/gr4vy/sdk/Payouts.java
+++ b/src/main/java/com/gr4vy/sdk/Payouts.java
@@ -20,7 +20,6 @@
import com.gr4vy.sdk.operations.ListPayouts;
import com.gr4vy.sdk.utils.Headers;
import com.gr4vy.sdk.utils.Options;
-import java.lang.Long;
import java.lang.String;
import java.util.Optional;
import org.openapitools.jackson.nullable.JsonNullable;
@@ -61,12 +60,12 @@ public ListPayoutsRequestBuilder list() {
*
* Returns a list of payouts made.
*
+ * @param request The request object containing all the parameters for the API call.
* @return The response from the API call
* @throws RuntimeException subclass if the API call fails
*/
- public ListPayoutsResponse listDirect() {
- return list(JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(),
- Optional.empty());
+ public ListPayoutsResponse list(ListPayoutsRequest request) {
+ return list(request, Optional.empty());
}
/**
@@ -74,23 +73,12 @@ public ListPayoutsResponse listDirect() {
*
*
Returns a list of payouts made.
*
- * @param cursor A pointer to the page of results to return.
- * @param limit The maximum number of items that are at returned.
- * @param merchantAccountId
+ * @param request The request object containing all the parameters for the API call.
* @param options additional options
* @return The response from the API call
* @throws RuntimeException subclass if the API call fails
*/
- public ListPayoutsResponse list(
- JsonNullable cursor, Optional limit,
- JsonNullable merchantAccountId, Optional options) {
- ListPayoutsRequest request =
- ListPayoutsRequest
- .builder()
- .cursor(cursor)
- .limit(limit)
- .merchantAccountId(merchantAccountId)
- .build();
+ public ListPayoutsResponse list(ListPayoutsRequest request, Optional options) {
RequestOperation operation
= new ListPayouts.Sync(sdkConfiguration, options, _headers);
return operation.handleResponse(operation.doRequest(request));
diff --git a/src/main/java/com/gr4vy/sdk/SDKConfiguration.java b/src/main/java/com/gr4vy/sdk/SDKConfiguration.java
index 14018d0b..4bb82e55 100644
--- a/src/main/java/com/gr4vy/sdk/SDKConfiguration.java
+++ b/src/main/java/com/gr4vy/sdk/SDKConfiguration.java
@@ -22,8 +22,8 @@ public class SDKConfiguration {
private static final String LANGUAGE = "java";
public static final String OPENAPI_DOC_VERSION = "1.0.0";
- public static final String SDK_VERSION = "2.16.96";
- public static final String GEN_VERSION = "2.911.3";
+ public static final String SDK_VERSION = "2.16.97";
+ public static final String GEN_VERSION = "2.912.1";
private static final String BASE_PACKAGE = "com.gr4vy.sdk";
public static final String USER_AGENT =
String.format("speakeasy-sdk/%s %s %s %s %s",
diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListPayoutsRequest.java b/src/main/java/com/gr4vy/sdk/models/operations/ListPayoutsRequest.java
index 67a7c47f..35205ec9 100644
--- a/src/main/java/com/gr4vy/sdk/models/operations/ListPayoutsRequest.java
+++ b/src/main/java/com/gr4vy/sdk/models/operations/ListPayoutsRequest.java
@@ -6,12 +6,16 @@
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.core.type.TypeReference;
+import com.gr4vy.sdk.models.components.PayoutStatus;
import com.gr4vy.sdk.utils.LazySingletonValue;
import com.gr4vy.sdk.utils.SpeakeasyMetadata;
import com.gr4vy.sdk.utils.Utils;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
+import java.lang.SuppressWarnings;
+import java.time.OffsetDateTime;
+import java.util.List;
import java.util.Optional;
import org.openapitools.jackson.nullable.JsonNullable;
@@ -29,6 +33,63 @@ public class ListPayoutsRequest {
@SpeakeasyMetadata("queryParam:style=form,explode=true,name=limit")
private Optional limit;
+ /**
+ * Filters the results to only payouts created before this ISO date-time string. The time zone must be
+ * included. Ensure that the date-time string is URL encoded, e.g.
+ *
+ * `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`.
+ */
+ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=created_at_lte")
+ private JsonNullable createdAtLte;
+
+ /**
+ * Filters the results to only payouts created after this ISO date-time string. The time zone must be
+ * included. Ensure that the date-time string is URL encoded, e.g.
+ *
+ * `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`.
+ */
+ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=created_at_gte")
+ private JsonNullable createdAtGte;
+
+ /**
+ * Filters the results to only payouts updated before this ISO date-time string. The time zone must be
+ * included. Ensure that the date-time string is URL encoded, e.g.
+ *
+ * `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`.
+ */
+ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=updated_at_lte")
+ private JsonNullable updatedAtLte;
+
+ /**
+ * Filters the results to only payouts updated after this ISO date-time string. The time zone must be
+ * included. Ensure that the date-time string is URL encoded, e.g.
+ *
+ * `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`.
+ */
+ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=updated_at_gte")
+ private JsonNullable updatedAtGte;
+
+ /**
+ * Filters the results to only the payouts that have an `external_identifier` that exactly matches this
+ * value.
+ */
+ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=external_identifier")
+ private JsonNullable externalIdentifier;
+
+ /**
+ * Filters the results to only the payouts that have a `payment_service_payout_id` that exactly matches
+ * this value.
+ */
+ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=payment_service_payout_id")
+ private JsonNullable paymentServicePayoutId;
+
+ /**
+ * Filters the results to only the payouts that have a `status` that matches with any of the provided
+ * status values.
+ */
+ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=status")
+ private JsonNullable extends List> status;
+
/**
* The ID of the merchant account to use for this request.
*/
@@ -39,17 +100,41 @@ public class ListPayoutsRequest {
public ListPayoutsRequest(
JsonNullable cursor,
Optional limit,
+ JsonNullable createdAtLte,
+ JsonNullable createdAtGte,
+ JsonNullable updatedAtLte,
+ JsonNullable updatedAtGte,
+ JsonNullable externalIdentifier,
+ JsonNullable paymentServicePayoutId,
+ JsonNullable extends List> status,
JsonNullable merchantAccountId) {
Utils.checkNotNull(cursor, "cursor");
Utils.checkNotNull(limit, "limit");
+ Utils.checkNotNull(createdAtLte, "createdAtLte");
+ Utils.checkNotNull(createdAtGte, "createdAtGte");
+ Utils.checkNotNull(updatedAtLte, "updatedAtLte");
+ Utils.checkNotNull(updatedAtGte, "updatedAtGte");
+ Utils.checkNotNull(externalIdentifier, "externalIdentifier");
+ Utils.checkNotNull(paymentServicePayoutId, "paymentServicePayoutId");
+ Utils.checkNotNull(status, "status");
Utils.checkNotNull(merchantAccountId, "merchantAccountId");
this.cursor = cursor;
this.limit = limit;
+ this.createdAtLte = createdAtLte;
+ this.createdAtGte = createdAtGte;
+ this.updatedAtLte = updatedAtLte;
+ this.updatedAtGte = updatedAtGte;
+ this.externalIdentifier = externalIdentifier;
+ this.paymentServicePayoutId = paymentServicePayoutId;
+ this.status = status;
this.merchantAccountId = merchantAccountId;
}
public ListPayoutsRequest() {
- this(JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined());
+ this(JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(),
+ JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(),
+ JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(),
+ JsonNullable.undefined());
}
/**
@@ -68,6 +153,78 @@ public Optional limit() {
return limit;
}
+ /**
+ * Filters the results to only payouts created before this ISO date-time string. The time zone must be
+ * included. Ensure that the date-time string is URL encoded, e.g.
+ *
+ * `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`.
+ */
+ @JsonIgnore
+ public JsonNullable createdAtLte() {
+ return createdAtLte;
+ }
+
+ /**
+ * Filters the results to only payouts created after this ISO date-time string. The time zone must be
+ * included. Ensure that the date-time string is URL encoded, e.g.
+ *
+ * `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`.
+ */
+ @JsonIgnore
+ public JsonNullable createdAtGte() {
+ return createdAtGte;
+ }
+
+ /**
+ * Filters the results to only payouts updated before this ISO date-time string. The time zone must be
+ * included. Ensure that the date-time string is URL encoded, e.g.
+ *
+ * `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`.
+ */
+ @JsonIgnore
+ public JsonNullable updatedAtLte() {
+ return updatedAtLte;
+ }
+
+ /**
+ * Filters the results to only payouts updated after this ISO date-time string. The time zone must be
+ * included. Ensure that the date-time string is URL encoded, e.g.
+ *
+ * `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`.
+ */
+ @JsonIgnore
+ public JsonNullable updatedAtGte() {
+ return updatedAtGte;
+ }
+
+ /**
+ * Filters the results to only the payouts that have an `external_identifier` that exactly matches this
+ * value.
+ */
+ @JsonIgnore
+ public JsonNullable externalIdentifier() {
+ return externalIdentifier;
+ }
+
+ /**
+ * Filters the results to only the payouts that have a `payment_service_payout_id` that exactly matches
+ * this value.
+ */
+ @JsonIgnore
+ public JsonNullable paymentServicePayoutId() {
+ return paymentServicePayoutId;
+ }
+
+ /**
+ * Filters the results to only the payouts that have a `status` that matches with any of the provided
+ * status values.
+ */
+ @SuppressWarnings("unchecked")
+ @JsonIgnore
+ public JsonNullable> status() {
+ return (JsonNullable>) status;
+ }
+
/**
* The ID of the merchant account to use for this request.
*/
@@ -118,6 +275,162 @@ public ListPayoutsRequest withLimit(Optional limit) {
return this;
}
+ /**
+ * Filters the results to only payouts created before this ISO date-time string. The time zone must be
+ * included. Ensure that the date-time string is URL encoded, e.g.
+ *
+ * `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`.
+ */
+ public ListPayoutsRequest withCreatedAtLte(OffsetDateTime createdAtLte) {
+ Utils.checkNotNull(createdAtLte, "createdAtLte");
+ this.createdAtLte = JsonNullable.of(createdAtLte);
+ return this;
+ }
+
+ /**
+ * Filters the results to only payouts created before this ISO date-time string. The time zone must be
+ * included. Ensure that the date-time string is URL encoded, e.g.
+ *
+ *
`2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`.
+ */
+ public ListPayoutsRequest withCreatedAtLte(JsonNullable createdAtLte) {
+ Utils.checkNotNull(createdAtLte, "createdAtLte");
+ this.createdAtLte = createdAtLte;
+ return this;
+ }
+
+ /**
+ * Filters the results to only payouts created after this ISO date-time string. The time zone must be
+ * included. Ensure that the date-time string is URL encoded, e.g.
+ *
+ * `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`.
+ */
+ public ListPayoutsRequest withCreatedAtGte(OffsetDateTime createdAtGte) {
+ Utils.checkNotNull(createdAtGte, "createdAtGte");
+ this.createdAtGte = JsonNullable.of(createdAtGte);
+ return this;
+ }
+
+ /**
+ * Filters the results to only payouts created after this ISO date-time string. The time zone must be
+ * included. Ensure that the date-time string is URL encoded, e.g.
+ *
+ *
`2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`.
+ */
+ public ListPayoutsRequest withCreatedAtGte(JsonNullable createdAtGte) {
+ Utils.checkNotNull(createdAtGte, "createdAtGte");
+ this.createdAtGte = createdAtGte;
+ return this;
+ }
+
+ /**
+ * Filters the results to only payouts updated before this ISO date-time string. The time zone must be
+ * included. Ensure that the date-time string is URL encoded, e.g.
+ *
+ * `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`.
+ */
+ public ListPayoutsRequest withUpdatedAtLte(OffsetDateTime updatedAtLte) {
+ Utils.checkNotNull(updatedAtLte, "updatedAtLte");
+ this.updatedAtLte = JsonNullable.of(updatedAtLte);
+ return this;
+ }
+
+ /**
+ * Filters the results to only payouts updated before this ISO date-time string. The time zone must be
+ * included. Ensure that the date-time string is URL encoded, e.g.
+ *
+ *
`2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`.
+ */
+ public ListPayoutsRequest withUpdatedAtLte(JsonNullable updatedAtLte) {
+ Utils.checkNotNull(updatedAtLte, "updatedAtLte");
+ this.updatedAtLte = updatedAtLte;
+ return this;
+ }
+
+ /**
+ * Filters the results to only payouts updated after this ISO date-time string. The time zone must be
+ * included. Ensure that the date-time string is URL encoded, e.g.
+ *
+ * `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`.
+ */
+ public ListPayoutsRequest withUpdatedAtGte(OffsetDateTime updatedAtGte) {
+ Utils.checkNotNull(updatedAtGte, "updatedAtGte");
+ this.updatedAtGte = JsonNullable.of(updatedAtGte);
+ return this;
+ }
+
+ /**
+ * Filters the results to only payouts updated after this ISO date-time string. The time zone must be
+ * included. Ensure that the date-time string is URL encoded, e.g.
+ *
+ *
`2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`.
+ */
+ public ListPayoutsRequest withUpdatedAtGte(JsonNullable updatedAtGte) {
+ Utils.checkNotNull(updatedAtGte, "updatedAtGte");
+ this.updatedAtGte = updatedAtGte;
+ return this;
+ }
+
+ /**
+ * Filters the results to only the payouts that have an `external_identifier` that exactly matches this
+ * value.
+ */
+ public ListPayoutsRequest withExternalIdentifier(String externalIdentifier) {
+ Utils.checkNotNull(externalIdentifier, "externalIdentifier");
+ this.externalIdentifier = JsonNullable.of(externalIdentifier);
+ return this;
+ }
+
+ /**
+ * Filters the results to only the payouts that have an `external_identifier` that exactly matches this
+ * value.
+ */
+ public ListPayoutsRequest withExternalIdentifier(JsonNullable externalIdentifier) {
+ Utils.checkNotNull(externalIdentifier, "externalIdentifier");
+ this.externalIdentifier = externalIdentifier;
+ return this;
+ }
+
+ /**
+ * Filters the results to only the payouts that have a `payment_service_payout_id` that exactly matches
+ * this value.
+ */
+ public ListPayoutsRequest withPaymentServicePayoutId(String paymentServicePayoutId) {
+ Utils.checkNotNull(paymentServicePayoutId, "paymentServicePayoutId");
+ this.paymentServicePayoutId = JsonNullable.of(paymentServicePayoutId);
+ return this;
+ }
+
+ /**
+ * Filters the results to only the payouts that have a `payment_service_payout_id` that exactly matches
+ * this value.
+ */
+ public ListPayoutsRequest withPaymentServicePayoutId(JsonNullable paymentServicePayoutId) {
+ Utils.checkNotNull(paymentServicePayoutId, "paymentServicePayoutId");
+ this.paymentServicePayoutId = paymentServicePayoutId;
+ return this;
+ }
+
+ /**
+ * Filters the results to only the payouts that have a `status` that matches with any of the provided
+ * status values.
+ */
+ public ListPayoutsRequest withStatus(List status) {
+ Utils.checkNotNull(status, "status");
+ this.status = JsonNullable.of(status);
+ return this;
+ }
+
+ /**
+ * Filters the results to only the payouts that have a `status` that matches with any of the provided
+ * status values.
+ */
+ public ListPayoutsRequest withStatus(JsonNullable extends List> status) {
+ Utils.checkNotNull(status, "status");
+ this.status = status;
+ return this;
+ }
+
/**
* The ID of the merchant account to use for this request.
*/
@@ -148,13 +461,23 @@ public boolean equals(java.lang.Object o) {
return
Utils.enhancedDeepEquals(this.cursor, other.cursor) &&
Utils.enhancedDeepEquals(this.limit, other.limit) &&
+ Utils.enhancedDeepEquals(this.createdAtLte, other.createdAtLte) &&
+ Utils.enhancedDeepEquals(this.createdAtGte, other.createdAtGte) &&
+ Utils.enhancedDeepEquals(this.updatedAtLte, other.updatedAtLte) &&
+ Utils.enhancedDeepEquals(this.updatedAtGte, other.updatedAtGte) &&
+ Utils.enhancedDeepEquals(this.externalIdentifier, other.externalIdentifier) &&
+ Utils.enhancedDeepEquals(this.paymentServicePayoutId, other.paymentServicePayoutId) &&
+ Utils.enhancedDeepEquals(this.status, other.status) &&
Utils.enhancedDeepEquals(this.merchantAccountId, other.merchantAccountId);
}
@Override
public int hashCode() {
return Utils.enhancedHash(
- cursor, limit, merchantAccountId);
+ cursor, limit, createdAtLte,
+ createdAtGte, updatedAtLte, updatedAtGte,
+ externalIdentifier, paymentServicePayoutId, status,
+ merchantAccountId);
}
@Override
@@ -162,6 +485,13 @@ public String toString() {
return Utils.toString(ListPayoutsRequest.class,
"cursor", cursor,
"limit", limit,
+ "createdAtLte", createdAtLte,
+ "createdAtGte", createdAtGte,
+ "updatedAtLte", updatedAtLte,
+ "updatedAtGte", updatedAtGte,
+ "externalIdentifier", externalIdentifier,
+ "paymentServicePayoutId", paymentServicePayoutId,
+ "status", status,
"merchantAccountId", merchantAccountId);
}
@@ -172,6 +502,20 @@ public final static class Builder {
private Optional limit;
+ private JsonNullable createdAtLte = JsonNullable.undefined();
+
+ private JsonNullable createdAtGte = JsonNullable.undefined();
+
+ private JsonNullable updatedAtLte = JsonNullable.undefined();
+
+ private JsonNullable updatedAtGte = JsonNullable.undefined();
+
+ private JsonNullable externalIdentifier = JsonNullable.undefined();
+
+ private JsonNullable paymentServicePayoutId = JsonNullable.undefined();
+
+ private JsonNullable extends List> status = JsonNullable.undefined();
+
private JsonNullable merchantAccountId = JsonNullable.undefined();
private Builder() {
@@ -217,6 +561,169 @@ public Builder limit(Optional limit) {
}
+ /**
+ * Filters the results to only payouts created before this ISO date-time string. The time zone must be
+ * included. Ensure that the date-time string is URL encoded, e.g.
+ *
+ * `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`.
+ */
+ public Builder createdAtLte(OffsetDateTime createdAtLte) {
+ Utils.checkNotNull(createdAtLte, "createdAtLte");
+ this.createdAtLte = JsonNullable.of(createdAtLte);
+ return this;
+ }
+
+ /**
+ * Filters the results to only payouts created before this ISO date-time string. The time zone must be
+ * included. Ensure that the date-time string is URL encoded, e.g.
+ *
+ *
`2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`.
+ */
+ public Builder createdAtLte(JsonNullable createdAtLte) {
+ Utils.checkNotNull(createdAtLte, "createdAtLte");
+ this.createdAtLte = createdAtLte;
+ return this;
+ }
+
+
+ /**
+ * Filters the results to only payouts created after this ISO date-time string. The time zone must be
+ * included. Ensure that the date-time string is URL encoded, e.g.
+ *
+ * `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`.
+ */
+ public Builder createdAtGte(OffsetDateTime createdAtGte) {
+ Utils.checkNotNull(createdAtGte, "createdAtGte");
+ this.createdAtGte = JsonNullable.of(createdAtGte);
+ return this;
+ }
+
+ /**
+ * Filters the results to only payouts created after this ISO date-time string. The time zone must be
+ * included. Ensure that the date-time string is URL encoded, e.g.
+ *
+ *
`2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`.
+ */
+ public Builder createdAtGte(JsonNullable createdAtGte) {
+ Utils.checkNotNull(createdAtGte, "createdAtGte");
+ this.createdAtGte = createdAtGte;
+ return this;
+ }
+
+
+ /**
+ * Filters the results to only payouts updated before this ISO date-time string. The time zone must be
+ * included. Ensure that the date-time string is URL encoded, e.g.
+ *
+ * `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`.
+ */
+ public Builder updatedAtLte(OffsetDateTime updatedAtLte) {
+ Utils.checkNotNull(updatedAtLte, "updatedAtLte");
+ this.updatedAtLte = JsonNullable.of(updatedAtLte);
+ return this;
+ }
+
+ /**
+ * Filters the results to only payouts updated before this ISO date-time string. The time zone must be
+ * included. Ensure that the date-time string is URL encoded, e.g.
+ *
+ *
`2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`.
+ */
+ public Builder updatedAtLte(JsonNullable updatedAtLte) {
+ Utils.checkNotNull(updatedAtLte, "updatedAtLte");
+ this.updatedAtLte = updatedAtLte;
+ return this;
+ }
+
+
+ /**
+ * Filters the results to only payouts updated after this ISO date-time string. The time zone must be
+ * included. Ensure that the date-time string is URL encoded, e.g.
+ *
+ * `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`.
+ */
+ public Builder updatedAtGte(OffsetDateTime updatedAtGte) {
+ Utils.checkNotNull(updatedAtGte, "updatedAtGte");
+ this.updatedAtGte = JsonNullable.of(updatedAtGte);
+ return this;
+ }
+
+ /**
+ * Filters the results to only payouts updated after this ISO date-time string. The time zone must be
+ * included. Ensure that the date-time string is URL encoded, e.g.
+ *
+ *
`2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`.
+ */
+ public Builder updatedAtGte(JsonNullable updatedAtGte) {
+ Utils.checkNotNull(updatedAtGte, "updatedAtGte");
+ this.updatedAtGte = updatedAtGte;
+ return this;
+ }
+
+
+ /**
+ * Filters the results to only the payouts that have an `external_identifier` that exactly matches this
+ * value.
+ */
+ public Builder externalIdentifier(String externalIdentifier) {
+ Utils.checkNotNull(externalIdentifier, "externalIdentifier");
+ this.externalIdentifier = JsonNullable.of(externalIdentifier);
+ return this;
+ }
+
+ /**
+ * Filters the results to only the payouts that have an `external_identifier` that exactly matches this
+ * value.
+ */
+ public Builder externalIdentifier(JsonNullable externalIdentifier) {
+ Utils.checkNotNull(externalIdentifier, "externalIdentifier");
+ this.externalIdentifier = externalIdentifier;
+ return this;
+ }
+
+
+ /**
+ * Filters the results to only the payouts that have a `payment_service_payout_id` that exactly matches
+ * this value.
+ */
+ public Builder paymentServicePayoutId(String paymentServicePayoutId) {
+ Utils.checkNotNull(paymentServicePayoutId, "paymentServicePayoutId");
+ this.paymentServicePayoutId = JsonNullable.of(paymentServicePayoutId);
+ return this;
+ }
+
+ /**
+ * Filters the results to only the payouts that have a `payment_service_payout_id` that exactly matches
+ * this value.
+ */
+ public Builder paymentServicePayoutId(JsonNullable paymentServicePayoutId) {
+ Utils.checkNotNull(paymentServicePayoutId, "paymentServicePayoutId");
+ this.paymentServicePayoutId = paymentServicePayoutId;
+ return this;
+ }
+
+
+ /**
+ * Filters the results to only the payouts that have a `status` that matches with any of the provided
+ * status values.
+ */
+ public Builder status(List status) {
+ Utils.checkNotNull(status, "status");
+ this.status = JsonNullable.of(status);
+ return this;
+ }
+
+ /**
+ * Filters the results to only the payouts that have a `status` that matches with any of the provided
+ * status values.
+ */
+ public Builder status(JsonNullable extends List> status) {
+ Utils.checkNotNull(status, "status");
+ this.status = status;
+ return this;
+ }
+
+
/**
* The ID of the merchant account to use for this request.
*/
@@ -241,7 +748,10 @@ public ListPayoutsRequest build() {
}
return new ListPayoutsRequest(
- cursor, limit, merchantAccountId);
+ cursor, limit, createdAtLte,
+ createdAtGte, updatedAtLte, updatedAtGte,
+ externalIdentifier, paymentServicePayoutId, status,
+ merchantAccountId);
}
diff --git a/src/main/java/com/gr4vy/sdk/models/operations/ListPayoutsRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/ListPayoutsRequestBuilder.java
index d4691741..4038ffaf 100644
--- a/src/main/java/com/gr4vy/sdk/models/operations/ListPayoutsRequestBuilder.java
+++ b/src/main/java/com/gr4vy/sdk/models/operations/ListPayoutsRequestBuilder.java
@@ -8,11 +8,9 @@
import static com.gr4vy.sdk.utils.Utils.transform;
import static com.gr4vy.sdk.utils.Utils.toStream;
-import com.fasterxml.jackson.core.type.TypeReference;
import com.gr4vy.sdk.SDKConfiguration;
import com.gr4vy.sdk.operations.ListPayouts;
import com.gr4vy.sdk.utils.Headers;
-import com.gr4vy.sdk.utils.LazySingletonValue;
import com.gr4vy.sdk.utils.Options;
import com.gr4vy.sdk.utils.RetryConfig;
import com.gr4vy.sdk.utils.Utils;
@@ -20,22 +18,15 @@
import com.gr4vy.sdk.utils.pagination.Paginator;
import java.io.InputStream;
import java.lang.Iterable;
-import java.lang.Long;
import java.lang.String;
import java.net.http.HttpResponse;
import java.util.Iterator;
import java.util.Optional;
import java.util.stream.Stream;
-import org.openapitools.jackson.nullable.JsonNullable;
public class ListPayoutsRequestBuilder {
- private JsonNullable cursor = JsonNullable.undefined();
- private Optional limit = Utils.readDefaultOrConstValue(
- "limit",
- "20",
- new TypeReference>() {});
- private JsonNullable merchantAccountId = JsonNullable.undefined();
+ private ListPayoutsRequest request;
private Optional retryConfig = Optional.empty();
private final SDKConfiguration sdkConfiguration;
private final Headers _headers = new Headers();
@@ -44,39 +35,9 @@ public ListPayoutsRequestBuilder(SDKConfiguration sdkConfiguration) {
this.sdkConfiguration = sdkConfiguration;
}
- public ListPayoutsRequestBuilder cursor(String cursor) {
- Utils.checkNotNull(cursor, "cursor");
- this.cursor = JsonNullable.of(cursor);
- return this;
- }
-
- public ListPayoutsRequestBuilder cursor(JsonNullable cursor) {
- Utils.checkNotNull(cursor, "cursor");
- this.cursor = cursor;
- return this;
- }
-
- public ListPayoutsRequestBuilder limit(long limit) {
- Utils.checkNotNull(limit, "limit");
- this.limit = Optional.of(limit);
- return this;
- }
-
- public ListPayoutsRequestBuilder limit(Optional limit) {
- Utils.checkNotNull(limit, "limit");
- this.limit = limit;
- return this;
- }
-
- public ListPayoutsRequestBuilder merchantAccountId(String merchantAccountId) {
- Utils.checkNotNull(merchantAccountId, "merchantAccountId");
- this.merchantAccountId = JsonNullable.of(merchantAccountId);
- return this;
- }
-
- public ListPayoutsRequestBuilder merchantAccountId(JsonNullable merchantAccountId) {
- Utils.checkNotNull(merchantAccountId, "merchantAccountId");
- this.merchantAccountId = merchantAccountId;
+ public ListPayoutsRequestBuilder request(ListPayoutsRequest request) {
+ Utils.checkNotNull(request, "request");
+ this.request = request;
return this;
}
@@ -92,19 +53,6 @@ public ListPayoutsRequestBuilder retryConfig(Optional retryConfig)
return this;
}
-
- private ListPayoutsRequest buildRequest() {
- if (limit == null) {
- limit = _SINGLETON_VALUE_Limit.value();
- }
-
- ListPayoutsRequest request = new ListPayoutsRequest(cursor,
- limit,
- merchantAccountId);
-
- return request;
- }
-
public ListPayoutsResponse call() {
Optional options = Optional.of(Options.builder()
.retryConfig(retryConfig)
@@ -112,7 +60,6 @@ public ListPayoutsResponse call() {
RequestOperation operation
= new ListPayouts.Sync(sdkConfiguration, options, _headers);
- ListPayoutsRequest request = buildRequest();
return operation.handleResponse(operation.doRequest(request));
}
@@ -137,7 +84,6 @@ public Iterable callAsIterable() {
RequestOperation operation
= new ListPayouts.Sync(sdkConfiguration, options, _headers);
- ListPayoutsRequest request = buildRequest();
Iterator> iterator = new Paginator<>(
request,
new CursorTracker<>("$.next_cursor", String.class),
@@ -157,10 +103,4 @@ public Stream callAsStream() {
return toStream(callAsIterable());
}
-
- private static final LazySingletonValue> _SINGLETON_VALUE_Limit =
- new LazySingletonValue<>(
- "limit",
- "20",
- new TypeReference>() {});
}
diff --git a/src/main/java/com/gr4vy/sdk/models/operations/async/ListPayoutsRequestBuilder.java b/src/main/java/com/gr4vy/sdk/models/operations/async/ListPayoutsRequestBuilder.java
index 4a945edf..661bf2cc 100644
--- a/src/main/java/com/gr4vy/sdk/models/operations/async/ListPayoutsRequestBuilder.java
+++ b/src/main/java/com/gr4vy/sdk/models/operations/async/ListPayoutsRequestBuilder.java
@@ -6,36 +6,27 @@
import static com.gr4vy.sdk.operations.Operations.AsyncRequestOperation;
import static com.gr4vy.sdk.utils.reactive.ReactiveUtils.mapAsync;
-import com.fasterxml.jackson.core.type.TypeReference;
import com.gr4vy.sdk.SDKConfiguration;
import com.gr4vy.sdk.models.operations.ListPayoutsRequest;
import com.gr4vy.sdk.operations.ListPayouts;
import com.gr4vy.sdk.utils.Blob;
import com.gr4vy.sdk.utils.Headers;
-import com.gr4vy.sdk.utils.LazySingletonValue;
import com.gr4vy.sdk.utils.Options;
import com.gr4vy.sdk.utils.RetryConfig;
import com.gr4vy.sdk.utils.Utils;
import com.gr4vy.sdk.utils.pagination.AsyncPaginator;
import com.gr4vy.sdk.utils.pagination.CursorTracker;
-import java.lang.Long;
import java.lang.String;
import java.net.http.HttpResponse;
import java.util.Optional;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Flow;
-import org.openapitools.jackson.nullable.JsonNullable;
import org.reactivestreams.FlowAdapters;
import org.reactivestreams.Publisher;
public class ListPayoutsRequestBuilder {
- private JsonNullable cursor = JsonNullable.undefined();
- private Optional limit = Utils.readDefaultOrConstValue(
- "limit",
- "20",
- new TypeReference>() {});
- private JsonNullable merchantAccountId = JsonNullable.undefined();
+ private ListPayoutsRequest request;
private Optional retryConfig = Optional.empty();
private final SDKConfiguration sdkConfiguration;
private final Headers _headers = new Headers();
@@ -44,39 +35,9 @@ public ListPayoutsRequestBuilder(SDKConfiguration sdkConfiguration) {
this.sdkConfiguration = sdkConfiguration;
}
- public ListPayoutsRequestBuilder cursor(String cursor) {
- Utils.checkNotNull(cursor, "cursor");
- this.cursor = JsonNullable.of(cursor);
- return this;
- }
-
- public ListPayoutsRequestBuilder cursor(JsonNullable cursor) {
- Utils.checkNotNull(cursor, "cursor");
- this.cursor = cursor;
- return this;
- }
-
- public ListPayoutsRequestBuilder limit(long limit) {
- Utils.checkNotNull(limit, "limit");
- this.limit = Optional.of(limit);
- return this;
- }
-
- public ListPayoutsRequestBuilder limit(Optional limit) {
- Utils.checkNotNull(limit, "limit");
- this.limit = limit;
- return this;
- }
-
- public ListPayoutsRequestBuilder merchantAccountId(String merchantAccountId) {
- Utils.checkNotNull(merchantAccountId, "merchantAccountId");
- this.merchantAccountId = JsonNullable.of(merchantAccountId);
- return this;
- }
-
- public ListPayoutsRequestBuilder merchantAccountId(JsonNullable merchantAccountId) {
- Utils.checkNotNull(merchantAccountId, "merchantAccountId");
- this.merchantAccountId = merchantAccountId;
+ public ListPayoutsRequestBuilder request(ListPayoutsRequest request) {
+ Utils.checkNotNull(request, "request");
+ this.request = request;
return this;
}
@@ -92,19 +53,6 @@ public ListPayoutsRequestBuilder retryConfig(Optional retryConfig)
return this;
}
-
- private ListPayoutsRequest buildRequest() {
- if (limit == null) {
- limit = _SINGLETON_VALUE_Limit.value();
- }
-
- ListPayoutsRequest request = new ListPayoutsRequest(cursor,
- limit,
- merchantAccountId);
-
- return request;
- }
-
public CompletableFuture call() {
Optional options = Optional.of(Options.builder()
.retryConfig(retryConfig)
@@ -114,7 +62,6 @@ public CompletableFuture call() {
= new ListPayouts.Async(
sdkConfiguration, options, sdkConfiguration.retryScheduler(),
_headers);
- ListPayoutsRequest request = buildRequest();
return operation.doRequest(request)
.thenCompose(operation::handleResponse);
@@ -135,7 +82,7 @@ public CompletableFuture call() {
* @return A Publisher that emits pages asynchronously
*/
public Publisher callAsPublisher() {
- ListPayoutsRequest request = this.buildRequest();
+ ListPayoutsRequest request = this.request;
Optional options = Optional.of(Options.builder()
.retryConfig(retryConfig)
.build());
@@ -159,10 +106,4 @@ public Publisher callAsPublisher() {
return FlowAdapters.toPublisher(flowPublisher);
}
-
- private static final LazySingletonValue> _SINGLETON_VALUE_Limit =
- new LazySingletonValue<>(
- "limit",
- "20",
- new TypeReference>() {});
}