* | :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/docs/sdks/merchantaccounts/README.md b/docs/sdks/merchantaccounts/README.md
index f75d3364..94703d66 100644
--- a/docs/sdks/merchantaccounts/README.md
+++ b/docs/sdks/merchantaccounts/README.md
@@ -111,8 +111,8 @@ public class Application {
.request(req)
.call();
- if (res.merchantAccount().isPresent()) {
- System.out.println(res.merchantAccount().get());
+ if (res.apiRoutersMerchantAccountsSchemasMerchantAccount().isPresent()) {
+ System.out.println(res.apiRoutersMerchantAccountsSchemasMerchantAccount().get());
}
}
}
@@ -173,8 +173,8 @@ public class Application {
.merchantAccountId("merchant-12345")
.call();
- if (res.merchantAccount().isPresent()) {
- System.out.println(res.merchantAccount().get());
+ if (res.apiRoutersMerchantAccountsSchemasMerchantAccount().isPresent()) {
+ System.out.println(res.apiRoutersMerchantAccountsSchemasMerchantAccount().get());
}
}
}
@@ -240,8 +240,8 @@ public class Application {
.build())
.call();
- if (res.merchantAccount().isPresent()) {
- System.out.println(res.merchantAccount().get());
+ if (res.apiRoutersMerchantAccountsSchemasMerchantAccount().isPresent()) {
+ System.out.println(res.apiRoutersMerchantAccountsSchemasMerchantAccount().get());
}
}
}
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..0f35c166
--- /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/ApiCommonSchemasMerchantAccount.java b/src/main/java/com/gr4vy/sdk/models/components/ApiCommonSchemasMerchantAccount.java
new file mode 100644
index 00000000..f1c442e8
--- /dev/null
+++ b/src/main/java/com/gr4vy/sdk/models/components/ApiCommonSchemasMerchantAccount.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 ApiCommonSchemasMerchantAccount {
+
+ @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 ApiCommonSchemasMerchantAccount(
+ @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 ApiCommonSchemasMerchantAccount(
+ 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 ApiCommonSchemasMerchantAccount withId(String id) {
+ Utils.checkNotNull(id, "id");
+ this.id = id;
+ return this;
+ }
+
+ public ApiCommonSchemasMerchantAccount withDisplayName(String displayName) {
+ Utils.checkNotNull(displayName, "displayName");
+ this.displayName = displayName;
+ return this;
+ }
+
+ public ApiCommonSchemasMerchantAccount withCreatedAt(OffsetDateTime createdAt) {
+ Utils.checkNotNull(createdAt, "createdAt");
+ this.createdAt = createdAt;
+ return this;
+ }
+
+ public ApiCommonSchemasMerchantAccount withUpdatedAt(OffsetDateTime updatedAt) {
+ Utils.checkNotNull(updatedAt, "updatedAt");
+ this.updatedAt = updatedAt;
+ return this;
+ }
+
+ public ApiCommonSchemasMerchantAccount withOverCaptureAmount(long overCaptureAmount) {
+ Utils.checkNotNull(overCaptureAmount, "overCaptureAmount");
+ this.overCaptureAmount = JsonNullable.of(overCaptureAmount);
+ return this;
+ }
+
+ public ApiCommonSchemasMerchantAccount withOverCaptureAmount(JsonNullable overCaptureAmount) {
+ Utils.checkNotNull(overCaptureAmount, "overCaptureAmount");
+ this.overCaptureAmount = overCaptureAmount;
+ return this;
+ }
+
+ public ApiCommonSchemasMerchantAccount withOverCapturePercentage(long overCapturePercentage) {
+ Utils.checkNotNull(overCapturePercentage, "overCapturePercentage");
+ this.overCapturePercentage = JsonNullable.of(overCapturePercentage);
+ return this;
+ }
+
+ public ApiCommonSchemasMerchantAccount 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;
+ }
+ ApiCommonSchemasMerchantAccount other = (ApiCommonSchemasMerchantAccount) 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(ApiCommonSchemasMerchantAccount.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 ApiCommonSchemasMerchantAccount build() {
+
+ return new ApiCommonSchemasMerchantAccount(
+ 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/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/MerchantAccount.java b/src/main/java/com/gr4vy/sdk/models/components/ApiRoutersMerchantAccountsSchemasMerchantAccount.java
similarity index 92%
rename from src/main/java/com/gr4vy/sdk/models/components/MerchantAccount.java
rename to src/main/java/com/gr4vy/sdk/models/components/ApiRoutersMerchantAccountsSchemasMerchantAccount.java
index 3b8eca75..a7a5b5ec 100644
--- a/src/main/java/com/gr4vy/sdk/models/components/MerchantAccount.java
+++ b/src/main/java/com/gr4vy/sdk/models/components/ApiRoutersMerchantAccountsSchemasMerchantAccount.java
@@ -22,7 +22,7 @@
import org.openapitools.jackson.nullable.JsonNullable;
-public class MerchantAccount {
+public class ApiRoutersMerchantAccountsSchemasMerchantAccount {
/**
* Always `merchant-account`.
*/
@@ -219,7 +219,7 @@ public class MerchantAccount {
private OffsetDateTime updatedAt;
@JsonCreator
- public MerchantAccount(
+ public ApiRoutersMerchantAccountsSchemasMerchantAccount(
@JsonProperty("id") String id,
@JsonProperty("display_name") String displayName,
@JsonProperty("loon_client_key") JsonNullable loonClientKey,
@@ -292,7 +292,7 @@ public MerchantAccount(
this.updatedAt = updatedAt;
}
- public MerchantAccount(
+ public ApiRoutersMerchantAccountsSchemasMerchantAccount(
String id,
String displayName,
boolean accountUpdaterEnabled,
@@ -541,7 +541,7 @@ public static Builder builder() {
/**
* The ID for the merchant account.
*/
- public MerchantAccount withId(String id) {
+ public ApiRoutersMerchantAccountsSchemasMerchantAccount withId(String id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
@@ -550,7 +550,7 @@ public MerchantAccount withId(String id) {
/**
* The display name for the buyer.
*/
- public MerchantAccount withDisplayName(String displayName) {
+ public ApiRoutersMerchantAccountsSchemasMerchantAccount withDisplayName(String displayName) {
Utils.checkNotNull(displayName, "displayName");
this.displayName = displayName;
return this;
@@ -561,7 +561,7 @@ public MerchantAccount withDisplayName(String displayName) {
* use and if the field is not set or if it's set to null, the Account Updater service doesn't get
* configured. If the field is set to `null`, the other `loon_*` fields must be set to null as well.
*/
- public MerchantAccount withLoonClientKey(String loonClientKey) {
+ public ApiRoutersMerchantAccountsSchemasMerchantAccount withLoonClientKey(String loonClientKey) {
Utils.checkNotNull(loonClientKey, "loonClientKey");
this.loonClientKey = JsonNullable.of(loonClientKey);
return this;
@@ -572,7 +572,7 @@ public MerchantAccount withLoonClientKey(String loonClientKey) {
* use and if the field is not set or if it's set to null, the Account Updater service doesn't get
* configured. If the field is set to `null`, the other `loon_*` fields must be set to null as well.
*/
- public MerchantAccount withLoonClientKey(JsonNullable loonClientKey) {
+ public ApiRoutersMerchantAccountsSchemasMerchantAccount withLoonClientKey(JsonNullable loonClientKey) {
Utils.checkNotNull(loonClientKey, "loonClientKey");
this.loonClientKey = loonClientKey;
return this;
@@ -583,7 +583,7 @@ public MerchantAccount withLoonClientKey(JsonNullable loonClientKey) {
* use and if the field is not set or if it's set to null, the Account Updater service doesn't get
* configured. If the field is set to `null`, the other `loon_*` fields must be set to null as well.
*/
- public MerchantAccount withLoonSecretKey(String loonSecretKey) {
+ public ApiRoutersMerchantAccountsSchemasMerchantAccount withLoonSecretKey(String loonSecretKey) {
Utils.checkNotNull(loonSecretKey, "loonSecretKey");
this.loonSecretKey = JsonNullable.of(loonSecretKey);
return this;
@@ -594,7 +594,7 @@ public MerchantAccount withLoonSecretKey(String loonSecretKey) {
* use and if the field is not set or if it's set to null, the Account Updater service doesn't get
* configured. If the field is set to `null`, the other `loon_*` fields must be set to null as well.
*/
- public MerchantAccount withLoonSecretKey(JsonNullable loonSecretKey) {
+ public ApiRoutersMerchantAccountsSchemasMerchantAccount withLoonSecretKey(JsonNullable loonSecretKey) {
Utils.checkNotNull(loonSecretKey, "loonSecretKey");
this.loonSecretKey = loonSecretKey;
return this;
@@ -606,7 +606,7 @@ public MerchantAccount withLoonSecretKey(JsonNullable loonSecretKey) {
* service doesn't get configured. If the field is set to `null`, the other `loon_*` fields must be set
* to null as well.
*/
- public MerchantAccount withLoonAcceptedSchemes(List loonAcceptedSchemes) {
+ public ApiRoutersMerchantAccountsSchemasMerchantAccount withLoonAcceptedSchemes(List loonAcceptedSchemes) {
Utils.checkNotNull(loonAcceptedSchemes, "loonAcceptedSchemes");
this.loonAcceptedSchemes = JsonNullable.of(loonAcceptedSchemes);
return this;
@@ -618,7 +618,7 @@ public MerchantAccount withLoonAcceptedSchemes(List loonAcceptedSche
* service doesn't get configured. If the field is set to `null`, the other `loon_*` fields must be set
* to null as well.
*/
- public MerchantAccount withLoonAcceptedSchemes(JsonNullable extends List> loonAcceptedSchemes) {
+ public ApiRoutersMerchantAccountsSchemasMerchantAccount withLoonAcceptedSchemes(JsonNullable extends List> loonAcceptedSchemes) {
Utils.checkNotNull(loonAcceptedSchemes, "loonAcceptedSchemes");
this.loonAcceptedSchemes = loonAcceptedSchemes;
return this;
@@ -631,7 +631,7 @@ public MerchantAccount withLoonAcceptedSchemes(JsonNullable extends ListIf the field is set, the other `account_updater_*` fields must be set as well.
*/
- public MerchantAccount withAccountUpdaterRequestEncryptionKey(String accountUpdaterRequestEncryptionKey) {
+ public ApiRoutersMerchantAccountsSchemasMerchantAccount withAccountUpdaterRequestEncryptionKey(String accountUpdaterRequestEncryptionKey) {
Utils.checkNotNull(accountUpdaterRequestEncryptionKey, "accountUpdaterRequestEncryptionKey");
this.accountUpdaterRequestEncryptionKey = JsonNullable.of(accountUpdaterRequestEncryptionKey);
return this;
@@ -644,7 +644,7 @@ public MerchantAccount withAccountUpdaterRequestEncryptionKey(String accountUpda
*
* If the field is set, the other `account_updater_*` fields must be set as well.
*/
- public MerchantAccount withAccountUpdaterRequestEncryptionKey(JsonNullable accountUpdaterRequestEncryptionKey) {
+ public ApiRoutersMerchantAccountsSchemasMerchantAccount withAccountUpdaterRequestEncryptionKey(JsonNullable accountUpdaterRequestEncryptionKey) {
Utils.checkNotNull(accountUpdaterRequestEncryptionKey, "accountUpdaterRequestEncryptionKey");
this.accountUpdaterRequestEncryptionKey = accountUpdaterRequestEncryptionKey;
return this;
@@ -657,7 +657,7 @@ public MerchantAccount withAccountUpdaterRequestEncryptionKey(JsonNullableIf the field is set, the other `account_updater_*` fields must be set as well.
*/
- public MerchantAccount withAccountUpdaterRequestEncryptionKeyId(String accountUpdaterRequestEncryptionKeyId) {
+ public ApiRoutersMerchantAccountsSchemasMerchantAccount withAccountUpdaterRequestEncryptionKeyId(String accountUpdaterRequestEncryptionKeyId) {
Utils.checkNotNull(accountUpdaterRequestEncryptionKeyId, "accountUpdaterRequestEncryptionKeyId");
this.accountUpdaterRequestEncryptionKeyId = JsonNullable.of(accountUpdaterRequestEncryptionKeyId);
return this;
@@ -670,7 +670,7 @@ public MerchantAccount withAccountUpdaterRequestEncryptionKeyId(String accountUp
*
* If the field is set, the other `account_updater_*` fields must be set as well.
*/
- public MerchantAccount withAccountUpdaterRequestEncryptionKeyId(JsonNullable accountUpdaterRequestEncryptionKeyId) {
+ public ApiRoutersMerchantAccountsSchemasMerchantAccount withAccountUpdaterRequestEncryptionKeyId(JsonNullable accountUpdaterRequestEncryptionKeyId) {
Utils.checkNotNull(accountUpdaterRequestEncryptionKeyId, "accountUpdaterRequestEncryptionKeyId");
this.accountUpdaterRequestEncryptionKeyId = accountUpdaterRequestEncryptionKeyId;
return this;
@@ -683,7 +683,7 @@ public MerchantAccount withAccountUpdaterRequestEncryptionKeyId(JsonNullableIf the field is set, the other `account_updater_*` fields must be set as well.
*/
- public MerchantAccount withAccountUpdaterResponseDecryptionKey(String accountUpdaterResponseDecryptionKey) {
+ public ApiRoutersMerchantAccountsSchemasMerchantAccount withAccountUpdaterResponseDecryptionKey(String accountUpdaterResponseDecryptionKey) {
Utils.checkNotNull(accountUpdaterResponseDecryptionKey, "accountUpdaterResponseDecryptionKey");
this.accountUpdaterResponseDecryptionKey = JsonNullable.of(accountUpdaterResponseDecryptionKey);
return this;
@@ -696,7 +696,7 @@ public MerchantAccount withAccountUpdaterResponseDecryptionKey(String accountUpd
*
* If the field is set, the other `account_updater_*` fields must be set as well.
*/
- public MerchantAccount withAccountUpdaterResponseDecryptionKey(JsonNullable accountUpdaterResponseDecryptionKey) {
+ public ApiRoutersMerchantAccountsSchemasMerchantAccount withAccountUpdaterResponseDecryptionKey(JsonNullable accountUpdaterResponseDecryptionKey) {
Utils.checkNotNull(accountUpdaterResponseDecryptionKey, "accountUpdaterResponseDecryptionKey");
this.accountUpdaterResponseDecryptionKey = accountUpdaterResponseDecryptionKey;
return this;
@@ -709,7 +709,7 @@ public MerchantAccount withAccountUpdaterResponseDecryptionKey(JsonNullableIf the field is set, the other `account_updater_*` fields must be set as well.
*/
- public MerchantAccount withAccountUpdaterResponseDecryptionKeyId(String accountUpdaterResponseDecryptionKeyId) {
+ public ApiRoutersMerchantAccountsSchemasMerchantAccount withAccountUpdaterResponseDecryptionKeyId(String accountUpdaterResponseDecryptionKeyId) {
Utils.checkNotNull(accountUpdaterResponseDecryptionKeyId, "accountUpdaterResponseDecryptionKeyId");
this.accountUpdaterResponseDecryptionKeyId = JsonNullable.of(accountUpdaterResponseDecryptionKeyId);
return this;
@@ -722,7 +722,7 @@ public MerchantAccount withAccountUpdaterResponseDecryptionKeyId(String accountU
*
* If the field is set, the other `account_updater_*` fields must be set as well.
*/
- public MerchantAccount withAccountUpdaterResponseDecryptionKeyId(JsonNullable accountUpdaterResponseDecryptionKeyId) {
+ public ApiRoutersMerchantAccountsSchemasMerchantAccount withAccountUpdaterResponseDecryptionKeyId(JsonNullable accountUpdaterResponseDecryptionKeyId) {
Utils.checkNotNull(accountUpdaterResponseDecryptionKeyId, "accountUpdaterResponseDecryptionKeyId");
this.accountUpdaterResponseDecryptionKeyId = accountUpdaterResponseDecryptionKeyId;
return this;
@@ -737,7 +737,7 @@ public MerchantAccount withAccountUpdaterResponseDecryptionKeyId(JsonNullableIf the field is set to `true`, the service is called. Please note that for this to work the other
* `account_updater_* fields` must be set as well.
*/
- public MerchantAccount withAccountUpdaterEnabled(boolean accountUpdaterEnabled) {
+ public ApiRoutersMerchantAccountsSchemasMerchantAccount withAccountUpdaterEnabled(boolean accountUpdaterEnabled) {
Utils.checkNotNull(accountUpdaterEnabled, "accountUpdaterEnabled");
this.accountUpdaterEnabled = accountUpdaterEnabled;
return this;
@@ -747,7 +747,7 @@ public MerchantAccount withAccountUpdaterEnabled(boolean accountUpdaterEnabled)
* The maximum monetary amount allowed for over-capture, in the smallest currency unit, for example
* `1299` cents to allow for an over-capture of `$12.99`.
*/
- public MerchantAccount withOverCaptureAmount(long overCaptureAmount) {
+ public ApiRoutersMerchantAccountsSchemasMerchantAccount withOverCaptureAmount(long overCaptureAmount) {
Utils.checkNotNull(overCaptureAmount, "overCaptureAmount");
this.overCaptureAmount = JsonNullable.of(overCaptureAmount);
return this;
@@ -757,7 +757,7 @@ public MerchantAccount withOverCaptureAmount(long overCaptureAmount) {
* The maximum monetary amount allowed for over-capture, in the smallest currency unit, for example
* `1299` cents to allow for an over-capture of `$12.99`.
*/
- public MerchantAccount withOverCaptureAmount(JsonNullable overCaptureAmount) {
+ public ApiRoutersMerchantAccountsSchemasMerchantAccount withOverCaptureAmount(JsonNullable overCaptureAmount) {
Utils.checkNotNull(overCaptureAmount, "overCaptureAmount");
this.overCaptureAmount = overCaptureAmount;
return this;
@@ -767,7 +767,7 @@ public MerchantAccount withOverCaptureAmount(JsonNullable overCaptureAmoun
* The maximum percentage allowed for over-capture, for example `25` to allow for an over-capture of
* `25%` of the original transaction amount.
*/
- public MerchantAccount withOverCapturePercentage(long overCapturePercentage) {
+ public ApiRoutersMerchantAccountsSchemasMerchantAccount withOverCapturePercentage(long overCapturePercentage) {
Utils.checkNotNull(overCapturePercentage, "overCapturePercentage");
this.overCapturePercentage = JsonNullable.of(overCapturePercentage);
return this;
@@ -777,7 +777,7 @@ public MerchantAccount withOverCapturePercentage(long overCapturePercentage) {
* The maximum percentage allowed for over-capture, for example `25` to allow for an over-capture of
* `25%` of the original transaction amount.
*/
- public MerchantAccount withOverCapturePercentage(JsonNullable overCapturePercentage) {
+ public ApiRoutersMerchantAccountsSchemasMerchantAccount withOverCapturePercentage(JsonNullable overCapturePercentage) {
Utils.checkNotNull(overCapturePercentage, "overCapturePercentage");
this.overCapturePercentage = overCapturePercentage;
return this;
@@ -786,7 +786,7 @@ public MerchantAccount withOverCapturePercentage(JsonNullable overCaptureP
/**
* Requestor ID provided for Visa after onboarding to use Network Tokens.
*/
- public MerchantAccount withVisaNetworkTokensRequestorId(String visaNetworkTokensRequestorId) {
+ public ApiRoutersMerchantAccountsSchemasMerchantAccount withVisaNetworkTokensRequestorId(String visaNetworkTokensRequestorId) {
Utils.checkNotNull(visaNetworkTokensRequestorId, "visaNetworkTokensRequestorId");
this.visaNetworkTokensRequestorId = JsonNullable.of(visaNetworkTokensRequestorId);
return this;
@@ -795,7 +795,7 @@ public MerchantAccount withVisaNetworkTokensRequestorId(String visaNetworkTokens
/**
* Requestor ID provided for Visa after onboarding to use Network Tokens.
*/
- public MerchantAccount withVisaNetworkTokensRequestorId(JsonNullable visaNetworkTokensRequestorId) {
+ public ApiRoutersMerchantAccountsSchemasMerchantAccount withVisaNetworkTokensRequestorId(JsonNullable visaNetworkTokensRequestorId) {
Utils.checkNotNull(visaNetworkTokensRequestorId, "visaNetworkTokensRequestorId");
this.visaNetworkTokensRequestorId = visaNetworkTokensRequestorId;
return this;
@@ -804,7 +804,7 @@ public MerchantAccount withVisaNetworkTokensRequestorId(JsonNullable vis
/**
* Application ID provided for Visa after onboarding to use Network Tokens.
*/
- public MerchantAccount withVisaNetworkTokensAppId(String visaNetworkTokensAppId) {
+ public ApiRoutersMerchantAccountsSchemasMerchantAccount withVisaNetworkTokensAppId(String visaNetworkTokensAppId) {
Utils.checkNotNull(visaNetworkTokensAppId, "visaNetworkTokensAppId");
this.visaNetworkTokensAppId = JsonNullable.of(visaNetworkTokensAppId);
return this;
@@ -813,7 +813,7 @@ public MerchantAccount withVisaNetworkTokensAppId(String visaNetworkTokensAppId)
/**
* Application ID provided for Visa after onboarding to use Network Tokens.
*/
- public MerchantAccount withVisaNetworkTokensAppId(JsonNullable visaNetworkTokensAppId) {
+ public ApiRoutersMerchantAccountsSchemasMerchantAccount withVisaNetworkTokensAppId(JsonNullable visaNetworkTokensAppId) {
Utils.checkNotNull(visaNetworkTokensAppId, "visaNetworkTokensAppId");
this.visaNetworkTokensAppId = visaNetworkTokensAppId;
return this;
@@ -822,7 +822,7 @@ public MerchantAccount withVisaNetworkTokensAppId(JsonNullable visaNetwo
/**
* Requestor ID provided for American Express after onboarding to use Network Tokens.
*/
- public MerchantAccount withAmexNetworkTokensRequestorId(String amexNetworkTokensRequestorId) {
+ public ApiRoutersMerchantAccountsSchemasMerchantAccount withAmexNetworkTokensRequestorId(String amexNetworkTokensRequestorId) {
Utils.checkNotNull(amexNetworkTokensRequestorId, "amexNetworkTokensRequestorId");
this.amexNetworkTokensRequestorId = JsonNullable.of(amexNetworkTokensRequestorId);
return this;
@@ -831,7 +831,7 @@ public MerchantAccount withAmexNetworkTokensRequestorId(String amexNetworkTokens
/**
* Requestor ID provided for American Express after onboarding to use Network Tokens.
*/
- public MerchantAccount withAmexNetworkTokensRequestorId(JsonNullable amexNetworkTokensRequestorId) {
+ public ApiRoutersMerchantAccountsSchemasMerchantAccount withAmexNetworkTokensRequestorId(JsonNullable amexNetworkTokensRequestorId) {
Utils.checkNotNull(amexNetworkTokensRequestorId, "amexNetworkTokensRequestorId");
this.amexNetworkTokensRequestorId = amexNetworkTokensRequestorId;
return this;
@@ -840,7 +840,7 @@ public MerchantAccount withAmexNetworkTokensRequestorId(JsonNullable