* | :heavy_minus_sign: | The maximum number of items that are returned. | 20 |
+
+### Response
+
+**[ListApiKeyPairsResponse](../../models/operations/ListApiKeyPairsResponse.md)**
+
+### Errors
+
+| Error Type | Status Code | Content Type |
+| --------------------------------- | --------------------------------- | --------------------------------- |
+| models/errors/Error400 | 400 | application/json |
+| models/errors/Error401 | 401 | application/json |
+| models/errors/Error403 | 403 | application/json |
+| models/errors/Error404 | 404 | application/json |
+| models/errors/Error405 | 405 | application/json |
+| models/errors/Error409 | 409 | application/json |
+| models/errors/HTTPValidationError | 422 | application/json |
+| models/errors/Error425 | 425 | application/json |
+| models/errors/Error429 | 429 | application/json |
+| models/errors/Error500 | 500 | application/json |
+| models/errors/Error502 | 502 | application/json |
+| models/errors/Error504 | 504 | application/json |
+| models/errors/APIException | 4XX, 5XX | \*/\* |
+
+## create
+
+Create a new API key pair.
+
+### Example Usage
+
+
+```java
+package hello.world;
+
+import com.gr4vy.sdk.Gr4vy;
+import com.gr4vy.sdk.models.components.APIKeyPairCreate;
+import com.gr4vy.sdk.models.errors.*;
+import com.gr4vy.sdk.models.operations.CreateApiKeyPairResponse;
+import java.lang.Exception;
+import java.util.List;
+
+public class Application {
+
+ public static void main(String[] args) throws Exception {
+
+ Gr4vy sdk = Gr4vy.builder()
+ .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
+ .build();
+
+ APIKeyPairCreate req = APIKeyPairCreate.builder()
+ .displayName("Production key")
+ .roleIds(List.of(
+ "8f4b8c1a-1b2c-4d3e-9f5a-6b7c8d9e0f1a"))
+ .build();
+
+ CreateApiKeyPairResponse res = sdk.apiKeyPairs().create()
+ .request(req)
+ .call();
+
+ if (res.apiKeyPair().isPresent()) {
+ System.out.println(res.apiKeyPair().get());
+ }
+ }
+}
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description |
+| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
+| `request` | [APIKeyPairCreate](../../models/shared/APIKeyPairCreate.md) | :heavy_check_mark: | The request object to use for the request. |
+
+### Response
+
+**[CreateApiKeyPairResponse](../../models/operations/CreateApiKeyPairResponse.md)**
+
+### Errors
+
+| Error Type | Status Code | Content Type |
+| --------------------------------- | --------------------------------- | --------------------------------- |
+| models/errors/Error400 | 400 | application/json |
+| models/errors/Error401 | 401 | application/json |
+| models/errors/Error403 | 403 | application/json |
+| models/errors/Error404 | 404 | application/json |
+| models/errors/Error405 | 405 | application/json |
+| models/errors/Error409 | 409 | application/json |
+| models/errors/HTTPValidationError | 422 | application/json |
+| models/errors/Error425 | 425 | application/json |
+| models/errors/Error429 | 429 | application/json |
+| models/errors/Error500 | 500 | application/json |
+| models/errors/Error502 | 502 | application/json |
+| models/errors/Error504 | 504 | application/json |
+| models/errors/APIException | 4XX, 5XX | \*/\* |
+
+## get
+
+Fetches an API key pair by its ID.
+
+### Example Usage
+
+
+```java
+package hello.world;
+
+import com.gr4vy.sdk.Gr4vy;
+import com.gr4vy.sdk.models.errors.*;
+import com.gr4vy.sdk.models.operations.GetApiKeyPairResponse;
+import java.lang.Exception;
+
+public class Application {
+
+ public static void main(String[] args) throws Exception {
+
+ Gr4vy sdk = Gr4vy.builder()
+ .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
+ .build();
+
+ GetApiKeyPairResponse res = sdk.apiKeyPairs().get()
+ .apiKeyPairId("fe26475d-ec3e-4884-9553-f7356683f7f9")
+ .call();
+
+ if (res.apiKeyPair().isPresent()) {
+ System.out.println(res.apiKeyPair().get());
+ }
+ }
+}
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description | Example |
+| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ |
+| `apiKeyPairId` | *String* | :heavy_check_mark: | The ID of the API key pair. | fe26475d-ec3e-4884-9553-f7356683f7f9 |
+
+### Response
+
+**[GetApiKeyPairResponse](../../models/operations/GetApiKeyPairResponse.md)**
+
+### Errors
+
+| Error Type | Status Code | Content Type |
+| --------------------------------- | --------------------------------- | --------------------------------- |
+| models/errors/Error400 | 400 | application/json |
+| models/errors/Error401 | 401 | application/json |
+| models/errors/Error403 | 403 | application/json |
+| models/errors/Error404 | 404 | application/json |
+| models/errors/Error405 | 405 | application/json |
+| models/errors/Error409 | 409 | application/json |
+| models/errors/HTTPValidationError | 422 | application/json |
+| models/errors/Error425 | 425 | application/json |
+| models/errors/Error429 | 429 | application/json |
+| models/errors/Error500 | 500 | application/json |
+| models/errors/Error502 | 502 | application/json |
+| models/errors/Error504 | 504 | application/json |
+| models/errors/APIException | 4XX, 5XX | \*/\* |
+
+## update
+
+Updates an API key pair.
+
+### Example Usage
+
+
+```java
+package hello.world;
+
+import com.gr4vy.sdk.Gr4vy;
+import com.gr4vy.sdk.models.components.APIKeyPairUpdate;
+import com.gr4vy.sdk.models.errors.*;
+import com.gr4vy.sdk.models.operations.UpdateApiKeyPairResponse;
+import java.lang.Exception;
+
+public class Application {
+
+ public static void main(String[] args) throws Exception {
+
+ Gr4vy sdk = Gr4vy.builder()
+ .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
+ .build();
+
+ UpdateApiKeyPairResponse res = sdk.apiKeyPairs().update()
+ .apiKeyPairId("fe26475d-ec3e-4884-9553-f7356683f7f9")
+ .apiKeyPairUpdate(APIKeyPairUpdate.builder()
+ .build())
+ .call();
+
+ if (res.apiKeyPair().isPresent()) {
+ System.out.println(res.apiKeyPair().get());
+ }
+ }
+}
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description | Example |
+| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- |
+| `apiKeyPairId` | *String* | :heavy_check_mark: | The ID of the API key pair. | fe26475d-ec3e-4884-9553-f7356683f7f9 |
+| `apiKeyPairUpdate` | [APIKeyPairUpdate](../../models/components/APIKeyPairUpdate.md) | :heavy_check_mark: | N/A | |
+
+### Response
+
+**[UpdateApiKeyPairResponse](../../models/operations/UpdateApiKeyPairResponse.md)**
+
+### Errors
+
+| Error Type | Status Code | Content Type |
+| --------------------------------- | --------------------------------- | --------------------------------- |
+| models/errors/Error400 | 400 | application/json |
+| models/errors/Error401 | 401 | application/json |
+| models/errors/Error403 | 403 | application/json |
+| models/errors/Error404 | 404 | application/json |
+| models/errors/Error405 | 405 | application/json |
+| models/errors/Error409 | 409 | application/json |
+| models/errors/HTTPValidationError | 422 | application/json |
+| models/errors/Error425 | 425 | application/json |
+| models/errors/Error429 | 429 | application/json |
+| models/errors/Error500 | 500 | application/json |
+| models/errors/Error502 | 502 | application/json |
+| models/errors/Error504 | 504 | application/json |
+| models/errors/APIException | 4XX, 5XX | \*/\* |
+
+## delete
+
+Permanently removes an API key pair.
+
+### Example Usage
+
+
+```java
+package hello.world;
+
+import com.gr4vy.sdk.Gr4vy;
+import com.gr4vy.sdk.models.errors.*;
+import com.gr4vy.sdk.models.operations.DeleteApiKeyPairResponse;
+import java.lang.Exception;
+
+public class Application {
+
+ public static void main(String[] args) throws Exception {
+
+ Gr4vy sdk = Gr4vy.builder()
+ .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
+ .build();
+
+ DeleteApiKeyPairResponse res = sdk.apiKeyPairs().delete()
+ .apiKeyPairId("fe26475d-ec3e-4884-9553-f7356683f7f9")
+ .call();
+
+ // handle response
+ }
+}
+```
+
+### Parameters
+
+| Parameter | Type | Required | Description | Example |
+| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ |
+| `apiKeyPairId` | *String* | :heavy_check_mark: | The ID of the API key pair. | fe26475d-ec3e-4884-9553-f7356683f7f9 |
+
+### Response
+
+**[DeleteApiKeyPairResponse](../../models/operations/DeleteApiKeyPairResponse.md)**
+
+### Errors
+
+| Error Type | Status Code | Content Type |
+| --------------------------------- | --------------------------------- | --------------------------------- |
+| models/errors/Error400 | 400 | application/json |
+| models/errors/Error401 | 401 | application/json |
+| models/errors/Error403 | 403 | application/json |
+| models/errors/Error404 | 404 | application/json |
+| models/errors/Error405 | 405 | application/json |
+| models/errors/Error409 | 409 | application/json |
+| models/errors/HTTPValidationError | 422 | application/json |
+| models/errors/Error425 | 425 | application/json |
+| models/errors/Error429 | 429 | application/json |
+| models/errors/Error500 | 500 | application/json |
+| models/errors/Error502 | 502 | application/json |
+| models/errors/Error504 | 504 | application/json |
+| models/errors/APIException | 4XX, 5XX | \*/\* |
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
index ccfcf41d..29be94aa 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,4 +1,4 @@
groupId=com.gr4vy
artifactId=sdk
-version=2.16.101
+version=2.16.102
org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g
diff --git a/src/main/java/com/gr4vy/sdk/ApiKeyPairs.java b/src/main/java/com/gr4vy/sdk/ApiKeyPairs.java
new file mode 100644
index 00000000..63576898
--- /dev/null
+++ b/src/main/java/com/gr4vy/sdk/ApiKeyPairs.java
@@ -0,0 +1,239 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.gr4vy.sdk;
+
+import static com.gr4vy.sdk.operations.Operations.RequestOperation;
+
+import com.gr4vy.sdk.models.components.APIKeyPairCreate;
+import com.gr4vy.sdk.models.components.APIKeyPairUpdate;
+import com.gr4vy.sdk.models.operations.CreateApiKeyPairRequestBuilder;
+import com.gr4vy.sdk.models.operations.CreateApiKeyPairResponse;
+import com.gr4vy.sdk.models.operations.DeleteApiKeyPairRequest;
+import com.gr4vy.sdk.models.operations.DeleteApiKeyPairRequestBuilder;
+import com.gr4vy.sdk.models.operations.DeleteApiKeyPairResponse;
+import com.gr4vy.sdk.models.operations.GetApiKeyPairRequest;
+import com.gr4vy.sdk.models.operations.GetApiKeyPairRequestBuilder;
+import com.gr4vy.sdk.models.operations.GetApiKeyPairResponse;
+import com.gr4vy.sdk.models.operations.ListApiKeyPairsRequest;
+import com.gr4vy.sdk.models.operations.ListApiKeyPairsRequestBuilder;
+import com.gr4vy.sdk.models.operations.ListApiKeyPairsResponse;
+import com.gr4vy.sdk.models.operations.UpdateApiKeyPairRequest;
+import com.gr4vy.sdk.models.operations.UpdateApiKeyPairRequestBuilder;
+import com.gr4vy.sdk.models.operations.UpdateApiKeyPairResponse;
+import com.gr4vy.sdk.operations.CreateApiKeyPair;
+import com.gr4vy.sdk.operations.DeleteApiKeyPair;
+import com.gr4vy.sdk.operations.GetApiKeyPair;
+import com.gr4vy.sdk.operations.ListApiKeyPairs;
+import com.gr4vy.sdk.operations.UpdateApiKeyPair;
+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;
+
+
+public class ApiKeyPairs {
+ private static final Headers _headers = Headers.EMPTY;
+ private final SDKConfiguration sdkConfiguration;
+ private final AsyncApiKeyPairs asyncSDK;
+
+ ApiKeyPairs(SDKConfiguration sdkConfiguration) {
+ this.sdkConfiguration = sdkConfiguration;
+ this.asyncSDK = new AsyncApiKeyPairs(this, sdkConfiguration);
+ }
+
+ /**
+ * Switches to the async SDK.
+ *
+ * @return The async SDK
+ */
+ public AsyncApiKeyPairs async() {
+ return asyncSDK;
+ }
+
+ /**
+ * List all API key pairs
+ *
+ * List all API key pairs.
+ *
+ * @return The call builder
+ */
+ public ListApiKeyPairsRequestBuilder list() {
+ return new ListApiKeyPairsRequestBuilder(sdkConfiguration);
+ }
+
+ /**
+ * List all API key pairs
+ *
+ *
List all API key pairs.
+ *
+ * @return The response from the API call
+ * @throws RuntimeException subclass if the API call fails
+ */
+ public ListApiKeyPairsResponse listDirect() {
+ return list(JsonNullable.undefined(), Optional.empty(), Optional.empty());
+ }
+
+ /**
+ * List all API key pairs
+ *
+ *
List all API key pairs.
+ *
+ * @param cursor A pointer to the page of results to return.
+ * @param limit The maximum number of items that are returned.
+ * @param options additional options
+ * @return The response from the API call
+ * @throws RuntimeException subclass if the API call fails
+ */
+ public ListApiKeyPairsResponse list(
+ JsonNullable cursor, Optional limit,
+ Optional options) {
+ ListApiKeyPairsRequest request =
+ ListApiKeyPairsRequest
+ .builder()
+ .cursor(cursor)
+ .limit(limit)
+ .build();
+ RequestOperation operation
+ = new ListApiKeyPairs.Sync(sdkConfiguration, options, _headers);
+ return operation.handleResponse(operation.doRequest(request));
+ }
+
+ /**
+ * Create an API key pair
+ *
+ * Create a new API key pair.
+ *
+ * @return The call builder
+ */
+ public CreateApiKeyPairRequestBuilder create() {
+ return new CreateApiKeyPairRequestBuilder(sdkConfiguration);
+ }
+
+ /**
+ * Create an API key pair
+ *
+ *
Create a new API key pair.
+ *
+ * @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 CreateApiKeyPairResponse create(APIKeyPairCreate request) {
+ RequestOperation operation
+ = new CreateApiKeyPair.Sync(sdkConfiguration, _headers);
+ return operation.handleResponse(operation.doRequest(request));
+ }
+
+ /**
+ * Get an API key pair
+ *
+ * Fetches an API key pair by its ID.
+ *
+ * @return The call builder
+ */
+ public GetApiKeyPairRequestBuilder get() {
+ return new GetApiKeyPairRequestBuilder(sdkConfiguration);
+ }
+
+ /**
+ * Get an API key pair
+ *
+ *
Fetches an API key pair by its ID.
+ *
+ * @param apiKeyPairId The ID of the API key pair.
+ * @return The response from the API call
+ * @throws RuntimeException subclass if the API call fails
+ */
+ public GetApiKeyPairResponse get(String apiKeyPairId) {
+ return get(apiKeyPairId, Optional.empty());
+ }
+
+ /**
+ * Get an API key pair
+ *
+ *
Fetches an API key pair by its ID.
+ *
+ * @param apiKeyPairId The ID of the API key pair.
+ * @param options additional options
+ * @return The response from the API call
+ * @throws RuntimeException subclass if the API call fails
+ */
+ public GetApiKeyPairResponse get(String apiKeyPairId, Optional options) {
+ GetApiKeyPairRequest request =
+ GetApiKeyPairRequest
+ .builder()
+ .apiKeyPairId(apiKeyPairId)
+ .build();
+ RequestOperation operation
+ = new GetApiKeyPair.Sync(sdkConfiguration, options, _headers);
+ return operation.handleResponse(operation.doRequest(request));
+ }
+
+ /**
+ * Update an API key pair
+ *
+ * Updates an API key pair.
+ *
+ * @return The call builder
+ */
+ public UpdateApiKeyPairRequestBuilder update() {
+ return new UpdateApiKeyPairRequestBuilder(sdkConfiguration);
+ }
+
+ /**
+ * Update an API key pair
+ *
+ *
Updates an API key pair.
+ *
+ * @param apiKeyPairId The ID of the API key pair.
+ * @param apiKeyPairUpdate
+ * @return The response from the API call
+ * @throws RuntimeException subclass if the API call fails
+ */
+ public UpdateApiKeyPairResponse update(String apiKeyPairId, APIKeyPairUpdate apiKeyPairUpdate) {
+ UpdateApiKeyPairRequest request =
+ UpdateApiKeyPairRequest
+ .builder()
+ .apiKeyPairId(apiKeyPairId)
+ .apiKeyPairUpdate(apiKeyPairUpdate)
+ .build();
+ RequestOperation operation
+ = new UpdateApiKeyPair.Sync(sdkConfiguration, _headers);
+ return operation.handleResponse(operation.doRequest(request));
+ }
+
+ /**
+ * Delete an API key pair
+ *
+ * Permanently removes an API key pair.
+ *
+ * @return The call builder
+ */
+ public DeleteApiKeyPairRequestBuilder delete() {
+ return new DeleteApiKeyPairRequestBuilder(sdkConfiguration);
+ }
+
+ /**
+ * Delete an API key pair
+ *
+ *
Permanently removes an API key pair.
+ *
+ * @param apiKeyPairId The ID of the API key pair.
+ * @return The response from the API call
+ * @throws RuntimeException subclass if the API call fails
+ */
+ public DeleteApiKeyPairResponse delete(String apiKeyPairId) {
+ DeleteApiKeyPairRequest request =
+ DeleteApiKeyPairRequest
+ .builder()
+ .apiKeyPairId(apiKeyPairId)
+ .build();
+ RequestOperation operation
+ = new DeleteApiKeyPair.Sync(sdkConfiguration, _headers);
+ return operation.handleResponse(operation.doRequest(request));
+ }
+
+}
diff --git a/src/main/java/com/gr4vy/sdk/AsyncApiKeyPairs.java b/src/main/java/com/gr4vy/sdk/AsyncApiKeyPairs.java
new file mode 100644
index 00000000..ea651883
--- /dev/null
+++ b/src/main/java/com/gr4vy/sdk/AsyncApiKeyPairs.java
@@ -0,0 +1,247 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.gr4vy.sdk;
+
+import static com.gr4vy.sdk.operations.Operations.AsyncRequestOperation;
+
+import com.gr4vy.sdk.models.components.APIKeyPairCreate;
+import com.gr4vy.sdk.models.components.APIKeyPairUpdate;
+import com.gr4vy.sdk.models.operations.DeleteApiKeyPairRequest;
+import com.gr4vy.sdk.models.operations.GetApiKeyPairRequest;
+import com.gr4vy.sdk.models.operations.ListApiKeyPairsRequest;
+import com.gr4vy.sdk.models.operations.UpdateApiKeyPairRequest;
+import com.gr4vy.sdk.models.operations.async.CreateApiKeyPairRequestBuilder;
+import com.gr4vy.sdk.models.operations.async.CreateApiKeyPairResponse;
+import com.gr4vy.sdk.models.operations.async.DeleteApiKeyPairRequestBuilder;
+import com.gr4vy.sdk.models.operations.async.DeleteApiKeyPairResponse;
+import com.gr4vy.sdk.models.operations.async.GetApiKeyPairRequestBuilder;
+import com.gr4vy.sdk.models.operations.async.GetApiKeyPairResponse;
+import com.gr4vy.sdk.models.operations.async.ListApiKeyPairsRequestBuilder;
+import com.gr4vy.sdk.models.operations.async.ListApiKeyPairsResponse;
+import com.gr4vy.sdk.models.operations.async.UpdateApiKeyPairRequestBuilder;
+import com.gr4vy.sdk.models.operations.async.UpdateApiKeyPairResponse;
+import com.gr4vy.sdk.operations.CreateApiKeyPair;
+import com.gr4vy.sdk.operations.DeleteApiKeyPair;
+import com.gr4vy.sdk.operations.GetApiKeyPair;
+import com.gr4vy.sdk.operations.ListApiKeyPairs;
+import com.gr4vy.sdk.operations.UpdateApiKeyPair;
+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;
+import org.openapitools.jackson.nullable.JsonNullable;
+
+
+public class AsyncApiKeyPairs {
+ private static final Headers _headers = Headers.EMPTY;
+ private final SDKConfiguration sdkConfiguration;
+ private final ApiKeyPairs syncSDK;
+
+ AsyncApiKeyPairs(ApiKeyPairs syncSDK, SDKConfiguration sdkConfiguration) {
+ this.sdkConfiguration = sdkConfiguration;
+ this.syncSDK = syncSDK;
+ }
+
+ /**
+ * Switches to the sync SDK.
+ *
+ * @return The sync SDK
+ */
+ public ApiKeyPairs sync() {
+ return syncSDK;
+ }
+
+
+ /**
+ * List all API key pairs
+ *
+ * List all API key pairs.
+ *
+ * @return The async call builder
+ */
+ public ListApiKeyPairsRequestBuilder list() {
+ return new ListApiKeyPairsRequestBuilder(sdkConfiguration);
+ }
+
+ /**
+ * List all API key pairs
+ *
+ *
List all API key pairs.
+ *
+ * @return {@code CompletableFuture} - The async response
+ */
+ public CompletableFuture listDirect() {
+ return list(JsonNullable.undefined(), Optional.empty(), Optional.empty());
+ }
+
+ /**
+ * List all API key pairs
+ *
+ * List all API key pairs.
+ *
+ * @param cursor A pointer to the page of results to return.
+ * @param limit The maximum number of items that are returned.
+ * @param options additional options
+ * @return {@code CompletableFuture} - The async response
+ */
+ public CompletableFuture list(
+ JsonNullable cursor, Optional limit,
+ Optional options) {
+ ListApiKeyPairsRequest request =
+ ListApiKeyPairsRequest
+ .builder()
+ .cursor(cursor)
+ .limit(limit)
+ .build();
+ AsyncRequestOperation operation
+ = new ListApiKeyPairs.Async(
+ sdkConfiguration, options, sdkConfiguration.retryScheduler(),
+ _headers);
+ return operation.doRequest(request)
+ .thenCompose(operation::handleResponse);
+ }
+
+
+ /**
+ * Create an API key pair
+ *
+ * Create a new API key pair.
+ *
+ * @return The async call builder
+ */
+ public CreateApiKeyPairRequestBuilder create() {
+ return new CreateApiKeyPairRequestBuilder(sdkConfiguration);
+ }
+
+ /**
+ * Create an API key pair
+ *
+ *
Create a new API key pair.
+ *
+ * @param request The request object containing all the parameters for the API call.
+ * @return {@code CompletableFuture} - The async response
+ */
+ public CompletableFuture create(APIKeyPairCreate request) {
+ AsyncRequestOperation operation
+ = new CreateApiKeyPair.Async(sdkConfiguration, _headers);
+ return operation.doRequest(request)
+ .thenCompose(operation::handleResponse);
+ }
+
+
+ /**
+ * Get an API key pair
+ *
+ * Fetches an API key pair by its ID.
+ *
+ * @return The async call builder
+ */
+ public GetApiKeyPairRequestBuilder get() {
+ return new GetApiKeyPairRequestBuilder(sdkConfiguration);
+ }
+
+ /**
+ * Get an API key pair
+ *
+ *
Fetches an API key pair by its ID.
+ *
+ * @param apiKeyPairId The ID of the API key pair.
+ * @return {@code CompletableFuture} - The async response
+ */
+ public CompletableFuture get(String apiKeyPairId) {
+ return get(apiKeyPairId, Optional.empty());
+ }
+
+ /**
+ * Get an API key pair
+ *
+ * Fetches an API key pair by its ID.
+ *
+ * @param apiKeyPairId The ID of the API key pair.
+ * @param options additional options
+ * @return {@code CompletableFuture} - The async response
+ */
+ public CompletableFuture get(String apiKeyPairId, Optional options) {
+ GetApiKeyPairRequest request =
+ GetApiKeyPairRequest
+ .builder()
+ .apiKeyPairId(apiKeyPairId)
+ .build();
+ AsyncRequestOperation operation
+ = new GetApiKeyPair.Async(
+ sdkConfiguration, options, sdkConfiguration.retryScheduler(),
+ _headers);
+ return operation.doRequest(request)
+ .thenCompose(operation::handleResponse);
+ }
+
+
+ /**
+ * Update an API key pair
+ *
+ * Updates an API key pair.
+ *
+ * @return The async call builder
+ */
+ public UpdateApiKeyPairRequestBuilder update() {
+ return new UpdateApiKeyPairRequestBuilder(sdkConfiguration);
+ }
+
+ /**
+ * Update an API key pair
+ *
+ *
Updates an API key pair.
+ *
+ * @param apiKeyPairId The ID of the API key pair.
+ * @param apiKeyPairUpdate
+ * @return {@code CompletableFuture} - The async response
+ */
+ public CompletableFuture update(String apiKeyPairId, APIKeyPairUpdate apiKeyPairUpdate) {
+ UpdateApiKeyPairRequest request =
+ UpdateApiKeyPairRequest
+ .builder()
+ .apiKeyPairId(apiKeyPairId)
+ .apiKeyPairUpdate(apiKeyPairUpdate)
+ .build();
+ AsyncRequestOperation operation
+ = new UpdateApiKeyPair.Async(sdkConfiguration, _headers);
+ return operation.doRequest(request)
+ .thenCompose(operation::handleResponse);
+ }
+
+
+ /**
+ * Delete an API key pair
+ *
+ * Permanently removes an API key pair.
+ *
+ * @return The async call builder
+ */
+ public DeleteApiKeyPairRequestBuilder delete() {
+ return new DeleteApiKeyPairRequestBuilder(sdkConfiguration);
+ }
+
+ /**
+ * Delete an API key pair
+ *
+ *
Permanently removes an API key pair.
+ *
+ * @param apiKeyPairId The ID of the API key pair.
+ * @return {@code CompletableFuture} - The async response
+ */
+ public CompletableFuture delete(String apiKeyPairId) {
+ DeleteApiKeyPairRequest request =
+ DeleteApiKeyPairRequest
+ .builder()
+ .apiKeyPairId(apiKeyPairId)
+ .build();
+ AsyncRequestOperation operation
+ = new DeleteApiKeyPair.Async(sdkConfiguration, _headers);
+ return operation.doRequest(request)
+ .thenCompose(operation::handleResponse);
+ }
+
+}
diff --git a/src/main/java/com/gr4vy/sdk/AsyncGr4vy.java b/src/main/java/com/gr4vy/sdk/AsyncGr4vy.java
index d0751378..59bfd5b6 100644
--- a/src/main/java/com/gr4vy/sdk/AsyncGr4vy.java
+++ b/src/main/java/com/gr4vy/sdk/AsyncGr4vy.java
@@ -13,6 +13,8 @@ public class AsyncGr4vy {
private final AsyncAccountUpdater accountUpdater;
+ private final AsyncApiKeyPairs apiKeyPairs;
+
private final AsyncBuyers buyers;
private final AsyncPaymentMethods paymentMethods;
@@ -53,6 +55,10 @@ public AsyncAccountUpdater accountUpdater() {
return accountUpdater;
}
+ public AsyncApiKeyPairs apiKeyPairs() {
+ return apiKeyPairs;
+ }
+
public AsyncBuyers buyers() {
return buyers;
}
@@ -132,6 +138,7 @@ public AsyncPaymentLinks paymentLinks() {
this.syncSDK = syncSDK;
this.sdkConfiguration = sdkConfiguration;
this.accountUpdater = new AsyncAccountUpdater(syncSDK.accountUpdater(), sdkConfiguration);
+ this.apiKeyPairs = new AsyncApiKeyPairs(syncSDK.apiKeyPairs(), sdkConfiguration);
this.buyers = new AsyncBuyers(syncSDK.buyers(), sdkConfiguration);
this.paymentMethods = new AsyncPaymentMethods(syncSDK.paymentMethods(), sdkConfiguration);
this.giftCards = new AsyncGiftCards(syncSDK.giftCards(), sdkConfiguration);
diff --git a/src/main/java/com/gr4vy/sdk/Gr4vy.java b/src/main/java/com/gr4vy/sdk/Gr4vy.java
index f7d963e6..8f82bd1d 100644
--- a/src/main/java/com/gr4vy/sdk/Gr4vy.java
+++ b/src/main/java/com/gr4vy/sdk/Gr4vy.java
@@ -55,6 +55,9 @@ public String server() {
private final AccountUpdater accountUpdater;
+ private final ApiKeyPairs apiKeyPairs;
+
+
private final Buyers buyers;
@@ -114,6 +117,11 @@ public AccountUpdater accountUpdater() {
}
+ public ApiKeyPairs apiKeyPairs() {
+ return apiKeyPairs;
+ }
+
+
public Buyers buyers() {
return buyers;
}
@@ -374,6 +382,7 @@ public static Builder builder() {
private Gr4vy(SDKConfiguration sdkConfiguration) {
sdkConfiguration.initialize();
this.accountUpdater = new AccountUpdater(sdkConfiguration);
+ this.apiKeyPairs = new ApiKeyPairs(sdkConfiguration);
this.buyers = new Buyers(sdkConfiguration);
this.paymentMethods = new PaymentMethods(sdkConfiguration);
this.giftCards = new GiftCards(sdkConfiguration);
diff --git a/src/main/java/com/gr4vy/sdk/SDKConfiguration.java b/src/main/java/com/gr4vy/sdk/SDKConfiguration.java
index ae73a2e6..86ad435c 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.101";
- public static final String GEN_VERSION = "2.914.0";
+ public static final String SDK_VERSION = "2.16.102";
+ public static final String GEN_VERSION = "2.915.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/components/APIKeyPair.java b/src/main/java/com/gr4vy/sdk/models/components/APIKeyPair.java
new file mode 100644
index 00000000..8893253f
--- /dev/null
+++ b/src/main/java/com/gr4vy/sdk/models/components/APIKeyPair.java
@@ -0,0 +1,637 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.gr4vy.sdk.models.components;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.gr4vy.sdk.utils.LazySingletonValue;
+import com.gr4vy.sdk.utils.Utils;
+import java.lang.Boolean;
+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;
+
+
+public class APIKeyPair {
+ /**
+ * The type of this resource.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("type")
+ private Optional type;
+
+ /**
+ * The ID for the API key pair.
+ */
+ @JsonProperty("id")
+ private String id;
+
+ /**
+ * The unique thumbprint that identifies the API key pair.
+ */
+ @JsonProperty("thumbprint")
+ private String thumbprint;
+
+ /**
+ * The display name for the API key pair.
+ */
+ @JsonProperty("display_name")
+ private String displayName;
+
+
+ @JsonProperty("algorithm")
+ private CertificateAlgorithm algorithm;
+
+ /**
+ * Whether the API key pair is active and can be used to authenticate.
+ */
+ @JsonProperty("active")
+ private boolean active;
+
+ /**
+ * The PEM-encoded private key. Only returned once, in the response to creating the API key pair, and
+ * only when Gr4vy generated the key pair. Store it securely, as it cannot be retrieved later.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("private_key")
+ private JsonNullable privateKey;
+
+ /**
+ * The date and time when this API key pair was created.
+ */
+ @JsonProperty("created_at")
+ private OffsetDateTime createdAt;
+
+ /**
+ * The date and time when this API key pair was last updated.
+ */
+ @JsonProperty("updated_at")
+ private OffsetDateTime updatedAt;
+
+ /**
+ * The user or API key pair that created this API key pair.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("creator")
+ private JsonNullable extends ApiRoutersApiKeyPairsSchemasCreator> creator;
+
+ /**
+ * The merchant accounts this API key pair has access to. An empty list means it has access to all
+ * merchant accounts.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("merchant_accounts")
+ private Optional extends List> merchantAccounts;
+
+ /**
+ * The roles assigned to this API key pair.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("roles")
+ private Optional extends List> roles;
+
+ @JsonCreator
+ public APIKeyPair(
+ @JsonProperty("id") String id,
+ @JsonProperty("thumbprint") String thumbprint,
+ @JsonProperty("display_name") String displayName,
+ @JsonProperty("algorithm") CertificateAlgorithm algorithm,
+ @JsonProperty("active") boolean active,
+ @JsonProperty("private_key") JsonNullable privateKey,
+ @JsonProperty("created_at") OffsetDateTime createdAt,
+ @JsonProperty("updated_at") OffsetDateTime updatedAt,
+ @JsonProperty("creator") JsonNullable extends ApiRoutersApiKeyPairsSchemasCreator> creator,
+ @JsonProperty("merchant_accounts") Optional extends List> merchantAccounts,
+ @JsonProperty("roles") Optional extends List> roles) {
+ Utils.checkNotNull(id, "id");
+ Utils.checkNotNull(thumbprint, "thumbprint");
+ Utils.checkNotNull(displayName, "displayName");
+ Utils.checkNotNull(algorithm, "algorithm");
+ Utils.checkNotNull(active, "active");
+ Utils.checkNotNull(privateKey, "privateKey");
+ Utils.checkNotNull(createdAt, "createdAt");
+ Utils.checkNotNull(updatedAt, "updatedAt");
+ Utils.checkNotNull(creator, "creator");
+ Utils.checkNotNull(merchantAccounts, "merchantAccounts");
+ Utils.checkNotNull(roles, "roles");
+ this.type = Builder._SINGLETON_VALUE_Type.value();
+ this.id = id;
+ this.thumbprint = thumbprint;
+ this.displayName = displayName;
+ this.algorithm = algorithm;
+ this.active = active;
+ this.privateKey = privateKey;
+ this.createdAt = createdAt;
+ this.updatedAt = updatedAt;
+ this.creator = creator;
+ this.merchantAccounts = merchantAccounts;
+ this.roles = roles;
+ }
+
+ public APIKeyPair(
+ String id,
+ String thumbprint,
+ String displayName,
+ CertificateAlgorithm algorithm,
+ boolean active,
+ OffsetDateTime createdAt,
+ OffsetDateTime updatedAt) {
+ this(id, thumbprint, displayName,
+ algorithm, active, JsonNullable.undefined(),
+ createdAt, updatedAt, JsonNullable.undefined(),
+ Optional.empty(), Optional.empty());
+ }
+
+ /**
+ * The type of this resource.
+ */
+ @JsonIgnore
+ public Optional type() {
+ return type;
+ }
+
+ /**
+ * The ID for the API key pair.
+ */
+ @JsonIgnore
+ public String id() {
+ return id;
+ }
+
+ /**
+ * The unique thumbprint that identifies the API key pair.
+ */
+ @JsonIgnore
+ public String thumbprint() {
+ return thumbprint;
+ }
+
+ /**
+ * The display name for the API key pair.
+ */
+ @JsonIgnore
+ public String displayName() {
+ return displayName;
+ }
+
+ @JsonIgnore
+ public CertificateAlgorithm algorithm() {
+ return algorithm;
+ }
+
+ /**
+ * Whether the API key pair is active and can be used to authenticate.
+ */
+ @JsonIgnore
+ public boolean active() {
+ return active;
+ }
+
+ /**
+ * The PEM-encoded private key. Only returned once, in the response to creating the API key pair, and
+ * only when Gr4vy generated the key pair. Store it securely, as it cannot be retrieved later.
+ */
+ @JsonIgnore
+ public JsonNullable privateKey() {
+ return privateKey;
+ }
+
+ /**
+ * The date and time when this API key pair was created.
+ */
+ @JsonIgnore
+ public OffsetDateTime createdAt() {
+ return createdAt;
+ }
+
+ /**
+ * The date and time when this API key pair was last updated.
+ */
+ @JsonIgnore
+ public OffsetDateTime updatedAt() {
+ return updatedAt;
+ }
+
+ /**
+ * The user or API key pair that created this API key pair.
+ */
+ @SuppressWarnings("unchecked")
+ @JsonIgnore
+ public JsonNullable creator() {
+ return (JsonNullable) creator;
+ }
+
+ /**
+ * The merchant accounts this API key pair has access to. An empty list means it has access to all
+ * merchant accounts.
+ */
+ @SuppressWarnings("unchecked")
+ @JsonIgnore
+ public Optional> merchantAccounts() {
+ return (Optional>) merchantAccounts;
+ }
+
+ /**
+ * The roles assigned to this API key pair.
+ */
+ @SuppressWarnings("unchecked")
+ @JsonIgnore
+ public Optional> roles() {
+ return (Optional>) roles;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+
+ /**
+ * The ID for the API key pair.
+ */
+ public APIKeyPair withId(String id) {
+ Utils.checkNotNull(id, "id");
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The unique thumbprint that identifies the API key pair.
+ */
+ public APIKeyPair withThumbprint(String thumbprint) {
+ Utils.checkNotNull(thumbprint, "thumbprint");
+ this.thumbprint = thumbprint;
+ return this;
+ }
+
+ /**
+ * The display name for the API key pair.
+ */
+ public APIKeyPair withDisplayName(String displayName) {
+ Utils.checkNotNull(displayName, "displayName");
+ this.displayName = displayName;
+ return this;
+ }
+
+ public APIKeyPair withAlgorithm(CertificateAlgorithm algorithm) {
+ Utils.checkNotNull(algorithm, "algorithm");
+ this.algorithm = algorithm;
+ return this;
+ }
+
+ /**
+ * Whether the API key pair is active and can be used to authenticate.
+ */
+ public APIKeyPair withActive(boolean active) {
+ Utils.checkNotNull(active, "active");
+ this.active = active;
+ return this;
+ }
+
+ /**
+ * The PEM-encoded private key. Only returned once, in the response to creating the API key pair, and
+ * only when Gr4vy generated the key pair. Store it securely, as it cannot be retrieved later.
+ */
+ public APIKeyPair withPrivateKey(String privateKey) {
+ Utils.checkNotNull(privateKey, "privateKey");
+ this.privateKey = JsonNullable.of(privateKey);
+ return this;
+ }
+
+ /**
+ * The PEM-encoded private key. Only returned once, in the response to creating the API key pair, and
+ * only when Gr4vy generated the key pair. Store it securely, as it cannot be retrieved later.
+ */
+ public APIKeyPair withPrivateKey(JsonNullable privateKey) {
+ Utils.checkNotNull(privateKey, "privateKey");
+ this.privateKey = privateKey;
+ return this;
+ }
+
+ /**
+ * The date and time when this API key pair was created.
+ */
+ public APIKeyPair withCreatedAt(OffsetDateTime createdAt) {
+ Utils.checkNotNull(createdAt, "createdAt");
+ this.createdAt = createdAt;
+ return this;
+ }
+
+ /**
+ * The date and time when this API key pair was last updated.
+ */
+ public APIKeyPair withUpdatedAt(OffsetDateTime updatedAt) {
+ Utils.checkNotNull(updatedAt, "updatedAt");
+ this.updatedAt = updatedAt;
+ return this;
+ }
+
+ /**
+ * The user or API key pair that created this API key pair.
+ */
+ public APIKeyPair withCreator(ApiRoutersApiKeyPairsSchemasCreator creator) {
+ Utils.checkNotNull(creator, "creator");
+ this.creator = JsonNullable.of(creator);
+ return this;
+ }
+
+ /**
+ * The user or API key pair that created this API key pair.
+ */
+ public APIKeyPair withCreator(JsonNullable extends ApiRoutersApiKeyPairsSchemasCreator> creator) {
+ Utils.checkNotNull(creator, "creator");
+ this.creator = creator;
+ return this;
+ }
+
+ /**
+ * The merchant accounts this API key pair has access to. An empty list means it has access to all
+ * merchant accounts.
+ */
+ public APIKeyPair withMerchantAccounts(List merchantAccounts) {
+ Utils.checkNotNull(merchantAccounts, "merchantAccounts");
+ this.merchantAccounts = Optional.ofNullable(merchantAccounts);
+ return this;
+ }
+
+
+ /**
+ * The merchant accounts this API key pair has access to. An empty list means it has access to all
+ * merchant accounts.
+ */
+ public APIKeyPair withMerchantAccounts(Optional extends List> merchantAccounts) {
+ Utils.checkNotNull(merchantAccounts, "merchantAccounts");
+ this.merchantAccounts = merchantAccounts;
+ return this;
+ }
+
+ /**
+ * The roles assigned to this API key pair.
+ */
+ public APIKeyPair withRoles(List roles) {
+ Utils.checkNotNull(roles, "roles");
+ this.roles = Optional.ofNullable(roles);
+ return this;
+ }
+
+
+ /**
+ * The roles assigned to this API key pair.
+ */
+ public APIKeyPair withRoles(Optional extends List> roles) {
+ Utils.checkNotNull(roles, "roles");
+ this.roles = roles;
+ return this;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ APIKeyPair other = (APIKeyPair) o;
+ return
+ Utils.enhancedDeepEquals(this.type, other.type) &&
+ Utils.enhancedDeepEquals(this.id, other.id) &&
+ Utils.enhancedDeepEquals(this.thumbprint, other.thumbprint) &&
+ Utils.enhancedDeepEquals(this.displayName, other.displayName) &&
+ Utils.enhancedDeepEquals(this.algorithm, other.algorithm) &&
+ Utils.enhancedDeepEquals(this.active, other.active) &&
+ Utils.enhancedDeepEquals(this.privateKey, other.privateKey) &&
+ Utils.enhancedDeepEquals(this.createdAt, other.createdAt) &&
+ Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) &&
+ Utils.enhancedDeepEquals(this.creator, other.creator) &&
+ Utils.enhancedDeepEquals(this.merchantAccounts, other.merchantAccounts) &&
+ Utils.enhancedDeepEquals(this.roles, other.roles);
+ }
+
+ @Override
+ public int hashCode() {
+ return Utils.enhancedHash(
+ type, id, thumbprint,
+ displayName, algorithm, active,
+ privateKey, createdAt, updatedAt,
+ creator, merchantAccounts, roles);
+ }
+
+ @Override
+ public String toString() {
+ return Utils.toString(APIKeyPair.class,
+ "type", type,
+ "id", id,
+ "thumbprint", thumbprint,
+ "displayName", displayName,
+ "algorithm", algorithm,
+ "active", active,
+ "privateKey", privateKey,
+ "createdAt", createdAt,
+ "updatedAt", updatedAt,
+ "creator", creator,
+ "merchantAccounts", merchantAccounts,
+ "roles", roles);
+ }
+
+ @SuppressWarnings("UnusedReturnValue")
+ public final static class Builder {
+
+ private String id;
+
+ private String thumbprint;
+
+ private String displayName;
+
+ private CertificateAlgorithm algorithm;
+
+ private Boolean active;
+
+ private JsonNullable privateKey = JsonNullable.undefined();
+
+ private OffsetDateTime createdAt;
+
+ private OffsetDateTime updatedAt;
+
+ private JsonNullable extends ApiRoutersApiKeyPairsSchemasCreator> creator = JsonNullable.undefined();
+
+ private Optional extends List> merchantAccounts = Optional.empty();
+
+ private Optional extends List> roles = Optional.empty();
+
+ private Builder() {
+ // force use of static builder() method
+ }
+
+
+ /**
+ * The ID for the API key pair.
+ */
+ public Builder id(String id) {
+ Utils.checkNotNull(id, "id");
+ this.id = id;
+ return this;
+ }
+
+
+ /**
+ * The unique thumbprint that identifies the API key pair.
+ */
+ public Builder thumbprint(String thumbprint) {
+ Utils.checkNotNull(thumbprint, "thumbprint");
+ this.thumbprint = thumbprint;
+ return this;
+ }
+
+
+ /**
+ * The display name for the API key pair.
+ */
+ public Builder displayName(String displayName) {
+ Utils.checkNotNull(displayName, "displayName");
+ this.displayName = displayName;
+ return this;
+ }
+
+
+ public Builder algorithm(CertificateAlgorithm algorithm) {
+ Utils.checkNotNull(algorithm, "algorithm");
+ this.algorithm = algorithm;
+ return this;
+ }
+
+
+ /**
+ * Whether the API key pair is active and can be used to authenticate.
+ */
+ public Builder active(boolean active) {
+ Utils.checkNotNull(active, "active");
+ this.active = active;
+ return this;
+ }
+
+
+ /**
+ * The PEM-encoded private key. Only returned once, in the response to creating the API key pair, and
+ * only when Gr4vy generated the key pair. Store it securely, as it cannot be retrieved later.
+ */
+ public Builder privateKey(String privateKey) {
+ Utils.checkNotNull(privateKey, "privateKey");
+ this.privateKey = JsonNullable.of(privateKey);
+ return this;
+ }
+
+ /**
+ * The PEM-encoded private key. Only returned once, in the response to creating the API key pair, and
+ * only when Gr4vy generated the key pair. Store it securely, as it cannot be retrieved later.
+ */
+ public Builder privateKey(JsonNullable privateKey) {
+ Utils.checkNotNull(privateKey, "privateKey");
+ this.privateKey = privateKey;
+ return this;
+ }
+
+
+ /**
+ * The date and time when this API key pair was created.
+ */
+ public Builder createdAt(OffsetDateTime createdAt) {
+ Utils.checkNotNull(createdAt, "createdAt");
+ this.createdAt = createdAt;
+ return this;
+ }
+
+
+ /**
+ * The date and time when this API key pair was last updated.
+ */
+ public Builder updatedAt(OffsetDateTime updatedAt) {
+ Utils.checkNotNull(updatedAt, "updatedAt");
+ this.updatedAt = updatedAt;
+ return this;
+ }
+
+
+ /**
+ * The user or API key pair that created this API key pair.
+ */
+ public Builder creator(ApiRoutersApiKeyPairsSchemasCreator creator) {
+ Utils.checkNotNull(creator, "creator");
+ this.creator = JsonNullable.of(creator);
+ return this;
+ }
+
+ /**
+ * The user or API key pair that created this API key pair.
+ */
+ public Builder creator(JsonNullable extends ApiRoutersApiKeyPairsSchemasCreator> creator) {
+ Utils.checkNotNull(creator, "creator");
+ this.creator = creator;
+ return this;
+ }
+
+
+ /**
+ * The merchant accounts this API key pair has access to. An empty list means it has access to all
+ * merchant accounts.
+ */
+ public Builder merchantAccounts(List merchantAccounts) {
+ Utils.checkNotNull(merchantAccounts, "merchantAccounts");
+ this.merchantAccounts = Optional.ofNullable(merchantAccounts);
+ return this;
+ }
+
+ /**
+ * The merchant accounts this API key pair has access to. An empty list means it has access to all
+ * merchant accounts.
+ */
+ public Builder merchantAccounts(Optional extends List> merchantAccounts) {
+ Utils.checkNotNull(merchantAccounts, "merchantAccounts");
+ this.merchantAccounts = merchantAccounts;
+ return this;
+ }
+
+
+ /**
+ * The roles assigned to this API key pair.
+ */
+ public Builder roles(List roles) {
+ Utils.checkNotNull(roles, "roles");
+ this.roles = Optional.ofNullable(roles);
+ return this;
+ }
+
+ /**
+ * The roles assigned to this API key pair.
+ */
+ public Builder roles(Optional extends List> roles) {
+ Utils.checkNotNull(roles, "roles");
+ this.roles = roles;
+ return this;
+ }
+
+ public APIKeyPair build() {
+
+ return new APIKeyPair(
+ id, thumbprint, displayName,
+ algorithm, active, privateKey,
+ createdAt, updatedAt, creator,
+ merchantAccounts, roles);
+ }
+
+
+ private static final LazySingletonValue> _SINGLETON_VALUE_Type =
+ new LazySingletonValue<>(
+ "type",
+ "\"api-key-pair\"",
+ new TypeReference>() {});
+ }
+}
diff --git a/src/main/java/com/gr4vy/sdk/models/components/APIKeyPairCreate.java b/src/main/java/com/gr4vy/sdk/models/components/APIKeyPairCreate.java
new file mode 100644
index 00000000..25167bbf
--- /dev/null
+++ b/src/main/java/com/gr4vy/sdk/models/components/APIKeyPairCreate.java
@@ -0,0 +1,408 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.gr4vy.sdk.models.components;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.gr4vy.sdk.utils.LazySingletonValue;
+import com.gr4vy.sdk.utils.Utils;
+import java.lang.Boolean;
+import java.lang.Override;
+import java.lang.String;
+import java.lang.SuppressWarnings;
+import java.util.List;
+import java.util.Optional;
+import org.openapitools.jackson.nullable.JsonNullable;
+
+
+public class APIKeyPairCreate {
+ /**
+ * The display name for the API key pair.
+ */
+ @JsonProperty("display_name")
+ private String displayName;
+
+
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("algorithm")
+ private Optional extends CertificateAlgorithm> algorithm;
+
+ /**
+ * Whether the API key pair should be active and usable once created.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("active")
+ private Optional active;
+
+ /**
+ * The ID of the role to assign to the API key pair. Exactly one role is supported. The caller can only
+ * assign a role whose scopes are a subset of its own.
+ */
+ @JsonProperty("role_ids")
+ private List roleIds;
+
+ /**
+ * The IDs of the merchant accounts to associate with the API key pair. An empty list grants access to
+ * all merchant accounts. The caller can only assign merchant accounts it has access to.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("merchant_account_ids")
+ private Optional extends List> merchantAccountIds;
+
+ /**
+ * A PEM-encoded ECDSA P-521 (ES512) public key. Provide this to register your own key pair (bring your
+ * own key); If omitted, Gr4vy will generate the key pair and return the private key.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("public_key")
+ private JsonNullable publicKey;
+
+ @JsonCreator
+ public APIKeyPairCreate(
+ @JsonProperty("display_name") String displayName,
+ @JsonProperty("algorithm") Optional extends CertificateAlgorithm> algorithm,
+ @JsonProperty("active") Optional active,
+ @JsonProperty("role_ids") List roleIds,
+ @JsonProperty("merchant_account_ids") Optional extends List> merchantAccountIds,
+ @JsonProperty("public_key") JsonNullable publicKey) {
+ Utils.checkNotNull(displayName, "displayName");
+ Utils.checkNotNull(algorithm, "algorithm");
+ Utils.checkNotNull(active, "active");
+ Utils.checkNotNull(roleIds, "roleIds");
+ Utils.checkNotNull(merchantAccountIds, "merchantAccountIds");
+ Utils.checkNotNull(publicKey, "publicKey");
+ this.displayName = displayName;
+ this.algorithm = algorithm;
+ this.active = active;
+ this.roleIds = roleIds;
+ this.merchantAccountIds = merchantAccountIds;
+ this.publicKey = publicKey;
+ }
+
+ public APIKeyPairCreate(
+ String displayName,
+ List roleIds) {
+ this(displayName, Optional.empty(), Optional.empty(),
+ roleIds, Optional.empty(), JsonNullable.undefined());
+ }
+
+ /**
+ * The display name for the API key pair.
+ */
+ @JsonIgnore
+ public String displayName() {
+ return displayName;
+ }
+
+ @SuppressWarnings("unchecked")
+ @JsonIgnore
+ public Optional algorithm() {
+ return (Optional) algorithm;
+ }
+
+ /**
+ * Whether the API key pair should be active and usable once created.
+ */
+ @JsonIgnore
+ public Optional active() {
+ return active;
+ }
+
+ /**
+ * The ID of the role to assign to the API key pair. Exactly one role is supported. The caller can only
+ * assign a role whose scopes are a subset of its own.
+ */
+ @JsonIgnore
+ public List roleIds() {
+ return roleIds;
+ }
+
+ /**
+ * The IDs of the merchant accounts to associate with the API key pair. An empty list grants access to
+ * all merchant accounts. The caller can only assign merchant accounts it has access to.
+ */
+ @SuppressWarnings("unchecked")
+ @JsonIgnore
+ public Optional> merchantAccountIds() {
+ return (Optional>) merchantAccountIds;
+ }
+
+ /**
+ * A PEM-encoded ECDSA P-521 (ES512) public key. Provide this to register your own key pair (bring your
+ * own key); If omitted, Gr4vy will generate the key pair and return the private key.
+ */
+ @JsonIgnore
+ public JsonNullable publicKey() {
+ return publicKey;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+
+ /**
+ * The display name for the API key pair.
+ */
+ public APIKeyPairCreate withDisplayName(String displayName) {
+ Utils.checkNotNull(displayName, "displayName");
+ this.displayName = displayName;
+ return this;
+ }
+
+ public APIKeyPairCreate withAlgorithm(CertificateAlgorithm algorithm) {
+ Utils.checkNotNull(algorithm, "algorithm");
+ this.algorithm = Optional.ofNullable(algorithm);
+ return this;
+ }
+
+
+ public APIKeyPairCreate withAlgorithm(Optional extends CertificateAlgorithm> algorithm) {
+ Utils.checkNotNull(algorithm, "algorithm");
+ this.algorithm = algorithm;
+ return this;
+ }
+
+ /**
+ * Whether the API key pair should be active and usable once created.
+ */
+ public APIKeyPairCreate withActive(boolean active) {
+ Utils.checkNotNull(active, "active");
+ this.active = Optional.ofNullable(active);
+ return this;
+ }
+
+
+ /**
+ * Whether the API key pair should be active and usable once created.
+ */
+ public APIKeyPairCreate withActive(Optional active) {
+ Utils.checkNotNull(active, "active");
+ this.active = active;
+ return this;
+ }
+
+ /**
+ * The ID of the role to assign to the API key pair. Exactly one role is supported. The caller can only
+ * assign a role whose scopes are a subset of its own.
+ */
+ public APIKeyPairCreate withRoleIds(List roleIds) {
+ Utils.checkNotNull(roleIds, "roleIds");
+ this.roleIds = roleIds;
+ return this;
+ }
+
+ /**
+ * The IDs of the merchant accounts to associate with the API key pair. An empty list grants access to
+ * all merchant accounts. The caller can only assign merchant accounts it has access to.
+ */
+ public APIKeyPairCreate withMerchantAccountIds(List merchantAccountIds) {
+ Utils.checkNotNull(merchantAccountIds, "merchantAccountIds");
+ this.merchantAccountIds = Optional.ofNullable(merchantAccountIds);
+ return this;
+ }
+
+
+ /**
+ * The IDs of the merchant accounts to associate with the API key pair. An empty list grants access to
+ * all merchant accounts. The caller can only assign merchant accounts it has access to.
+ */
+ public APIKeyPairCreate withMerchantAccountIds(Optional extends List> merchantAccountIds) {
+ Utils.checkNotNull(merchantAccountIds, "merchantAccountIds");
+ this.merchantAccountIds = merchantAccountIds;
+ return this;
+ }
+
+ /**
+ * A PEM-encoded ECDSA P-521 (ES512) public key. Provide this to register your own key pair (bring your
+ * own key); If omitted, Gr4vy will generate the key pair and return the private key.
+ */
+ public APIKeyPairCreate withPublicKey(String publicKey) {
+ Utils.checkNotNull(publicKey, "publicKey");
+ this.publicKey = JsonNullable.of(publicKey);
+ return this;
+ }
+
+ /**
+ * A PEM-encoded ECDSA P-521 (ES512) public key. Provide this to register your own key pair (bring your
+ * own key); If omitted, Gr4vy will generate the key pair and return the private key.
+ */
+ public APIKeyPairCreate withPublicKey(JsonNullable publicKey) {
+ Utils.checkNotNull(publicKey, "publicKey");
+ this.publicKey = publicKey;
+ return this;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ APIKeyPairCreate other = (APIKeyPairCreate) o;
+ return
+ Utils.enhancedDeepEquals(this.displayName, other.displayName) &&
+ Utils.enhancedDeepEquals(this.algorithm, other.algorithm) &&
+ Utils.enhancedDeepEquals(this.active, other.active) &&
+ Utils.enhancedDeepEquals(this.roleIds, other.roleIds) &&
+ Utils.enhancedDeepEquals(this.merchantAccountIds, other.merchantAccountIds) &&
+ Utils.enhancedDeepEquals(this.publicKey, other.publicKey);
+ }
+
+ @Override
+ public int hashCode() {
+ return Utils.enhancedHash(
+ displayName, algorithm, active,
+ roleIds, merchantAccountIds, publicKey);
+ }
+
+ @Override
+ public String toString() {
+ return Utils.toString(APIKeyPairCreate.class,
+ "displayName", displayName,
+ "algorithm", algorithm,
+ "active", active,
+ "roleIds", roleIds,
+ "merchantAccountIds", merchantAccountIds,
+ "publicKey", publicKey);
+ }
+
+ @SuppressWarnings("UnusedReturnValue")
+ public final static class Builder {
+
+ private String displayName;
+
+ private Optional extends CertificateAlgorithm> algorithm = Optional.empty();
+
+ private Optional active;
+
+ private List roleIds;
+
+ private Optional extends List> merchantAccountIds = Optional.empty();
+
+ private JsonNullable publicKey = JsonNullable.undefined();
+
+ private Builder() {
+ // force use of static builder() method
+ }
+
+
+ /**
+ * The display name for the API key pair.
+ */
+ public Builder displayName(String displayName) {
+ Utils.checkNotNull(displayName, "displayName");
+ this.displayName = displayName;
+ return this;
+ }
+
+
+ public Builder algorithm(CertificateAlgorithm algorithm) {
+ Utils.checkNotNull(algorithm, "algorithm");
+ this.algorithm = Optional.ofNullable(algorithm);
+ return this;
+ }
+
+ public Builder algorithm(Optional extends CertificateAlgorithm> algorithm) {
+ Utils.checkNotNull(algorithm, "algorithm");
+ this.algorithm = algorithm;
+ return this;
+ }
+
+
+ /**
+ * Whether the API key pair should be active and usable once created.
+ */
+ public Builder active(boolean active) {
+ Utils.checkNotNull(active, "active");
+ this.active = Optional.ofNullable(active);
+ return this;
+ }
+
+ /**
+ * Whether the API key pair should be active and usable once created.
+ */
+ public Builder active(Optional active) {
+ Utils.checkNotNull(active, "active");
+ this.active = active;
+ return this;
+ }
+
+
+ /**
+ * The ID of the role to assign to the API key pair. Exactly one role is supported. The caller can only
+ * assign a role whose scopes are a subset of its own.
+ */
+ public Builder roleIds(List roleIds) {
+ Utils.checkNotNull(roleIds, "roleIds");
+ this.roleIds = roleIds;
+ return this;
+ }
+
+
+ /**
+ * The IDs of the merchant accounts to associate with the API key pair. An empty list grants access to
+ * all merchant accounts. The caller can only assign merchant accounts it has access to.
+ */
+ public Builder merchantAccountIds(List merchantAccountIds) {
+ Utils.checkNotNull(merchantAccountIds, "merchantAccountIds");
+ this.merchantAccountIds = Optional.ofNullable(merchantAccountIds);
+ return this;
+ }
+
+ /**
+ * The IDs of the merchant accounts to associate with the API key pair. An empty list grants access to
+ * all merchant accounts. The caller can only assign merchant accounts it has access to.
+ */
+ public Builder merchantAccountIds(Optional extends List> merchantAccountIds) {
+ Utils.checkNotNull(merchantAccountIds, "merchantAccountIds");
+ this.merchantAccountIds = merchantAccountIds;
+ return this;
+ }
+
+
+ /**
+ * A PEM-encoded ECDSA P-521 (ES512) public key. Provide this to register your own key pair (bring your
+ * own key); If omitted, Gr4vy will generate the key pair and return the private key.
+ */
+ public Builder publicKey(String publicKey) {
+ Utils.checkNotNull(publicKey, "publicKey");
+ this.publicKey = JsonNullable.of(publicKey);
+ return this;
+ }
+
+ /**
+ * A PEM-encoded ECDSA P-521 (ES512) public key. Provide this to register your own key pair (bring your
+ * own key); If omitted, Gr4vy will generate the key pair and return the private key.
+ */
+ public Builder publicKey(JsonNullable publicKey) {
+ Utils.checkNotNull(publicKey, "publicKey");
+ this.publicKey = publicKey;
+ return this;
+ }
+
+ public APIKeyPairCreate build() {
+ if (active == null) {
+ active = _SINGLETON_VALUE_Active.value();
+ }
+
+ return new APIKeyPairCreate(
+ displayName, algorithm, active,
+ roleIds, merchantAccountIds, publicKey);
+ }
+
+
+ private static final LazySingletonValue> _SINGLETON_VALUE_Active =
+ new LazySingletonValue<>(
+ "active",
+ "true",
+ new TypeReference>() {});
+ }
+}
diff --git a/src/main/java/com/gr4vy/sdk/models/components/APIKeyPairUpdate.java b/src/main/java/com/gr4vy/sdk/models/components/APIKeyPairUpdate.java
new file mode 100644
index 00000000..7848e7ab
--- /dev/null
+++ b/src/main/java/com/gr4vy/sdk/models/components/APIKeyPairUpdate.java
@@ -0,0 +1,301 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.gr4vy.sdk.models.components;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.gr4vy.sdk.utils.Utils;
+import java.lang.Boolean;
+import java.lang.Override;
+import java.lang.String;
+import java.lang.SuppressWarnings;
+import java.util.List;
+import org.openapitools.jackson.nullable.JsonNullable;
+
+
+public class APIKeyPairUpdate {
+ /**
+ * The display name for the API key pair.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("display_name")
+ private JsonNullable displayName;
+
+ /**
+ * Whether the API key pair is active and can be used to authenticate.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("active")
+ private JsonNullable active;
+
+
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("role_ids")
+ private JsonNullable extends List> roleIds;
+
+ /**
+ * The IDs of the merchant accounts to associate with the API key pair. The caller can only assign
+ * merchant accounts it has access to.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("merchant_account_ids")
+ private JsonNullable extends List> merchantAccountIds;
+
+ @JsonCreator
+ public APIKeyPairUpdate(
+ @JsonProperty("display_name") JsonNullable displayName,
+ @JsonProperty("active") JsonNullable active,
+ @JsonProperty("role_ids") JsonNullable extends List> roleIds,
+ @JsonProperty("merchant_account_ids") JsonNullable extends List> merchantAccountIds) {
+ Utils.checkNotNull(displayName, "displayName");
+ Utils.checkNotNull(active, "active");
+ Utils.checkNotNull(roleIds, "roleIds");
+ Utils.checkNotNull(merchantAccountIds, "merchantAccountIds");
+ this.displayName = displayName;
+ this.active = active;
+ this.roleIds = roleIds;
+ this.merchantAccountIds = merchantAccountIds;
+ }
+
+ public APIKeyPairUpdate() {
+ this(JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(),
+ JsonNullable.undefined());
+ }
+
+ /**
+ * The display name for the API key pair.
+ */
+ @JsonIgnore
+ public JsonNullable displayName() {
+ return displayName;
+ }
+
+ /**
+ * Whether the API key pair is active and can be used to authenticate.
+ */
+ @JsonIgnore
+ public JsonNullable active() {
+ return active;
+ }
+
+ @SuppressWarnings("unchecked")
+ @JsonIgnore
+ public JsonNullable> roleIds() {
+ return (JsonNullable>) roleIds;
+ }
+
+ /**
+ * The IDs of the merchant accounts to associate with the API key pair. The caller can only assign
+ * merchant accounts it has access to.
+ */
+ @SuppressWarnings("unchecked")
+ @JsonIgnore
+ public JsonNullable> merchantAccountIds() {
+ return (JsonNullable>) merchantAccountIds;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+
+ /**
+ * The display name for the API key pair.
+ */
+ public APIKeyPairUpdate withDisplayName(String displayName) {
+ Utils.checkNotNull(displayName, "displayName");
+ this.displayName = JsonNullable.of(displayName);
+ return this;
+ }
+
+ /**
+ * The display name for the API key pair.
+ */
+ public APIKeyPairUpdate withDisplayName(JsonNullable displayName) {
+ Utils.checkNotNull(displayName, "displayName");
+ this.displayName = displayName;
+ return this;
+ }
+
+ /**
+ * Whether the API key pair is active and can be used to authenticate.
+ */
+ public APIKeyPairUpdate withActive(boolean active) {
+ Utils.checkNotNull(active, "active");
+ this.active = JsonNullable.of(active);
+ return this;
+ }
+
+ /**
+ * Whether the API key pair is active and can be used to authenticate.
+ */
+ public APIKeyPairUpdate withActive(JsonNullable active) {
+ Utils.checkNotNull(active, "active");
+ this.active = active;
+ return this;
+ }
+
+ public APIKeyPairUpdate withRoleIds(List roleIds) {
+ Utils.checkNotNull(roleIds, "roleIds");
+ this.roleIds = JsonNullable.of(roleIds);
+ return this;
+ }
+
+ public APIKeyPairUpdate withRoleIds(JsonNullable extends List> roleIds) {
+ Utils.checkNotNull(roleIds, "roleIds");
+ this.roleIds = roleIds;
+ return this;
+ }
+
+ /**
+ * The IDs of the merchant accounts to associate with the API key pair. The caller can only assign
+ * merchant accounts it has access to.
+ */
+ public APIKeyPairUpdate withMerchantAccountIds(List merchantAccountIds) {
+ Utils.checkNotNull(merchantAccountIds, "merchantAccountIds");
+ this.merchantAccountIds = JsonNullable.of(merchantAccountIds);
+ return this;
+ }
+
+ /**
+ * The IDs of the merchant accounts to associate with the API key pair. The caller can only assign
+ * merchant accounts it has access to.
+ */
+ public APIKeyPairUpdate withMerchantAccountIds(JsonNullable extends List> merchantAccountIds) {
+ Utils.checkNotNull(merchantAccountIds, "merchantAccountIds");
+ this.merchantAccountIds = merchantAccountIds;
+ return this;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ APIKeyPairUpdate other = (APIKeyPairUpdate) o;
+ return
+ Utils.enhancedDeepEquals(this.displayName, other.displayName) &&
+ Utils.enhancedDeepEquals(this.active, other.active) &&
+ Utils.enhancedDeepEquals(this.roleIds, other.roleIds) &&
+ Utils.enhancedDeepEquals(this.merchantAccountIds, other.merchantAccountIds);
+ }
+
+ @Override
+ public int hashCode() {
+ return Utils.enhancedHash(
+ displayName, active, roleIds,
+ merchantAccountIds);
+ }
+
+ @Override
+ public String toString() {
+ return Utils.toString(APIKeyPairUpdate.class,
+ "displayName", displayName,
+ "active", active,
+ "roleIds", roleIds,
+ "merchantAccountIds", merchantAccountIds);
+ }
+
+ @SuppressWarnings("UnusedReturnValue")
+ public final static class Builder {
+
+ private JsonNullable displayName = JsonNullable.undefined();
+
+ private JsonNullable active = JsonNullable.undefined();
+
+ private JsonNullable extends List> roleIds = JsonNullable.undefined();
+
+ private JsonNullable extends List> merchantAccountIds = JsonNullable.undefined();
+
+ private Builder() {
+ // force use of static builder() method
+ }
+
+
+ /**
+ * The display name for the API key pair.
+ */
+ public Builder displayName(String displayName) {
+ Utils.checkNotNull(displayName, "displayName");
+ this.displayName = JsonNullable.of(displayName);
+ return this;
+ }
+
+ /**
+ * The display name for the API key pair.
+ */
+ public Builder displayName(JsonNullable displayName) {
+ Utils.checkNotNull(displayName, "displayName");
+ this.displayName = displayName;
+ return this;
+ }
+
+
+ /**
+ * Whether the API key pair is active and can be used to authenticate.
+ */
+ public Builder active(boolean active) {
+ Utils.checkNotNull(active, "active");
+ this.active = JsonNullable.of(active);
+ return this;
+ }
+
+ /**
+ * Whether the API key pair is active and can be used to authenticate.
+ */
+ public Builder active(JsonNullable active) {
+ Utils.checkNotNull(active, "active");
+ this.active = active;
+ return this;
+ }
+
+
+ public Builder roleIds(List roleIds) {
+ Utils.checkNotNull(roleIds, "roleIds");
+ this.roleIds = JsonNullable.of(roleIds);
+ return this;
+ }
+
+ public Builder roleIds(JsonNullable extends List> roleIds) {
+ Utils.checkNotNull(roleIds, "roleIds");
+ this.roleIds = roleIds;
+ return this;
+ }
+
+
+ /**
+ * The IDs of the merchant accounts to associate with the API key pair. The caller can only assign
+ * merchant accounts it has access to.
+ */
+ public Builder merchantAccountIds(List merchantAccountIds) {
+ Utils.checkNotNull(merchantAccountIds, "merchantAccountIds");
+ this.merchantAccountIds = JsonNullable.of(merchantAccountIds);
+ return this;
+ }
+
+ /**
+ * The IDs of the merchant accounts to associate with the API key pair. The caller can only assign
+ * merchant accounts it has access to.
+ */
+ public Builder merchantAccountIds(JsonNullable extends List> merchantAccountIds) {
+ Utils.checkNotNull(merchantAccountIds, "merchantAccountIds");
+ this.merchantAccountIds = merchantAccountIds;
+ return this;
+ }
+
+ public APIKeyPairUpdate build() {
+
+ return new APIKeyPairUpdate(
+ displayName, active, roleIds,
+ merchantAccountIds);
+ }
+
+ }
+}
diff --git a/src/main/java/com/gr4vy/sdk/models/components/Creator.java b/src/main/java/com/gr4vy/sdk/models/components/ApiCommonSchemasCreator.java
similarity index 86%
rename from src/main/java/com/gr4vy/sdk/models/components/Creator.java
rename to src/main/java/com/gr4vy/sdk/models/components/ApiCommonSchemasCreator.java
index a051b33a..ddced322 100644
--- a/src/main/java/com/gr4vy/sdk/models/components/Creator.java
+++ b/src/main/java/com/gr4vy/sdk/models/components/ApiCommonSchemasCreator.java
@@ -11,7 +11,7 @@
import java.lang.String;
-public class Creator {
+public class ApiCommonSchemasCreator {
@JsonProperty("id")
private String id;
@@ -25,7 +25,7 @@ public class Creator {
private String emailAddress;
@JsonCreator
- public Creator(
+ public ApiCommonSchemasCreator(
@JsonProperty("id") String id,
@JsonProperty("name") String name,
@JsonProperty("email_address") String emailAddress) {
@@ -57,19 +57,19 @@ public static Builder builder() {
}
- public Creator withId(String id) {
+ public ApiCommonSchemasCreator withId(String id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
}
- public Creator withName(String name) {
+ public ApiCommonSchemasCreator withName(String name) {
Utils.checkNotNull(name, "name");
this.name = name;
return this;
}
- public Creator withEmailAddress(String emailAddress) {
+ public ApiCommonSchemasCreator withEmailAddress(String emailAddress) {
Utils.checkNotNull(emailAddress, "emailAddress");
this.emailAddress = emailAddress;
return this;
@@ -83,7 +83,7 @@ public boolean equals(java.lang.Object o) {
if (o == null || getClass() != o.getClass()) {
return false;
}
- Creator other = (Creator) o;
+ ApiCommonSchemasCreator other = (ApiCommonSchemasCreator) o;
return
Utils.enhancedDeepEquals(this.id, other.id) &&
Utils.enhancedDeepEquals(this.name, other.name) &&
@@ -98,7 +98,7 @@ public int hashCode() {
@Override
public String toString() {
- return Utils.toString(Creator.class,
+ return Utils.toString(ApiCommonSchemasCreator.class,
"id", id,
"name", name,
"emailAddress", emailAddress);
@@ -138,9 +138,9 @@ public Builder emailAddress(String emailAddress) {
return this;
}
- public Creator build() {
+ public ApiCommonSchemasCreator build() {
- return new Creator(
+ return new ApiCommonSchemasCreator(
id, name, emailAddress);
}
diff --git a/src/main/java/com/gr4vy/sdk/models/components/ApiRoutersApiKeyPairsSchemasCreator.java b/src/main/java/com/gr4vy/sdk/models/components/ApiRoutersApiKeyPairsSchemasCreator.java
new file mode 100644
index 00000000..d7cec970
--- /dev/null
+++ b/src/main/java/com/gr4vy/sdk/models/components/ApiRoutersApiKeyPairsSchemasCreator.java
@@ -0,0 +1,283 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.gr4vy.sdk.models.components;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.gr4vy.sdk.utils.Utils;
+import java.lang.Override;
+import java.lang.String;
+import org.openapitools.jackson.nullable.JsonNullable;
+
+
+public class ApiRoutersApiKeyPairsSchemasCreator {
+ /**
+ * The ID of the user or API key pair that created the API key pair.
+ */
+ @JsonProperty("id")
+ private String id;
+
+ /**
+ * The name of the user or API key pair that created the API key pair.
+ */
+ @JsonProperty("name")
+ private String name;
+
+ /**
+ * The email address of the user that created the API key pair, when it was created by a dashboard
+ * user.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("email_address")
+ private JsonNullable emailAddress;
+
+ /**
+ * The thumbprint of the API key pair that created the API key pair, when it was created by another API
+ * key.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("thumbprint")
+ private JsonNullable thumbprint;
+
+ @JsonCreator
+ public ApiRoutersApiKeyPairsSchemasCreator(
+ @JsonProperty("id") String id,
+ @JsonProperty("name") String name,
+ @JsonProperty("email_address") JsonNullable emailAddress,
+ @JsonProperty("thumbprint") JsonNullable thumbprint) {
+ Utils.checkNotNull(id, "id");
+ Utils.checkNotNull(name, "name");
+ Utils.checkNotNull(emailAddress, "emailAddress");
+ Utils.checkNotNull(thumbprint, "thumbprint");
+ this.id = id;
+ this.name = name;
+ this.emailAddress = emailAddress;
+ this.thumbprint = thumbprint;
+ }
+
+ public ApiRoutersApiKeyPairsSchemasCreator(
+ String id,
+ String name) {
+ this(id, name, JsonNullable.undefined(),
+ JsonNullable.undefined());
+ }
+
+ /**
+ * The ID of the user or API key pair that created the API key pair.
+ */
+ @JsonIgnore
+ public String id() {
+ return id;
+ }
+
+ /**
+ * The name of the user or API key pair that created the API key pair.
+ */
+ @JsonIgnore
+ public String name() {
+ return name;
+ }
+
+ /**
+ * The email address of the user that created the API key pair, when it was created by a dashboard
+ * user.
+ */
+ @JsonIgnore
+ public JsonNullable emailAddress() {
+ return emailAddress;
+ }
+
+ /**
+ * The thumbprint of the API key pair that created the API key pair, when it was created by another API
+ * key.
+ */
+ @JsonIgnore
+ public JsonNullable thumbprint() {
+ return thumbprint;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+
+ /**
+ * The ID of the user or API key pair that created the API key pair.
+ */
+ public ApiRoutersApiKeyPairsSchemasCreator withId(String id) {
+ Utils.checkNotNull(id, "id");
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The name of the user or API key pair that created the API key pair.
+ */
+ public ApiRoutersApiKeyPairsSchemasCreator withName(String name) {
+ Utils.checkNotNull(name, "name");
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * The email address of the user that created the API key pair, when it was created by a dashboard
+ * user.
+ */
+ public ApiRoutersApiKeyPairsSchemasCreator withEmailAddress(String emailAddress) {
+ Utils.checkNotNull(emailAddress, "emailAddress");
+ this.emailAddress = JsonNullable.of(emailAddress);
+ return this;
+ }
+
+ /**
+ * The email address of the user that created the API key pair, when it was created by a dashboard
+ * user.
+ */
+ public ApiRoutersApiKeyPairsSchemasCreator withEmailAddress(JsonNullable emailAddress) {
+ Utils.checkNotNull(emailAddress, "emailAddress");
+ this.emailAddress = emailAddress;
+ return this;
+ }
+
+ /**
+ * The thumbprint of the API key pair that created the API key pair, when it was created by another API
+ * key.
+ */
+ public ApiRoutersApiKeyPairsSchemasCreator withThumbprint(String thumbprint) {
+ Utils.checkNotNull(thumbprint, "thumbprint");
+ this.thumbprint = JsonNullable.of(thumbprint);
+ return this;
+ }
+
+ /**
+ * The thumbprint of the API key pair that created the API key pair, when it was created by another API
+ * key.
+ */
+ public ApiRoutersApiKeyPairsSchemasCreator withThumbprint(JsonNullable thumbprint) {
+ Utils.checkNotNull(thumbprint, "thumbprint");
+ this.thumbprint = thumbprint;
+ return this;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ApiRoutersApiKeyPairsSchemasCreator other = (ApiRoutersApiKeyPairsSchemasCreator) o;
+ return
+ Utils.enhancedDeepEquals(this.id, other.id) &&
+ Utils.enhancedDeepEquals(this.name, other.name) &&
+ Utils.enhancedDeepEquals(this.emailAddress, other.emailAddress) &&
+ Utils.enhancedDeepEquals(this.thumbprint, other.thumbprint);
+ }
+
+ @Override
+ public int hashCode() {
+ return Utils.enhancedHash(
+ id, name, emailAddress,
+ thumbprint);
+ }
+
+ @Override
+ public String toString() {
+ return Utils.toString(ApiRoutersApiKeyPairsSchemasCreator.class,
+ "id", id,
+ "name", name,
+ "emailAddress", emailAddress,
+ "thumbprint", thumbprint);
+ }
+
+ @SuppressWarnings("UnusedReturnValue")
+ public final static class Builder {
+
+ private String id;
+
+ private String name;
+
+ private JsonNullable emailAddress = JsonNullable.undefined();
+
+ private JsonNullable thumbprint = JsonNullable.undefined();
+
+ private Builder() {
+ // force use of static builder() method
+ }
+
+
+ /**
+ * The ID of the user or API key pair that created the API key pair.
+ */
+ public Builder id(String id) {
+ Utils.checkNotNull(id, "id");
+ this.id = id;
+ return this;
+ }
+
+
+ /**
+ * The name of the user or API key pair that created the API key pair.
+ */
+ public Builder name(String name) {
+ Utils.checkNotNull(name, "name");
+ this.name = name;
+ return this;
+ }
+
+
+ /**
+ * The email address of the user that created the API key pair, when it was created by a dashboard
+ * user.
+ */
+ public Builder emailAddress(String emailAddress) {
+ Utils.checkNotNull(emailAddress, "emailAddress");
+ this.emailAddress = JsonNullable.of(emailAddress);
+ return this;
+ }
+
+ /**
+ * The email address of the user that created the API key pair, when it was created by a dashboard
+ * user.
+ */
+ public Builder emailAddress(JsonNullable emailAddress) {
+ Utils.checkNotNull(emailAddress, "emailAddress");
+ this.emailAddress = emailAddress;
+ return this;
+ }
+
+
+ /**
+ * The thumbprint of the API key pair that created the API key pair, when it was created by another API
+ * key.
+ */
+ public Builder thumbprint(String thumbprint) {
+ Utils.checkNotNull(thumbprint, "thumbprint");
+ this.thumbprint = JsonNullable.of(thumbprint);
+ return this;
+ }
+
+ /**
+ * The thumbprint of the API key pair that created the API key pair, when it was created by another API
+ * key.
+ */
+ public Builder thumbprint(JsonNullable thumbprint) {
+ Utils.checkNotNull(thumbprint, "thumbprint");
+ this.thumbprint = thumbprint;
+ return this;
+ }
+
+ public ApiRoutersApiKeyPairsSchemasCreator build() {
+
+ return new ApiRoutersApiKeyPairsSchemasCreator(
+ id, name, emailAddress,
+ thumbprint);
+ }
+
+ }
+}
diff --git a/src/main/java/com/gr4vy/sdk/models/components/CertificateAlgorithm.java b/src/main/java/com/gr4vy/sdk/models/components/CertificateAlgorithm.java
new file mode 100644
index 00000000..f498f0db
--- /dev/null
+++ b/src/main/java/com/gr4vy/sdk/models/components/CertificateAlgorithm.java
@@ -0,0 +1,127 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.gr4vy.sdk.models.components;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.lang.Override;
+import java.lang.String;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+
+/**
+ * Wrapper for an "open" enum that can handle unknown values from API responses
+ * without runtime errors. Instances are immutable singletons with reference equality.
+ * Use {@code asEnum()} for switch expressions.
+ */
+public class CertificateAlgorithm {
+
+ public static final CertificateAlgorithm ECDSA = new CertificateAlgorithm("ECDSA");
+ public static final CertificateAlgorithm RSA = new CertificateAlgorithm("RSA");
+
+ // This map will grow whenever a Color gets created with a new
+ // unrecognized value (a potential memory leak if the user is not
+ // careful). Keep this field lower case to avoid clashing with
+ // generated member names which will always be upper cased (Java
+ // convention)
+ private static final Map values = createValuesMap();
+ private static final Map enums = createEnumsMap();
+
+ private final String value;
+
+ private CertificateAlgorithm(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Returns a CertificateAlgorithm with the given value. For a specific value the
+ * returned object will always be a singleton so reference equality
+ * is satisfied when the values are the same.
+ *
+ * @param value value to be wrapped as CertificateAlgorithm
+ */
+ @JsonCreator
+ public static CertificateAlgorithm of(String value) {
+ synchronized (CertificateAlgorithm.class) {
+ return values.computeIfAbsent(value, v -> new CertificateAlgorithm(v));
+ }
+ }
+
+ @JsonValue
+ public String value() {
+ return value;
+ }
+
+ public Optional asEnum() {
+ return Optional.ofNullable(enums.getOrDefault(value, null));
+ }
+
+ public boolean isKnown() {
+ return asEnum().isPresent();
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(value);
+ }
+
+ @Override
+ public boolean equals(java.lang.Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ CertificateAlgorithm other = (CertificateAlgorithm) obj;
+ return Objects.equals(value, other.value);
+ }
+
+ @Override
+ public String toString() {
+ return "CertificateAlgorithm [value=" + value + "]";
+ }
+
+ // return an array just like an enum
+ public static CertificateAlgorithm[] values() {
+ synchronized (CertificateAlgorithm.class) {
+ return values.values().toArray(new CertificateAlgorithm[] {});
+ }
+ }
+
+ private static final Map createValuesMap() {
+ Map map = new LinkedHashMap<>();
+ map.put("ECDSA", ECDSA);
+ map.put("RSA", RSA);
+ return map;
+ }
+
+ private static final Map createEnumsMap() {
+ Map map = new HashMap<>();
+ map.put("ECDSA", CertificateAlgorithmEnum.ECDSA);
+ map.put("RSA", CertificateAlgorithmEnum.RSA);
+ return map;
+ }
+
+
+ public enum CertificateAlgorithmEnum {
+
+ ECDSA("ECDSA"),
+ RSA("RSA"),;
+
+ private final String value;
+
+ private CertificateAlgorithmEnum(String value) {
+ this.value = value;
+ }
+
+ public String value() {
+ return value;
+ }
+ }
+}
+
diff --git a/src/main/java/com/gr4vy/sdk/models/components/CollectionAPIKeyPair.java b/src/main/java/com/gr4vy/sdk/models/components/CollectionAPIKeyPair.java
new file mode 100644
index 00000000..77e4ae95
--- /dev/null
+++ b/src/main/java/com/gr4vy/sdk/models/components/CollectionAPIKeyPair.java
@@ -0,0 +1,304 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.gr4vy.sdk.models.components;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.gr4vy.sdk.utils.LazySingletonValue;
+import com.gr4vy.sdk.utils.Utils;
+import java.lang.Long;
+import java.lang.Override;
+import java.lang.String;
+import java.util.List;
+import java.util.Optional;
+import org.openapitools.jackson.nullable.JsonNullable;
+
+
+public class CollectionAPIKeyPair {
+ /**
+ * A list of items returned for this request.
+ */
+ @JsonProperty("items")
+ private List items;
+
+ /**
+ * The number of items for this page.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("limit")
+ private Optional limit;
+
+ /**
+ * The cursor pointing at the next page of items.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("next_cursor")
+ private JsonNullable nextCursor;
+
+ /**
+ * The cursor pointing at the previous page of items.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("previous_cursor")
+ private JsonNullable previousCursor;
+
+ @JsonCreator
+ public CollectionAPIKeyPair(
+ @JsonProperty("items") List items,
+ @JsonProperty("limit") Optional limit,
+ @JsonProperty("next_cursor") JsonNullable nextCursor,
+ @JsonProperty("previous_cursor") JsonNullable previousCursor) {
+ Utils.checkNotNull(items, "items");
+ Utils.checkNotNull(limit, "limit");
+ Utils.checkNotNull(nextCursor, "nextCursor");
+ Utils.checkNotNull(previousCursor, "previousCursor");
+ this.items = items;
+ this.limit = limit;
+ this.nextCursor = nextCursor;
+ this.previousCursor = previousCursor;
+ }
+
+ public CollectionAPIKeyPair(
+ List items) {
+ this(items, Optional.empty(), JsonNullable.undefined(),
+ JsonNullable.undefined());
+ }
+
+ /**
+ * A list of items returned for this request.
+ */
+ @JsonIgnore
+ public List items() {
+ return items;
+ }
+
+ /**
+ * The number of items for this page.
+ */
+ @JsonIgnore
+ public Optional limit() {
+ return limit;
+ }
+
+ /**
+ * The cursor pointing at the next page of items.
+ */
+ @JsonIgnore
+ public JsonNullable nextCursor() {
+ return nextCursor;
+ }
+
+ /**
+ * The cursor pointing at the previous page of items.
+ */
+ @JsonIgnore
+ public JsonNullable previousCursor() {
+ return previousCursor;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+
+ /**
+ * A list of items returned for this request.
+ */
+ public CollectionAPIKeyPair withItems(List items) {
+ Utils.checkNotNull(items, "items");
+ this.items = items;
+ return this;
+ }
+
+ /**
+ * The number of items for this page.
+ */
+ public CollectionAPIKeyPair withLimit(long limit) {
+ Utils.checkNotNull(limit, "limit");
+ this.limit = Optional.ofNullable(limit);
+ return this;
+ }
+
+
+ /**
+ * The number of items for this page.
+ */
+ public CollectionAPIKeyPair withLimit(Optional limit) {
+ Utils.checkNotNull(limit, "limit");
+ this.limit = limit;
+ return this;
+ }
+
+ /**
+ * The cursor pointing at the next page of items.
+ */
+ public CollectionAPIKeyPair withNextCursor(String nextCursor) {
+ Utils.checkNotNull(nextCursor, "nextCursor");
+ this.nextCursor = JsonNullable.of(nextCursor);
+ return this;
+ }
+
+ /**
+ * The cursor pointing at the next page of items.
+ */
+ public CollectionAPIKeyPair withNextCursor(JsonNullable nextCursor) {
+ Utils.checkNotNull(nextCursor, "nextCursor");
+ this.nextCursor = nextCursor;
+ return this;
+ }
+
+ /**
+ * The cursor pointing at the previous page of items.
+ */
+ public CollectionAPIKeyPair withPreviousCursor(String previousCursor) {
+ Utils.checkNotNull(previousCursor, "previousCursor");
+ this.previousCursor = JsonNullable.of(previousCursor);
+ return this;
+ }
+
+ /**
+ * The cursor pointing at the previous page of items.
+ */
+ public CollectionAPIKeyPair withPreviousCursor(JsonNullable previousCursor) {
+ Utils.checkNotNull(previousCursor, "previousCursor");
+ this.previousCursor = previousCursor;
+ return this;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CollectionAPIKeyPair other = (CollectionAPIKeyPair) o;
+ return
+ Utils.enhancedDeepEquals(this.items, other.items) &&
+ Utils.enhancedDeepEquals(this.limit, other.limit) &&
+ Utils.enhancedDeepEquals(this.nextCursor, other.nextCursor) &&
+ Utils.enhancedDeepEquals(this.previousCursor, other.previousCursor);
+ }
+
+ @Override
+ public int hashCode() {
+ return Utils.enhancedHash(
+ items, limit, nextCursor,
+ previousCursor);
+ }
+
+ @Override
+ public String toString() {
+ return Utils.toString(CollectionAPIKeyPair.class,
+ "items", items,
+ "limit", limit,
+ "nextCursor", nextCursor,
+ "previousCursor", previousCursor);
+ }
+
+ @SuppressWarnings("UnusedReturnValue")
+ public final static class Builder {
+
+ private List items;
+
+ private Optional limit;
+
+ private JsonNullable nextCursor = JsonNullable.undefined();
+
+ private JsonNullable previousCursor = JsonNullable.undefined();
+
+ private Builder() {
+ // force use of static builder() method
+ }
+
+
+ /**
+ * A list of items returned for this request.
+ */
+ public Builder items(List items) {
+ Utils.checkNotNull(items, "items");
+ this.items = items;
+ return this;
+ }
+
+
+ /**
+ * The number of items for this page.
+ */
+ public Builder limit(long limit) {
+ Utils.checkNotNull(limit, "limit");
+ this.limit = Optional.ofNullable(limit);
+ return this;
+ }
+
+ /**
+ * The number of items for this page.
+ */
+ public Builder limit(Optional limit) {
+ Utils.checkNotNull(limit, "limit");
+ this.limit = limit;
+ return this;
+ }
+
+
+ /**
+ * The cursor pointing at the next page of items.
+ */
+ public Builder nextCursor(String nextCursor) {
+ Utils.checkNotNull(nextCursor, "nextCursor");
+ this.nextCursor = JsonNullable.of(nextCursor);
+ return this;
+ }
+
+ /**
+ * The cursor pointing at the next page of items.
+ */
+ public Builder nextCursor(JsonNullable nextCursor) {
+ Utils.checkNotNull(nextCursor, "nextCursor");
+ this.nextCursor = nextCursor;
+ return this;
+ }
+
+
+ /**
+ * The cursor pointing at the previous page of items.
+ */
+ public Builder previousCursor(String previousCursor) {
+ Utils.checkNotNull(previousCursor, "previousCursor");
+ this.previousCursor = JsonNullable.of(previousCursor);
+ return this;
+ }
+
+ /**
+ * The cursor pointing at the previous page of items.
+ */
+ public Builder previousCursor(JsonNullable previousCursor) {
+ Utils.checkNotNull(previousCursor, "previousCursor");
+ this.previousCursor = previousCursor;
+ return this;
+ }
+
+ public CollectionAPIKeyPair build() {
+ if (limit == null) {
+ limit = _SINGLETON_VALUE_Limit.value();
+ }
+
+ return new CollectionAPIKeyPair(
+ items, limit, nextCursor,
+ previousCursor);
+ }
+
+
+ private static final LazySingletonValue> _SINGLETON_VALUE_Limit =
+ new LazySingletonValue<>(
+ "limit",
+ "20",
+ new TypeReference>() {});
+ }
+}
diff --git a/src/main/java/com/gr4vy/sdk/models/components/GiftCardServiceProvider.java b/src/main/java/com/gr4vy/sdk/models/components/GiftCardServiceProvider.java
index 23d25751..6a2cc79c 100644
--- a/src/main/java/com/gr4vy/sdk/models/components/GiftCardServiceProvider.java
+++ b/src/main/java/com/gr4vy/sdk/models/components/GiftCardServiceProvider.java
@@ -22,6 +22,7 @@ public class GiftCardServiceProvider {
public static final GiftCardServiceProvider MOCK_GIFT_CARD = new GiftCardServiceProvider("mock-gift-card");
public static final GiftCardServiceProvider QWIKCILVER_GIFT_CARD = new GiftCardServiceProvider("qwikcilver-gift-card");
+ public static final GiftCardServiceProvider VALUELINK_GIFT_CARD = new GiftCardServiceProvider("valuelink-gift-card");
// This map will grow whenever a Color gets created with a new
// unrecognized value (a potential memory leak if the user is not
@@ -97,6 +98,7 @@ private static final Map createValuesMap() {
Map map = new LinkedHashMap<>();
map.put("mock-gift-card", MOCK_GIFT_CARD);
map.put("qwikcilver-gift-card", QWIKCILVER_GIFT_CARD);
+ map.put("valuelink-gift-card", VALUELINK_GIFT_CARD);
return map;
}
@@ -104,6 +106,7 @@ private static final Map createEnumsMap() {
Map map = new HashMap<>();
map.put("mock-gift-card", GiftCardServiceProviderEnum.MOCK_GIFT_CARD);
map.put("qwikcilver-gift-card", GiftCardServiceProviderEnum.QWIKCILVER_GIFT_CARD);
+ map.put("valuelink-gift-card", GiftCardServiceProviderEnum.VALUELINK_GIFT_CARD);
return map;
}
@@ -111,7 +114,8 @@ private static final Map createEnumsMap() {
public enum GiftCardServiceProviderEnum {
MOCK_GIFT_CARD("mock-gift-card"),
- QWIKCILVER_GIFT_CARD("qwikcilver-gift-card"),;
+ QWIKCILVER_GIFT_CARD("qwikcilver-gift-card"),
+ VALUELINK_GIFT_CARD("valuelink-gift-card"),;
private final String value;
diff --git a/src/main/java/com/gr4vy/sdk/models/components/MerchantAccountSummary.java b/src/main/java/com/gr4vy/sdk/models/components/MerchantAccountSummary.java
new file mode 100644
index 00000000..85372c30
--- /dev/null
+++ b/src/main/java/com/gr4vy/sdk/models/components/MerchantAccountSummary.java
@@ -0,0 +1,300 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.gr4vy.sdk.models.components;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.gr4vy.sdk.utils.LazySingletonValue;
+import com.gr4vy.sdk.utils.Utils;
+import java.lang.Long;
+import java.lang.Override;
+import java.lang.String;
+import java.time.OffsetDateTime;
+import java.util.Optional;
+import org.openapitools.jackson.nullable.JsonNullable;
+
+
+public class MerchantAccountSummary {
+
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("type")
+ private Optional type;
+
+
+ @JsonProperty("id")
+ private String id;
+
+
+ @JsonProperty("display_name")
+ private String displayName;
+
+
+ @JsonProperty("created_at")
+ private OffsetDateTime createdAt;
+
+
+ @JsonProperty("updated_at")
+ private OffsetDateTime updatedAt;
+
+
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("over_capture_amount")
+ private JsonNullable overCaptureAmount;
+
+
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("over_capture_percentage")
+ private JsonNullable overCapturePercentage;
+
+ @JsonCreator
+ public MerchantAccountSummary(
+ @JsonProperty("id") String id,
+ @JsonProperty("display_name") String displayName,
+ @JsonProperty("created_at") OffsetDateTime createdAt,
+ @JsonProperty("updated_at") OffsetDateTime updatedAt,
+ @JsonProperty("over_capture_amount") JsonNullable overCaptureAmount,
+ @JsonProperty("over_capture_percentage") JsonNullable overCapturePercentage) {
+ Utils.checkNotNull(id, "id");
+ Utils.checkNotNull(displayName, "displayName");
+ Utils.checkNotNull(createdAt, "createdAt");
+ Utils.checkNotNull(updatedAt, "updatedAt");
+ Utils.checkNotNull(overCaptureAmount, "overCaptureAmount");
+ Utils.checkNotNull(overCapturePercentage, "overCapturePercentage");
+ this.type = Builder._SINGLETON_VALUE_Type.value();
+ this.id = id;
+ this.displayName = displayName;
+ this.createdAt = createdAt;
+ this.updatedAt = updatedAt;
+ this.overCaptureAmount = overCaptureAmount;
+ this.overCapturePercentage = overCapturePercentage;
+ }
+
+ public MerchantAccountSummary(
+ String id,
+ String displayName,
+ OffsetDateTime createdAt,
+ OffsetDateTime updatedAt) {
+ this(id, displayName, createdAt,
+ updatedAt, JsonNullable.undefined(), JsonNullable.undefined());
+ }
+
+ @JsonIgnore
+ public Optional type() {
+ return type;
+ }
+
+ @JsonIgnore
+ public String id() {
+ return id;
+ }
+
+ @JsonIgnore
+ public String displayName() {
+ return displayName;
+ }
+
+ @JsonIgnore
+ public OffsetDateTime createdAt() {
+ return createdAt;
+ }
+
+ @JsonIgnore
+ public OffsetDateTime updatedAt() {
+ return updatedAt;
+ }
+
+ @JsonIgnore
+ public JsonNullable overCaptureAmount() {
+ return overCaptureAmount;
+ }
+
+ @JsonIgnore
+ public JsonNullable overCapturePercentage() {
+ return overCapturePercentage;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+
+ public MerchantAccountSummary withId(String id) {
+ Utils.checkNotNull(id, "id");
+ this.id = id;
+ return this;
+ }
+
+ public MerchantAccountSummary withDisplayName(String displayName) {
+ Utils.checkNotNull(displayName, "displayName");
+ this.displayName = displayName;
+ return this;
+ }
+
+ public MerchantAccountSummary withCreatedAt(OffsetDateTime createdAt) {
+ Utils.checkNotNull(createdAt, "createdAt");
+ this.createdAt = createdAt;
+ return this;
+ }
+
+ public MerchantAccountSummary withUpdatedAt(OffsetDateTime updatedAt) {
+ Utils.checkNotNull(updatedAt, "updatedAt");
+ this.updatedAt = updatedAt;
+ return this;
+ }
+
+ public MerchantAccountSummary withOverCaptureAmount(long overCaptureAmount) {
+ Utils.checkNotNull(overCaptureAmount, "overCaptureAmount");
+ this.overCaptureAmount = JsonNullable.of(overCaptureAmount);
+ return this;
+ }
+
+ public MerchantAccountSummary withOverCaptureAmount(JsonNullable overCaptureAmount) {
+ Utils.checkNotNull(overCaptureAmount, "overCaptureAmount");
+ this.overCaptureAmount = overCaptureAmount;
+ return this;
+ }
+
+ public MerchantAccountSummary withOverCapturePercentage(long overCapturePercentage) {
+ Utils.checkNotNull(overCapturePercentage, "overCapturePercentage");
+ this.overCapturePercentage = JsonNullable.of(overCapturePercentage);
+ return this;
+ }
+
+ public MerchantAccountSummary withOverCapturePercentage(JsonNullable overCapturePercentage) {
+ Utils.checkNotNull(overCapturePercentage, "overCapturePercentage");
+ this.overCapturePercentage = overCapturePercentage;
+ return this;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ MerchantAccountSummary other = (MerchantAccountSummary) o;
+ return
+ Utils.enhancedDeepEquals(this.type, other.type) &&
+ Utils.enhancedDeepEquals(this.id, other.id) &&
+ Utils.enhancedDeepEquals(this.displayName, other.displayName) &&
+ Utils.enhancedDeepEquals(this.createdAt, other.createdAt) &&
+ Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) &&
+ Utils.enhancedDeepEquals(this.overCaptureAmount, other.overCaptureAmount) &&
+ Utils.enhancedDeepEquals(this.overCapturePercentage, other.overCapturePercentage);
+ }
+
+ @Override
+ public int hashCode() {
+ return Utils.enhancedHash(
+ type, id, displayName,
+ createdAt, updatedAt, overCaptureAmount,
+ overCapturePercentage);
+ }
+
+ @Override
+ public String toString() {
+ return Utils.toString(MerchantAccountSummary.class,
+ "type", type,
+ "id", id,
+ "displayName", displayName,
+ "createdAt", createdAt,
+ "updatedAt", updatedAt,
+ "overCaptureAmount", overCaptureAmount,
+ "overCapturePercentage", overCapturePercentage);
+ }
+
+ @SuppressWarnings("UnusedReturnValue")
+ public final static class Builder {
+
+ private String id;
+
+ private String displayName;
+
+ private OffsetDateTime createdAt;
+
+ private OffsetDateTime updatedAt;
+
+ private JsonNullable overCaptureAmount = JsonNullable.undefined();
+
+ private JsonNullable overCapturePercentage = JsonNullable.undefined();
+
+ private Builder() {
+ // force use of static builder() method
+ }
+
+
+ public Builder id(String id) {
+ Utils.checkNotNull(id, "id");
+ this.id = id;
+ return this;
+ }
+
+
+ public Builder displayName(String displayName) {
+ Utils.checkNotNull(displayName, "displayName");
+ this.displayName = displayName;
+ return this;
+ }
+
+
+ public Builder createdAt(OffsetDateTime createdAt) {
+ Utils.checkNotNull(createdAt, "createdAt");
+ this.createdAt = createdAt;
+ return this;
+ }
+
+
+ public Builder updatedAt(OffsetDateTime updatedAt) {
+ Utils.checkNotNull(updatedAt, "updatedAt");
+ this.updatedAt = updatedAt;
+ return this;
+ }
+
+
+ public Builder overCaptureAmount(long overCaptureAmount) {
+ Utils.checkNotNull(overCaptureAmount, "overCaptureAmount");
+ this.overCaptureAmount = JsonNullable.of(overCaptureAmount);
+ return this;
+ }
+
+ public Builder overCaptureAmount(JsonNullable overCaptureAmount) {
+ Utils.checkNotNull(overCaptureAmount, "overCaptureAmount");
+ this.overCaptureAmount = overCaptureAmount;
+ return this;
+ }
+
+
+ public Builder overCapturePercentage(long overCapturePercentage) {
+ Utils.checkNotNull(overCapturePercentage, "overCapturePercentage");
+ this.overCapturePercentage = JsonNullable.of(overCapturePercentage);
+ return this;
+ }
+
+ public Builder overCapturePercentage(JsonNullable overCapturePercentage) {
+ Utils.checkNotNull(overCapturePercentage, "overCapturePercentage");
+ this.overCapturePercentage = overCapturePercentage;
+ return this;
+ }
+
+ public MerchantAccountSummary build() {
+
+ return new MerchantAccountSummary(
+ id, displayName, createdAt,
+ updatedAt, overCaptureAmount, overCapturePercentage);
+ }
+
+
+ private static final LazySingletonValue> _SINGLETON_VALUE_Type =
+ new LazySingletonValue<>(
+ "type",
+ "\"merchant-account\"",
+ new TypeReference>() {});
+ }
+}
diff --git a/src/main/java/com/gr4vy/sdk/models/components/PermissionSet.java b/src/main/java/com/gr4vy/sdk/models/components/PermissionSet.java
new file mode 100644
index 00000000..415f8908
--- /dev/null
+++ b/src/main/java/com/gr4vy/sdk/models/components/PermissionSet.java
@@ -0,0 +1,91 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.gr4vy.sdk.models.components;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.gr4vy.sdk.utils.Utils;
+import java.lang.Override;
+import java.lang.String;
+import java.util.List;
+
+
+public class PermissionSet {
+
+ @JsonProperty("allow")
+ private List allow;
+
+ @JsonCreator
+ public PermissionSet(
+ @JsonProperty("allow") List allow) {
+ Utils.checkNotNull(allow, "allow");
+ this.allow = allow;
+ }
+
+ @JsonIgnore
+ public List allow() {
+ return allow;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+
+ public PermissionSet withAllow(List allow) {
+ Utils.checkNotNull(allow, "allow");
+ this.allow = allow;
+ return this;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ PermissionSet other = (PermissionSet) o;
+ return
+ Utils.enhancedDeepEquals(this.allow, other.allow);
+ }
+
+ @Override
+ public int hashCode() {
+ return Utils.enhancedHash(
+ allow);
+ }
+
+ @Override
+ public String toString() {
+ return Utils.toString(PermissionSet.class,
+ "allow", allow);
+ }
+
+ @SuppressWarnings("UnusedReturnValue")
+ public final static class Builder {
+
+ private List allow;
+
+ private Builder() {
+ // force use of static builder() method
+ }
+
+
+ public Builder allow(List allow) {
+ Utils.checkNotNull(allow, "allow");
+ this.allow = allow;
+ return this;
+ }
+
+ public PermissionSet build() {
+
+ return new PermissionSet(
+ allow);
+ }
+
+ }
+}
diff --git a/src/main/java/com/gr4vy/sdk/models/components/Refund.java b/src/main/java/com/gr4vy/sdk/models/components/Refund.java
index a568113f..311639b2 100644
--- a/src/main/java/com/gr4vy/sdk/models/components/Refund.java
+++ b/src/main/java/com/gr4vy/sdk/models/components/Refund.java
@@ -130,7 +130,7 @@ public class Refund {
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("creator")
- private JsonNullable extends Creator> creator;
+ private JsonNullable extends ApiCommonSchemasCreator> creator;
/**
* The standardized error code set by Gr4vy.
@@ -192,7 +192,7 @@ public Refund(
@JsonProperty("transaction_external_identifier") JsonNullable transactionExternalIdentifier,
@JsonProperty("created_at") OffsetDateTime createdAt,
@JsonProperty("updated_at") OffsetDateTime updatedAt,
- @JsonProperty("creator") JsonNullable extends Creator> creator,
+ @JsonProperty("creator") JsonNullable extends ApiCommonSchemasCreator> creator,
@JsonProperty("error_code") JsonNullable errorCode,
@JsonProperty("raw_response_code") JsonNullable rawResponseCode,
@JsonProperty("raw_response_description") JsonNullable rawResponseDescription,
@@ -400,8 +400,8 @@ public OffsetDateTime updatedAt() {
*/
@SuppressWarnings("unchecked")
@JsonIgnore
- public JsonNullable creator() {
- return (JsonNullable) creator;
+ public JsonNullable creator() {
+ return (JsonNullable) creator;
}
/**
@@ -642,7 +642,7 @@ public Refund withUpdatedAt(OffsetDateTime updatedAt) {
/**
* The user that created this resource
*/
- public Refund withCreator(Creator creator) {
+ public Refund withCreator(ApiCommonSchemasCreator creator) {
Utils.checkNotNull(creator, "creator");
this.creator = JsonNullable.of(creator);
return this;
@@ -651,7 +651,7 @@ public Refund withCreator(Creator creator) {
/**
* The user that created this resource
*/
- public Refund withCreator(JsonNullable extends Creator> creator) {
+ public Refund withCreator(JsonNullable extends ApiCommonSchemasCreator> creator) {
Utils.checkNotNull(creator, "creator");
this.creator = creator;
return this;
@@ -870,7 +870,7 @@ public final static class Builder {
private OffsetDateTime updatedAt;
- private JsonNullable extends Creator> creator = JsonNullable.undefined();
+ private JsonNullable extends ApiCommonSchemasCreator> creator = JsonNullable.undefined();
private JsonNullable errorCode = JsonNullable.undefined();
@@ -1087,7 +1087,7 @@ public Builder updatedAt(OffsetDateTime updatedAt) {
/**
* The user that created this resource
*/
- public Builder creator(Creator creator) {
+ public Builder creator(ApiCommonSchemasCreator creator) {
Utils.checkNotNull(creator, "creator");
this.creator = JsonNullable.of(creator);
return this;
@@ -1096,7 +1096,7 @@ public Builder creator(Creator creator) {
/**
* The user that created this resource
*/
- public Builder creator(JsonNullable extends Creator> creator) {
+ public Builder creator(JsonNullable extends ApiCommonSchemasCreator> creator) {
Utils.checkNotNull(creator, "creator");
this.creator = creator;
return this;
diff --git a/src/main/java/com/gr4vy/sdk/models/components/Role.java b/src/main/java/com/gr4vy/sdk/models/components/Role.java
new file mode 100644
index 00000000..850352d6
--- /dev/null
+++ b/src/main/java/com/gr4vy/sdk/models/components/Role.java
@@ -0,0 +1,203 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.gr4vy.sdk.models.components;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.gr4vy.sdk.utils.LazySingletonValue;
+import com.gr4vy.sdk.utils.Utils;
+import java.lang.Override;
+import java.lang.String;
+import java.util.Optional;
+
+
+public class Role {
+
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("type")
+ private Optional type;
+
+
+ @JsonProperty("id")
+ private String id;
+
+
+ @JsonProperty("name")
+ private String name;
+
+
+ @JsonProperty("description")
+ private String description;
+
+
+ @JsonProperty("permissions")
+ private PermissionSet permissions;
+
+ @JsonCreator
+ public Role(
+ @JsonProperty("id") String id,
+ @JsonProperty("name") String name,
+ @JsonProperty("description") String description,
+ @JsonProperty("permissions") PermissionSet permissions) {
+ Utils.checkNotNull(id, "id");
+ Utils.checkNotNull(name, "name");
+ Utils.checkNotNull(description, "description");
+ Utils.checkNotNull(permissions, "permissions");
+ this.type = Builder._SINGLETON_VALUE_Type.value();
+ this.id = id;
+ this.name = name;
+ this.description = description;
+ this.permissions = permissions;
+ }
+
+ @JsonIgnore
+ public Optional