diff --git a/.fern/metadata.json b/.fern/metadata.json
index 309b806..ffd7149 100644
--- a/.fern/metadata.json
+++ b/.fern/metadata.json
@@ -1,7 +1,7 @@
{
"cliVersion": "5.6.0",
"generatorName": "fernapi/fern-java-sdk",
- "generatorVersion": "4.9.0",
+ "generatorVersion": "4.9.1",
"generatorConfig": {
"client-class-name": "BaseSchematic",
"generate-unknown-as-json-node": true,
@@ -14,10 +14,10 @@
"implementation redis.clients:jedis:5.2.0"
]
},
- "originGitCommit": "a5724e8dfeba2338da634f270044ac597694f772",
+ "originGitCommit": "786b643cc0bf17aff1114597108246b5cf8af395",
"originGitCommitIsDirty": false,
"invokedBy": "ci",
- "requestedVersion": "1.4.2",
+ "requestedVersion": "1.4.3",
"ciProvider": "github",
- "sdkVersion": "1.4.2"
+ "sdkVersion": "1.4.3"
}
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index 8cca5aa..b581265 100644
--- a/build.gradle
+++ b/build.gradle
@@ -52,7 +52,7 @@ java {
group = 'com.schematichq'
-version = '1.4.2'
+version = '1.4.3'
jar {
dependsOn(":generatePomFileForMavenPublication")
@@ -83,7 +83,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.schematichq'
artifactId = 'schematic-java'
- version = '1.4.2'
+ version = '1.4.3'
from components.java
pom {
name = 'Schematic'
diff --git a/reference.md b/reference.md
index 7b267d5..dc2ff1f 100644
--- a/reference.md
+++ b/reference.md
@@ -1,4 +1,29 @@
# Reference
+client.getCreditLedger()
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```java
+client.getCreditLedger();
+```
+
+
+
+
+
+
+
+
+
+
## accounts
client.accounts.listAccountMembers() -> ListAccountMembersResponse
@@ -5193,222 +5218,6 @@ client.credits().releaseCreditLease(
-
-
-
-
-client.credits.getEnrichedCreditLedger() -> GetEnrichedCreditLedgerResponse
-
--
-
-#### 🔌 Usage
-
-
--
-
-
--
-
-```java
-client.credits().getEnrichedCreditLedger(
- GetEnrichedCreditLedgerRequest
- .builder()
- .companyId("company_id")
- .period(CreditLedgerPeriod.DAILY)
- .billingCreditId("billing_credit_id")
- .featureId("feature_id")
- .startTime("start_time")
- .endTime("end_time")
- .limit(1000000L)
- .offset(1000000L)
- .build()
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
--
-
-
--
-
-**companyId:** `String`
-
-
-
-
-
--
-
-**billingCreditId:** `Optional`
-
-
-
-
-
--
-
-**featureId:** `Optional`
-
-
-
-
-
--
-
-**period:** `CreditLedgerPeriod`
-
-
-
-
-
--
-
-**startTime:** `Optional`
-
-
-
-
-
--
-
-**endTime:** `Optional`
-
-
-
-
-
--
-
-**limit:** `Optional` — Page limit (default 100)
-
-
-
-
-
--
-
-**offset:** `Optional` — Page offset (default 0)
-
-
-
-
-
-
-
-
-
-
-
-client.credits.countCreditLedger() -> CountCreditLedgerResponse
-
--
-
-#### 🔌 Usage
-
-
--
-
-
--
-
-```java
-client.credits().countCreditLedger(
- CountCreditLedgerRequest
- .builder()
- .companyId("company_id")
- .period(CreditLedgerPeriod.DAILY)
- .billingCreditId("billing_credit_id")
- .featureId("feature_id")
- .startTime("start_time")
- .endTime("end_time")
- .limit(1000000L)
- .offset(1000000L)
- .build()
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
--
-
-
--
-
-**companyId:** `String`
-
-
-
-
-
--
-
-**billingCreditId:** `Optional`
-
-
-
-
-
--
-
-**featureId:** `Optional`
-
-
-
-
-
--
-
-**period:** `CreditLedgerPeriod`
-
-
-
-
-
--
-
-**startTime:** `Optional`
-
-
-
-
-
--
-
-**endTime:** `Optional`
-
-
-
-
-
--
-
-**limit:** `Optional` — Page limit (default 100)
-
-
-
-
-
--
-
-**offset:** `Optional` — Page offset (default 0)
-
-
-
-
-
-
-
@@ -12002,15 +11811,6 @@ client.plans().retryCustomPlanBilling(
RetryCustomPlanBillingRequestBody
.builder()
.customerEmail("customer_email")
- .payInAdvance(
- Arrays.asList(
- UpdatePayInAdvanceRequestBody
- .builder()
- .priceId("price_id")
- .quantity(1000000L)
- .build()
- )
- )
.build()
);
```
@@ -12053,14 +11853,6 @@ client.plans().retryCustomPlanBilling(
**daysUntilDue:** `Optional`
-
-
-
-
--
-
-**payInAdvance:** `List`
-
@@ -13152,15 +12944,6 @@ client.plans().publishPlanVersion(
.excludedCompanyIds(
Arrays.asList("excluded_company_ids")
)
- .payInAdvance(
- Arrays.asList(
- UpdatePayInAdvanceRequestBody
- .builder()
- .priceId("price_id")
- .quantity(1000000L)
- .build()
- )
- )
.build()
);
```
@@ -13219,14 +13002,6 @@ client.plans().publishPlanVersion(
**migrationStrategy:** `PlanVersionMigrationStrategy`
-
-
-
-
--
-
-**payInAdvance:** `List`
-
@@ -16515,6 +16290,7 @@ client.plangroups().createPlanGroup(
.checkoutCollectEmail(true)
.checkoutCollectPhone(true)
.enableTaxCollection(true)
+ .optInEnabled(true)
.preventDowngradesWhenOverLimit(true)
.preventSelfServiceDowngrade(true)
.prorationBehavior(ProrationBehavior.CREATE_PRORATIONS)
@@ -16664,6 +16440,30 @@ client.plangroups().createPlanGroup(
-
+**optInEnabled:** `Boolean`
+
+
+
+
+
+-
+
+**optInText:** `Optional`
+
+
+
+
+
+-
+
+**optInTitle:** `Optional`
+
+
+
+
+
+-
+
**orderedAddOns:** `List`
@@ -16857,6 +16657,7 @@ client.plangroups().updatePlanGroup(
.checkoutCollectEmail(true)
.checkoutCollectPhone(true)
.enableTaxCollection(true)
+ .optInEnabled(true)
.preventDowngradesWhenOverLimit(true)
.preventSelfServiceDowngrade(true)
.prorationBehavior(ProrationBehavior.CREATE_PRORATIONS)
@@ -17014,6 +16815,30 @@ client.plangroups().updatePlanGroup(
-
+**optInEnabled:** `Boolean`
+
+
+
+
+
+-
+
+**optInText:** `Optional`
+
+
+
+
+
+-
+
+**optInTitle:** `Optional`
+
+
+
+
+
+-
+
**orderedAddOns:** `List`
diff --git a/src/main/java/com/schematic/api/AsyncBaseSchematic.java b/src/main/java/com/schematic/api/AsyncBaseSchematic.java
index 16df612..0cbf4ac 100644
--- a/src/main/java/com/schematic/api/AsyncBaseSchematic.java
+++ b/src/main/java/com/schematic/api/AsyncBaseSchematic.java
@@ -4,6 +4,7 @@
package com.schematic.api;
import com.schematic.api.core.ClientOptions;
+import com.schematic.api.core.RequestOptions;
import com.schematic.api.core.Suppliers;
import com.schematic.api.resources.accesstokens.AsyncAccesstokensClient;
import com.schematic.api.resources.accounts.AsyncAccountsClient;
@@ -25,11 +26,14 @@
import com.schematic.api.resources.plans.AsyncPlansClient;
import com.schematic.api.resources.scheduledcheckout.AsyncScheduledcheckoutClient;
import com.schematic.api.resources.webhooks.AsyncWebhooksClient;
+import java.util.concurrent.CompletableFuture;
import java.util.function.Supplier;
public class AsyncBaseSchematic {
protected final ClientOptions clientOptions;
+ private final AsyncRawBaseSchematic rawClient;
+
protected final Supplier accountsClient;
protected final Supplier billingClient;
@@ -72,6 +76,7 @@ public class AsyncBaseSchematic {
public AsyncBaseSchematic(ClientOptions clientOptions) {
this.clientOptions = clientOptions;
+ this.rawClient = new AsyncRawBaseSchematic(clientOptions);
this.accountsClient = Suppliers.memoize(() -> new AsyncAccountsClient(clientOptions));
this.billingClient = Suppliers.memoize(() -> new AsyncBillingClient(clientOptions));
this.creditsClient = Suppliers.memoize(() -> new AsyncCreditsClient(clientOptions));
@@ -94,6 +99,21 @@ public AsyncBaseSchematic(ClientOptions clientOptions) {
this.webhooksClient = Suppliers.memoize(() -> new AsyncWebhooksClient(clientOptions));
}
+ /**
+ * Get responses with HTTP metadata like headers
+ */
+ public AsyncRawBaseSchematic withRawResponse() {
+ return this.rawClient;
+ }
+
+ public CompletableFuture getCreditLedger() {
+ return this.rawClient.getCreditLedger().thenApply(response -> response.body());
+ }
+
+ public CompletableFuture getCreditLedger(RequestOptions requestOptions) {
+ return this.rawClient.getCreditLedger(requestOptions).thenApply(response -> response.body());
+ }
+
public AsyncAccountsClient accounts() {
return this.accountsClient.get();
}
diff --git a/src/main/java/com/schematic/api/AsyncRawBaseSchematic.java b/src/main/java/com/schematic/api/AsyncRawBaseSchematic.java
new file mode 100644
index 0000000..6d926ed
--- /dev/null
+++ b/src/main/java/com/schematic/api/AsyncRawBaseSchematic.java
@@ -0,0 +1,79 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.schematic.api;
+
+import com.schematic.api.core.BaseSchematicApiException;
+import com.schematic.api.core.BaseSchematicException;
+import com.schematic.api.core.BaseSchematicHttpResponse;
+import com.schematic.api.core.ClientOptions;
+import com.schematic.api.core.ObjectMappers;
+import com.schematic.api.core.RequestOptions;
+import java.io.IOException;
+import java.util.concurrent.CompletableFuture;
+import okhttp3.Call;
+import okhttp3.Callback;
+import okhttp3.Headers;
+import okhttp3.HttpUrl;
+import okhttp3.OkHttpClient;
+import okhttp3.Request;
+import okhttp3.Response;
+import okhttp3.ResponseBody;
+import org.jetbrains.annotations.NotNull;
+
+public class AsyncRawBaseSchematic {
+ protected final ClientOptions clientOptions;
+
+ public AsyncRawBaseSchematic(ClientOptions clientOptions) {
+ this.clientOptions = clientOptions;
+ }
+
+ public CompletableFuture> getCreditLedger() {
+ return getCreditLedger(null);
+ }
+
+ public CompletableFuture> getCreditLedger(RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("billing/credits/ledger");
+ 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)))
+ .build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ 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()) {
+ if (response.isSuccessful()) {
+ future.complete(new BaseSchematicHttpResponse<>(null, response));
+ return;
+ }
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ future.completeExceptionally(new BaseSchematicApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response));
+ return;
+ } 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;
+ }
+}
diff --git a/src/main/java/com/schematic/api/RawBaseSchematic.java b/src/main/java/com/schematic/api/RawBaseSchematic.java
new file mode 100644
index 0000000..9f77bf3
--- /dev/null
+++ b/src/main/java/com/schematic/api/RawBaseSchematic.java
@@ -0,0 +1,62 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.schematic.api;
+
+import com.schematic.api.core.BaseSchematicApiException;
+import com.schematic.api.core.BaseSchematicException;
+import com.schematic.api.core.BaseSchematicHttpResponse;
+import com.schematic.api.core.ClientOptions;
+import com.schematic.api.core.ObjectMappers;
+import com.schematic.api.core.RequestOptions;
+import java.io.IOException;
+import okhttp3.Headers;
+import okhttp3.HttpUrl;
+import okhttp3.OkHttpClient;
+import okhttp3.Request;
+import okhttp3.Response;
+import okhttp3.ResponseBody;
+
+public class RawBaseSchematic {
+ protected final ClientOptions clientOptions;
+
+ public RawBaseSchematic(ClientOptions clientOptions) {
+ this.clientOptions = clientOptions;
+ }
+
+ public BaseSchematicHttpResponse getCreditLedger() {
+ return getCreditLedger(null);
+ }
+
+ public BaseSchematicHttpResponse getCreditLedger(RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("billing/credits/ledger");
+ 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)))
+ .build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ try (Response response = client.newCall(okhttpRequest).execute()) {
+ ResponseBody responseBody = response.body();
+ if (response.isSuccessful()) {
+ return new BaseSchematicHttpResponse<>(null, response);
+ }
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ throw new BaseSchematicApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response);
+ } catch (IOException e) {
+ throw new BaseSchematicException("Network error executing HTTP request", e);
+ }
+ }
+}
diff --git a/src/main/java/com/schematic/api/core/ClientOptions.java b/src/main/java/com/schematic/api/core/ClientOptions.java
index 0b2f698..f832217 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.4.2");
+ put("User-Agent", "com.schematichq:schematic-java/1.4.3");
put("X-Fern-Language", "JAVA");
put("X-Fern-SDK-Name", "com.schematic.fern:api-sdk");
- put("X-Fern-SDK-Version", "1.4.2");
+ put("X-Fern-SDK-Version", "1.4.3");
}
});
this.headerSuppliers = headerSuppliers;
diff --git a/src/main/java/com/schematic/api/resources/credits/AsyncCreditsClient.java b/src/main/java/com/schematic/api/resources/credits/AsyncCreditsClient.java
index 93a982f..015e66d 100644
--- a/src/main/java/com/schematic/api/resources/credits/AsyncCreditsClient.java
+++ b/src/main/java/com/schematic/api/resources/credits/AsyncCreditsClient.java
@@ -13,13 +13,11 @@
import com.schematic.api.resources.credits.requests.CountCompanyGrantsRequest;
import com.schematic.api.resources.credits.requests.CountCreditBundlesRequest;
import com.schematic.api.resources.credits.requests.CountCreditEventLedgerRequest;
-import com.schematic.api.resources.credits.requests.CountCreditLedgerRequest;
import com.schematic.api.resources.credits.requests.CreateBillingCreditRequestBody;
import com.schematic.api.resources.credits.requests.CreateCompanyCreditGrant;
import com.schematic.api.resources.credits.requests.CreateCreditBundleRequestBody;
import com.schematic.api.resources.credits.requests.DeleteBillingPlanCreditGrantRequest;
import com.schematic.api.resources.credits.requests.ExtendCreditLeaseRequestBody;
-import com.schematic.api.resources.credits.requests.GetEnrichedCreditLedgerRequest;
import com.schematic.api.resources.credits.requests.ListBillingCreditsRequest;
import com.schematic.api.resources.credits.requests.ListBillingPlanCreditGrantsRequest;
import com.schematic.api.resources.credits.requests.ListCompanyCreditBalancesRequest;
@@ -37,7 +35,6 @@
import com.schematic.api.resources.credits.types.CountCompanyGrantsResponse;
import com.schematic.api.resources.credits.types.CountCreditBundlesResponse;
import com.schematic.api.resources.credits.types.CountCreditEventLedgerResponse;
-import com.schematic.api.resources.credits.types.CountCreditLedgerResponse;
import com.schematic.api.resources.credits.types.CreateBillingCreditResponse;
import com.schematic.api.resources.credits.types.CreateBillingPlanCreditGrantResponse;
import com.schematic.api.resources.credits.types.CreateCreditBundleResponse;
@@ -45,7 +42,6 @@
import com.schematic.api.resources.credits.types.DeleteCreditBundleResponse;
import com.schematic.api.resources.credits.types.ExtendCreditLeaseResponse;
import com.schematic.api.resources.credits.types.GetCreditBundleResponse;
-import com.schematic.api.resources.credits.types.GetEnrichedCreditLedgerResponse;
import com.schematic.api.resources.credits.types.GetSingleBillingCreditResponse;
import com.schematic.api.resources.credits.types.GetSingleBillingPlanCreditGrantResponse;
import com.schematic.api.resources.credits.types.GrantBillingCreditsToCompanyResponse;
@@ -371,25 +367,6 @@ public CompletableFuture releaseCreditLease(
.thenApply(response -> response.body());
}
- public CompletableFuture getEnrichedCreditLedger(
- GetEnrichedCreditLedgerRequest request) {
- return this.rawClient.getEnrichedCreditLedger(request).thenApply(response -> response.body());
- }
-
- public CompletableFuture getEnrichedCreditLedger(
- GetEnrichedCreditLedgerRequest request, RequestOptions requestOptions) {
- return this.rawClient.getEnrichedCreditLedger(request, requestOptions).thenApply(response -> response.body());
- }
-
- public CompletableFuture countCreditLedger(CountCreditLedgerRequest request) {
- return this.rawClient.countCreditLedger(request).thenApply(response -> response.body());
- }
-
- public CompletableFuture countCreditLedger(
- CountCreditLedgerRequest request, RequestOptions requestOptions) {
- return this.rawClient.countCreditLedger(request, requestOptions).thenApply(response -> response.body());
- }
-
public CompletableFuture listBillingPlanCreditGrants() {
return this.rawClient.listBillingPlanCreditGrants().thenApply(response -> response.body());
}
diff --git a/src/main/java/com/schematic/api/resources/credits/AsyncRawCreditsClient.java b/src/main/java/com/schematic/api/resources/credits/AsyncRawCreditsClient.java
index 0a5a03f..912ca5a 100644
--- a/src/main/java/com/schematic/api/resources/credits/AsyncRawCreditsClient.java
+++ b/src/main/java/com/schematic/api/resources/credits/AsyncRawCreditsClient.java
@@ -25,13 +25,11 @@
import com.schematic.api.resources.credits.requests.CountCompanyGrantsRequest;
import com.schematic.api.resources.credits.requests.CountCreditBundlesRequest;
import com.schematic.api.resources.credits.requests.CountCreditEventLedgerRequest;
-import com.schematic.api.resources.credits.requests.CountCreditLedgerRequest;
import com.schematic.api.resources.credits.requests.CreateBillingCreditRequestBody;
import com.schematic.api.resources.credits.requests.CreateCompanyCreditGrant;
import com.schematic.api.resources.credits.requests.CreateCreditBundleRequestBody;
import com.schematic.api.resources.credits.requests.DeleteBillingPlanCreditGrantRequest;
import com.schematic.api.resources.credits.requests.ExtendCreditLeaseRequestBody;
-import com.schematic.api.resources.credits.requests.GetEnrichedCreditLedgerRequest;
import com.schematic.api.resources.credits.requests.ListBillingCreditsRequest;
import com.schematic.api.resources.credits.requests.ListBillingPlanCreditGrantsRequest;
import com.schematic.api.resources.credits.requests.ListCompanyCreditBalancesRequest;
@@ -49,7 +47,6 @@
import com.schematic.api.resources.credits.types.CountCompanyGrantsResponse;
import com.schematic.api.resources.credits.types.CountCreditBundlesResponse;
import com.schematic.api.resources.credits.types.CountCreditEventLedgerResponse;
-import com.schematic.api.resources.credits.types.CountCreditLedgerResponse;
import com.schematic.api.resources.credits.types.CreateBillingCreditResponse;
import com.schematic.api.resources.credits.types.CreateBillingPlanCreditGrantResponse;
import com.schematic.api.resources.credits.types.CreateCreditBundleResponse;
@@ -57,7 +54,6 @@
import com.schematic.api.resources.credits.types.DeleteCreditBundleResponse;
import com.schematic.api.resources.credits.types.ExtendCreditLeaseResponse;
import com.schematic.api.resources.credits.types.GetCreditBundleResponse;
-import com.schematic.api.resources.credits.types.GetEnrichedCreditLedgerResponse;
import com.schematic.api.resources.credits.types.GetSingleBillingCreditResponse;
import com.schematic.api.resources.credits.types.GetSingleBillingPlanCreditGrantResponse;
import com.schematic.api.resources.credits.types.GrantBillingCreditsToCompanyResponse;
@@ -2294,231 +2290,6 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) {
return future;
}
- public CompletableFuture> getEnrichedCreditLedger(
- GetEnrichedCreditLedgerRequest request) {
- return getEnrichedCreditLedger(request, null);
- }
-
- public CompletableFuture> getEnrichedCreditLedger(
- GetEnrichedCreditLedgerRequest request, RequestOptions requestOptions) {
- HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
- .newBuilder()
- .addPathSegments("billing/credits/ledger");
- QueryStringMapper.addQueryParameter(httpUrl, "company_id", request.getCompanyId(), false);
- if (request.getBillingCreditId().isPresent()) {
- QueryStringMapper.addQueryParameter(
- httpUrl, "billing_credit_id", request.getBillingCreditId().get(), false);
- }
- if (request.getFeatureId().isPresent()) {
- QueryStringMapper.addQueryParameter(
- httpUrl, "feature_id", request.getFeatureId().get(), false);
- }
- QueryStringMapper.addQueryParameter(httpUrl, "period", request.getPeriod(), false);
- if (request.getStartTime().isPresent()) {
- QueryStringMapper.addQueryParameter(
- httpUrl, "start_time", request.getStartTime().get(), false);
- }
- if (request.getEndTime().isPresent()) {
- QueryStringMapper.addQueryParameter(
- httpUrl, "end_time", request.getEndTime().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);
- }
- 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, GetEnrichedCreditLedgerResponse.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 (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> countCreditLedger(
- CountCreditLedgerRequest request) {
- return countCreditLedger(request, null);
- }
-
- public CompletableFuture> countCreditLedger(
- CountCreditLedgerRequest request, RequestOptions requestOptions) {
- HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
- .newBuilder()
- .addPathSegments("billing/credits/ledger/count");
- QueryStringMapper.addQueryParameter(httpUrl, "company_id", request.getCompanyId(), false);
- if (request.getBillingCreditId().isPresent()) {
- QueryStringMapper.addQueryParameter(
- httpUrl, "billing_credit_id", request.getBillingCreditId().get(), false);
- }
- if (request.getFeatureId().isPresent()) {
- QueryStringMapper.addQueryParameter(
- httpUrl, "feature_id", request.getFeatureId().get(), false);
- }
- QueryStringMapper.addQueryParameter(httpUrl, "period", request.getPeriod(), false);
- if (request.getStartTime().isPresent()) {
- QueryStringMapper.addQueryParameter(
- httpUrl, "start_time", request.getStartTime().get(), false);
- }
- if (request.getEndTime().isPresent()) {
- QueryStringMapper.addQueryParameter(
- httpUrl, "end_time", request.getEndTime().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);
- }
- 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, CountCreditLedgerResponse.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 (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>
listBillingPlanCreditGrants() {
return listBillingPlanCreditGrants(
diff --git a/src/main/java/com/schematic/api/resources/credits/CreditsClient.java b/src/main/java/com/schematic/api/resources/credits/CreditsClient.java
index 05961a5..f9ce4fa 100644
--- a/src/main/java/com/schematic/api/resources/credits/CreditsClient.java
+++ b/src/main/java/com/schematic/api/resources/credits/CreditsClient.java
@@ -13,13 +13,11 @@
import com.schematic.api.resources.credits.requests.CountCompanyGrantsRequest;
import com.schematic.api.resources.credits.requests.CountCreditBundlesRequest;
import com.schematic.api.resources.credits.requests.CountCreditEventLedgerRequest;
-import com.schematic.api.resources.credits.requests.CountCreditLedgerRequest;
import com.schematic.api.resources.credits.requests.CreateBillingCreditRequestBody;
import com.schematic.api.resources.credits.requests.CreateCompanyCreditGrant;
import com.schematic.api.resources.credits.requests.CreateCreditBundleRequestBody;
import com.schematic.api.resources.credits.requests.DeleteBillingPlanCreditGrantRequest;
import com.schematic.api.resources.credits.requests.ExtendCreditLeaseRequestBody;
-import com.schematic.api.resources.credits.requests.GetEnrichedCreditLedgerRequest;
import com.schematic.api.resources.credits.requests.ListBillingCreditsRequest;
import com.schematic.api.resources.credits.requests.ListBillingPlanCreditGrantsRequest;
import com.schematic.api.resources.credits.requests.ListCompanyCreditBalancesRequest;
@@ -37,7 +35,6 @@
import com.schematic.api.resources.credits.types.CountCompanyGrantsResponse;
import com.schematic.api.resources.credits.types.CountCreditBundlesResponse;
import com.schematic.api.resources.credits.types.CountCreditEventLedgerResponse;
-import com.schematic.api.resources.credits.types.CountCreditLedgerResponse;
import com.schematic.api.resources.credits.types.CreateBillingCreditResponse;
import com.schematic.api.resources.credits.types.CreateBillingPlanCreditGrantResponse;
import com.schematic.api.resources.credits.types.CreateCreditBundleResponse;
@@ -45,7 +42,6 @@
import com.schematic.api.resources.credits.types.DeleteCreditBundleResponse;
import com.schematic.api.resources.credits.types.ExtendCreditLeaseResponse;
import com.schematic.api.resources.credits.types.GetCreditBundleResponse;
-import com.schematic.api.resources.credits.types.GetEnrichedCreditLedgerResponse;
import com.schematic.api.resources.credits.types.GetSingleBillingCreditResponse;
import com.schematic.api.resources.credits.types.GetSingleBillingPlanCreditGrantResponse;
import com.schematic.api.resources.credits.types.GrantBillingCreditsToCompanyResponse;
@@ -360,24 +356,6 @@ public ReleaseCreditLeaseResponse releaseCreditLease(
.body();
}
- public GetEnrichedCreditLedgerResponse getEnrichedCreditLedger(GetEnrichedCreditLedgerRequest request) {
- return this.rawClient.getEnrichedCreditLedger(request).body();
- }
-
- public GetEnrichedCreditLedgerResponse getEnrichedCreditLedger(
- GetEnrichedCreditLedgerRequest request, RequestOptions requestOptions) {
- return this.rawClient.getEnrichedCreditLedger(request, requestOptions).body();
- }
-
- public CountCreditLedgerResponse countCreditLedger(CountCreditLedgerRequest request) {
- return this.rawClient.countCreditLedger(request).body();
- }
-
- public CountCreditLedgerResponse countCreditLedger(
- CountCreditLedgerRequest request, RequestOptions requestOptions) {
- return this.rawClient.countCreditLedger(request, requestOptions).body();
- }
-
public ListBillingPlanCreditGrantsResponse listBillingPlanCreditGrants() {
return this.rawClient.listBillingPlanCreditGrants().body();
}
diff --git a/src/main/java/com/schematic/api/resources/credits/RawCreditsClient.java b/src/main/java/com/schematic/api/resources/credits/RawCreditsClient.java
index cfddf47..091862d 100644
--- a/src/main/java/com/schematic/api/resources/credits/RawCreditsClient.java
+++ b/src/main/java/com/schematic/api/resources/credits/RawCreditsClient.java
@@ -25,13 +25,11 @@
import com.schematic.api.resources.credits.requests.CountCompanyGrantsRequest;
import com.schematic.api.resources.credits.requests.CountCreditBundlesRequest;
import com.schematic.api.resources.credits.requests.CountCreditEventLedgerRequest;
-import com.schematic.api.resources.credits.requests.CountCreditLedgerRequest;
import com.schematic.api.resources.credits.requests.CreateBillingCreditRequestBody;
import com.schematic.api.resources.credits.requests.CreateCompanyCreditGrant;
import com.schematic.api.resources.credits.requests.CreateCreditBundleRequestBody;
import com.schematic.api.resources.credits.requests.DeleteBillingPlanCreditGrantRequest;
import com.schematic.api.resources.credits.requests.ExtendCreditLeaseRequestBody;
-import com.schematic.api.resources.credits.requests.GetEnrichedCreditLedgerRequest;
import com.schematic.api.resources.credits.requests.ListBillingCreditsRequest;
import com.schematic.api.resources.credits.requests.ListBillingPlanCreditGrantsRequest;
import com.schematic.api.resources.credits.requests.ListCompanyCreditBalancesRequest;
@@ -49,7 +47,6 @@
import com.schematic.api.resources.credits.types.CountCompanyGrantsResponse;
import com.schematic.api.resources.credits.types.CountCreditBundlesResponse;
import com.schematic.api.resources.credits.types.CountCreditEventLedgerResponse;
-import com.schematic.api.resources.credits.types.CountCreditLedgerResponse;
import com.schematic.api.resources.credits.types.CreateBillingCreditResponse;
import com.schematic.api.resources.credits.types.CreateBillingPlanCreditGrantResponse;
import com.schematic.api.resources.credits.types.CreateCreditBundleResponse;
@@ -57,7 +54,6 @@
import com.schematic.api.resources.credits.types.DeleteCreditBundleResponse;
import com.schematic.api.resources.credits.types.ExtendCreditLeaseResponse;
import com.schematic.api.resources.credits.types.GetCreditBundleResponse;
-import com.schematic.api.resources.credits.types.GetEnrichedCreditLedgerResponse;
import com.schematic.api.resources.credits.types.GetSingleBillingCreditResponse;
import com.schematic.api.resources.credits.types.GetSingleBillingPlanCreditGrantResponse;
import com.schematic.api.resources.credits.types.GrantBillingCreditsToCompanyResponse;
@@ -1750,181 +1746,6 @@ public BaseSchematicHttpResponse releaseCreditLease(
}
}
- public BaseSchematicHttpResponse getEnrichedCreditLedger(
- GetEnrichedCreditLedgerRequest request) {
- return getEnrichedCreditLedger(request, null);
- }
-
- public BaseSchematicHttpResponse getEnrichedCreditLedger(
- GetEnrichedCreditLedgerRequest request, RequestOptions requestOptions) {
- HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
- .newBuilder()
- .addPathSegments("billing/credits/ledger");
- QueryStringMapper.addQueryParameter(httpUrl, "company_id", request.getCompanyId(), false);
- if (request.getBillingCreditId().isPresent()) {
- QueryStringMapper.addQueryParameter(
- httpUrl, "billing_credit_id", request.getBillingCreditId().get(), false);
- }
- if (request.getFeatureId().isPresent()) {
- QueryStringMapper.addQueryParameter(
- httpUrl, "feature_id", request.getFeatureId().get(), false);
- }
- QueryStringMapper.addQueryParameter(httpUrl, "period", request.getPeriod(), false);
- if (request.getStartTime().isPresent()) {
- QueryStringMapper.addQueryParameter(
- httpUrl, "start_time", request.getStartTime().get(), false);
- }
- if (request.getEndTime().isPresent()) {
- QueryStringMapper.addQueryParameter(
- httpUrl, "end_time", request.getEndTime().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);
- }
- 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, GetEnrichedCreditLedgerResponse.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 (IOException e) {
- throw new BaseSchematicException("Network error executing HTTP request", e);
- }
- }
-
- public BaseSchematicHttpResponse countCreditLedger(CountCreditLedgerRequest request) {
- return countCreditLedger(request, null);
- }
-
- public BaseSchematicHttpResponse countCreditLedger(
- CountCreditLedgerRequest request, RequestOptions requestOptions) {
- HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
- .newBuilder()
- .addPathSegments("billing/credits/ledger/count");
- QueryStringMapper.addQueryParameter(httpUrl, "company_id", request.getCompanyId(), false);
- if (request.getBillingCreditId().isPresent()) {
- QueryStringMapper.addQueryParameter(
- httpUrl, "billing_credit_id", request.getBillingCreditId().get(), false);
- }
- if (request.getFeatureId().isPresent()) {
- QueryStringMapper.addQueryParameter(
- httpUrl, "feature_id", request.getFeatureId().get(), false);
- }
- QueryStringMapper.addQueryParameter(httpUrl, "period", request.getPeriod(), false);
- if (request.getStartTime().isPresent()) {
- QueryStringMapper.addQueryParameter(
- httpUrl, "start_time", request.getStartTime().get(), false);
- }
- if (request.getEndTime().isPresent()) {
- QueryStringMapper.addQueryParameter(
- httpUrl, "end_time", request.getEndTime().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);
- }
- 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, CountCreditLedgerResponse.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 (IOException e) {
- throw new BaseSchematicException("Network error executing HTTP request", e);
- }
- }
-
public BaseSchematicHttpResponse listBillingPlanCreditGrants() {
return listBillingPlanCreditGrants(
ListBillingPlanCreditGrantsRequest.builder().build());
diff --git a/src/main/java/com/schematic/api/resources/credits/requests/CountCreditLedgerRequest.java b/src/main/java/com/schematic/api/resources/credits/requests/CountCreditLedgerRequest.java
deleted file mode 100644
index 32fb794..0000000
--- a/src/main/java/com/schematic/api/resources/credits/requests/CountCreditLedgerRequest.java
+++ /dev/null
@@ -1,370 +0,0 @@
-/**
- * This file was auto-generated by Fern from our API Definition.
- */
-package com.schematic.api.resources.credits.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.CreditLedgerPeriod;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Optional;
-import org.jetbrains.annotations.NotNull;
-
-@JsonInclude(JsonInclude.Include.NON_ABSENT)
-@JsonDeserialize(builder = CountCreditLedgerRequest.Builder.class)
-public final class CountCreditLedgerRequest {
- private final String companyId;
-
- private final Optional billingCreditId;
-
- private final Optional featureId;
-
- private final CreditLedgerPeriod period;
-
- private final Optional startTime;
-
- private final Optional endTime;
-
- private final Optional limit;
-
- private final Optional offset;
-
- private final Map additionalProperties;
-
- private CountCreditLedgerRequest(
- String companyId,
- Optional billingCreditId,
- Optional featureId,
- CreditLedgerPeriod period,
- Optional startTime,
- Optional endTime,
- Optional limit,
- Optional offset,
- Map additionalProperties) {
- this.companyId = companyId;
- this.billingCreditId = billingCreditId;
- this.featureId = featureId;
- this.period = period;
- this.startTime = startTime;
- this.endTime = endTime;
- this.limit = limit;
- this.offset = offset;
- this.additionalProperties = additionalProperties;
- }
-
- @JsonProperty("company_id")
- public String getCompanyId() {
- return companyId;
- }
-
- @JsonProperty("billing_credit_id")
- public Optional getBillingCreditId() {
- return billingCreditId;
- }
-
- @JsonProperty("feature_id")
- public Optional getFeatureId() {
- return featureId;
- }
-
- @JsonProperty("period")
- public CreditLedgerPeriod getPeriod() {
- return period;
- }
-
- @JsonProperty("start_time")
- public Optional getStartTime() {
- return startTime;
- }
-
- @JsonProperty("end_time")
- public Optional getEndTime() {
- return endTime;
- }
-
- /**
- * @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 CountCreditLedgerRequest && equalTo((CountCreditLedgerRequest) other);
- }
-
- @JsonAnyGetter
- public Map getAdditionalProperties() {
- return this.additionalProperties;
- }
-
- private boolean equalTo(CountCreditLedgerRequest other) {
- return companyId.equals(other.companyId)
- && billingCreditId.equals(other.billingCreditId)
- && featureId.equals(other.featureId)
- && period.equals(other.period)
- && startTime.equals(other.startTime)
- && endTime.equals(other.endTime)
- && limit.equals(other.limit)
- && offset.equals(other.offset);
- }
-
- @java.lang.Override
- public int hashCode() {
- return Objects.hash(
- this.companyId,
- this.billingCreditId,
- this.featureId,
- this.period,
- this.startTime,
- this.endTime,
- this.limit,
- this.offset);
- }
-
- @java.lang.Override
- public String toString() {
- return ObjectMappers.stringify(this);
- }
-
- public static CompanyIdStage builder() {
- return new Builder();
- }
-
- public interface CompanyIdStage {
- PeriodStage companyId(@NotNull String companyId);
-
- Builder from(CountCreditLedgerRequest other);
- }
-
- public interface PeriodStage {
- _FinalStage period(@NotNull CreditLedgerPeriod period);
- }
-
- public interface _FinalStage {
- CountCreditLedgerRequest build();
-
- _FinalStage additionalProperty(String key, Object value);
-
- _FinalStage additionalProperties(Map additionalProperties);
-
- _FinalStage billingCreditId(Optional billingCreditId);
-
- _FinalStage billingCreditId(String billingCreditId);
-
- _FinalStage featureId(Optional featureId);
-
- _FinalStage featureId(String featureId);
-
- _FinalStage startTime(Optional startTime);
-
- _FinalStage startTime(String startTime);
-
- _FinalStage endTime(Optional endTime);
-
- _FinalStage endTime(String endTime);
-
- /**
- * Page limit (default 100)
- */
- _FinalStage limit(Optional limit);
-
- _FinalStage limit(Long limit);
-
- /**
- * Page offset (default 0)
- */
- _FinalStage offset(Optional offset);
-
- _FinalStage offset(Long offset);
- }
-
- @JsonIgnoreProperties(ignoreUnknown = true)
- public static final class Builder implements CompanyIdStage, PeriodStage, _FinalStage {
- private String companyId;
-
- private CreditLedgerPeriod period;
-
- private Optional offset = Optional.empty();
-
- private Optional limit = Optional.empty();
-
- private Optional endTime = Optional.empty();
-
- private Optional startTime = Optional.empty();
-
- private Optional featureId = Optional.empty();
-
- private Optional billingCreditId = Optional.empty();
-
- @JsonAnySetter
- private Map additionalProperties = new HashMap<>();
-
- private Builder() {}
-
- @java.lang.Override
- public Builder from(CountCreditLedgerRequest other) {
- companyId(other.getCompanyId());
- billingCreditId(other.getBillingCreditId());
- featureId(other.getFeatureId());
- period(other.getPeriod());
- startTime(other.getStartTime());
- endTime(other.getEndTime());
- limit(other.getLimit());
- offset(other.getOffset());
- return this;
- }
-
- @java.lang.Override
- @JsonSetter("company_id")
- public PeriodStage companyId(@NotNull String companyId) {
- this.companyId = Objects.requireNonNull(companyId, "companyId must not be null");
- return this;
- }
-
- @java.lang.Override
- @JsonSetter("period")
- public _FinalStage period(@NotNull CreditLedgerPeriod period) {
- this.period = Objects.requireNonNull(period, "period must not be null");
- return this;
- }
-
- /**
- * Page offset (default 0)
- * @return Reference to {@code this} so that method calls can be chained together.
- */
- @java.lang.Override
- public _FinalStage offset(Long offset) {
- this.offset = Optional.ofNullable(offset);
- return this;
- }
-
- /**
- * Page offset (default 0)
- */
- @java.lang.Override
- @JsonSetter(value = "offset", nulls = Nulls.SKIP)
- public _FinalStage offset(Optional offset) {
- this.offset = offset;
- return this;
- }
-
- /**
- * Page limit (default 100)
- * @return Reference to {@code this} so that method calls can be chained together.
- */
- @java.lang.Override
- public _FinalStage limit(Long limit) {
- this.limit = Optional.ofNullable(limit);
- return this;
- }
-
- /**
- * Page limit (default 100)
- */
- @java.lang.Override
- @JsonSetter(value = "limit", nulls = Nulls.SKIP)
- public _FinalStage limit(Optional limit) {
- this.limit = limit;
- return this;
- }
-
- @java.lang.Override
- public _FinalStage endTime(String endTime) {
- this.endTime = Optional.ofNullable(endTime);
- return this;
- }
-
- @java.lang.Override
- @JsonSetter(value = "end_time", nulls = Nulls.SKIP)
- public _FinalStage endTime(Optional endTime) {
- this.endTime = endTime;
- return this;
- }
-
- @java.lang.Override
- public _FinalStage startTime(String startTime) {
- this.startTime = Optional.ofNullable(startTime);
- return this;
- }
-
- @java.lang.Override
- @JsonSetter(value = "start_time", nulls = Nulls.SKIP)
- public _FinalStage startTime(Optional startTime) {
- this.startTime = startTime;
- return this;
- }
-
- @java.lang.Override
- public _FinalStage featureId(String featureId) {
- this.featureId = Optional.ofNullable(featureId);
- return this;
- }
-
- @java.lang.Override
- @JsonSetter(value = "feature_id", nulls = Nulls.SKIP)
- public _FinalStage featureId(Optional featureId) {
- this.featureId = featureId;
- return this;
- }
-
- @java.lang.Override
- public _FinalStage billingCreditId(String billingCreditId) {
- this.billingCreditId = Optional.ofNullable(billingCreditId);
- return this;
- }
-
- @java.lang.Override
- @JsonSetter(value = "billing_credit_id", nulls = Nulls.SKIP)
- public _FinalStage billingCreditId(Optional billingCreditId) {
- this.billingCreditId = billingCreditId;
- return this;
- }
-
- @java.lang.Override
- public CountCreditLedgerRequest build() {
- return new CountCreditLedgerRequest(
- companyId,
- billingCreditId,
- featureId,
- period,
- startTime,
- endTime,
- limit,
- offset,
- 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/credits/requests/GetEnrichedCreditLedgerRequest.java b/src/main/java/com/schematic/api/resources/credits/requests/GetEnrichedCreditLedgerRequest.java
deleted file mode 100644
index 4b10bb1..0000000
--- a/src/main/java/com/schematic/api/resources/credits/requests/GetEnrichedCreditLedgerRequest.java
+++ /dev/null
@@ -1,370 +0,0 @@
-/**
- * This file was auto-generated by Fern from our API Definition.
- */
-package com.schematic.api.resources.credits.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.CreditLedgerPeriod;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Optional;
-import org.jetbrains.annotations.NotNull;
-
-@JsonInclude(JsonInclude.Include.NON_ABSENT)
-@JsonDeserialize(builder = GetEnrichedCreditLedgerRequest.Builder.class)
-public final class GetEnrichedCreditLedgerRequest {
- private final String companyId;
-
- private final Optional billingCreditId;
-
- private final Optional featureId;
-
- private final CreditLedgerPeriod period;
-
- private final Optional startTime;
-
- private final Optional endTime;
-
- private final Optional limit;
-
- private final Optional offset;
-
- private final Map additionalProperties;
-
- private GetEnrichedCreditLedgerRequest(
- String companyId,
- Optional billingCreditId,
- Optional featureId,
- CreditLedgerPeriod period,
- Optional startTime,
- Optional endTime,
- Optional limit,
- Optional offset,
- Map additionalProperties) {
- this.companyId = companyId;
- this.billingCreditId = billingCreditId;
- this.featureId = featureId;
- this.period = period;
- this.startTime = startTime;
- this.endTime = endTime;
- this.limit = limit;
- this.offset = offset;
- this.additionalProperties = additionalProperties;
- }
-
- @JsonProperty("company_id")
- public String getCompanyId() {
- return companyId;
- }
-
- @JsonProperty("billing_credit_id")
- public Optional getBillingCreditId() {
- return billingCreditId;
- }
-
- @JsonProperty("feature_id")
- public Optional getFeatureId() {
- return featureId;
- }
-
- @JsonProperty("period")
- public CreditLedgerPeriod getPeriod() {
- return period;
- }
-
- @JsonProperty("start_time")
- public Optional getStartTime() {
- return startTime;
- }
-
- @JsonProperty("end_time")
- public Optional getEndTime() {
- return endTime;
- }
-
- /**
- * @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 GetEnrichedCreditLedgerRequest && equalTo((GetEnrichedCreditLedgerRequest) other);
- }
-
- @JsonAnyGetter
- public Map getAdditionalProperties() {
- return this.additionalProperties;
- }
-
- private boolean equalTo(GetEnrichedCreditLedgerRequest other) {
- return companyId.equals(other.companyId)
- && billingCreditId.equals(other.billingCreditId)
- && featureId.equals(other.featureId)
- && period.equals(other.period)
- && startTime.equals(other.startTime)
- && endTime.equals(other.endTime)
- && limit.equals(other.limit)
- && offset.equals(other.offset);
- }
-
- @java.lang.Override
- public int hashCode() {
- return Objects.hash(
- this.companyId,
- this.billingCreditId,
- this.featureId,
- this.period,
- this.startTime,
- this.endTime,
- this.limit,
- this.offset);
- }
-
- @java.lang.Override
- public String toString() {
- return ObjectMappers.stringify(this);
- }
-
- public static CompanyIdStage builder() {
- return new Builder();
- }
-
- public interface CompanyIdStage {
- PeriodStage companyId(@NotNull String companyId);
-
- Builder from(GetEnrichedCreditLedgerRequest other);
- }
-
- public interface PeriodStage {
- _FinalStage period(@NotNull CreditLedgerPeriod period);
- }
-
- public interface _FinalStage {
- GetEnrichedCreditLedgerRequest build();
-
- _FinalStage additionalProperty(String key, Object value);
-
- _FinalStage additionalProperties(Map additionalProperties);
-
- _FinalStage billingCreditId(Optional billingCreditId);
-
- _FinalStage billingCreditId(String billingCreditId);
-
- _FinalStage featureId(Optional featureId);
-
- _FinalStage featureId(String featureId);
-
- _FinalStage startTime(Optional startTime);
-
- _FinalStage startTime(String startTime);
-
- _FinalStage endTime(Optional endTime);
-
- _FinalStage endTime(String endTime);
-
- /**
- * Page limit (default 100)
- */
- _FinalStage limit(Optional limit);
-
- _FinalStage limit(Long limit);
-
- /**
- * Page offset (default 0)
- */
- _FinalStage offset(Optional offset);
-
- _FinalStage offset(Long offset);
- }
-
- @JsonIgnoreProperties(ignoreUnknown = true)
- public static final class Builder implements CompanyIdStage, PeriodStage, _FinalStage {
- private String companyId;
-
- private CreditLedgerPeriod period;
-
- private Optional offset = Optional.empty();
-
- private Optional limit = Optional.empty();
-
- private Optional endTime = Optional.empty();
-
- private Optional startTime = Optional.empty();
-
- private Optional featureId = Optional.empty();
-
- private Optional billingCreditId = Optional.empty();
-
- @JsonAnySetter
- private Map additionalProperties = new HashMap<>();
-
- private Builder() {}
-
- @java.lang.Override
- public Builder from(GetEnrichedCreditLedgerRequest other) {
- companyId(other.getCompanyId());
- billingCreditId(other.getBillingCreditId());
- featureId(other.getFeatureId());
- period(other.getPeriod());
- startTime(other.getStartTime());
- endTime(other.getEndTime());
- limit(other.getLimit());
- offset(other.getOffset());
- return this;
- }
-
- @java.lang.Override
- @JsonSetter("company_id")
- public PeriodStage companyId(@NotNull String companyId) {
- this.companyId = Objects.requireNonNull(companyId, "companyId must not be null");
- return this;
- }
-
- @java.lang.Override
- @JsonSetter("period")
- public _FinalStage period(@NotNull CreditLedgerPeriod period) {
- this.period = Objects.requireNonNull(period, "period must not be null");
- return this;
- }
-
- /**
- * Page offset (default 0)
- * @return Reference to {@code this} so that method calls can be chained together.
- */
- @java.lang.Override
- public _FinalStage offset(Long offset) {
- this.offset = Optional.ofNullable(offset);
- return this;
- }
-
- /**
- * Page offset (default 0)
- */
- @java.lang.Override
- @JsonSetter(value = "offset", nulls = Nulls.SKIP)
- public _FinalStage offset(Optional offset) {
- this.offset = offset;
- return this;
- }
-
- /**
- * Page limit (default 100)
- * @return Reference to {@code this} so that method calls can be chained together.
- */
- @java.lang.Override
- public _FinalStage limit(Long limit) {
- this.limit = Optional.ofNullable(limit);
- return this;
- }
-
- /**
- * Page limit (default 100)
- */
- @java.lang.Override
- @JsonSetter(value = "limit", nulls = Nulls.SKIP)
- public _FinalStage limit(Optional limit) {
- this.limit = limit;
- return this;
- }
-
- @java.lang.Override
- public _FinalStage endTime(String endTime) {
- this.endTime = Optional.ofNullable(endTime);
- return this;
- }
-
- @java.lang.Override
- @JsonSetter(value = "end_time", nulls = Nulls.SKIP)
- public _FinalStage endTime(Optional endTime) {
- this.endTime = endTime;
- return this;
- }
-
- @java.lang.Override
- public _FinalStage startTime(String startTime) {
- this.startTime = Optional.ofNullable(startTime);
- return this;
- }
-
- @java.lang.Override
- @JsonSetter(value = "start_time", nulls = Nulls.SKIP)
- public _FinalStage startTime(Optional startTime) {
- this.startTime = startTime;
- return this;
- }
-
- @java.lang.Override
- public _FinalStage featureId(String featureId) {
- this.featureId = Optional.ofNullable(featureId);
- return this;
- }
-
- @java.lang.Override
- @JsonSetter(value = "feature_id", nulls = Nulls.SKIP)
- public _FinalStage featureId(Optional featureId) {
- this.featureId = featureId;
- return this;
- }
-
- @java.lang.Override
- public _FinalStage billingCreditId(String billingCreditId) {
- this.billingCreditId = Optional.ofNullable(billingCreditId);
- return this;
- }
-
- @java.lang.Override
- @JsonSetter(value = "billing_credit_id", nulls = Nulls.SKIP)
- public _FinalStage billingCreditId(Optional billingCreditId) {
- this.billingCreditId = billingCreditId;
- return this;
- }
-
- @java.lang.Override
- public GetEnrichedCreditLedgerRequest build() {
- return new GetEnrichedCreditLedgerRequest(
- companyId,
- billingCreditId,
- featureId,
- period,
- startTime,
- endTime,
- limit,
- offset,
- 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/credits/types/CountCreditLedgerParams.java b/src/main/java/com/schematic/api/resources/credits/types/CountCreditLedgerParams.java
deleted file mode 100644
index 649986c..0000000
--- a/src/main/java/com/schematic/api/resources/credits/types/CountCreditLedgerParams.java
+++ /dev/null
@@ -1,305 +0,0 @@
-/**
- * This file was auto-generated by Fern from our API Definition.
- */
-package com.schematic.api.resources.credits.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.CreditLedgerPeriod;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Optional;
-
-@JsonInclude(JsonInclude.Include.NON_ABSENT)
-@JsonDeserialize(builder = CountCreditLedgerParams.Builder.class)
-public final class CountCreditLedgerParams {
- private final Optional billingCreditId;
-
- private final Optional companyId;
-
- private final Optional endTime;
-
- private final Optional featureId;
-
- private final Optional limit;
-
- private final Optional offset;
-
- private final Optional period;
-
- private final Optional startTime;
-
- private final Map additionalProperties;
-
- private CountCreditLedgerParams(
- Optional billingCreditId,
- Optional companyId,
- Optional endTime,
- Optional featureId,
- Optional limit,
- Optional offset,
- Optional period,
- Optional startTime,
- Map additionalProperties) {
- this.billingCreditId = billingCreditId;
- this.companyId = companyId;
- this.endTime = endTime;
- this.featureId = featureId;
- this.limit = limit;
- this.offset = offset;
- this.period = period;
- this.startTime = startTime;
- this.additionalProperties = additionalProperties;
- }
-
- @JsonProperty("billing_credit_id")
- public Optional getBillingCreditId() {
- return billingCreditId;
- }
-
- @JsonProperty("company_id")
- public Optional getCompanyId() {
- return companyId;
- }
-
- @JsonProperty("end_time")
- public Optional getEndTime() {
- return endTime;
- }
-
- @JsonProperty("feature_id")
- public Optional getFeatureId() {
- return featureId;
- }
-
- /**
- * @return Page limit (default 100)
- */
- @JsonProperty("limit")
- public Optional getLimit() {
- return limit;
- }
-
- /**
- * @return Page offset (default 0)
- */
- @JsonProperty("offset")
- public Optional getOffset() {
- return offset;
- }
-
- @JsonProperty("period")
- public Optional getPeriod() {
- return period;
- }
-
- @JsonProperty("start_time")
- public Optional getStartTime() {
- return startTime;
- }
-
- @java.lang.Override
- public boolean equals(Object other) {
- if (this == other) return true;
- return other instanceof CountCreditLedgerParams && equalTo((CountCreditLedgerParams) other);
- }
-
- @JsonAnyGetter
- public Map getAdditionalProperties() {
- return this.additionalProperties;
- }
-
- private boolean equalTo(CountCreditLedgerParams other) {
- return billingCreditId.equals(other.billingCreditId)
- && companyId.equals(other.companyId)
- && endTime.equals(other.endTime)
- && featureId.equals(other.featureId)
- && limit.equals(other.limit)
- && offset.equals(other.offset)
- && period.equals(other.period)
- && startTime.equals(other.startTime);
- }
-
- @java.lang.Override
- public int hashCode() {
- return Objects.hash(
- this.billingCreditId,
- this.companyId,
- this.endTime,
- this.featureId,
- this.limit,
- this.offset,
- this.period,
- this.startTime);
- }
-
- @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 billingCreditId = Optional.empty();
-
- private Optional companyId = Optional.empty();
-
- private Optional endTime = Optional.empty();
-
- private Optional featureId = Optional.empty();
-
- private Optional limit = Optional.empty();
-
- private Optional offset = Optional.empty();
-
- private Optional period = Optional.empty();
-
- private Optional startTime = Optional.empty();
-
- @JsonAnySetter
- private Map additionalProperties = new HashMap<>();
-
- private Builder() {}
-
- public Builder from(CountCreditLedgerParams other) {
- billingCreditId(other.getBillingCreditId());
- companyId(other.getCompanyId());
- endTime(other.getEndTime());
- featureId(other.getFeatureId());
- limit(other.getLimit());
- offset(other.getOffset());
- period(other.getPeriod());
- startTime(other.getStartTime());
- return this;
- }
-
- @JsonSetter(value = "billing_credit_id", nulls = Nulls.SKIP)
- public Builder billingCreditId(Optional billingCreditId) {
- this.billingCreditId = billingCreditId;
- return this;
- }
-
- public Builder billingCreditId(String billingCreditId) {
- this.billingCreditId = Optional.ofNullable(billingCreditId);
- return this;
- }
-
- @JsonSetter(value = "company_id", nulls = Nulls.SKIP)
- public Builder companyId(Optional companyId) {
- this.companyId = companyId;
- return this;
- }
-
- public Builder companyId(String companyId) {
- this.companyId = Optional.ofNullable(companyId);
- return this;
- }
-
- @JsonSetter(value = "end_time", nulls = Nulls.SKIP)
- public Builder endTime(Optional endTime) {
- this.endTime = endTime;
- return this;
- }
-
- public Builder endTime(String endTime) {
- this.endTime = Optional.ofNullable(endTime);
- return this;
- }
-
- @JsonSetter(value = "feature_id", nulls = Nulls.SKIP)
- public Builder featureId(Optional featureId) {
- this.featureId = featureId;
- return this;
- }
-
- public Builder featureId(String featureId) {
- this.featureId = Optional.ofNullable(featureId);
- 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;
- }
-
- @JsonSetter(value = "period", nulls = Nulls.SKIP)
- public Builder period(Optional period) {
- this.period = period;
- return this;
- }
-
- public Builder period(CreditLedgerPeriod period) {
- this.period = Optional.ofNullable(period);
- return this;
- }
-
- @JsonSetter(value = "start_time", nulls = Nulls.SKIP)
- public Builder startTime(Optional startTime) {
- this.startTime = startTime;
- return this;
- }
-
- public Builder startTime(String startTime) {
- this.startTime = Optional.ofNullable(startTime);
- return this;
- }
-
- public CountCreditLedgerParams build() {
- return new CountCreditLedgerParams(
- billingCreditId,
- companyId,
- endTime,
- featureId,
- limit,
- offset,
- period,
- startTime,
- 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/credits/types/CountCreditLedgerResponse.java b/src/main/java/com/schematic/api/resources/credits/types/CountCreditLedgerResponse.java
deleted file mode 100644
index 0691a0e..0000000
--- a/src/main/java/com/schematic/api/resources/credits/types/CountCreditLedgerResponse.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/**
- * This file was auto-generated by Fern from our API Definition.
- */
-package com.schematic.api.resources.credits.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 = CountCreditLedgerResponse.Builder.class)
-public final class CountCreditLedgerResponse {
- private final CountResponse data;
-
- private final CountCreditLedgerParams params;
-
- private final Map additionalProperties;
-
- private CountCreditLedgerResponse(
- CountResponse data, CountCreditLedgerParams 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 CountCreditLedgerParams getParams() {
- return params;
- }
-
- @java.lang.Override
- public boolean equals(Object other) {
- if (this == other) return true;
- return other instanceof CountCreditLedgerResponse && equalTo((CountCreditLedgerResponse) other);
- }
-
- @JsonAnyGetter
- public Map getAdditionalProperties() {
- return this.additionalProperties;
- }
-
- private boolean equalTo(CountCreditLedgerResponse 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(CountCreditLedgerResponse other);
- }
-
- public interface ParamsStage {
- /**
- * Input parameters
- */
- _FinalStage params(@NotNull CountCreditLedgerParams params);
- }
-
- public interface _FinalStage {
- CountCreditLedgerResponse 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 CountCreditLedgerParams params;
-
- @JsonAnySetter
- private Map additionalProperties = new HashMap<>();
-
- private Builder() {}
-
- @java.lang.Override
- public Builder from(CountCreditLedgerResponse 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
- * Input parameters
- * @return Reference to {@code this} so that method calls can be chained together.
- */
- @java.lang.Override
- @JsonSetter("params")
- public _FinalStage params(@NotNull CountCreditLedgerParams params) {
- this.params = Objects.requireNonNull(params, "params must not be null");
- return this;
- }
-
- @java.lang.Override
- public CountCreditLedgerResponse build() {
- return new CountCreditLedgerResponse(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/credits/types/GetEnrichedCreditLedgerParams.java b/src/main/java/com/schematic/api/resources/credits/types/GetEnrichedCreditLedgerParams.java
deleted file mode 100644
index c0841ef..0000000
--- a/src/main/java/com/schematic/api/resources/credits/types/GetEnrichedCreditLedgerParams.java
+++ /dev/null
@@ -1,305 +0,0 @@
-/**
- * This file was auto-generated by Fern from our API Definition.
- */
-package com.schematic.api.resources.credits.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.CreditLedgerPeriod;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Optional;
-
-@JsonInclude(JsonInclude.Include.NON_ABSENT)
-@JsonDeserialize(builder = GetEnrichedCreditLedgerParams.Builder.class)
-public final class GetEnrichedCreditLedgerParams {
- private final Optional billingCreditId;
-
- private final Optional companyId;
-
- private final Optional endTime;
-
- private final Optional featureId;
-
- private final Optional limit;
-
- private final Optional offset;
-
- private final Optional period;
-
- private final Optional startTime;
-
- private final Map additionalProperties;
-
- private GetEnrichedCreditLedgerParams(
- Optional billingCreditId,
- Optional companyId,
- Optional endTime,
- Optional featureId,
- Optional limit,
- Optional offset,
- Optional period,
- Optional startTime,
- Map additionalProperties) {
- this.billingCreditId = billingCreditId;
- this.companyId = companyId;
- this.endTime = endTime;
- this.featureId = featureId;
- this.limit = limit;
- this.offset = offset;
- this.period = period;
- this.startTime = startTime;
- this.additionalProperties = additionalProperties;
- }
-
- @JsonProperty("billing_credit_id")
- public Optional getBillingCreditId() {
- return billingCreditId;
- }
-
- @JsonProperty("company_id")
- public Optional getCompanyId() {
- return companyId;
- }
-
- @JsonProperty("end_time")
- public Optional getEndTime() {
- return endTime;
- }
-
- @JsonProperty("feature_id")
- public Optional getFeatureId() {
- return featureId;
- }
-
- /**
- * @return Page limit (default 100)
- */
- @JsonProperty("limit")
- public Optional getLimit() {
- return limit;
- }
-
- /**
- * @return Page offset (default 0)
- */
- @JsonProperty("offset")
- public Optional getOffset() {
- return offset;
- }
-
- @JsonProperty("period")
- public Optional getPeriod() {
- return period;
- }
-
- @JsonProperty("start_time")
- public Optional getStartTime() {
- return startTime;
- }
-
- @java.lang.Override
- public boolean equals(Object other) {
- if (this == other) return true;
- return other instanceof GetEnrichedCreditLedgerParams && equalTo((GetEnrichedCreditLedgerParams) other);
- }
-
- @JsonAnyGetter
- public Map getAdditionalProperties() {
- return this.additionalProperties;
- }
-
- private boolean equalTo(GetEnrichedCreditLedgerParams other) {
- return billingCreditId.equals(other.billingCreditId)
- && companyId.equals(other.companyId)
- && endTime.equals(other.endTime)
- && featureId.equals(other.featureId)
- && limit.equals(other.limit)
- && offset.equals(other.offset)
- && period.equals(other.period)
- && startTime.equals(other.startTime);
- }
-
- @java.lang.Override
- public int hashCode() {
- return Objects.hash(
- this.billingCreditId,
- this.companyId,
- this.endTime,
- this.featureId,
- this.limit,
- this.offset,
- this.period,
- this.startTime);
- }
-
- @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 billingCreditId = Optional.empty();
-
- private Optional companyId = Optional.empty();
-
- private Optional endTime = Optional.empty();
-
- private Optional featureId = Optional.empty();
-
- private Optional limit = Optional.empty();
-
- private Optional offset = Optional.empty();
-
- private Optional period = Optional.empty();
-
- private Optional startTime = Optional.empty();
-
- @JsonAnySetter
- private Map additionalProperties = new HashMap<>();
-
- private Builder() {}
-
- public Builder from(GetEnrichedCreditLedgerParams other) {
- billingCreditId(other.getBillingCreditId());
- companyId(other.getCompanyId());
- endTime(other.getEndTime());
- featureId(other.getFeatureId());
- limit(other.getLimit());
- offset(other.getOffset());
- period(other.getPeriod());
- startTime(other.getStartTime());
- return this;
- }
-
- @JsonSetter(value = "billing_credit_id", nulls = Nulls.SKIP)
- public Builder billingCreditId(Optional billingCreditId) {
- this.billingCreditId = billingCreditId;
- return this;
- }
-
- public Builder billingCreditId(String billingCreditId) {
- this.billingCreditId = Optional.ofNullable(billingCreditId);
- return this;
- }
-
- @JsonSetter(value = "company_id", nulls = Nulls.SKIP)
- public Builder companyId(Optional companyId) {
- this.companyId = companyId;
- return this;
- }
-
- public Builder companyId(String companyId) {
- this.companyId = Optional.ofNullable(companyId);
- return this;
- }
-
- @JsonSetter(value = "end_time", nulls = Nulls.SKIP)
- public Builder endTime(Optional endTime) {
- this.endTime = endTime;
- return this;
- }
-
- public Builder endTime(String endTime) {
- this.endTime = Optional.ofNullable(endTime);
- return this;
- }
-
- @JsonSetter(value = "feature_id", nulls = Nulls.SKIP)
- public Builder featureId(Optional featureId) {
- this.featureId = featureId;
- return this;
- }
-
- public Builder featureId(String featureId) {
- this.featureId = Optional.ofNullable(featureId);
- 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;
- }
-
- @JsonSetter(value = "period", nulls = Nulls.SKIP)
- public Builder period(Optional period) {
- this.period = period;
- return this;
- }
-
- public Builder period(CreditLedgerPeriod period) {
- this.period = Optional.ofNullable(period);
- return this;
- }
-
- @JsonSetter(value = "start_time", nulls = Nulls.SKIP)
- public Builder startTime(Optional startTime) {
- this.startTime = startTime;
- return this;
- }
-
- public Builder startTime(String startTime) {
- this.startTime = Optional.ofNullable(startTime);
- return this;
- }
-
- public GetEnrichedCreditLedgerParams build() {
- return new GetEnrichedCreditLedgerParams(
- billingCreditId,
- companyId,
- endTime,
- featureId,
- limit,
- offset,
- period,
- startTime,
- 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/credits/types/GetEnrichedCreditLedgerResponse.java b/src/main/java/com/schematic/api/resources/credits/types/GetEnrichedCreditLedgerResponse.java
deleted file mode 100644
index 475c367..0000000
--- a/src/main/java/com/schematic/api/resources/credits/types/GetEnrichedCreditLedgerResponse.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/**
- * This file was auto-generated by Fern from our API Definition.
- */
-package com.schematic.api.resources.credits.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.CreditLedgerEnrichedEntryResponseData;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import org.jetbrains.annotations.NotNull;
-
-@JsonInclude(JsonInclude.Include.NON_ABSENT)
-@JsonDeserialize(builder = GetEnrichedCreditLedgerResponse.Builder.class)
-public final class GetEnrichedCreditLedgerResponse {
- private final List data;
-
- private final GetEnrichedCreditLedgerParams params;
-
- private final Map additionalProperties;
-
- private GetEnrichedCreditLedgerResponse(
- List data,
- GetEnrichedCreditLedgerParams params,
- Map additionalProperties) {
- this.data = data;
- this.params = params;
- this.additionalProperties = additionalProperties;
- }
-
- @JsonProperty("data")
- public List getData() {
- return data;
- }
-
- /**
- * @return Input parameters
- */
- @JsonProperty("params")
- public GetEnrichedCreditLedgerParams getParams() {
- return params;
- }
-
- @java.lang.Override
- public boolean equals(Object other) {
- if (this == other) return true;
- return other instanceof GetEnrichedCreditLedgerResponse && equalTo((GetEnrichedCreditLedgerResponse) other);
- }
-
- @JsonAnyGetter
- public Map getAdditionalProperties() {
- return this.additionalProperties;
- }
-
- private boolean equalTo(GetEnrichedCreditLedgerResponse 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 ParamsStage builder() {
- return new Builder();
- }
-
- public interface ParamsStage {
- /**
- * Input parameters
- */
- _FinalStage params(@NotNull GetEnrichedCreditLedgerParams params);
-
- Builder from(GetEnrichedCreditLedgerResponse other);
- }
-
- public interface _FinalStage {
- GetEnrichedCreditLedgerResponse build();
-
- _FinalStage additionalProperty(String key, Object value);
-
- _FinalStage additionalProperties(Map additionalProperties);
-
- _FinalStage data(List data);
-
- _FinalStage addData(CreditLedgerEnrichedEntryResponseData data);
-
- _FinalStage addAllData(List data);
- }
-
- @JsonIgnoreProperties(ignoreUnknown = true)
- public static final class Builder implements ParamsStage, _FinalStage {
- private GetEnrichedCreditLedgerParams params;
-
- private List data = new ArrayList<>();
-
- @JsonAnySetter
- private Map additionalProperties = new HashMap<>();
-
- private Builder() {}
-
- @java.lang.Override
- public Builder from(GetEnrichedCreditLedgerResponse other) {
- data(other.getData());
- params(other.getParams());
- return this;
- }
-
- /**
- * Input parameters
- * Input parameters
- * @return Reference to {@code this} so that method calls can be chained together.
- */
- @java.lang.Override
- @JsonSetter("params")
- public _FinalStage params(@NotNull GetEnrichedCreditLedgerParams params) {
- this.params = Objects.requireNonNull(params, "params must not be null");
- return this;
- }
-
- @java.lang.Override
- public _FinalStage addAllData(List data) {
- if (data != null) {
- this.data.addAll(data);
- }
- return this;
- }
-
- @java.lang.Override
- public _FinalStage addData(CreditLedgerEnrichedEntryResponseData data) {
- this.data.add(data);
- return this;
- }
-
- @java.lang.Override
- @JsonSetter(value = "data", nulls = Nulls.SKIP)
- public _FinalStage data(List data) {
- this.data.clear();
- if (data != null) {
- this.data.addAll(data);
- }
- return this;
- }
-
- @java.lang.Override
- public GetEnrichedCreditLedgerResponse build() {
- return new GetEnrichedCreditLedgerResponse(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/plangroups/requests/CreatePlanGroupRequestBody.java b/src/main/java/com/schematic/api/resources/plangroups/requests/CreatePlanGroupRequestBody.java
index 1efe1fc..ffa4df5 100644
--- a/src/main/java/com/schematic/api/resources/plangroups/requests/CreatePlanGroupRequestBody.java
+++ b/src/main/java/com/schematic/api/resources/plangroups/requests/CreatePlanGroupRequestBody.java
@@ -54,6 +54,12 @@ public final class CreatePlanGroupRequestBody {
private final Optional initialPlanPriceId;
+ private final boolean optInEnabled;
+
+ private final Optional optInText;
+
+ private final Optional optInTitle;
+
private final List orderedAddOns;
private final List orderedBundleList;
@@ -111,6 +117,9 @@ private CreatePlanGroupRequestBody(
Optional fallbackPlanId,
Optional initialPlanId,
Optional initialPlanPriceId,
+ boolean optInEnabled,
+ Optional optInText,
+ Optional optInTitle,
List orderedAddOns,
List orderedBundleList,
List orderedPlans,
@@ -145,6 +154,9 @@ private CreatePlanGroupRequestBody(
this.fallbackPlanId = fallbackPlanId;
this.initialPlanId = initialPlanId;
this.initialPlanPriceId = initialPlanPriceId;
+ this.optInEnabled = optInEnabled;
+ this.optInText = optInText;
+ this.optInTitle = optInTitle;
this.orderedAddOns = orderedAddOns;
this.orderedBundleList = orderedBundleList;
this.orderedPlans = orderedPlans;
@@ -232,6 +244,21 @@ public Optional getInitialPlanPriceId() {
return initialPlanPriceId;
}
+ @JsonProperty("opt_in_enabled")
+ public boolean getOptInEnabled() {
+ return optInEnabled;
+ }
+
+ @JsonProperty("opt_in_text")
+ public Optional getOptInText() {
+ return optInText;
+ }
+
+ @JsonProperty("opt_in_title")
+ public Optional getOptInTitle() {
+ return optInTitle;
+ }
+
@JsonProperty("ordered_add_ons")
public List getOrderedAddOns() {
return orderedAddOns;
@@ -361,6 +388,9 @@ private boolean equalTo(CreatePlanGroupRequestBody other) {
&& fallbackPlanId.equals(other.fallbackPlanId)
&& initialPlanId.equals(other.initialPlanId)
&& initialPlanPriceId.equals(other.initialPlanPriceId)
+ && optInEnabled == other.optInEnabled
+ && optInText.equals(other.optInText)
+ && optInTitle.equals(other.optInTitle)
&& orderedAddOns.equals(other.orderedAddOns)
&& orderedBundleList.equals(other.orderedBundleList)
&& orderedPlans.equals(other.orderedPlans)
@@ -399,6 +429,9 @@ public int hashCode() {
this.fallbackPlanId,
this.initialPlanId,
this.initialPlanPriceId,
+ this.optInEnabled,
+ this.optInText,
+ this.optInTitle,
this.orderedAddOns,
this.orderedBundleList,
this.orderedPlans,
@@ -446,7 +479,11 @@ public interface CheckoutCollectPhoneStage {
}
public interface EnableTaxCollectionStage {
- PreventDowngradesWhenOverLimitStage enableTaxCollection(boolean enableTaxCollection);
+ OptInEnabledStage enableTaxCollection(boolean enableTaxCollection);
+ }
+
+ public interface OptInEnabledStage {
+ PreventDowngradesWhenOverLimitStage optInEnabled(boolean optInEnabled);
}
public interface PreventDowngradesWhenOverLimitStage {
@@ -533,6 +570,14 @@ public interface _FinalStage {
_FinalStage initialPlanPriceId(String initialPlanPriceId);
+ _FinalStage optInText(Optional optInText);
+
+ _FinalStage optInText(String optInText);
+
+ _FinalStage optInTitle(Optional optInTitle);
+
+ _FinalStage optInTitle(String optInTitle);
+
_FinalStage orderedAddOns(List orderedAddOns);
_FinalStage addOrderedAddOns(OrderedPlansInGroup orderedAddOns);
@@ -590,6 +635,7 @@ public static final class Builder
CheckoutCollectEmailStage,
CheckoutCollectPhoneStage,
EnableTaxCollectionStage,
+ OptInEnabledStage,
PreventDowngradesWhenOverLimitStage,
PreventSelfServiceDowngradeStage,
ProrationBehaviorStage,
@@ -609,6 +655,8 @@ public static final class Builder
private boolean enableTaxCollection;
+ private boolean optInEnabled;
+
private boolean preventDowngradesWhenOverLimit;
private boolean preventSelfServiceDowngrade;
@@ -651,6 +699,10 @@ public static final class Builder
private List orderedAddOns = new ArrayList<>();
+ private Optional optInTitle = Optional.empty();
+
+ private Optional optInText = Optional.empty();
+
private Optional initialPlanPriceId = Optional.empty();
private Optional initialPlanId = Optional.empty();
@@ -686,6 +738,9 @@ public Builder from(CreatePlanGroupRequestBody other) {
fallbackPlanId(other.getFallbackPlanId());
initialPlanId(other.getInitialPlanId());
initialPlanPriceId(other.getInitialPlanPriceId());
+ optInEnabled(other.getOptInEnabled());
+ optInText(other.getOptInText());
+ optInTitle(other.getOptInTitle());
orderedAddOns(other.getOrderedAddOns());
orderedBundleList(other.getOrderedBundleList());
orderedPlans(other.getOrderedPlans());
@@ -733,11 +788,18 @@ public EnableTaxCollectionStage checkoutCollectPhone(boolean checkoutCollectPhon
@java.lang.Override
@JsonSetter("enable_tax_collection")
- public PreventDowngradesWhenOverLimitStage enableTaxCollection(boolean enableTaxCollection) {
+ public OptInEnabledStage enableTaxCollection(boolean enableTaxCollection) {
this.enableTaxCollection = enableTaxCollection;
return this;
}
+ @java.lang.Override
+ @JsonSetter("opt_in_enabled")
+ public PreventDowngradesWhenOverLimitStage optInEnabled(boolean optInEnabled) {
+ this.optInEnabled = optInEnabled;
+ return this;
+ }
+
@java.lang.Override
@JsonSetter("prevent_downgrades_when_over_limit")
public PreventSelfServiceDowngradeStage preventDowngradesWhenOverLimit(boolean preventDowngradesWhenOverLimit) {
@@ -987,6 +1049,32 @@ public _FinalStage orderedAddOns(List orderedAddOns) {
return this;
}
+ @java.lang.Override
+ public _FinalStage optInTitle(String optInTitle) {
+ this.optInTitle = Optional.ofNullable(optInTitle);
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter(value = "opt_in_title", nulls = Nulls.SKIP)
+ public _FinalStage optInTitle(Optional optInTitle) {
+ this.optInTitle = optInTitle;
+ return this;
+ }
+
+ @java.lang.Override
+ public _FinalStage optInText(String optInText) {
+ this.optInText = Optional.ofNullable(optInText);
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter(value = "opt_in_text", nulls = Nulls.SKIP)
+ public _FinalStage optInText(Optional optInText) {
+ this.optInText = optInText;
+ return this;
+ }
+
@java.lang.Override
public _FinalStage initialPlanPriceId(String initialPlanPriceId) {
this.initialPlanPriceId = Optional.ofNullable(initialPlanPriceId);
@@ -1128,6 +1216,9 @@ public CreatePlanGroupRequestBody build() {
fallbackPlanId,
initialPlanId,
initialPlanPriceId,
+ optInEnabled,
+ optInText,
+ optInTitle,
orderedAddOns,
orderedBundleList,
orderedPlans,
diff --git a/src/main/java/com/schematic/api/resources/plangroups/requests/UpdatePlanGroupRequestBody.java b/src/main/java/com/schematic/api/resources/plangroups/requests/UpdatePlanGroupRequestBody.java
index a8dc851..67cda9e 100644
--- a/src/main/java/com/schematic/api/resources/plangroups/requests/UpdatePlanGroupRequestBody.java
+++ b/src/main/java/com/schematic/api/resources/plangroups/requests/UpdatePlanGroupRequestBody.java
@@ -54,6 +54,12 @@ public final class UpdatePlanGroupRequestBody {
private final Optional