diff --git a/.fern/metadata.json b/.fern/metadata.json
index a66ea1e..5537d0e 100644
--- a/.fern/metadata.json
+++ b/.fern/metadata.json
@@ -14,10 +14,10 @@
"implementation redis.clients:jedis:5.2.0"
]
},
- "originGitCommit": "8cfe954dda14329fc30a4f80b915db0acf608382",
+ "originGitCommit": "1ab5d36abb4de887dde605f8b82a71dce464a26b",
"originGitCommitIsDirty": false,
"invokedBy": "ci",
- "requestedVersion": "1.5.5",
+ "requestedVersion": "1.5.6",
"ciProvider": "github",
- "sdkVersion": "1.5.5"
+ "sdkVersion": "1.5.6"
}
\ No newline at end of file
diff --git a/.fern/replay.lock b/.fern/replay.lock
index 8683d29..dc4a2c1 100644
--- a/.fern/replay.lock
+++ b/.fern/replay.lock
@@ -36,5 +36,11 @@ generations:
cli_version: unknown
generator_versions:
fernapi/fern-java-sdk: 4.11.1
-current_generation: d154934d6a2afaf450896d2bbc575fdd061e1562
+ - commit_sha: 9ef584d5a4b3d7cf1b53e9667a766da9dce2ce09
+ tree_hash: 5e10be6e608058c4c816f6945f82b8d21194cc51
+ timestamp: 2026-08-17T10:13:16.774Z
+ cli_version: unknown
+ generator_versions:
+ fernapi/fern-java-sdk: 4.11.1
+current_generation: 9ef584d5a4b3d7cf1b53e9667a766da9dce2ce09
patches: []
diff --git a/build.gradle b/build.gradle
index 71faae1..0a98126 100644
--- a/build.gradle
+++ b/build.gradle
@@ -62,7 +62,7 @@ java {
group = 'com.schematichq'
-version = '1.5.5'
+version = '1.5.6'
jar {
dependsOn(":generatePomFileForMavenPublication")
@@ -93,7 +93,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.schematichq'
artifactId = 'schematic-java'
- version = '1.5.5'
+ version = '1.5.6'
from components.java
pom {
name = 'Schematic'
diff --git a/reference.md b/reference.md
index cef993c..38875f7 100644
--- a/reference.md
+++ b/reference.md
@@ -1095,6 +1095,99 @@ client.accounts().deleteEnvironment("environment_id");
+
+
+
+
+client.accounts.getOnboardingState() -> GetOnboardingStateResponse
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```java
+client.accounts().getOnboardingState();
+```
+
+
+
+
+
+
+
+
+
+
+client.accounts.updateOnboardingState(request) -> UpdateOnboardingStateResponse
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```java
+client.accounts().updateOnboardingState(
+ UpdateOnboardingStateRequestBody
+ .builder()
+ .build()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**path:** `Optional`
+
+
+
+
+
+-
+
+**pricingPageUrl:** `Optional`
+
+
+
+
+
+-
+
+**track:** `Optional`
+
+
+
+
+
+-
+
+**websiteUrl:** `Optional`
+
+
+
+
+
+
+
@@ -4302,6 +4395,14 @@ client.credits().createCreditBundle(
-
+**compatiblePlanIds:** `Optional
>` — Plans whose companies may purchase this bundle. Omitted or empty means the bundle is purchasable on every plan.
+
+
+
+
+
+-
+
**creditId:** `String`
@@ -4477,6 +4578,14 @@ client.credits().updateCreditBundleDetails(
-
+**compatiblePlanIds:** `Optional
>` — Plans whose companies may purchase this bundle. Omitted leaves compatibility unchanged; empty resets the bundle to purchasable on every plan.
+
+
+
+
+
+-
+
**currencyPrices:** `Optional
>`
@@ -9182,6 +9291,86 @@ client.companies().updateEntityTraitDefinition(
+
+
+
+
+client.companies.deleteEntityTraitDefinition(entityTraitDefinitionId) -> DeleteEntityTraitDefinitionResponse
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```java
+client.companies().deleteEntityTraitDefinition("entity_trait_definition_id");
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**entityTraitDefinitionId:** `String` — entity_trait_definition_id
+
+
+
+
+
+
+
+
+
+
+
+client.companies.getEntityTraitDefinitionUsage(entityTraitDefinitionId) -> GetEntityTraitDefinitionUsageResponse
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```java
+client.companies().getEntityTraitDefinitionUsage("entity_trait_definition_id");
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**entityTraitDefinitionId:** `String` — entity_trait_definition_id
+
+
+
+
+
+
+
@@ -9357,6 +9546,78 @@ client.companies().getEntityTraitValues(
+
+
+
+
+client.companies.countEntityTraits() -> CountEntityTraitsResponse
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```java
+client.companies().countEntityTraits(
+ CountEntityTraitsRequest
+ .builder()
+ .definitionId("definition_id")
+ .entityType(EntityType.COMPANY)
+ .limit(1000000L)
+ .offset(1000000L)
+ .build()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**definitionId:** `Optional`
+
+
+
+
+
+-
+
+**entityType:** `Optional`
+
+
+
+
+
+-
+
+**limit:** `Optional` — Page limit (default 100)
+
+
+
+
+
+-
+
+**offset:** `Optional` — Page offset (default 0)
+
+
+
+
+
+
+
@@ -9380,9 +9641,6 @@ client.companies().listPlanChanges(
.companyIds(
Arrays.asList("company_ids")
)
- .planIds(
- Arrays.asList("plan_ids")
- )
.action(PlanChangeAction.CHECKOUT)
.basePlanAction(PlanChangeBasePlanAction.FALLBACK)
.companyId("company_id")
@@ -9436,14 +9694,6 @@ client.companies().listPlanChanges(
-
-**planIds:** `Optional`
-
-
-
-
-
--
-
**limit:** `Optional` — Page limit (default 100)
@@ -13054,7 +13304,7 @@ client.entitlements().getUserUsageDetail(
## plans
-client.plans.updateCompanyPlans(companyPlanId, request) -> UpdateCompanyPlansResponse
+client.plans.updateCompanyPlans(companyId, request) -> UpdateCompanyPlansResponse
-
@@ -13068,7 +13318,7 @@ client.entitlements().getUserUsageDetail(
```java
client.plans().updateCompanyPlans(
- "company_plan_id",
+ "company_id",
UpdateCompanyPlansRequestBody
.builder()
.addOnIds(
@@ -13090,7 +13340,7 @@ client.plans().updateCompanyPlans(
-
-**companyPlanId:** `String` — company_plan_id
+**companyId:** `String` — company_id
@@ -13139,6 +13389,7 @@ client.plans().listCustomPlanBillings(
)
.companyId("company_id")
.planId("plan_id")
+ .planBillingSource(PlanBillingSource.CUSTOM_PLAN)
.status(CustomPlanBillingStatus.ACTIVE)
.limit(1000000L)
.offset(1000000L)
@@ -13174,6 +13425,14 @@ client.plans().listCustomPlanBillings(
-
+**planBillingSource:** `Optional` — Filter by the flow that created the billing record. Defaults to custom_plan.
+
+
+
+
+
+-
+
**status:** `Optional` — Filter by billing status
@@ -14347,7 +14606,7 @@ client.plans().listPlanIssues(
-client.plans.deletePlanVersion(planId) -> DeletePlanVersionResponse
+client.plans.deletePlanVersion(planVersionId) -> DeletePlanVersionResponse
-
@@ -14361,7 +14620,7 @@ client.plans().listPlanIssues(
```java
client.plans().deletePlanVersion(
- "plan_id",
+ "plan_version_id",
DeletePlanVersionRequest
.builder()
.promoteArchivedVersion(true)
@@ -14381,7 +14640,7 @@ client.plans().deletePlanVersion(
-
-**planId:** `String` — plan_id
+**planVersionId:** `String` — plan_version_id
@@ -14401,7 +14660,7 @@ client.plans().deletePlanVersion(
-client.plans.publishPlanVersion(planId, request) -> PublishPlanVersionResponse
+client.plans.publishPlanVersion(planVersionId, request) -> PublishPlanVersionResponse
-
@@ -14415,7 +14674,7 @@ client.plans().deletePlanVersion(
```java
client.plans().publishPlanVersion(
- "plan_id",
+ "plan_version_id",
PublishPlanVersionRequestBody
.builder()
.migrationStrategy(PlanVersionMigrationStrategy.IMMEDIATE)
@@ -14438,7 +14697,7 @@ client.plans().publishPlanVersion(
-
-**planId:** `String` — plan_id
+**planVersionId:** `String` — plan_version_id
@@ -14518,6 +14777,14 @@ client.plans().publishPlanVersion(
-
+**prorationBehavior:** `Optional`
+
+
+
+
+
+-
+
**sendInvoice:** `Optional` — Whether Stripe emails the invoice when it is finalized. Defaults to true.
@@ -15144,7 +15411,7 @@ client.planbundle().createPlanBundle(
-client.planbundle.updatePlanBundle(planBundleId, request) -> UpdatePlanBundleResponse
+client.planbundle.updatePlanBundle(planId, request) -> UpdatePlanBundleResponse
-
@@ -15158,7 +15425,7 @@ client.planbundle().createPlanBundle(
```java
client.planbundle().updatePlanBundle(
- "plan_bundle_id",
+ "plan_id",
UpdatePlanBundleRequestBody
.builder()
.entitlements(
@@ -15185,7 +15452,7 @@ client.planbundle().updatePlanBundle(
-
-**planBundleId:** `String` — plan_bundle_id
+**planId:** `String` — plan_id
@@ -18179,9 +18446,11 @@ client.plangroups().getPlanGroup(
client.plangroups().createPlanGroup(
CreatePlanGroupRequestBody
.builder()
+ .checkoutBundlePurchaseBehavior(CheckoutBundlePurchaseBehavior.INDIVIDUAL)
.checkoutCollectAddress(true)
.checkoutCollectEmail(true)
.checkoutCollectPhone(true)
+ .checkoutCollectTaxId(true)
.enableTaxCollection(true)
.optInEnabled(true)
.preventDowngradesWhenOverLimit(true)
@@ -18253,6 +18522,14 @@ client.plangroups().createPlanGroup(
-
+**checkoutBundlePurchaseBehavior:** `CheckoutBundlePurchaseBehavior`
+
+
+
+
+
+-
+
**checkoutCollectAddress:** `Boolean`
@@ -18277,6 +18554,14 @@ client.plangroups().createPlanGroup(
-
+**checkoutCollectTaxId:** `Boolean`
+
+
+
+
+
+-
+
**customCheckoutFields:** `Optional
>`
@@ -18546,9 +18831,11 @@ client.plangroups().updatePlanGroup(
"plan_group_id",
UpdatePlanGroupRequestBody
.builder()
+ .checkoutBundlePurchaseBehavior(CheckoutBundlePurchaseBehavior.INDIVIDUAL)
.checkoutCollectAddress(true)
.checkoutCollectEmail(true)
.checkoutCollectPhone(true)
+ .checkoutCollectTaxId(true)
.enableTaxCollection(true)
.optInEnabled(true)
.preventDowngradesWhenOverLimit(true)
@@ -18628,6 +18915,14 @@ client.plangroups().updatePlanGroup(
-
+**checkoutBundlePurchaseBehavior:** `CheckoutBundlePurchaseBehavior`
+
+
+
+
+
+-
+
**checkoutCollectAddress:** `Boolean`
@@ -18652,6 +18947,14 @@ client.plangroups().updatePlanGroup(
-
+**checkoutCollectTaxId:** `Boolean`
+
+
+
+
+
+-
+
**customCheckoutFields:** `Optional
>`
@@ -19199,15 +19502,6 @@ client.planmigrations().createMigration(
.planVersionIdTo("plan_version_id_to")
.strategy(PlanVersionMigrationStrategy.IMMEDIATE)
.targetPlanType(PlanType.PLAN)
- .companyIds(
- Arrays.asList("company_ids")
- )
- .excludedCompanyIds(
- Arrays.asList("excluded_company_ids")
- )
- .planVersionIdsFrom(
- Arrays.asList("plan_version_ids_from")
- )
.build()
);
```
@@ -19224,7 +19518,7 @@ client.planmigrations().createMigration(
-
-**companyIds:** `List`
+**companyIds:** `Optional
>`
@@ -19232,7 +19526,7 @@ client.planmigrations().createMigration(
-
-**excludedCompanyIds:** `List`
+**excludedCompanyIds:** `Optional
>`
@@ -19256,7 +19550,15 @@ client.planmigrations().createMigration(
-
-**planVersionIdsFrom:** `List`
+**planVersionIdsFrom:** `Optional
>`
+
+
+
+
+
+-
+
+**prorationBehavior:** `Optional`
@@ -19471,9 +19773,6 @@ client.planmigrations().previewMigration(
.planId("plan_id")
.planVersionIdTo("plan_version_id_to")
.targetPlanType(PlanType.PLAN)
- .companyIds(
- Arrays.asList("company_ids")
- )
.build()
);
```
@@ -19490,7 +19789,7 @@ client.planmigrations().previewMigration(
-
-**companyIds:** `List`
+**companyIds:** `Optional
>`
@@ -19514,6 +19813,14 @@ client.planmigrations().previewMigration(
-
+**planVersionIdsFrom:** `Optional
>`
+
+
+
+
+
+-
+
**targetPlanType:** `PlanType`
diff --git a/src/main/java/com/schematic/api/core/ClientOptions.java b/src/main/java/com/schematic/api/core/ClientOptions.java
index 0873c62..63ecbd4 100644
--- a/src/main/java/com/schematic/api/core/ClientOptions.java
+++ b/src/main/java/com/schematic/api/core/ClientOptions.java
@@ -38,10 +38,10 @@ private ClientOptions(
this.headers.putAll(headers);
this.headers.putAll(new HashMap() {
{
- put("User-Agent", "com.schematichq:schematic-java/1.5.5");
+ put("User-Agent", "com.schematichq:schematic-java/1.5.6");
put("X-Fern-Language", "JAVA");
put("X-Fern-SDK-Name", "com.schematic.fern:api-sdk");
- put("X-Fern-SDK-Version", "1.5.5");
+ put("X-Fern-SDK-Version", "1.5.6");
}
});
this.headerSuppliers = headerSuppliers;
diff --git a/src/main/java/com/schematic/api/resources/accounts/AccountsClient.java b/src/main/java/com/schematic/api/resources/accounts/AccountsClient.java
index 3719aa9..f62983b 100644
--- a/src/main/java/com/schematic/api/resources/accounts/AccountsClient.java
+++ b/src/main/java/com/schematic/api/resources/accounts/AccountsClient.java
@@ -16,6 +16,7 @@
import com.schematic.api.resources.accounts.requests.ListEnvironmentsRequest;
import com.schematic.api.resources.accounts.requests.UpdateApiKeyRequestBody;
import com.schematic.api.resources.accounts.requests.UpdateEnvironmentRequestBody;
+import com.schematic.api.resources.accounts.requests.UpdateOnboardingStateRequestBody;
import com.schematic.api.resources.accounts.types.CountAccountMembersResponse;
import com.schematic.api.resources.accounts.types.CountApiKeysResponse;
import com.schematic.api.resources.accounts.types.CountAuditLogsResponse;
@@ -27,6 +28,7 @@
import com.schematic.api.resources.accounts.types.GetApiKeyResponse;
import com.schematic.api.resources.accounts.types.GetAuditLogResponse;
import com.schematic.api.resources.accounts.types.GetEnvironmentResponse;
+import com.schematic.api.resources.accounts.types.GetOnboardingStateResponse;
import com.schematic.api.resources.accounts.types.GetWhoAmIResponse;
import com.schematic.api.resources.accounts.types.ListAccountMembersResponse;
import com.schematic.api.resources.accounts.types.ListApiKeysResponse;
@@ -35,6 +37,7 @@
import com.schematic.api.resources.accounts.types.QuickstartResponse;
import com.schematic.api.resources.accounts.types.UpdateApiKeyResponse;
import com.schematic.api.resources.accounts.types.UpdateEnvironmentResponse;
+import com.schematic.api.resources.accounts.types.UpdateOnboardingStateResponse;
public class AccountsClient {
protected final ClientOptions clientOptions;
@@ -252,6 +255,31 @@ public DeleteEnvironmentResponse deleteEnvironment(String environmentId, Request
return this.rawClient.deleteEnvironment(environmentId, requestOptions).body();
}
+ public GetOnboardingStateResponse getOnboardingState() {
+ return this.rawClient.getOnboardingState().body();
+ }
+
+ public GetOnboardingStateResponse getOnboardingState(RequestOptions requestOptions) {
+ return this.rawClient.getOnboardingState(requestOptions).body();
+ }
+
+ public UpdateOnboardingStateResponse updateOnboardingState() {
+ return this.rawClient.updateOnboardingState().body();
+ }
+
+ public UpdateOnboardingStateResponse updateOnboardingState(RequestOptions requestOptions) {
+ return this.rawClient.updateOnboardingState(requestOptions).body();
+ }
+
+ public UpdateOnboardingStateResponse updateOnboardingState(UpdateOnboardingStateRequestBody request) {
+ return this.rawClient.updateOnboardingState(request).body();
+ }
+
+ public UpdateOnboardingStateResponse updateOnboardingState(
+ UpdateOnboardingStateRequestBody request, RequestOptions requestOptions) {
+ return this.rawClient.updateOnboardingState(request, requestOptions).body();
+ }
+
public QuickstartResponse quickstart() {
return this.rawClient.quickstart().body();
}
diff --git a/src/main/java/com/schematic/api/resources/accounts/AsyncAccountsClient.java b/src/main/java/com/schematic/api/resources/accounts/AsyncAccountsClient.java
index 3a5326b..306f5ce 100644
--- a/src/main/java/com/schematic/api/resources/accounts/AsyncAccountsClient.java
+++ b/src/main/java/com/schematic/api/resources/accounts/AsyncAccountsClient.java
@@ -16,6 +16,7 @@
import com.schematic.api.resources.accounts.requests.ListEnvironmentsRequest;
import com.schematic.api.resources.accounts.requests.UpdateApiKeyRequestBody;
import com.schematic.api.resources.accounts.requests.UpdateEnvironmentRequestBody;
+import com.schematic.api.resources.accounts.requests.UpdateOnboardingStateRequestBody;
import com.schematic.api.resources.accounts.types.CountAccountMembersResponse;
import com.schematic.api.resources.accounts.types.CountApiKeysResponse;
import com.schematic.api.resources.accounts.types.CountAuditLogsResponse;
@@ -27,6 +28,7 @@
import com.schematic.api.resources.accounts.types.GetApiKeyResponse;
import com.schematic.api.resources.accounts.types.GetAuditLogResponse;
import com.schematic.api.resources.accounts.types.GetEnvironmentResponse;
+import com.schematic.api.resources.accounts.types.GetOnboardingStateResponse;
import com.schematic.api.resources.accounts.types.GetWhoAmIResponse;
import com.schematic.api.resources.accounts.types.ListAccountMembersResponse;
import com.schematic.api.resources.accounts.types.ListApiKeysResponse;
@@ -35,6 +37,7 @@
import com.schematic.api.resources.accounts.types.QuickstartResponse;
import com.schematic.api.resources.accounts.types.UpdateApiKeyResponse;
import com.schematic.api.resources.accounts.types.UpdateEnvironmentResponse;
+import com.schematic.api.resources.accounts.types.UpdateOnboardingStateResponse;
import java.util.concurrent.CompletableFuture;
public class AsyncAccountsClient {
@@ -264,6 +267,32 @@ public CompletableFuture deleteEnvironment(
return this.rawClient.deleteEnvironment(environmentId, requestOptions).thenApply(response -> response.body());
}
+ public CompletableFuture getOnboardingState() {
+ return this.rawClient.getOnboardingState().thenApply(response -> response.body());
+ }
+
+ public CompletableFuture getOnboardingState(RequestOptions requestOptions) {
+ return this.rawClient.getOnboardingState(requestOptions).thenApply(response -> response.body());
+ }
+
+ public CompletableFuture updateOnboardingState() {
+ return this.rawClient.updateOnboardingState().thenApply(response -> response.body());
+ }
+
+ public CompletableFuture updateOnboardingState(RequestOptions requestOptions) {
+ return this.rawClient.updateOnboardingState(requestOptions).thenApply(response -> response.body());
+ }
+
+ public CompletableFuture updateOnboardingState(
+ UpdateOnboardingStateRequestBody request) {
+ return this.rawClient.updateOnboardingState(request).thenApply(response -> response.body());
+ }
+
+ public CompletableFuture updateOnboardingState(
+ UpdateOnboardingStateRequestBody request, RequestOptions requestOptions) {
+ return this.rawClient.updateOnboardingState(request, requestOptions).thenApply(response -> response.body());
+ }
+
public CompletableFuture quickstart() {
return this.rawClient.quickstart().thenApply(response -> response.body());
}
diff --git a/src/main/java/com/schematic/api/resources/accounts/AsyncRawAccountsClient.java b/src/main/java/com/schematic/api/resources/accounts/AsyncRawAccountsClient.java
index a0ed741..c0d7b67 100644
--- a/src/main/java/com/schematic/api/resources/accounts/AsyncRawAccountsClient.java
+++ b/src/main/java/com/schematic/api/resources/accounts/AsyncRawAccountsClient.java
@@ -29,6 +29,7 @@
import com.schematic.api.resources.accounts.requests.ListEnvironmentsRequest;
import com.schematic.api.resources.accounts.requests.UpdateApiKeyRequestBody;
import com.schematic.api.resources.accounts.requests.UpdateEnvironmentRequestBody;
+import com.schematic.api.resources.accounts.requests.UpdateOnboardingStateRequestBody;
import com.schematic.api.resources.accounts.types.CountAccountMembersResponse;
import com.schematic.api.resources.accounts.types.CountApiKeysResponse;
import com.schematic.api.resources.accounts.types.CountAuditLogsResponse;
@@ -40,6 +41,7 @@
import com.schematic.api.resources.accounts.types.GetApiKeyResponse;
import com.schematic.api.resources.accounts.types.GetAuditLogResponse;
import com.schematic.api.resources.accounts.types.GetEnvironmentResponse;
+import com.schematic.api.resources.accounts.types.GetOnboardingStateResponse;
import com.schematic.api.resources.accounts.types.GetWhoAmIResponse;
import com.schematic.api.resources.accounts.types.ListAccountMembersResponse;
import com.schematic.api.resources.accounts.types.ListApiKeysResponse;
@@ -48,6 +50,7 @@
import com.schematic.api.resources.accounts.types.QuickstartResponse;
import com.schematic.api.resources.accounts.types.UpdateApiKeyResponse;
import com.schematic.api.resources.accounts.types.UpdateEnvironmentResponse;
+import com.schematic.api.resources.accounts.types.UpdateOnboardingStateResponse;
import com.schematic.api.types.ApiError;
import java.io.IOException;
import java.util.concurrent.CompletableFuture;
@@ -1931,6 +1934,213 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) {
return future;
}
+ public CompletableFuture> getOnboardingState() {
+ return getOnboardingState(null);
+ }
+
+ public CompletableFuture> getOnboardingState(
+ RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("onboarding-state");
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ Request okhttpRequest = new Request.Builder()
+ .url(httpUrl.build())
+ .method("GET", null)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json")
+ .build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ CompletableFuture> future = new CompletableFuture<>();
+ client.newCall(okhttpRequest).enqueue(new Callback() {
+ @Override
+ public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
+ try (ResponseBody responseBody = response.body()) {
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ future.complete(new BaseSchematicHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(
+ responseBodyString, GetOnboardingStateResponse.class),
+ response));
+ return;
+ }
+ try {
+ switch (response.code()) {
+ case 401:
+ future.completeExceptionally(new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ case 403:
+ future.completeExceptionally(new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ case 404:
+ future.completeExceptionally(new NotFoundError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ case 500:
+ future.completeExceptionally(new InternalServerError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ future.completeExceptionally(new BaseSchematicApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response));
+ return;
+ } catch (JsonProcessingException e) {
+ future.completeExceptionally(
+ new BaseSchematicException("Failed to deserialize response: " + e.getMessage(), e));
+ } catch (IOException e) {
+ future.completeExceptionally(new BaseSchematicException("Network error executing HTTP request", e));
+ }
+ }
+
+ @Override
+ public void onFailure(@NotNull Call call, @NotNull IOException e) {
+ future.completeExceptionally(new BaseSchematicException("Network error executing HTTP request", e));
+ }
+ });
+ return future;
+ }
+
+ public CompletableFuture> updateOnboardingState() {
+ return updateOnboardingState(UpdateOnboardingStateRequestBody.builder().build());
+ }
+
+ public CompletableFuture> updateOnboardingState(
+ RequestOptions requestOptions) {
+ return updateOnboardingState(UpdateOnboardingStateRequestBody.builder().build(), requestOptions);
+ }
+
+ public CompletableFuture> updateOnboardingState(
+ UpdateOnboardingStateRequestBody request) {
+ return updateOnboardingState(request, null);
+ }
+
+ public CompletableFuture> updateOnboardingState(
+ UpdateOnboardingStateRequestBody request, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("onboarding-state");
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ RequestBody body;
+ try {
+ body = RequestBody.create(
+ ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON);
+ } catch (JsonProcessingException e) {
+ throw new BaseSchematicException("Failed to serialize request", e);
+ }
+ Request okhttpRequest = new Request.Builder()
+ .url(httpUrl.build())
+ .method("POST", body)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Content-Type", "application/json")
+ .addHeader("Accept", "application/json")
+ .build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ CompletableFuture> future = new CompletableFuture<>();
+ client.newCall(okhttpRequest).enqueue(new Callback() {
+ @Override
+ public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
+ try (ResponseBody responseBody = response.body()) {
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ future.complete(new BaseSchematicHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(
+ responseBodyString, UpdateOnboardingStateResponse.class),
+ response));
+ return;
+ }
+ try {
+ switch (response.code()) {
+ case 400:
+ future.completeExceptionally(new BadRequestError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ case 401:
+ future.completeExceptionally(new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ case 403:
+ future.completeExceptionally(new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ case 404:
+ future.completeExceptionally(new NotFoundError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ case 500:
+ future.completeExceptionally(new InternalServerError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ future.completeExceptionally(new BaseSchematicApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response));
+ return;
+ } catch (JsonProcessingException e) {
+ future.completeExceptionally(
+ new BaseSchematicException("Failed to deserialize response: " + e.getMessage(), e));
+ } catch (IOException e) {
+ future.completeExceptionally(new BaseSchematicException("Network error executing HTTP request", e));
+ }
+ }
+
+ @Override
+ public void onFailure(@NotNull Call call, @NotNull IOException e) {
+ future.completeExceptionally(new BaseSchematicException("Network error executing HTTP request", e));
+ }
+ });
+ return future;
+ }
+
public CompletableFuture> quickstart() {
return quickstart(null);
}
diff --git a/src/main/java/com/schematic/api/resources/accounts/RawAccountsClient.java b/src/main/java/com/schematic/api/resources/accounts/RawAccountsClient.java
index 5f46f46..871952c 100644
--- a/src/main/java/com/schematic/api/resources/accounts/RawAccountsClient.java
+++ b/src/main/java/com/schematic/api/resources/accounts/RawAccountsClient.java
@@ -29,6 +29,7 @@
import com.schematic.api.resources.accounts.requests.ListEnvironmentsRequest;
import com.schematic.api.resources.accounts.requests.UpdateApiKeyRequestBody;
import com.schematic.api.resources.accounts.requests.UpdateEnvironmentRequestBody;
+import com.schematic.api.resources.accounts.requests.UpdateOnboardingStateRequestBody;
import com.schematic.api.resources.accounts.types.CountAccountMembersResponse;
import com.schematic.api.resources.accounts.types.CountApiKeysResponse;
import com.schematic.api.resources.accounts.types.CountAuditLogsResponse;
@@ -40,6 +41,7 @@
import com.schematic.api.resources.accounts.types.GetApiKeyResponse;
import com.schematic.api.resources.accounts.types.GetAuditLogResponse;
import com.schematic.api.resources.accounts.types.GetEnvironmentResponse;
+import com.schematic.api.resources.accounts.types.GetOnboardingStateResponse;
import com.schematic.api.resources.accounts.types.GetWhoAmIResponse;
import com.schematic.api.resources.accounts.types.ListAccountMembersResponse;
import com.schematic.api.resources.accounts.types.ListApiKeysResponse;
@@ -48,6 +50,7 @@
import com.schematic.api.resources.accounts.types.QuickstartResponse;
import com.schematic.api.resources.accounts.types.UpdateApiKeyResponse;
import com.schematic.api.resources.accounts.types.UpdateEnvironmentResponse;
+import com.schematic.api.resources.accounts.types.UpdateOnboardingStateResponse;
import com.schematic.api.types.ApiError;
import java.io.IOException;
import okhttp3.Headers;
@@ -1499,6 +1502,164 @@ public BaseSchematicHttpResponse deleteEnvironment(
}
}
+ public BaseSchematicHttpResponse getOnboardingState() {
+ return getOnboardingState(null);
+ }
+
+ public BaseSchematicHttpResponse getOnboardingState(RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("onboarding-state");
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ Request okhttpRequest = new Request.Builder()
+ .url(httpUrl.build())
+ .method("GET", null)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json")
+ .build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ try (Response response = client.newCall(okhttpRequest).execute()) {
+ ResponseBody responseBody = response.body();
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ return new BaseSchematicHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GetOnboardingStateResponse.class),
+ response);
+ }
+ try {
+ switch (response.code()) {
+ case 401:
+ throw new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ case 403:
+ throw new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ case 404:
+ throw new NotFoundError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ case 500:
+ throw new InternalServerError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ throw new BaseSchematicApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response);
+ } catch (JsonProcessingException e) {
+ throw new BaseSchematicException("Failed to deserialize response: " + e.getMessage(), e);
+ } catch (IOException e) {
+ throw new BaseSchematicException("Network error executing HTTP request", e);
+ }
+ }
+
+ public BaseSchematicHttpResponse updateOnboardingState() {
+ return updateOnboardingState(UpdateOnboardingStateRequestBody.builder().build());
+ }
+
+ public BaseSchematicHttpResponse updateOnboardingState(
+ RequestOptions requestOptions) {
+ return updateOnboardingState(UpdateOnboardingStateRequestBody.builder().build(), requestOptions);
+ }
+
+ public BaseSchematicHttpResponse updateOnboardingState(
+ UpdateOnboardingStateRequestBody request) {
+ return updateOnboardingState(request, null);
+ }
+
+ public BaseSchematicHttpResponse updateOnboardingState(
+ UpdateOnboardingStateRequestBody request, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("onboarding-state");
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ RequestBody body;
+ try {
+ body = RequestBody.create(
+ ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON);
+ } catch (JsonProcessingException e) {
+ throw new BaseSchematicException("Failed to serialize request", e);
+ }
+ Request okhttpRequest = new Request.Builder()
+ .url(httpUrl.build())
+ .method("POST", body)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Content-Type", "application/json")
+ .addHeader("Accept", "application/json")
+ .build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ try (Response response = client.newCall(okhttpRequest).execute()) {
+ ResponseBody responseBody = response.body();
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ return new BaseSchematicHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, UpdateOnboardingStateResponse.class),
+ response);
+ }
+ try {
+ switch (response.code()) {
+ case 400:
+ throw new BadRequestError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ case 401:
+ throw new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ case 403:
+ throw new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ case 404:
+ throw new NotFoundError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ case 500:
+ throw new InternalServerError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ throw new BaseSchematicApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response);
+ } catch (JsonProcessingException e) {
+ throw new BaseSchematicException("Failed to deserialize response: " + e.getMessage(), e);
+ } catch (IOException e) {
+ throw new BaseSchematicException("Network error executing HTTP request", e);
+ }
+ }
+
public BaseSchematicHttpResponse quickstart() {
return quickstart(null);
}
diff --git a/src/main/java/com/schematic/api/resources/accounts/requests/UpdateOnboardingStateRequestBody.java b/src/main/java/com/schematic/api/resources/accounts/requests/UpdateOnboardingStateRequestBody.java
new file mode 100644
index 0000000..d4db49c
--- /dev/null
+++ b/src/main/java/com/schematic/api/resources/accounts/requests/UpdateOnboardingStateRequestBody.java
@@ -0,0 +1,181 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.schematic.api.resources.accounts.requests;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.schematic.api.core.ObjectMappers;
+import com.schematic.api.types.OnboardingPath;
+import com.schematic.api.types.OnboardingTrack;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = UpdateOnboardingStateRequestBody.Builder.class)
+public final class UpdateOnboardingStateRequestBody {
+ private final Optional path;
+
+ private final Optional pricingPageUrl;
+
+ private final Optional track;
+
+ private final Optional websiteUrl;
+
+ private final Map additionalProperties;
+
+ private UpdateOnboardingStateRequestBody(
+ Optional path,
+ Optional pricingPageUrl,
+ Optional track,
+ Optional websiteUrl,
+ Map additionalProperties) {
+ this.path = path;
+ this.pricingPageUrl = pricingPageUrl;
+ this.track = track;
+ this.websiteUrl = websiteUrl;
+ this.additionalProperties = additionalProperties;
+ }
+
+ @JsonProperty("path")
+ public Optional getPath() {
+ return path;
+ }
+
+ @JsonProperty("pricing_page_url")
+ public Optional getPricingPageUrl() {
+ return pricingPageUrl;
+ }
+
+ @JsonProperty("track")
+ public Optional getTrack() {
+ return track;
+ }
+
+ @JsonProperty("website_url")
+ public Optional getWebsiteUrl() {
+ return websiteUrl;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof UpdateOnboardingStateRequestBody && equalTo((UpdateOnboardingStateRequestBody) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(UpdateOnboardingStateRequestBody other) {
+ return path.equals(other.path)
+ && pricingPageUrl.equals(other.pricingPageUrl)
+ && track.equals(other.track)
+ && websiteUrl.equals(other.websiteUrl);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.path, this.pricingPageUrl, this.track, this.websiteUrl);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder {
+ private Optional path = Optional.empty();
+
+ private Optional pricingPageUrl = Optional.empty();
+
+ private Optional track = Optional.empty();
+
+ private Optional websiteUrl = Optional.empty();
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ public Builder from(UpdateOnboardingStateRequestBody other) {
+ path(other.getPath());
+ pricingPageUrl(other.getPricingPageUrl());
+ track(other.getTrack());
+ websiteUrl(other.getWebsiteUrl());
+ return this;
+ }
+
+ @JsonSetter(value = "path", nulls = Nulls.SKIP)
+ public Builder path(Optional path) {
+ this.path = path;
+ return this;
+ }
+
+ public Builder path(OnboardingPath path) {
+ this.path = Optional.ofNullable(path);
+ return this;
+ }
+
+ @JsonSetter(value = "pricing_page_url", nulls = Nulls.SKIP)
+ public Builder pricingPageUrl(Optional pricingPageUrl) {
+ this.pricingPageUrl = pricingPageUrl;
+ return this;
+ }
+
+ public Builder pricingPageUrl(String pricingPageUrl) {
+ this.pricingPageUrl = Optional.ofNullable(pricingPageUrl);
+ return this;
+ }
+
+ @JsonSetter(value = "track", nulls = Nulls.SKIP)
+ public Builder track(Optional track) {
+ this.track = track;
+ return this;
+ }
+
+ public Builder track(OnboardingTrack track) {
+ this.track = Optional.ofNullable(track);
+ return this;
+ }
+
+ @JsonSetter(value = "website_url", nulls = Nulls.SKIP)
+ public Builder websiteUrl(Optional websiteUrl) {
+ this.websiteUrl = websiteUrl;
+ return this;
+ }
+
+ public Builder websiteUrl(String websiteUrl) {
+ this.websiteUrl = Optional.ofNullable(websiteUrl);
+ return this;
+ }
+
+ public UpdateOnboardingStateRequestBody build() {
+ return new UpdateOnboardingStateRequestBody(path, pricingPageUrl, track, websiteUrl, additionalProperties);
+ }
+
+ public Builder additionalProperty(String key, Object value) {
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ public Builder additionalProperties(Map additionalProperties) {
+ this.additionalProperties.putAll(additionalProperties);
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/com/schematic/api/resources/accounts/types/GetOnboardingStateResponse.java b/src/main/java/com/schematic/api/resources/accounts/types/GetOnboardingStateResponse.java
new file mode 100644
index 0000000..f7641a7
--- /dev/null
+++ b/src/main/java/com/schematic/api/resources/accounts/types/GetOnboardingStateResponse.java
@@ -0,0 +1,181 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.schematic.api.resources.accounts.types;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.schematic.api.core.ObjectMappers;
+import com.schematic.api.types.GetOnboardingStateResp;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = GetOnboardingStateResponse.Builder.class)
+public final class GetOnboardingStateResponse {
+ private final GetOnboardingStateResp data;
+
+ private final Map params;
+
+ private final Map additionalProperties;
+
+ private GetOnboardingStateResponse(
+ GetOnboardingStateResp data, Map params, Map additionalProperties) {
+ this.data = data;
+ this.params = params;
+ this.additionalProperties = additionalProperties;
+ }
+
+ @JsonProperty("data")
+ public GetOnboardingStateResp getData() {
+ return data;
+ }
+
+ /**
+ * @return Input parameters
+ */
+ @JsonProperty("params")
+ public Map getParams() {
+ return params;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof GetOnboardingStateResponse && equalTo((GetOnboardingStateResponse) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(GetOnboardingStateResponse other) {
+ return data.equals(other.data) && params.equals(other.params);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.data, this.params);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static DataStage builder() {
+ return new Builder();
+ }
+
+ public interface DataStage {
+ _FinalStage data(@NotNull GetOnboardingStateResp data);
+
+ Builder from(GetOnboardingStateResponse other);
+ }
+
+ public interface _FinalStage {
+ GetOnboardingStateResponse build();
+
+ _FinalStage additionalProperty(String key, Object value);
+
+ _FinalStage additionalProperties(Map additionalProperties);
+
+ /**
+ * Input parameters
+ */
+ _FinalStage params(Map params);
+
+ _FinalStage putAllParams(Map params);
+
+ _FinalStage params(String key, JsonNode value);
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder implements DataStage, _FinalStage {
+ private GetOnboardingStateResp data;
+
+ private Map params = new LinkedHashMap<>();
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ @java.lang.Override
+ public Builder from(GetOnboardingStateResponse other) {
+ data(other.getData());
+ params(other.getParams());
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter("data")
+ public _FinalStage data(@NotNull GetOnboardingStateResp data) {
+ this.data = Objects.requireNonNull(data, "data must not be null");
+ return this;
+ }
+
+ /**
+ * Input parameters
+ * @return Reference to {@code this} so that method calls can be chained together.
+ */
+ @java.lang.Override
+ public _FinalStage params(String key, JsonNode value) {
+ this.params.put(key, value);
+ return this;
+ }
+
+ /**
+ * Input parameters
+ * @return Reference to {@code this} so that method calls can be chained together.
+ */
+ @java.lang.Override
+ public _FinalStage putAllParams(Map params) {
+ if (params != null) {
+ this.params.putAll(params);
+ }
+ return this;
+ }
+
+ /**
+ * Input parameters
+ */
+ @java.lang.Override
+ @JsonSetter(value = "params", nulls = Nulls.SKIP)
+ public _FinalStage params(Map params) {
+ this.params.clear();
+ if (params != null) {
+ this.params.putAll(params);
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public GetOnboardingStateResponse build() {
+ return new GetOnboardingStateResponse(data, params, additionalProperties);
+ }
+
+ @java.lang.Override
+ public Builder additionalProperty(String key, Object value) {
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ @java.lang.Override
+ public Builder additionalProperties(Map additionalProperties) {
+ this.additionalProperties.putAll(additionalProperties);
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/com/schematic/api/resources/accounts/types/UpdateOnboardingStateResponse.java b/src/main/java/com/schematic/api/resources/accounts/types/UpdateOnboardingStateResponse.java
new file mode 100644
index 0000000..e10f76e
--- /dev/null
+++ b/src/main/java/com/schematic/api/resources/accounts/types/UpdateOnboardingStateResponse.java
@@ -0,0 +1,181 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.schematic.api.resources.accounts.types;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.schematic.api.core.ObjectMappers;
+import com.schematic.api.types.GetOnboardingStateResp;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = UpdateOnboardingStateResponse.Builder.class)
+public final class UpdateOnboardingStateResponse {
+ private final GetOnboardingStateResp data;
+
+ private final Map params;
+
+ private final Map additionalProperties;
+
+ private UpdateOnboardingStateResponse(
+ GetOnboardingStateResp data, Map params, Map additionalProperties) {
+ this.data = data;
+ this.params = params;
+ this.additionalProperties = additionalProperties;
+ }
+
+ @JsonProperty("data")
+ public GetOnboardingStateResp getData() {
+ return data;
+ }
+
+ /**
+ * @return Input parameters
+ */
+ @JsonProperty("params")
+ public Map getParams() {
+ return params;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof UpdateOnboardingStateResponse && equalTo((UpdateOnboardingStateResponse) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(UpdateOnboardingStateResponse other) {
+ return data.equals(other.data) && params.equals(other.params);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.data, this.params);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static DataStage builder() {
+ return new Builder();
+ }
+
+ public interface DataStage {
+ _FinalStage data(@NotNull GetOnboardingStateResp data);
+
+ Builder from(UpdateOnboardingStateResponse other);
+ }
+
+ public interface _FinalStage {
+ UpdateOnboardingStateResponse build();
+
+ _FinalStage additionalProperty(String key, Object value);
+
+ _FinalStage additionalProperties(Map additionalProperties);
+
+ /**
+ * Input parameters
+ */
+ _FinalStage params(Map params);
+
+ _FinalStage putAllParams(Map params);
+
+ _FinalStage params(String key, JsonNode value);
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder implements DataStage, _FinalStage {
+ private GetOnboardingStateResp data;
+
+ private Map params = new LinkedHashMap<>();
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ @java.lang.Override
+ public Builder from(UpdateOnboardingStateResponse other) {
+ data(other.getData());
+ params(other.getParams());
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter("data")
+ public _FinalStage data(@NotNull GetOnboardingStateResp data) {
+ this.data = Objects.requireNonNull(data, "data must not be null");
+ return this;
+ }
+
+ /**
+ * Input parameters
+ * @return Reference to {@code this} so that method calls can be chained together.
+ */
+ @java.lang.Override
+ public _FinalStage params(String key, JsonNode value) {
+ this.params.put(key, value);
+ return this;
+ }
+
+ /**
+ * Input parameters
+ * @return Reference to {@code this} so that method calls can be chained together.
+ */
+ @java.lang.Override
+ public _FinalStage putAllParams(Map params) {
+ if (params != null) {
+ this.params.putAll(params);
+ }
+ return this;
+ }
+
+ /**
+ * Input parameters
+ */
+ @java.lang.Override
+ @JsonSetter(value = "params", nulls = Nulls.SKIP)
+ public _FinalStage params(Map params) {
+ this.params.clear();
+ if (params != null) {
+ this.params.putAll(params);
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public UpdateOnboardingStateResponse build() {
+ return new UpdateOnboardingStateResponse(data, params, additionalProperties);
+ }
+
+ @java.lang.Override
+ public Builder additionalProperty(String key, Object value) {
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ @java.lang.Override
+ public Builder additionalProperties(Map additionalProperties) {
+ this.additionalProperties.putAll(additionalProperties);
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/com/schematic/api/resources/companies/AsyncCompaniesClient.java b/src/main/java/com/schematic/api/resources/companies/AsyncCompaniesClient.java
index 8e49990..720d24e 100644
--- a/src/main/java/com/schematic/api/resources/companies/AsyncCompaniesClient.java
+++ b/src/main/java/com/schematic/api/resources/companies/AsyncCompaniesClient.java
@@ -9,6 +9,7 @@
import com.schematic.api.resources.companies.requests.CountEntityKeyDefinitionsRequest;
import com.schematic.api.resources.companies.requests.CountEntityKeysRequest;
import com.schematic.api.resources.companies.requests.CountEntityTraitDefinitionsRequest;
+import com.schematic.api.resources.companies.requests.CountEntityTraitsRequest;
import com.schematic.api.resources.companies.requests.CountPlanTraitsRequest;
import com.schematic.api.resources.companies.requests.CountUsersRequest;
import com.schematic.api.resources.companies.requests.CreateEntityTraitDefinitionRequestBody;
@@ -33,6 +34,7 @@
import com.schematic.api.resources.companies.types.CountEntityKeyDefinitionsResponse;
import com.schematic.api.resources.companies.types.CountEntityKeysResponse;
import com.schematic.api.resources.companies.types.CountEntityTraitDefinitionsResponse;
+import com.schematic.api.resources.companies.types.CountEntityTraitsResponse;
import com.schematic.api.resources.companies.types.CountPlanTraitsResponse;
import com.schematic.api.resources.companies.types.CountUsersResponse;
import com.schematic.api.resources.companies.types.CreateCompanyResponse;
@@ -41,6 +43,7 @@
import com.schematic.api.resources.companies.types.DeleteCompanyMembershipResponse;
import com.schematic.api.resources.companies.types.DeleteCompanyResponse;
import com.schematic.api.resources.companies.types.DeleteEntityKeyDefinitionResponse;
+import com.schematic.api.resources.companies.types.DeleteEntityTraitDefinitionResponse;
import com.schematic.api.resources.companies.types.DeleteUserByKeysResponse;
import com.schematic.api.resources.companies.types.DeleteUserResponse;
import com.schematic.api.resources.companies.types.GetActiveCompanySubscriptionResponse;
@@ -48,6 +51,7 @@
import com.schematic.api.resources.companies.types.GetCompanyBillingEntityResponse;
import com.schematic.api.resources.companies.types.GetCompanyResponse;
import com.schematic.api.resources.companies.types.GetEntityTraitDefinitionResponse;
+import com.schematic.api.resources.companies.types.GetEntityTraitDefinitionUsageResponse;
import com.schematic.api.resources.companies.types.GetEntityTraitValuesResponse;
import com.schematic.api.resources.companies.types.GetOrCreateCompanyMembershipResponse;
import com.schematic.api.resources.companies.types.GetOrCreateEntityTraitDefinitionResponse;
@@ -442,6 +446,34 @@ public CompletableFuture updateEntityTraitD
.thenApply(response -> response.body());
}
+ public CompletableFuture deleteEntityTraitDefinition(
+ String entityTraitDefinitionId) {
+ return this.rawClient
+ .deleteEntityTraitDefinition(entityTraitDefinitionId)
+ .thenApply(response -> response.body());
+ }
+
+ public CompletableFuture deleteEntityTraitDefinition(
+ String entityTraitDefinitionId, RequestOptions requestOptions) {
+ return this.rawClient
+ .deleteEntityTraitDefinition(entityTraitDefinitionId, requestOptions)
+ .thenApply(response -> response.body());
+ }
+
+ public CompletableFuture getEntityTraitDefinitionUsage(
+ String entityTraitDefinitionId) {
+ return this.rawClient
+ .getEntityTraitDefinitionUsage(entityTraitDefinitionId)
+ .thenApply(response -> response.body());
+ }
+
+ public CompletableFuture getEntityTraitDefinitionUsage(
+ String entityTraitDefinitionId, RequestOptions requestOptions) {
+ return this.rawClient
+ .getEntityTraitDefinitionUsage(entityTraitDefinitionId, requestOptions)
+ .thenApply(response -> response.body());
+ }
+
public CompletableFuture countEntityTraitDefinitions() {
return this.rawClient.countEntityTraitDefinitions().thenApply(response -> response.body());
}
@@ -472,6 +504,23 @@ public CompletableFuture getEntityTraitValues(
return this.rawClient.getEntityTraitValues(request, requestOptions).thenApply(response -> response.body());
}
+ public CompletableFuture countEntityTraits() {
+ return this.rawClient.countEntityTraits().thenApply(response -> response.body());
+ }
+
+ public CompletableFuture countEntityTraits(RequestOptions requestOptions) {
+ return this.rawClient.countEntityTraits(requestOptions).thenApply(response -> response.body());
+ }
+
+ public CompletableFuture countEntityTraits(CountEntityTraitsRequest request) {
+ return this.rawClient.countEntityTraits(request).thenApply(response -> response.body());
+ }
+
+ public CompletableFuture countEntityTraits(
+ CountEntityTraitsRequest request, RequestOptions requestOptions) {
+ return this.rawClient.countEntityTraits(request, requestOptions).thenApply(response -> response.body());
+ }
+
public CompletableFuture listPlanChanges() {
return this.rawClient.listPlanChanges().thenApply(response -> response.body());
}
diff --git a/src/main/java/com/schematic/api/resources/companies/AsyncRawCompaniesClient.java b/src/main/java/com/schematic/api/resources/companies/AsyncRawCompaniesClient.java
index 294c557..918ac74 100644
--- a/src/main/java/com/schematic/api/resources/companies/AsyncRawCompaniesClient.java
+++ b/src/main/java/com/schematic/api/resources/companies/AsyncRawCompaniesClient.java
@@ -22,6 +22,7 @@
import com.schematic.api.resources.companies.requests.CountEntityKeyDefinitionsRequest;
import com.schematic.api.resources.companies.requests.CountEntityKeysRequest;
import com.schematic.api.resources.companies.requests.CountEntityTraitDefinitionsRequest;
+import com.schematic.api.resources.companies.requests.CountEntityTraitsRequest;
import com.schematic.api.resources.companies.requests.CountPlanTraitsRequest;
import com.schematic.api.resources.companies.requests.CountUsersRequest;
import com.schematic.api.resources.companies.requests.CreateEntityTraitDefinitionRequestBody;
@@ -46,6 +47,7 @@
import com.schematic.api.resources.companies.types.CountEntityKeyDefinitionsResponse;
import com.schematic.api.resources.companies.types.CountEntityKeysResponse;
import com.schematic.api.resources.companies.types.CountEntityTraitDefinitionsResponse;
+import com.schematic.api.resources.companies.types.CountEntityTraitsResponse;
import com.schematic.api.resources.companies.types.CountPlanTraitsResponse;
import com.schematic.api.resources.companies.types.CountUsersResponse;
import com.schematic.api.resources.companies.types.CreateCompanyResponse;
@@ -54,6 +56,7 @@
import com.schematic.api.resources.companies.types.DeleteCompanyMembershipResponse;
import com.schematic.api.resources.companies.types.DeleteCompanyResponse;
import com.schematic.api.resources.companies.types.DeleteEntityKeyDefinitionResponse;
+import com.schematic.api.resources.companies.types.DeleteEntityTraitDefinitionResponse;
import com.schematic.api.resources.companies.types.DeleteUserByKeysResponse;
import com.schematic.api.resources.companies.types.DeleteUserResponse;
import com.schematic.api.resources.companies.types.GetActiveCompanySubscriptionResponse;
@@ -61,6 +64,7 @@
import com.schematic.api.resources.companies.types.GetCompanyBillingEntityResponse;
import com.schematic.api.resources.companies.types.GetCompanyResponse;
import com.schematic.api.resources.companies.types.GetEntityTraitDefinitionResponse;
+import com.schematic.api.resources.companies.types.GetEntityTraitDefinitionUsageResponse;
import com.schematic.api.resources.companies.types.GetEntityTraitValuesResponse;
import com.schematic.api.resources.companies.types.GetOrCreateCompanyMembershipResponse;
import com.schematic.api.resources.companies.types.GetOrCreateEntityTraitDefinitionResponse;
@@ -2882,6 +2886,202 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) {
return future;
}
+ public CompletableFuture>
+ deleteEntityTraitDefinition(String entityTraitDefinitionId) {
+ return deleteEntityTraitDefinition(entityTraitDefinitionId, null);
+ }
+
+ public CompletableFuture>
+ deleteEntityTraitDefinition(String entityTraitDefinitionId, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("entity-trait-definitions")
+ .addPathSegment(entityTraitDefinitionId);
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ Request okhttpRequest = new Request.Builder()
+ .url(httpUrl.build())
+ .method("DELETE", null)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json")
+ .build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ CompletableFuture> future =
+ new CompletableFuture<>();
+ client.newCall(okhttpRequest).enqueue(new Callback() {
+ @Override
+ public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
+ try (ResponseBody responseBody = response.body()) {
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ future.complete(new BaseSchematicHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(
+ responseBodyString, DeleteEntityTraitDefinitionResponse.class),
+ response));
+ return;
+ }
+ try {
+ switch (response.code()) {
+ case 400:
+ future.completeExceptionally(new BadRequestError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ case 401:
+ future.completeExceptionally(new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ case 403:
+ future.completeExceptionally(new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ case 404:
+ future.completeExceptionally(new NotFoundError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ case 500:
+ future.completeExceptionally(new InternalServerError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ future.completeExceptionally(new BaseSchematicApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response));
+ return;
+ } catch (JsonProcessingException e) {
+ future.completeExceptionally(
+ new BaseSchematicException("Failed to deserialize response: " + e.getMessage(), e));
+ } catch (IOException e) {
+ future.completeExceptionally(new BaseSchematicException("Network error executing HTTP request", e));
+ }
+ }
+
+ @Override
+ public void onFailure(@NotNull Call call, @NotNull IOException e) {
+ future.completeExceptionally(new BaseSchematicException("Network error executing HTTP request", e));
+ }
+ });
+ return future;
+ }
+
+ public CompletableFuture>
+ getEntityTraitDefinitionUsage(String entityTraitDefinitionId) {
+ return getEntityTraitDefinitionUsage(entityTraitDefinitionId, null);
+ }
+
+ public CompletableFuture>
+ getEntityTraitDefinitionUsage(String entityTraitDefinitionId, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("entity-trait-definitions")
+ .addPathSegment(entityTraitDefinitionId)
+ .addPathSegments("usage");
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ Request okhttpRequest = new Request.Builder()
+ .url(httpUrl.build())
+ .method("GET", null)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json")
+ .build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ CompletableFuture> future =
+ new CompletableFuture<>();
+ client.newCall(okhttpRequest).enqueue(new Callback() {
+ @Override
+ public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
+ try (ResponseBody responseBody = response.body()) {
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ future.complete(new BaseSchematicHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(
+ responseBodyString, GetEntityTraitDefinitionUsageResponse.class),
+ response));
+ return;
+ }
+ try {
+ switch (response.code()) {
+ case 401:
+ future.completeExceptionally(new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ case 403:
+ future.completeExceptionally(new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ case 404:
+ future.completeExceptionally(new NotFoundError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ case 500:
+ future.completeExceptionally(new InternalServerError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ future.completeExceptionally(new BaseSchematicApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response));
+ return;
+ } catch (JsonProcessingException e) {
+ future.completeExceptionally(
+ new BaseSchematicException("Failed to deserialize response: " + e.getMessage(), e));
+ } catch (IOException e) {
+ future.completeExceptionally(new BaseSchematicException("Network error executing HTTP request", e));
+ }
+ }
+
+ @Override
+ public void onFailure(@NotNull Call call, @NotNull IOException e) {
+ future.completeExceptionally(new BaseSchematicException("Network error executing HTTP request", e));
+ }
+ });
+ return future;
+ }
+
public CompletableFuture>
countEntityTraitDefinitions() {
return countEntityTraitDefinitions(
@@ -3129,6 +3329,129 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) {
return future;
}
+ public CompletableFuture> countEntityTraits() {
+ return countEntityTraits(CountEntityTraitsRequest.builder().build());
+ }
+
+ public CompletableFuture> countEntityTraits(
+ RequestOptions requestOptions) {
+ return countEntityTraits(CountEntityTraitsRequest.builder().build(), requestOptions);
+ }
+
+ public CompletableFuture> countEntityTraits(
+ CountEntityTraitsRequest request) {
+ return countEntityTraits(request, null);
+ }
+
+ public CompletableFuture> countEntityTraits(
+ CountEntityTraitsRequest request, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("entity-traits/count");
+ if (request.getDefinitionId().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "definition_id", request.getDefinitionId().get(), false);
+ }
+ if (request.getEntityType().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "entity_type", request.getEntityType().get(), false);
+ }
+ if (request.getLimit().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "limit", request.getLimit().get(), false);
+ }
+ if (request.getOffset().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "offset", request.getOffset().get(), false);
+ }
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ Request.Builder _requestBuilder = new Request.Builder()
+ .url(httpUrl.build())
+ .method("GET", null)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json");
+ Request okhttpRequest = _requestBuilder.build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ CompletableFuture> future = new CompletableFuture<>();
+ client.newCall(okhttpRequest).enqueue(new Callback() {
+ @Override
+ public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
+ try (ResponseBody responseBody = response.body()) {
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ future.complete(new BaseSchematicHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(
+ responseBodyString, CountEntityTraitsResponse.class),
+ response));
+ return;
+ }
+ try {
+ switch (response.code()) {
+ case 400:
+ future.completeExceptionally(new BadRequestError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ case 401:
+ future.completeExceptionally(new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ case 403:
+ future.completeExceptionally(new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ case 404:
+ future.completeExceptionally(new NotFoundError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ case 500:
+ future.completeExceptionally(new InternalServerError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ future.completeExceptionally(new BaseSchematicApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response));
+ return;
+ } catch (JsonProcessingException e) {
+ future.completeExceptionally(
+ new BaseSchematicException("Failed to deserialize response: " + e.getMessage(), e));
+ } catch (IOException e) {
+ future.completeExceptionally(new BaseSchematicException("Network error executing HTTP request", e));
+ }
+ }
+
+ @Override
+ public void onFailure(@NotNull Call call, @NotNull IOException e) {
+ future.completeExceptionally(new BaseSchematicException("Network error executing HTTP request", e));
+ }
+ });
+ return future;
+ }
+
public CompletableFuture> listPlanChanges() {
return listPlanChanges(ListPlanChangesRequest.builder().build());
}
@@ -3172,10 +3495,6 @@ public CompletableFuture> lis
QueryStringMapper.addQueryParameter(
httpUrl, "company_ids", request.getCompanyIds().get(), true);
}
- if (request.getPlanIds().isPresent()) {
- QueryStringMapper.addQueryParameter(
- httpUrl, "plan_ids", request.getPlanIds().get(), true);
- }
if (requestOptions != null) {
requestOptions.getQueryParameters().forEach((_key, _value) -> {
httpUrl.addQueryParameter(_key, _value);
diff --git a/src/main/java/com/schematic/api/resources/companies/CompaniesClient.java b/src/main/java/com/schematic/api/resources/companies/CompaniesClient.java
index 1b228e1..85fcf08 100644
--- a/src/main/java/com/schematic/api/resources/companies/CompaniesClient.java
+++ b/src/main/java/com/schematic/api/resources/companies/CompaniesClient.java
@@ -9,6 +9,7 @@
import com.schematic.api.resources.companies.requests.CountEntityKeyDefinitionsRequest;
import com.schematic.api.resources.companies.requests.CountEntityKeysRequest;
import com.schematic.api.resources.companies.requests.CountEntityTraitDefinitionsRequest;
+import com.schematic.api.resources.companies.requests.CountEntityTraitsRequest;
import com.schematic.api.resources.companies.requests.CountPlanTraitsRequest;
import com.schematic.api.resources.companies.requests.CountUsersRequest;
import com.schematic.api.resources.companies.requests.CreateEntityTraitDefinitionRequestBody;
@@ -33,6 +34,7 @@
import com.schematic.api.resources.companies.types.CountEntityKeyDefinitionsResponse;
import com.schematic.api.resources.companies.types.CountEntityKeysResponse;
import com.schematic.api.resources.companies.types.CountEntityTraitDefinitionsResponse;
+import com.schematic.api.resources.companies.types.CountEntityTraitsResponse;
import com.schematic.api.resources.companies.types.CountPlanTraitsResponse;
import com.schematic.api.resources.companies.types.CountUsersResponse;
import com.schematic.api.resources.companies.types.CreateCompanyResponse;
@@ -41,6 +43,7 @@
import com.schematic.api.resources.companies.types.DeleteCompanyMembershipResponse;
import com.schematic.api.resources.companies.types.DeleteCompanyResponse;
import com.schematic.api.resources.companies.types.DeleteEntityKeyDefinitionResponse;
+import com.schematic.api.resources.companies.types.DeleteEntityTraitDefinitionResponse;
import com.schematic.api.resources.companies.types.DeleteUserByKeysResponse;
import com.schematic.api.resources.companies.types.DeleteUserResponse;
import com.schematic.api.resources.companies.types.GetActiveCompanySubscriptionResponse;
@@ -48,6 +51,7 @@
import com.schematic.api.resources.companies.types.GetCompanyBillingEntityResponse;
import com.schematic.api.resources.companies.types.GetCompanyResponse;
import com.schematic.api.resources.companies.types.GetEntityTraitDefinitionResponse;
+import com.schematic.api.resources.companies.types.GetEntityTraitDefinitionUsageResponse;
import com.schematic.api.resources.companies.types.GetEntityTraitValuesResponse;
import com.schematic.api.resources.companies.types.GetOrCreateCompanyMembershipResponse;
import com.schematic.api.resources.companies.types.GetOrCreateEntityTraitDefinitionResponse;
@@ -424,6 +428,32 @@ public UpdateEntityTraitDefinitionResponse updateEntityTraitDefinition(
.body();
}
+ public DeleteEntityTraitDefinitionResponse deleteEntityTraitDefinition(String entityTraitDefinitionId) {
+ return this.rawClient
+ .deleteEntityTraitDefinition(entityTraitDefinitionId)
+ .body();
+ }
+
+ public DeleteEntityTraitDefinitionResponse deleteEntityTraitDefinition(
+ String entityTraitDefinitionId, RequestOptions requestOptions) {
+ return this.rawClient
+ .deleteEntityTraitDefinition(entityTraitDefinitionId, requestOptions)
+ .body();
+ }
+
+ public GetEntityTraitDefinitionUsageResponse getEntityTraitDefinitionUsage(String entityTraitDefinitionId) {
+ return this.rawClient
+ .getEntityTraitDefinitionUsage(entityTraitDefinitionId)
+ .body();
+ }
+
+ public GetEntityTraitDefinitionUsageResponse getEntityTraitDefinitionUsage(
+ String entityTraitDefinitionId, RequestOptions requestOptions) {
+ return this.rawClient
+ .getEntityTraitDefinitionUsage(entityTraitDefinitionId, requestOptions)
+ .body();
+ }
+
public CountEntityTraitDefinitionsResponse countEntityTraitDefinitions() {
return this.rawClient.countEntityTraitDefinitions().body();
}
@@ -452,6 +482,23 @@ public GetEntityTraitValuesResponse getEntityTraitValues(
return this.rawClient.getEntityTraitValues(request, requestOptions).body();
}
+ public CountEntityTraitsResponse countEntityTraits() {
+ return this.rawClient.countEntityTraits().body();
+ }
+
+ public CountEntityTraitsResponse countEntityTraits(RequestOptions requestOptions) {
+ return this.rawClient.countEntityTraits(requestOptions).body();
+ }
+
+ public CountEntityTraitsResponse countEntityTraits(CountEntityTraitsRequest request) {
+ return this.rawClient.countEntityTraits(request).body();
+ }
+
+ public CountEntityTraitsResponse countEntityTraits(
+ CountEntityTraitsRequest request, RequestOptions requestOptions) {
+ return this.rawClient.countEntityTraits(request, requestOptions).body();
+ }
+
public ListPlanChangesResponse listPlanChanges() {
return this.rawClient.listPlanChanges().body();
}
diff --git a/src/main/java/com/schematic/api/resources/companies/RawCompaniesClient.java b/src/main/java/com/schematic/api/resources/companies/RawCompaniesClient.java
index a1493cc..da74552 100644
--- a/src/main/java/com/schematic/api/resources/companies/RawCompaniesClient.java
+++ b/src/main/java/com/schematic/api/resources/companies/RawCompaniesClient.java
@@ -22,6 +22,7 @@
import com.schematic.api.resources.companies.requests.CountEntityKeyDefinitionsRequest;
import com.schematic.api.resources.companies.requests.CountEntityKeysRequest;
import com.schematic.api.resources.companies.requests.CountEntityTraitDefinitionsRequest;
+import com.schematic.api.resources.companies.requests.CountEntityTraitsRequest;
import com.schematic.api.resources.companies.requests.CountPlanTraitsRequest;
import com.schematic.api.resources.companies.requests.CountUsersRequest;
import com.schematic.api.resources.companies.requests.CreateEntityTraitDefinitionRequestBody;
@@ -46,6 +47,7 @@
import com.schematic.api.resources.companies.types.CountEntityKeyDefinitionsResponse;
import com.schematic.api.resources.companies.types.CountEntityKeysResponse;
import com.schematic.api.resources.companies.types.CountEntityTraitDefinitionsResponse;
+import com.schematic.api.resources.companies.types.CountEntityTraitsResponse;
import com.schematic.api.resources.companies.types.CountPlanTraitsResponse;
import com.schematic.api.resources.companies.types.CountUsersResponse;
import com.schematic.api.resources.companies.types.CreateCompanyResponse;
@@ -54,6 +56,7 @@
import com.schematic.api.resources.companies.types.DeleteCompanyMembershipResponse;
import com.schematic.api.resources.companies.types.DeleteCompanyResponse;
import com.schematic.api.resources.companies.types.DeleteEntityKeyDefinitionResponse;
+import com.schematic.api.resources.companies.types.DeleteEntityTraitDefinitionResponse;
import com.schematic.api.resources.companies.types.DeleteUserByKeysResponse;
import com.schematic.api.resources.companies.types.DeleteUserResponse;
import com.schematic.api.resources.companies.types.GetActiveCompanySubscriptionResponse;
@@ -61,6 +64,7 @@
import com.schematic.api.resources.companies.types.GetCompanyBillingEntityResponse;
import com.schematic.api.resources.companies.types.GetCompanyResponse;
import com.schematic.api.resources.companies.types.GetEntityTraitDefinitionResponse;
+import com.schematic.api.resources.companies.types.GetEntityTraitDefinitionUsageResponse;
import com.schematic.api.resources.companies.types.GetEntityTraitValuesResponse;
import com.schematic.api.resources.companies.types.GetOrCreateCompanyMembershipResponse;
import com.schematic.api.resources.companies.types.GetOrCreateEntityTraitDefinitionResponse;
@@ -2287,6 +2291,154 @@ public BaseSchematicHttpResponse updateEnti
}
}
+ public BaseSchematicHttpResponse deleteEntityTraitDefinition(
+ String entityTraitDefinitionId) {
+ return deleteEntityTraitDefinition(entityTraitDefinitionId, null);
+ }
+
+ public BaseSchematicHttpResponse deleteEntityTraitDefinition(
+ String entityTraitDefinitionId, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("entity-trait-definitions")
+ .addPathSegment(entityTraitDefinitionId);
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ Request okhttpRequest = new Request.Builder()
+ .url(httpUrl.build())
+ .method("DELETE", null)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json")
+ .build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ try (Response response = client.newCall(okhttpRequest).execute()) {
+ ResponseBody responseBody = response.body();
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ return new BaseSchematicHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(
+ responseBodyString, DeleteEntityTraitDefinitionResponse.class),
+ response);
+ }
+ try {
+ switch (response.code()) {
+ case 400:
+ throw new BadRequestError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ case 401:
+ throw new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ case 403:
+ throw new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ case 404:
+ throw new NotFoundError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ case 500:
+ throw new InternalServerError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ throw new BaseSchematicApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response);
+ } catch (JsonProcessingException e) {
+ throw new BaseSchematicException("Failed to deserialize response: " + e.getMessage(), e);
+ } catch (IOException e) {
+ throw new BaseSchematicException("Network error executing HTTP request", e);
+ }
+ }
+
+ public BaseSchematicHttpResponse getEntityTraitDefinitionUsage(
+ String entityTraitDefinitionId) {
+ return getEntityTraitDefinitionUsage(entityTraitDefinitionId, null);
+ }
+
+ public BaseSchematicHttpResponse getEntityTraitDefinitionUsage(
+ String entityTraitDefinitionId, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("entity-trait-definitions")
+ .addPathSegment(entityTraitDefinitionId)
+ .addPathSegments("usage");
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ Request okhttpRequest = new Request.Builder()
+ .url(httpUrl.build())
+ .method("GET", null)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json")
+ .build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ try (Response response = client.newCall(okhttpRequest).execute()) {
+ ResponseBody responseBody = response.body();
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ return new BaseSchematicHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(
+ responseBodyString, GetEntityTraitDefinitionUsageResponse.class),
+ response);
+ }
+ try {
+ switch (response.code()) {
+ case 401:
+ throw new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ case 403:
+ throw new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ case 404:
+ throw new NotFoundError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ case 500:
+ throw new InternalServerError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ throw new BaseSchematicApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response);
+ } catch (JsonProcessingException e) {
+ throw new BaseSchematicException("Failed to deserialize response: " + e.getMessage(), e);
+ } catch (IOException e) {
+ throw new BaseSchematicException("Network error executing HTTP request", e);
+ }
+ }
+
public BaseSchematicHttpResponse countEntityTraitDefinitions() {
return countEntityTraitDefinitions(
CountEntityTraitDefinitionsRequest.builder().build());
@@ -2483,6 +2635,102 @@ public BaseSchematicHttpResponse getEntityTraitVal
}
}
+ public BaseSchematicHttpResponse countEntityTraits() {
+ return countEntityTraits(CountEntityTraitsRequest.builder().build());
+ }
+
+ public BaseSchematicHttpResponse countEntityTraits(RequestOptions requestOptions) {
+ return countEntityTraits(CountEntityTraitsRequest.builder().build(), requestOptions);
+ }
+
+ public BaseSchematicHttpResponse countEntityTraits(CountEntityTraitsRequest request) {
+ return countEntityTraits(request, null);
+ }
+
+ public BaseSchematicHttpResponse countEntityTraits(
+ CountEntityTraitsRequest request, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("entity-traits/count");
+ if (request.getDefinitionId().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "definition_id", request.getDefinitionId().get(), false);
+ }
+ if (request.getEntityType().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "entity_type", request.getEntityType().get(), false);
+ }
+ if (request.getLimit().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "limit", request.getLimit().get(), false);
+ }
+ if (request.getOffset().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "offset", request.getOffset().get(), false);
+ }
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ Request.Builder _requestBuilder = new Request.Builder()
+ .url(httpUrl.build())
+ .method("GET", null)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json");
+ Request okhttpRequest = _requestBuilder.build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ try (Response response = client.newCall(okhttpRequest).execute()) {
+ ResponseBody responseBody = response.body();
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ return new BaseSchematicHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CountEntityTraitsResponse.class),
+ response);
+ }
+ try {
+ switch (response.code()) {
+ case 400:
+ throw new BadRequestError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ case 401:
+ throw new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ case 403:
+ throw new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ case 404:
+ throw new NotFoundError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ case 500:
+ throw new InternalServerError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ throw new BaseSchematicApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response);
+ } catch (JsonProcessingException e) {
+ throw new BaseSchematicException("Failed to deserialize response: " + e.getMessage(), e);
+ } catch (IOException e) {
+ throw new BaseSchematicException("Network error executing HTTP request", e);
+ }
+ }
+
public BaseSchematicHttpResponse listPlanChanges() {
return listPlanChanges(ListPlanChangesRequest.builder().build());
}
@@ -2524,10 +2772,6 @@ public BaseSchematicHttpResponse listPlanChanges(
QueryStringMapper.addQueryParameter(
httpUrl, "company_ids", request.getCompanyIds().get(), true);
}
- if (request.getPlanIds().isPresent()) {
- QueryStringMapper.addQueryParameter(
- httpUrl, "plan_ids", request.getPlanIds().get(), true);
- }
if (requestOptions != null) {
requestOptions.getQueryParameters().forEach((_key, _value) -> {
httpUrl.addQueryParameter(_key, _value);
diff --git a/src/main/java/com/schematic/api/resources/companies/requests/CountEntityTraitsRequest.java b/src/main/java/com/schematic/api/resources/companies/requests/CountEntityTraitsRequest.java
new file mode 100644
index 0000000..78ad740
--- /dev/null
+++ b/src/main/java/com/schematic/api/resources/companies/requests/CountEntityTraitsRequest.java
@@ -0,0 +1,192 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.schematic.api.resources.companies.requests;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.schematic.api.core.ObjectMappers;
+import com.schematic.api.types.EntityType;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = CountEntityTraitsRequest.Builder.class)
+public final class CountEntityTraitsRequest {
+ private final Optional definitionId;
+
+ private final Optional entityType;
+
+ private final Optional limit;
+
+ private final Optional offset;
+
+ private final Map additionalProperties;
+
+ private CountEntityTraitsRequest(
+ Optional definitionId,
+ Optional entityType,
+ Optional limit,
+ Optional offset,
+ Map additionalProperties) {
+ this.definitionId = definitionId;
+ this.entityType = entityType;
+ this.limit = limit;
+ this.offset = offset;
+ this.additionalProperties = additionalProperties;
+ }
+
+ @JsonProperty("definition_id")
+ public Optional getDefinitionId() {
+ return definitionId;
+ }
+
+ @JsonProperty("entity_type")
+ public Optional getEntityType() {
+ return entityType;
+ }
+
+ /**
+ * @return Page limit (default 100)
+ */
+ @JsonProperty("limit")
+ public Optional getLimit() {
+ return limit;
+ }
+
+ /**
+ * @return Page offset (default 0)
+ */
+ @JsonProperty("offset")
+ public Optional getOffset() {
+ return offset;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof CountEntityTraitsRequest && equalTo((CountEntityTraitsRequest) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(CountEntityTraitsRequest other) {
+ return definitionId.equals(other.definitionId)
+ && entityType.equals(other.entityType)
+ && limit.equals(other.limit)
+ && offset.equals(other.offset);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.definitionId, this.entityType, this.limit, this.offset);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder {
+ private Optional definitionId = Optional.empty();
+
+ private Optional entityType = Optional.empty();
+
+ private Optional limit = Optional.empty();
+
+ private Optional offset = Optional.empty();
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ public Builder from(CountEntityTraitsRequest other) {
+ definitionId(other.getDefinitionId());
+ entityType(other.getEntityType());
+ limit(other.getLimit());
+ offset(other.getOffset());
+ return this;
+ }
+
+ @JsonSetter(value = "definition_id", nulls = Nulls.SKIP)
+ public Builder definitionId(Optional definitionId) {
+ this.definitionId = definitionId;
+ return this;
+ }
+
+ public Builder definitionId(String definitionId) {
+ this.definitionId = Optional.ofNullable(definitionId);
+ return this;
+ }
+
+ @JsonSetter(value = "entity_type", nulls = Nulls.SKIP)
+ public Builder entityType(Optional entityType) {
+ this.entityType = entityType;
+ return this;
+ }
+
+ public Builder entityType(EntityType entityType) {
+ this.entityType = Optional.ofNullable(entityType);
+ return this;
+ }
+
+ /**
+ * Page limit (default 100)
+ */
+ @JsonSetter(value = "limit", nulls = Nulls.SKIP)
+ public Builder limit(Optional limit) {
+ this.limit = limit;
+ return this;
+ }
+
+ public Builder limit(Long limit) {
+ this.limit = Optional.ofNullable(limit);
+ return this;
+ }
+
+ /**
+ * Page offset (default 0)
+ */
+ @JsonSetter(value = "offset", nulls = Nulls.SKIP)
+ public Builder offset(Optional offset) {
+ this.offset = offset;
+ return this;
+ }
+
+ public Builder offset(Long offset) {
+ this.offset = Optional.ofNullable(offset);
+ return this;
+ }
+
+ public CountEntityTraitsRequest build() {
+ return new CountEntityTraitsRequest(definitionId, entityType, limit, offset, additionalProperties);
+ }
+
+ public Builder additionalProperty(String key, Object value) {
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ public Builder additionalProperties(Map additionalProperties) {
+ this.additionalProperties.putAll(additionalProperties);
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/com/schematic/api/resources/companies/requests/ListPlanChangesRequest.java b/src/main/java/com/schematic/api/resources/companies/requests/ListPlanChangesRequest.java
index aa3452c..194fc53 100644
--- a/src/main/java/com/schematic/api/resources/companies/requests/ListPlanChangesRequest.java
+++ b/src/main/java/com/schematic/api/resources/companies/requests/ListPlanChangesRequest.java
@@ -26,8 +26,6 @@
public final class ListPlanChangesRequest {
private final Optional> companyIds;
- private final Optional> planIds;
-
private final Optional action;
private final Optional basePlanAction;
@@ -42,7 +40,6 @@ public final class ListPlanChangesRequest {
private ListPlanChangesRequest(
Optional> companyIds,
- Optional> planIds,
Optional action,
Optional basePlanAction,
Optional companyId,
@@ -50,7 +47,6 @@ private ListPlanChangesRequest(
Optional offset,
Map additionalProperties) {
this.companyIds = companyIds;
- this.planIds = planIds;
this.action = action;
this.basePlanAction = basePlanAction;
this.companyId = companyId;
@@ -64,11 +60,6 @@ public Optional> getCompanyIds() {
return companyIds;
}
- @JsonProperty("plan_ids")
- public Optional> getPlanIds() {
- return planIds;
- }
-
@JsonProperty("action")
public Optional getAction() {
return action;
@@ -113,7 +104,6 @@ public Map getAdditionalProperties() {
private boolean equalTo(ListPlanChangesRequest other) {
return companyIds.equals(other.companyIds)
- && planIds.equals(other.planIds)
&& action.equals(other.action)
&& basePlanAction.equals(other.basePlanAction)
&& companyId.equals(other.companyId)
@@ -123,14 +113,7 @@ private boolean equalTo(ListPlanChangesRequest other) {
@java.lang.Override
public int hashCode() {
- return Objects.hash(
- this.companyIds,
- this.planIds,
- this.action,
- this.basePlanAction,
- this.companyId,
- this.limit,
- this.offset);
+ return Objects.hash(this.companyIds, this.action, this.basePlanAction, this.companyId, this.limit, this.offset);
}
@java.lang.Override
@@ -146,8 +129,6 @@ public static Builder builder() {
public static final class Builder {
private Optional> companyIds = Optional.empty();
- private Optional> planIds = Optional.empty();
-
private Optional action = Optional.empty();
private Optional basePlanAction = Optional.empty();
@@ -165,7 +146,6 @@ private Builder() {}
public Builder from(ListPlanChangesRequest other) {
companyIds(other.getCompanyIds());
- planIds(other.getPlanIds());
action(other.getAction());
basePlanAction(other.getBasePlanAction());
companyId(other.getCompanyId());
@@ -190,22 +170,6 @@ public Builder companyIds(String companyIds) {
return this;
}
- @JsonSetter(value = "plan_ids", nulls = Nulls.SKIP)
- public Builder planIds(Optional> planIds) {
- this.planIds = planIds;
- return this;
- }
-
- public Builder planIds(List planIds) {
- this.planIds = Optional.ofNullable(planIds);
- return this;
- }
-
- public Builder planIds(String planIds) {
- this.planIds = Optional.of(Collections.singletonList(planIds));
- return this;
- }
-
@JsonSetter(value = "action", nulls = Nulls.SKIP)
public Builder action(Optional action) {
this.action = action;
@@ -269,7 +233,7 @@ public Builder offset(Long offset) {
public ListPlanChangesRequest build() {
return new ListPlanChangesRequest(
- companyIds, planIds, action, basePlanAction, companyId, limit, offset, additionalProperties);
+ companyIds, action, basePlanAction, companyId, limit, offset, additionalProperties);
}
public Builder additionalProperty(String key, Object value) {
diff --git a/src/main/java/com/schematic/api/resources/companies/types/CountEntityTraitsParams.java b/src/main/java/com/schematic/api/resources/companies/types/CountEntityTraitsParams.java
new file mode 100644
index 0000000..af2af7b
--- /dev/null
+++ b/src/main/java/com/schematic/api/resources/companies/types/CountEntityTraitsParams.java
@@ -0,0 +1,192 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.schematic.api.resources.companies.types;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.schematic.api.core.ObjectMappers;
+import com.schematic.api.types.EntityType;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = CountEntityTraitsParams.Builder.class)
+public final class CountEntityTraitsParams {
+ private final Optional definitionId;
+
+ private final Optional entityType;
+
+ private final Optional limit;
+
+ private final Optional offset;
+
+ private final Map additionalProperties;
+
+ private CountEntityTraitsParams(
+ Optional definitionId,
+ Optional entityType,
+ Optional limit,
+ Optional offset,
+ Map additionalProperties) {
+ this.definitionId = definitionId;
+ this.entityType = entityType;
+ this.limit = limit;
+ this.offset = offset;
+ this.additionalProperties = additionalProperties;
+ }
+
+ @JsonProperty("definition_id")
+ public Optional getDefinitionId() {
+ return definitionId;
+ }
+
+ @JsonProperty("entity_type")
+ public Optional getEntityType() {
+ return entityType;
+ }
+
+ /**
+ * @return Page limit (default 100)
+ */
+ @JsonProperty("limit")
+ public Optional getLimit() {
+ return limit;
+ }
+
+ /**
+ * @return Page offset (default 0)
+ */
+ @JsonProperty("offset")
+ public Optional getOffset() {
+ return offset;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof CountEntityTraitsParams && equalTo((CountEntityTraitsParams) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(CountEntityTraitsParams other) {
+ return definitionId.equals(other.definitionId)
+ && entityType.equals(other.entityType)
+ && limit.equals(other.limit)
+ && offset.equals(other.offset);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.definitionId, this.entityType, this.limit, this.offset);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder {
+ private Optional definitionId = Optional.empty();
+
+ private Optional entityType = Optional.empty();
+
+ private Optional limit = Optional.empty();
+
+ private Optional offset = Optional.empty();
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ public Builder from(CountEntityTraitsParams other) {
+ definitionId(other.getDefinitionId());
+ entityType(other.getEntityType());
+ limit(other.getLimit());
+ offset(other.getOffset());
+ return this;
+ }
+
+ @JsonSetter(value = "definition_id", nulls = Nulls.SKIP)
+ public Builder definitionId(Optional definitionId) {
+ this.definitionId = definitionId;
+ return this;
+ }
+
+ public Builder definitionId(String definitionId) {
+ this.definitionId = Optional.ofNullable(definitionId);
+ return this;
+ }
+
+ @JsonSetter(value = "entity_type", nulls = Nulls.SKIP)
+ public Builder entityType(Optional entityType) {
+ this.entityType = entityType;
+ return this;
+ }
+
+ public Builder entityType(EntityType entityType) {
+ this.entityType = Optional.ofNullable(entityType);
+ return this;
+ }
+
+ /**
+ * Page limit (default 100)
+ */
+ @JsonSetter(value = "limit", nulls = Nulls.SKIP)
+ public Builder limit(Optional limit) {
+ this.limit = limit;
+ return this;
+ }
+
+ public Builder limit(Long limit) {
+ this.limit = Optional.ofNullable(limit);
+ return this;
+ }
+
+ /**
+ * Page offset (default 0)
+ */
+ @JsonSetter(value = "offset", nulls = Nulls.SKIP)
+ public Builder offset(Optional offset) {
+ this.offset = offset;
+ return this;
+ }
+
+ public Builder offset(Long offset) {
+ this.offset = Optional.ofNullable(offset);
+ return this;
+ }
+
+ public CountEntityTraitsParams build() {
+ return new CountEntityTraitsParams(definitionId, entityType, limit, offset, additionalProperties);
+ }
+
+ public Builder additionalProperty(String key, Object value) {
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ public Builder additionalProperties(Map additionalProperties) {
+ this.additionalProperties.putAll(additionalProperties);
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/com/schematic/api/resources/companies/types/CountEntityTraitsResponse.java b/src/main/java/com/schematic/api/resources/companies/types/CountEntityTraitsResponse.java
new file mode 100644
index 0000000..f480640
--- /dev/null
+++ b/src/main/java/com/schematic/api/resources/companies/types/CountEntityTraitsResponse.java
@@ -0,0 +1,152 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.schematic.api.resources.companies.types;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.schematic.api.core.ObjectMappers;
+import com.schematic.api.types.CountResponse;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = CountEntityTraitsResponse.Builder.class)
+public final class CountEntityTraitsResponse {
+ private final CountResponse data;
+
+ private final CountEntityTraitsParams params;
+
+ private final Map additionalProperties;
+
+ private CountEntityTraitsResponse(
+ CountResponse data, CountEntityTraitsParams params, Map additionalProperties) {
+ this.data = data;
+ this.params = params;
+ this.additionalProperties = additionalProperties;
+ }
+
+ @JsonProperty("data")
+ public CountResponse getData() {
+ return data;
+ }
+
+ /**
+ * @return Input parameters
+ */
+ @JsonProperty("params")
+ public CountEntityTraitsParams getParams() {
+ return params;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof CountEntityTraitsResponse && equalTo((CountEntityTraitsResponse) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(CountEntityTraitsResponse other) {
+ return data.equals(other.data) && params.equals(other.params);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.data, this.params);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static DataStage builder() {
+ return new Builder();
+ }
+
+ public interface DataStage {
+ ParamsStage data(@NotNull CountResponse data);
+
+ Builder from(CountEntityTraitsResponse other);
+ }
+
+ public interface ParamsStage {
+ /**
+ * Input parameters
+ */
+ _FinalStage params(@NotNull CountEntityTraitsParams params);
+ }
+
+ public interface _FinalStage {
+ CountEntityTraitsResponse build();
+
+ _FinalStage additionalProperty(String key, Object value);
+
+ _FinalStage additionalProperties(Map additionalProperties);
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder implements DataStage, ParamsStage, _FinalStage {
+ private CountResponse data;
+
+ private CountEntityTraitsParams params;
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ @java.lang.Override
+ public Builder from(CountEntityTraitsResponse other) {
+ data(other.getData());
+ params(other.getParams());
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter("data")
+ public ParamsStage data(@NotNull CountResponse data) {
+ this.data = Objects.requireNonNull(data, "data must not be null");
+ return this;
+ }
+
+ /**
+ * Input parameters
+ * @return Reference to {@code this} so that method calls can be chained together.
+ */
+ @java.lang.Override
+ @JsonSetter("params")
+ public _FinalStage params(@NotNull CountEntityTraitsParams params) {
+ this.params = Objects.requireNonNull(params, "params must not be null");
+ return this;
+ }
+
+ @java.lang.Override
+ public CountEntityTraitsResponse build() {
+ return new CountEntityTraitsResponse(data, params, additionalProperties);
+ }
+
+ @java.lang.Override
+ public Builder additionalProperty(String key, Object value) {
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ @java.lang.Override
+ public Builder additionalProperties(Map additionalProperties) {
+ this.additionalProperties.putAll(additionalProperties);
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/com/schematic/api/resources/companies/types/DeleteEntityTraitDefinitionResponse.java b/src/main/java/com/schematic/api/resources/companies/types/DeleteEntityTraitDefinitionResponse.java
new file mode 100644
index 0000000..f1ca157
--- /dev/null
+++ b/src/main/java/com/schematic/api/resources/companies/types/DeleteEntityTraitDefinitionResponse.java
@@ -0,0 +1,182 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.schematic.api.resources.companies.types;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.schematic.api.core.ObjectMappers;
+import com.schematic.api.types.DeleteResponse;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = DeleteEntityTraitDefinitionResponse.Builder.class)
+public final class DeleteEntityTraitDefinitionResponse {
+ private final DeleteResponse data;
+
+ private final Map params;
+
+ private final Map additionalProperties;
+
+ private DeleteEntityTraitDefinitionResponse(
+ DeleteResponse data, Map params, Map additionalProperties) {
+ this.data = data;
+ this.params = params;
+ this.additionalProperties = additionalProperties;
+ }
+
+ @JsonProperty("data")
+ public DeleteResponse getData() {
+ return data;
+ }
+
+ /**
+ * @return Input parameters
+ */
+ @JsonProperty("params")
+ public Map getParams() {
+ return params;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof DeleteEntityTraitDefinitionResponse
+ && equalTo((DeleteEntityTraitDefinitionResponse) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(DeleteEntityTraitDefinitionResponse other) {
+ return data.equals(other.data) && params.equals(other.params);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.data, this.params);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static DataStage builder() {
+ return new Builder();
+ }
+
+ public interface DataStage {
+ _FinalStage data(@NotNull DeleteResponse data);
+
+ Builder from(DeleteEntityTraitDefinitionResponse other);
+ }
+
+ public interface _FinalStage {
+ DeleteEntityTraitDefinitionResponse build();
+
+ _FinalStage additionalProperty(String key, Object value);
+
+ _FinalStage additionalProperties(Map additionalProperties);
+
+ /**
+ * Input parameters
+ */
+ _FinalStage params(Map params);
+
+ _FinalStage putAllParams(Map params);
+
+ _FinalStage params(String key, JsonNode value);
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder implements DataStage, _FinalStage {
+ private DeleteResponse data;
+
+ private Map params = new LinkedHashMap<>();
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ @java.lang.Override
+ public Builder from(DeleteEntityTraitDefinitionResponse other) {
+ data(other.getData());
+ params(other.getParams());
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter("data")
+ public _FinalStage data(@NotNull DeleteResponse data) {
+ this.data = Objects.requireNonNull(data, "data must not be null");
+ return this;
+ }
+
+ /**
+ * Input parameters
+ * @return Reference to {@code this} so that method calls can be chained together.
+ */
+ @java.lang.Override
+ public _FinalStage params(String key, JsonNode value) {
+ this.params.put(key, value);
+ return this;
+ }
+
+ /**
+ * Input parameters
+ * @return Reference to {@code this} so that method calls can be chained together.
+ */
+ @java.lang.Override
+ public _FinalStage putAllParams(Map params) {
+ if (params != null) {
+ this.params.putAll(params);
+ }
+ return this;
+ }
+
+ /**
+ * Input parameters
+ */
+ @java.lang.Override
+ @JsonSetter(value = "params", nulls = Nulls.SKIP)
+ public _FinalStage params(Map params) {
+ this.params.clear();
+ if (params != null) {
+ this.params.putAll(params);
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public DeleteEntityTraitDefinitionResponse build() {
+ return new DeleteEntityTraitDefinitionResponse(data, params, additionalProperties);
+ }
+
+ @java.lang.Override
+ public Builder additionalProperty(String key, Object value) {
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ @java.lang.Override
+ public Builder additionalProperties(Map additionalProperties) {
+ this.additionalProperties.putAll(additionalProperties);
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/com/schematic/api/resources/companies/types/GetEntityTraitDefinitionUsageResponse.java b/src/main/java/com/schematic/api/resources/companies/types/GetEntityTraitDefinitionUsageResponse.java
new file mode 100644
index 0000000..c5c8f20
--- /dev/null
+++ b/src/main/java/com/schematic/api/resources/companies/types/GetEntityTraitDefinitionUsageResponse.java
@@ -0,0 +1,182 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.schematic.api.resources.companies.types;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.schematic.api.core.ObjectMappers;
+import com.schematic.api.types.EntityTraitDefinitionUsage;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = GetEntityTraitDefinitionUsageResponse.Builder.class)
+public final class GetEntityTraitDefinitionUsageResponse {
+ private final EntityTraitDefinitionUsage data;
+
+ private final Map params;
+
+ private final Map additionalProperties;
+
+ private GetEntityTraitDefinitionUsageResponse(
+ EntityTraitDefinitionUsage data, Map params, Map additionalProperties) {
+ this.data = data;
+ this.params = params;
+ this.additionalProperties = additionalProperties;
+ }
+
+ @JsonProperty("data")
+ public EntityTraitDefinitionUsage getData() {
+ return data;
+ }
+
+ /**
+ * @return Input parameters
+ */
+ @JsonProperty("params")
+ public Map getParams() {
+ return params;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof GetEntityTraitDefinitionUsageResponse
+ && equalTo((GetEntityTraitDefinitionUsageResponse) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(GetEntityTraitDefinitionUsageResponse other) {
+ return data.equals(other.data) && params.equals(other.params);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.data, this.params);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static DataStage builder() {
+ return new Builder();
+ }
+
+ public interface DataStage {
+ _FinalStage data(@NotNull EntityTraitDefinitionUsage data);
+
+ Builder from(GetEntityTraitDefinitionUsageResponse other);
+ }
+
+ public interface _FinalStage {
+ GetEntityTraitDefinitionUsageResponse build();
+
+ _FinalStage additionalProperty(String key, Object value);
+
+ _FinalStage additionalProperties(Map additionalProperties);
+
+ /**
+ * Input parameters
+ */
+ _FinalStage params(Map params);
+
+ _FinalStage putAllParams(Map params);
+
+ _FinalStage params(String key, JsonNode value);
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder implements DataStage, _FinalStage {
+ private EntityTraitDefinitionUsage data;
+
+ private Map params = new LinkedHashMap<>();
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ @java.lang.Override
+ public Builder from(GetEntityTraitDefinitionUsageResponse other) {
+ data(other.getData());
+ params(other.getParams());
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter("data")
+ public _FinalStage data(@NotNull EntityTraitDefinitionUsage data) {
+ this.data = Objects.requireNonNull(data, "data must not be null");
+ return this;
+ }
+
+ /**
+ * Input parameters
+ * @return Reference to {@code this} so that method calls can be chained together.
+ */
+ @java.lang.Override
+ public _FinalStage params(String key, JsonNode value) {
+ this.params.put(key, value);
+ return this;
+ }
+
+ /**
+ * Input parameters
+ * @return Reference to {@code this} so that method calls can be chained together.
+ */
+ @java.lang.Override
+ public _FinalStage putAllParams(Map params) {
+ if (params != null) {
+ this.params.putAll(params);
+ }
+ return this;
+ }
+
+ /**
+ * Input parameters
+ */
+ @java.lang.Override
+ @JsonSetter(value = "params", nulls = Nulls.SKIP)
+ public _FinalStage params(Map params) {
+ this.params.clear();
+ if (params != null) {
+ this.params.putAll(params);
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public GetEntityTraitDefinitionUsageResponse build() {
+ return new GetEntityTraitDefinitionUsageResponse(data, params, additionalProperties);
+ }
+
+ @java.lang.Override
+ public Builder additionalProperty(String key, Object value) {
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ @java.lang.Override
+ public Builder additionalProperties(Map additionalProperties) {
+ this.additionalProperties.putAll(additionalProperties);
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/com/schematic/api/resources/companies/types/ListPlanChangesParams.java b/src/main/java/com/schematic/api/resources/companies/types/ListPlanChangesParams.java
index b694f5e..1f3fc96 100644
--- a/src/main/java/com/schematic/api/resources/companies/types/ListPlanChangesParams.java
+++ b/src/main/java/com/schematic/api/resources/companies/types/ListPlanChangesParams.java
@@ -35,8 +35,6 @@ public final class ListPlanChangesParams {
private final Optional offset;
- private final Optional> planIds;
-
private final Map additionalProperties;
private ListPlanChangesParams(
@@ -46,7 +44,6 @@ private ListPlanChangesParams(
Optional> companyIds,
Optional limit,
Optional offset,
- Optional> planIds,
Map additionalProperties) {
this.action = action;
this.basePlanAction = basePlanAction;
@@ -54,7 +51,6 @@ private ListPlanChangesParams(
this.companyIds = companyIds;
this.limit = limit;
this.offset = offset;
- this.planIds = planIds;
this.additionalProperties = additionalProperties;
}
@@ -94,11 +90,6 @@ public Optional getOffset() {
return offset;
}
- @JsonProperty("plan_ids")
- public Optional> getPlanIds() {
- return planIds;
- }
-
@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
@@ -116,20 +107,12 @@ private boolean equalTo(ListPlanChangesParams other) {
&& companyId.equals(other.companyId)
&& companyIds.equals(other.companyIds)
&& limit.equals(other.limit)
- && offset.equals(other.offset)
- && planIds.equals(other.planIds);
+ && offset.equals(other.offset);
}
@java.lang.Override
public int hashCode() {
- return Objects.hash(
- this.action,
- this.basePlanAction,
- this.companyId,
- this.companyIds,
- this.limit,
- this.offset,
- this.planIds);
+ return Objects.hash(this.action, this.basePlanAction, this.companyId, this.companyIds, this.limit, this.offset);
}
@java.lang.Override
@@ -155,8 +138,6 @@ public static final class Builder {
private Optional offset = Optional.empty();
- private Optional> planIds = Optional.empty();
-
@JsonAnySetter
private Map additionalProperties = new HashMap<>();
@@ -169,7 +150,6 @@ public Builder from(ListPlanChangesParams other) {
companyIds(other.getCompanyIds());
limit(other.getLimit());
offset(other.getOffset());
- planIds(other.getPlanIds());
return this;
}
@@ -245,20 +225,9 @@ public Builder offset(Long offset) {
return this;
}
- @JsonSetter(value = "plan_ids", nulls = Nulls.SKIP)
- public Builder planIds(Optional> planIds) {
- this.planIds = planIds;
- return this;
- }
-
- public Builder planIds(List planIds) {
- this.planIds = Optional.ofNullable(planIds);
- return this;
- }
-
public ListPlanChangesParams build() {
return new ListPlanChangesParams(
- action, basePlanAction, companyId, companyIds, limit, offset, planIds, additionalProperties);
+ action, basePlanAction, companyId, companyIds, limit, offset, additionalProperties);
}
public Builder additionalProperty(String key, Object value) {
diff --git a/src/main/java/com/schematic/api/resources/credits/requests/CreateCreditBundleRequestBody.java b/src/main/java/com/schematic/api/resources/credits/requests/CreateCreditBundleRequestBody.java
index efa78b1..ebe5357 100644
--- a/src/main/java/com/schematic/api/resources/credits/requests/CreateCreditBundleRequestBody.java
+++ b/src/main/java/com/schematic/api/resources/credits/requests/CreateCreditBundleRequestBody.java
@@ -30,6 +30,8 @@ public final class CreateCreditBundleRequestBody {
private final Optional bundleType;
+ private final Optional