diff --git a/.fernignore b/.fernignore
index f34ea1d..b2e9f70 100644
--- a/.fernignore
+++ b/.fernignore
@@ -2,6 +2,7 @@
CLAUDE.md
LICENSE
README.md
+.github/CODEOWNERS
src/main/java/com/schematic/api/BaseSchematic.java
src/main/java/com/schematic/api/EventBuffer.java
src/main/java/com/schematic/api/Schematic.java
diff --git a/build.gradle b/build.gradle
index 1d74354..e1ffc06 100644
--- a/build.gradle
+++ b/build.gradle
@@ -49,7 +49,7 @@ java {
group = 'com.schematichq'
-version = '1.2.0'
+version = '1.3.0'
jar {
dependsOn(":generatePomFileForMavenPublication")
@@ -80,7 +80,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.schematichq'
artifactId = 'schematic-java'
- version = '1.2.0'
+ version = '1.3.0'
from components.java
pom {
name = 'schematic'
diff --git a/reference.md b/reference.md
index 4960436..0d60eec 100644
--- a/reference.md
+++ b/reference.md
@@ -624,6 +624,208 @@ client.accounts().countApiRequests(
+
+
+
+
+client.accounts.listAuditLogs() -> ListAuditLogsResponse
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```java
+client.accounts().listAuditLogs(
+ ListAuditLogsRequest
+ .builder()
+ .actorType(ActorType.API_KEY)
+ .environmentId("environment_id")
+ .q("q")
+ .limit(1)
+ .offset(1)
+ .build()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**actorType:** `Optional`
+
+
+
+
+
+-
+
+**environmentId:** `Optional`
+
+
+
+
+
+-
+
+**q:** `Optional`
+
+
+
+
+
+-
+
+**limit:** `Optional` — Page limit (default 100)
+
+
+
+
+
+-
+
+**offset:** `Optional` — Page offset (default 0)
+
+
+
+
+
+
+
+
+
+
+
+client.accounts.getAuditLog(auditLogId) -> GetAuditLogResponse
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```java
+client.accounts().getAuditLog("audit_log_id");
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**auditLogId:** `String` — audit_log_id
+
+
+
+
+
+
+
+
+
+
+
+client.accounts.countAuditLogs() -> CountAuditLogsResponse
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```java
+client.accounts().countAuditLogs(
+ CountAuditLogsRequest
+ .builder()
+ .actorType(ActorType.API_KEY)
+ .environmentId("environment_id")
+ .q("q")
+ .limit(1)
+ .offset(1)
+ .build()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**actorType:** `Optional`
+
+
+
+
+
+-
+
+**environmentId:** `Optional`
+
+
+
+
+
+-
+
+**q:** `Optional`
+
+
+
+
+
+-
+
+**limit:** `Optional` — Page limit (default 100)
+
+
+
+
+
+-
+
+**offset:** `Optional` — Page offset (default 0)
+
+
+
+
+
+
+
@@ -706,7 +908,7 @@ client.accounts().listEnvironments(
client.accounts().createEnvironment(
CreateEnvironmentRequestBody
.builder()
- .environmentType(CreateEnvironmentRequestBodyEnvironmentType.DEVELOPMENT)
+ .environmentType(EnvironmentType.DEVELOPMENT)
.name("name")
.build()
);
@@ -724,7 +926,7 @@ client.accounts().createEnvironment(
-
-**environmentType:** `CreateEnvironmentRequestBodyEnvironmentType`
+**environmentType:** `EnvironmentType`
@@ -825,7 +1027,7 @@ client.accounts().updateEnvironment(
-
-**environmentType:** `Optional`
+**environmentType:** `Optional`
@@ -1117,7 +1319,6 @@ client.billing().upsertBillingCustomer(
.builder()
.email("email")
.externalId("external_id")
- .failedToImport(true)
.meta(
new HashMap() {{
put("key", "value");
@@ -1172,7 +1373,7 @@ client.billing().upsertBillingCustomer(
-
-**failedToImport:** `Boolean`
+**meta:** `Map`
@@ -1180,7 +1381,7 @@ client.billing().upsertBillingCustomer(
-
-**meta:** `Map`
+**name:** `String`
@@ -1188,7 +1389,7 @@ client.billing().upsertBillingCustomer(
-
-**name:** `String`
+**providerType:** `Optional`
@@ -1217,7 +1418,7 @@ client.billing().listCustomersWithSubscriptions(
ListCustomersWithSubscriptionsRequest
.builder()
.name("name")
- .failedToImport(true)
+ .providerType(BillingProviderType.SCHEMATIC)
.q("q")
.limit(1)
.offset(1)
@@ -1253,7 +1454,7 @@ client.billing().listCustomersWithSubscriptions(
-
-**failedToImport:** `Optional`
+**providerType:** `Optional`
@@ -1306,7 +1507,7 @@ client.billing().countCustomers(
CountCustomersRequest
.builder()
.name("name")
- .failedToImport(true)
+ .providerType(BillingProviderType.SCHEMATIC)
.q("q")
.limit(1)
.offset(1)
@@ -1342,7 +1543,7 @@ client.billing().countCustomers(
-
-**failedToImport:** `Optional`
+**providerType:** `Optional`
@@ -1940,7 +2141,7 @@ client.billing().upsertPaymentMethod(
-client.billing.searchBillingPrices() -> SearchBillingPricesResponse
+client.billing.listBillingPrices() -> ListBillingPricesResponse
-
@@ -1953,18 +2154,20 @@ client.billing().upsertPaymentMethod(
-
```java
-client.billing().searchBillingPrices(
- SearchBillingPricesRequest
+client.billing().listBillingPrices(
+ ListBillingPricesRequest
.builder()
.forInitialPlan(true)
.forTrialExpiryPlan(true)
- .productId("product_id")
.interval("interval")
+ .isActive(true)
.price(1)
+ .productId("product_id")
+ .providerType(BillingProviderType.SCHEMATIC)
.q("q")
- .requiresPaymentMethod(true)
- .tiersMode(SearchBillingPricesRequestTiersMode.VOLUME)
- .usageType(SearchBillingPricesRequestUsageType.LICENSED)
+ .tiersMode(BillingTiersMode.GRADUATED)
+ .usageType(BillingPriceUsageType.LICENSED)
+ .withMeter(true)
.limit(1)
.offset(1)
.build()
@@ -2007,7 +2210,7 @@ client.billing().searchBillingPrices(
-
-**productId:** `Optional`
+**interval:** `Optional`
@@ -2015,7 +2218,7 @@ client.billing().searchBillingPrices(
-
-**interval:** `Optional`
+**isActive:** `Optional` — Filter for active prices on active products (defaults to true if not specified)
@@ -2031,6 +2234,30 @@ client.billing().searchBillingPrices(
-
+**productId:** `Optional`
+
+
+
+
+
+-
+
+**productIds:** `Optional`
+
+
+
+
+
+-
+
+**providerType:** `Optional`
+
+
+
+
+
+-
+
**q:** `Optional`
@@ -2039,7 +2266,7 @@ client.billing().searchBillingPrices(
-
-**requiresPaymentMethod:** `Optional` — Filter for prices that require a payment method (inverse of ForInitialPlan)
+**tiersMode:** `Optional`
@@ -2047,7 +2274,7 @@ client.billing().searchBillingPrices(
-
-**tiersMode:** `Optional`
+**usageType:** `Optional`
@@ -2055,7 +2282,7 @@ client.billing().searchBillingPrices(
-
-**usageType:** `Optional`
+**withMeter:** `Optional` — Filter for prices with a meter
@@ -2099,7 +2326,7 @@ client.billing().searchBillingPrices(
client.billing().upsertBillingPrice(
CreateBillingPriceRequestBody
.builder()
- .billingScheme(CreateBillingPriceRequestBodyBillingScheme.PER_UNIT)
+ .billingScheme(BillingPriceScheme.PER_UNIT)
.currency("currency")
.externalAccountId("external_account_id")
.interval("interval")
@@ -2115,7 +2342,7 @@ client.billing().upsertBillingPrice(
)
)
.productExternalId("product_external_id")
- .usageType(CreateBillingPriceRequestBodyUsageType.LICENSED)
+ .usageType(BillingPriceUsageType.LICENSED)
.build()
);
```
@@ -2132,7 +2359,7 @@ client.billing().upsertBillingPrice(
-
-**billingScheme:** `CreateBillingPriceRequestBodyBillingScheme`
+**billingScheme:** `BillingPriceScheme`
@@ -2228,7 +2455,15 @@ client.billing().upsertBillingPrice(
-
-**tiersMode:** `Optional`
+**providerType:** `Optional`
+
+
+
+
+
+-
+
+**tiersMode:** `Optional`
@@ -2236,7 +2471,7 @@ client.billing().upsertBillingPrice(
-
-**usageType:** `CreateBillingPriceRequestBodyUsageType`
+**usageType:** `BillingPriceUsageType`
@@ -2288,7 +2523,7 @@ client.billing().deleteBillingProduct("billing_id");
-client.billing.listProductPrices() -> ListProductPricesResponse
+client.billing.listBillingProductPrices() -> ListBillingProductPricesResponse
-
@@ -2301,17 +2536,20 @@ client.billing().deleteBillingProduct("billing_id");
-
```java
-client.billing().listProductPrices(
- ListProductPricesRequest
+client.billing().listBillingProductPrices(
+ ListBillingProductPricesRequest
.builder()
- .name("name")
- .q("q")
- .priceUsageType(ListProductPricesRequestPriceUsageType.LICENSED)
- .withoutLinkedToPlan(true)
- .withOneTimeCharges(true)
- .withZeroPrice(true)
- .withPricesOnly(true)
+ .forInitialPlan(true)
+ .forTrialExpiryPlan(true)
+ .interval("interval")
.isActive(true)
+ .price(1)
+ .productId("product_id")
+ .providerType(BillingProviderType.SCHEMATIC)
+ .q("q")
+ .tiersMode(BillingTiersMode.GRADUATED)
+ .usageType(BillingPriceUsageType.LICENSED)
+ .withMeter(true)
.limit(1)
.offset(1)
.build()
@@ -2330,7 +2568,7 @@ client.billing().listProductPrices(
-
-**ids:** `Optional`
+**forInitialPlan:** `Optional` — Filter for prices valid for initial plans (free prices only)
@@ -2338,7 +2576,7 @@ client.billing().listProductPrices(
-
-**name:** `Optional`
+**forTrialExpiryPlan:** `Optional` — Filter for prices valid for trial expiry plans (free prices only)
@@ -2346,7 +2584,7 @@ client.billing().listProductPrices(
-
-**q:** `Optional`
+**ids:** `Optional`
@@ -2354,7 +2592,7 @@ client.billing().listProductPrices(
-
-**priceUsageType:** `Optional`
+**interval:** `Optional`
@@ -2362,7 +2600,7 @@ client.billing().listProductPrices(
-
-**withoutLinkedToPlan:** `Optional` — Filter products that are not linked to any plan
+**isActive:** `Optional` — Filter for active prices on active products (defaults to true if not specified)
@@ -2370,7 +2608,7 @@ client.billing().listProductPrices(
-
-**withOneTimeCharges:** `Optional` — Filter products that are one time charges
+**price:** `Optional`
@@ -2378,7 +2616,7 @@ client.billing().listProductPrices(
-
-**withZeroPrice:** `Optional` — Filter products that have zero price for free subscription type
+**productId:** `Optional`
@@ -2386,7 +2624,7 @@ client.billing().listProductPrices(
-
-**withPricesOnly:** `Optional` — Filter products that have prices
+**productIds:** `Optional`
@@ -2394,7 +2632,7 @@ client.billing().listProductPrices(
-
-**isActive:** `Optional` — Filter products that are active
+**providerType:** `Optional`
@@ -2402,7 +2640,7 @@ client.billing().listProductPrices(
-
-**limit:** `Optional` — Page limit (default 100)
+**q:** `Optional`
@@ -2410,7 +2648,39 @@ client.billing().listProductPrices(
-
-**offset:** `Optional` — Page offset (default 0)
+**tiersMode:** `Optional`
+
+
+
+
+
+-
+
+**usageType:** `Optional`
+
+
+
+
+
+-
+
+**withMeter:** `Optional` — Filter for prices with a meter
+
+
+
+
+
+-
+
+**limit:** `Optional` — Page limit (default 100)
+
+
+
+
+
+-
+
+**offset:** `Optional` — Page offset (default 0)
@@ -2523,6 +2793,14 @@ client.billing().upsertBillingProduct(
**price:** `Double`
+
+
+
+
+-
+
+**providerType:** `Optional`
+
@@ -2549,14 +2827,15 @@ client.billing().upsertBillingProduct(
client.billing().listBillingProducts(
ListBillingProductsRequest
.builder()
+ .isActive(true)
.name("name")
+ .priceUsageType(BillingPriceUsageType.LICENSED)
+ .providerType(BillingProviderType.SCHEMATIC)
.q("q")
- .priceUsageType(ListBillingProductsRequestPriceUsageType.LICENSED)
- .withoutLinkedToPlan(true)
.withOneTimeCharges(true)
- .withZeroPrice(true)
.withPricesOnly(true)
- .isActive(true)
+ .withZeroPrice(true)
+ .withoutLinkedToPlan(true)
.limit(1)
.offset(1)
.build()
@@ -2583,6 +2862,14 @@ client.billing().listBillingProducts(
-
+**isActive:** `Optional` — Filter products that are active. Defaults to true if not specified
+
+
+
+
+
+-
+
**name:** `Optional`
@@ -2591,7 +2878,7 @@ client.billing().listBillingProducts(
-
-**q:** `Optional`
+**priceUsageType:** `Optional`
@@ -2599,7 +2886,7 @@ client.billing().listBillingProducts(
-
-**priceUsageType:** `Optional`
+**providerType:** `Optional`
@@ -2607,7 +2894,7 @@ client.billing().listBillingProducts(
-
-**withoutLinkedToPlan:** `Optional` — Filter products that are not linked to any plan
+**q:** `Optional`
@@ -2623,7 +2910,7 @@ client.billing().listBillingProducts(
-
-**withZeroPrice:** `Optional` — Filter products that have zero price for free subscription type
+**withPricesOnly:** `Optional` — Filter products that have prices
@@ -2631,7 +2918,7 @@ client.billing().listBillingProducts(
-
-**withPricesOnly:** `Optional` — Filter products that have prices
+**withZeroPrice:** `Optional` — Filter products that have zero price for free subscription type
@@ -2639,7 +2926,7 @@ client.billing().listBillingProducts(
-
-**isActive:** `Optional` — Filter products that are active
+**withoutLinkedToPlan:** `Optional` — Filter products that are not linked to any plan
@@ -2683,14 +2970,15 @@ client.billing().listBillingProducts(
client.billing().countBillingProducts(
CountBillingProductsRequest
.builder()
+ .isActive(true)
.name("name")
+ .priceUsageType(BillingPriceUsageType.LICENSED)
+ .providerType(BillingProviderType.SCHEMATIC)
.q("q")
- .priceUsageType(CountBillingProductsRequestPriceUsageType.LICENSED)
- .withoutLinkedToPlan(true)
.withOneTimeCharges(true)
- .withZeroPrice(true)
.withPricesOnly(true)
- .isActive(true)
+ .withZeroPrice(true)
+ .withoutLinkedToPlan(true)
.limit(1)
.offset(1)
.build()
@@ -2717,6 +3005,14 @@ client.billing().countBillingProducts(
-
+**isActive:** `Optional` — Filter products that are active. Defaults to true if not specified
+
+
+
+
+
+-
+
**name:** `Optional`
@@ -2725,7 +3021,7 @@ client.billing().countBillingProducts(
-
-**q:** `Optional`
+**priceUsageType:** `Optional`
@@ -2733,7 +3029,7 @@ client.billing().countBillingProducts(
-
-**priceUsageType:** `Optional`
+**providerType:** `Optional`
@@ -2741,7 +3037,7 @@ client.billing().countBillingProducts(
-
-**withoutLinkedToPlan:** `Optional` — Filter products that are not linked to any plan
+**q:** `Optional`
@@ -2757,7 +3053,7 @@ client.billing().countBillingProducts(
-
-**withZeroPrice:** `Optional` — Filter products that have zero price for free subscription type
+**withPricesOnly:** `Optional` — Filter products that have prices
@@ -2765,7 +3061,7 @@ client.billing().countBillingProducts(
-
-**withPricesOnly:** `Optional` — Filter products that have prices
+**withZeroPrice:** `Optional` — Filter products that have zero price for free subscription type
@@ -2773,7 +3069,7 @@ client.billing().countBillingProducts(
-
-**isActive:** `Optional` — Filter products that are active
+**withoutLinkedToPlan:** `Optional` — Filter products that are not linked to any plan
@@ -2842,7 +3138,7 @@ client.billing().upsertBillingSubscription(
.priceExternalId("price_external_id")
.productExternalId("product_external_id")
.quantity(1)
- .usageType(BillingProductPricingUsageType.LICENSED)
+ .usageType(BillingPriceUsageType.LICENSED)
.build()
)
)
@@ -2864,6 +3160,14 @@ client.billing().upsertBillingSubscription(
-
+**applicationId:** `Optional`
+
+
+
+
+
+-
+
**cancelAt:** `Optional`
@@ -3000,7 +3304,7 @@ client.billing().upsertBillingSubscription(
-
-**trialEndSetting:** `Optional`
+**trialEndSetting:** `Optional`
@@ -3119,7 +3423,7 @@ client.credits().createBillingCredit(
-
-**burnStrategy:** `Optional`
+**burnStrategy:** `Optional`
@@ -3135,7 +3439,7 @@ client.credits().createBillingCredit(
-
-**defaultExpiryUnit:** `Optional`
+**defaultExpiryUnit:** `Optional`
@@ -3151,7 +3455,7 @@ client.credits().createBillingCredit(
-
-**defaultRolloverPolicy:** `Optional`
+**defaultRolloverPolicy:** `Optional`
@@ -3302,7 +3606,7 @@ client.credits().updateBillingCredit(
-
-**burnStrategy:** `Optional`
+**burnStrategy:** `Optional`
@@ -3310,7 +3614,7 @@ client.credits().updateBillingCredit(
-
-**defaultExpiryUnit:** `Optional`
+**defaultExpiryUnit:** `Optional`
@@ -3326,7 +3630,7 @@ client.credits().updateBillingCredit(
-
-**defaultRolloverPolicy:** `Optional`
+**defaultRolloverPolicy:** `Optional`
@@ -3451,7 +3755,7 @@ client.credits().listCreditBundles(
ListCreditBundlesRequest
.builder()
.creditId("credit_id")
- .status(ListCreditBundlesRequestStatus.ACTIVE)
+ .status(BillingCreditBundleStatus.ACTIVE)
.bundleType("fixed")
.limit(1)
.offset(1)
@@ -3487,7 +3791,7 @@ client.credits().listCreditBundles(
-
-**status:** `Optional`
+**status:** `Optional`
@@ -3591,7 +3895,7 @@ client.credits().createCreditBundle(
-
-**expiryType:** `Optional`
+**expiryType:** `Optional`
@@ -3599,7 +3903,7 @@ client.credits().createCreditBundle(
-
-**expiryUnit:** `Optional`
+**expiryUnit:** `Optional`
@@ -3639,7 +3943,7 @@ client.credits().createCreditBundle(
-
-**status:** `Optional`
+**status:** `Optional`
@@ -3742,7 +4046,7 @@ client.credits().updateCreditBundleDetails(
-
-**expiryType:** `Optional`
+**expiryType:** `Optional`
@@ -3750,7 +4054,7 @@ client.credits().updateCreditBundleDetails(
-
-**expiryUnit:** `Optional`
+**expiryUnit:** `Optional`
@@ -3790,7 +4094,7 @@ client.credits().updateCreditBundleDetails(
-
-**status:** `Optional`
+**status:** `Optional`
@@ -3859,7 +4163,7 @@ client.credits().countCreditBundles(
CountCreditBundlesRequest
.builder()
.creditId("credit_id")
- .status(CountCreditBundlesRequestStatus.ACTIVE)
+ .status(BillingCreditBundleStatus.ACTIVE)
.bundleType("fixed")
.limit(1)
.offset(1)
@@ -3895,7 +4199,7 @@ client.credits().countCreditBundles(
-
-**status:** `Optional`
+**status:** `Optional`
@@ -4043,7 +4347,7 @@ client.credits().zeroOutGrant(
-
-**reason:** `Optional`
+**reason:** `Optional`
@@ -4074,7 +4378,7 @@ client.credits().grantBillingCreditsToCompany(
.companyId("company_id")
.creditId("credit_id")
.quantity(1)
- .reason("reason")
+ .reason(BillingCreditGrantReason.BILLING_CREDIT_AUTO_TOPUP)
.build()
);
```
@@ -4123,7 +4427,7 @@ client.credits().grantBillingCreditsToCompany(
-
-**expiryType:** `Optional`
+**expiryType:** `Optional`
@@ -4131,7 +4435,7 @@ client.credits().grantBillingCreditsToCompany(
-
-**expiryUnit:** `Optional`
+**expiryUnit:** `Optional`
@@ -4155,7 +4459,104 @@ client.credits().grantBillingCreditsToCompany(
-
-**reason:** `String`
+**reason:** `BillingCreditGrantReason`
+
+
+
+
+
+-
+
+**renewalEnabled:** `Optional`
+
+
+
+
+
+-
+
+**renewalPeriod:** `Optional`
+
+
+
+
+
+
+
+
+
+
+
+client.credits.countCompanyGrants() -> CountCompanyGrantsResponse
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```java
+client.credits().countCompanyGrants(
+ CountCompanyGrantsRequest
+ .builder()
+ .companyId("company_id")
+ .order(CreditGrantSortOrder.CREATED_AT)
+ .dir(SortDirection.ASC)
+ .limit(1)
+ .offset(1)
+ .build()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**companyId:** `Optional`
+
+
+
+
+
+-
+
+**order:** `Optional`
+
+
+
+
+
+-
+
+**dir:** `Optional`
+
+
+
+
+
+-
+
+**limit:** `Optional` — Page limit (default 100)
+
+
+
+
+
+-
+
+**offset:** `Optional` — Page offset (default 0)
@@ -4184,8 +4585,8 @@ client.credits().listCompanyGrants(
ListCompanyGrantsRequest
.builder()
.companyId("company_id")
- .order(ListCompanyGrantsRequestOrder.CREATED_AT)
- .dir(ListCompanyGrantsRequestDir.ASC)
+ .order(CreditGrantSortOrder.CREATED_AT)
+ .dir(SortDirection.ASC)
.limit(1)
.offset(1)
.build()
@@ -4212,7 +4613,7 @@ client.credits().listCompanyGrants(
-
-**order:** `Optional`
+**order:** `Optional`
@@ -4220,7 +4621,7 @@ client.credits().listCompanyGrants(
-
-**dir:** `Optional`
+**dir:** `Optional`
@@ -4407,7 +4808,7 @@ client.credits().getEnrichedCreditLedger(
GetEnrichedCreditLedgerRequest
.builder()
.companyId("company_id")
- .period(GetEnrichedCreditLedgerRequestPeriod.DAILY)
+ .period(CreditLedgerPeriod.DAILY)
.billingCreditId("billing_credit_id")
.featureId("feature_id")
.startTime("start_time")
@@ -4454,7 +4855,7 @@ client.credits().getEnrichedCreditLedger(
-
-**period:** `GetEnrichedCreditLedgerRequestPeriod`
+**period:** `CreditLedgerPeriod`
@@ -4515,7 +4916,7 @@ client.credits().countCreditLedger(
CountCreditLedgerRequest
.builder()
.companyId("company_id")
- .period(CountCreditLedgerRequestPeriod.DAILY)
+ .period(CreditLedgerPeriod.DAILY)
.billingCreditId("billing_credit_id")
.featureId("feature_id")
.startTime("start_time")
@@ -4562,7 +4963,7 @@ client.credits().countCreditLedger(
-
-**period:** `CountCreditLedgerRequestPeriod`
+**period:** `CreditLedgerPeriod`
@@ -4713,8 +5114,8 @@ client.credits().createBillingPlanCreditGrant(
.creditAmount(1)
.creditId("credit_id")
.planId("plan_id")
- .resetCadence(CreateBillingPlanCreditGrantRequestBodyResetCadence.MONTHLY)
- .resetStart(CreateBillingPlanCreditGrantRequestBodyResetStart.BILLING_PERIOD)
+ .resetCadence(BillingPlanCreditGrantResetCadence.DAILY)
+ .resetStart(BillingPlanCreditGrantResetStart.BILLING_PERIOD)
.build()
);
```
@@ -4731,71 +5132,54 @@ client.credits().createBillingPlanCreditGrant(
-
-**applyToExisting:** `Optional`
+**request:** `CreateBillingPlanCreditGrantRequestBody`
-
-
--
-
-**creditAmount:** `Integer`
-
-
--
-**creditId:** `String`
-
+
+client.credits.updateBillingPlanCreditGrant(planGrantId, request) -> UpdateBillingPlanCreditGrantResponse
-
-**expiryType:** `Optional`
-
-
-
+#### 🔌 Usage
-
-**expiryUnit:** `Optional`
-
-
-
-
-
-**expiryUnitCount:** `Optional`
-
+```java
+client.credits().updateBillingPlanCreditGrant(
+ "plan_grant_id",
+ UpdateBillingPlanCreditGrantRequestBody
+ .builder()
+ .resetCadence(BillingPlanCreditGrantResetCadence.DAILY)
+ .resetStart(BillingPlanCreditGrantResetStart.BILLING_PERIOD)
+ .build()
+);
+```
-
-
--
-
-**planId:** `String`
-
+#### ⚙️ Parameters
+
-
-**resetCadence:** `CreateBillingPlanCreditGrantRequestBodyResetCadence`
-
-
-
-
-
-**resetStart:** `CreateBillingPlanCreditGrantRequestBodyResetStart`
+**planGrantId:** `String` — plan_grant_id
@@ -4803,7 +5187,7 @@ client.credits().createBillingPlanCreditGrant(
-
-**resetType:** `Optional`
+**request:** `UpdateBillingPlanCreditGrantRequestBody`
@@ -4815,7 +5199,7 @@ client.credits().createBillingPlanCreditGrant(
-client.credits.updateBillingPlanCreditGrant(planGrantId, request) -> UpdateBillingPlanCreditGrantResponse
+client.credits.deleteBillingPlanCreditGrant(planGrantId) -> DeleteBillingPlanCreditGrantResponse
-
@@ -4828,12 +5212,11 @@ client.credits().createBillingPlanCreditGrant(
-
```java
-client.credits().updateBillingPlanCreditGrant(
+client.credits().deleteBillingPlanCreditGrant(
"plan_grant_id",
- UpdateBillingPlanCreditGrantRequestBody
+ DeleteBillingPlanCreditGrantRequest
.builder()
- .resetCadence(UpdateBillingPlanCreditGrantRequestBodyResetCadence.MONTHLY)
- .resetStart(UpdateBillingPlanCreditGrantRequestBodyResetStart.BILLING_PERIOD)
+ .applyToExisting(true)
.build()
);
```
@@ -4862,153 +5245,43 @@ client.credits().updateBillingPlanCreditGrant(
+
+
-
--
-**creditAmount:** `Optional`
-
+
+client.credits.countBillingPlanCreditGrants() -> CountBillingPlanCreditGrantsResponse
-
-**expiryType:** `Optional`
-
-
-
+#### 🔌 Usage
-
-**expiryUnit:** `Optional`
-
-
-
-
-
-**expiryUnitCount:** `Optional`
-
+```java
+client.credits().countBillingPlanCreditGrants(
+ CountBillingPlanCreditGrantsRequest
+ .builder()
+ .creditId("credit_id")
+ .planId("plan_id")
+ .limit(1)
+ .offset(1)
+ .build()
+);
+```
-
-
--
-
-**resetCadence:** `UpdateBillingPlanCreditGrantRequestBodyResetCadence`
-
-
-
-
-
--
-
-**resetStart:** `UpdateBillingPlanCreditGrantRequestBodyResetStart`
-
-
-
-
-
--
-
-**resetType:** `Optional`
-
-
-
-
-
-
-
-
-
-
-
-client.credits.deleteBillingPlanCreditGrant(planGrantId) -> DeleteBillingPlanCreditGrantResponse
-
--
-
-#### 🔌 Usage
-
-
--
-
-
--
-
-```java
-client.credits().deleteBillingPlanCreditGrant(
- "plan_grant_id",
- DeleteBillingPlanCreditGrantRequest
- .builder()
- .applyToExisting(true)
- .build()
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
--
-
-
--
-
-**planGrantId:** `String` — plan_grant_id
-
-
-
-
-
--
-
-**applyToExisting:** `Optional`
-
-
-
-
-
-
-
-
-
-
-
-client.credits.countBillingPlanCreditGrants() -> CountBillingPlanCreditGrantsResponse
-
--
-
-#### 🔌 Usage
-
-
--
-
-
--
-
-```java
-client.credits().countBillingPlanCreditGrants(
- CountBillingPlanCreditGrantsRequest
- .builder()
- .creditId("credit_id")
- .planId("plan_id")
- .limit(1)
- .offset(1)
- .build()
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
+
+
+
+#### ⚙️ Parameters
-
@@ -5410,6 +5683,67 @@ client.checkout().previewManagePlan(
+
+
+
+
+client.checkout.cancelSubscription(request) -> CancelSubscriptionResponse
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```java
+client.checkout().cancelSubscription(
+ CancelSubscriptionRequest
+ .builder()
+ .companyId("company_id")
+ .build()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**cancelImmediately:** `Optional` — If false, subscription cancels at period end. Defaults to true.
+
+
+
+
+
+-
+
+**companyId:** `String`
+
+
+
+
+
+-
+
+**prorate:** `Optional` — If true and cancel_immediately is true, issue prorated credit. Defaults to true.
+
+
+
+
+
+
+
@@ -5484,10 +5818,14 @@ client.checkout().updateCustomerSubscriptionTrialEnd(
client.companies().listCompanies(
ListCompaniesRequest
.builder()
+ .monetizedSubscriptions(true)
.planId("plan_id")
.q("q")
+ .sortOrderColumn("sort_order_column")
+ .sortOrderDirection(SortDirection.ASC)
.withoutFeatureOverrideFor("without_feature_override_for")
.withoutPlan(true)
+ .withoutSubscription(true)
.withSubscription(true)
.limit(1)
.offset(1)
@@ -5507,6 +5845,14 @@ client.companies().listCompanies(
-
+**creditTypeIds:** `Optional` — Filter companies by one or more credit type IDs (each ID starts with bcrd_)
+
+
+
+
+
+-
+
**ids:** `Optional` — Filter companies by multiple company IDs (starts with comp_)
@@ -5515,6 +5861,14 @@ client.companies().listCompanies(
-
+**monetizedSubscriptions:** `Optional` — Filter companies that have monetized subscriptions
+
+
+
+
+
+-
+
**planId:** `Optional` — Filter companies by plan ID (starts with plan_)
@@ -5523,6 +5877,14 @@ client.companies().listCompanies(
-
+**planIds:** `Optional` — Filter companies by one or more plan IDs (each ID starts with plan_)
+
+
+
+
+
+-
+
**q:** `Optional` — Search for companies by name, keys or string traits
@@ -5531,6 +5893,38 @@ client.companies().listCompanies(
-
+**sortOrderColumn:** `Optional` — Column to sort by (e.g. name, created_at, last_seen_at)
+
+
+
+
+
+-
+
+**sortOrderDirection:** `Optional` — Direction to sort by (asc or desc)
+
+
+
+
+
+-
+
+**subscriptionStatuses:** `Optional` — Filter companies by one or more subscription statuses
+
+
+
+
+
+-
+
+**subscriptionTypes:** `Optional` — Filter companies by one or more subscription types
+
+
+
+
+
+-
+
**withoutFeatureOverrideFor:** `Optional` — Filter out companies that already have a company override for the specified feature ID
@@ -5547,6 +5941,14 @@ client.companies().listCompanies(
-
+**withoutSubscription:** `Optional` — Filter out companies that have a subscription
+
+
+
+
+
+-
+
**withSubscription:** `Optional` — Filter companies that have a subscription
@@ -5677,7 +6079,14 @@ client.companies().getCompany("company_id");
-
```java
-client.companies().deleteCompany("company_id");
+client.companies().deleteCompany(
+ "company_id",
+ DeleteCompanyRequest
+ .builder()
+ .cancelSubscription(true)
+ .prorate(true)
+ .build()
+);
```
@@ -5694,6 +6103,22 @@ client.companies().deleteCompany("company_id");
**companyId:** `String` — company_id
+
+
+
+
+-
+
+**cancelSubscription:** `Optional`
+
+
+
+
+
+-
+
+**prorate:** `Optional`
+
@@ -5720,10 +6145,14 @@ client.companies().deleteCompany("company_id");
client.companies().countCompanies(
CountCompaniesRequest
.builder()
+ .monetizedSubscriptions(true)
.planId("plan_id")
.q("q")
+ .sortOrderColumn("sort_order_column")
+ .sortOrderDirection(SortDirection.ASC)
.withoutFeatureOverrideFor("without_feature_override_for")
.withoutPlan(true)
+ .withoutSubscription(true)
.withSubscription(true)
.limit(1)
.offset(1)
@@ -5743,7 +6172,7 @@ client.companies().countCompanies(
-
-**ids:** `Optional` — Filter companies by multiple company IDs (starts with comp_)
+**creditTypeIds:** `Optional` — Filter companies by one or more credit type IDs (each ID starts with bcrd_)
@@ -5751,7 +6180,31 @@ client.companies().countCompanies(
-
-**planId:** `Optional` — Filter companies by plan ID (starts with plan_)
+**ids:** `Optional` — Filter companies by multiple company IDs (starts with comp_)
+
+
+
+
+
+-
+
+**monetizedSubscriptions:** `Optional` — Filter companies that have monetized subscriptions
+
+
+
+
+
+-
+
+**planId:** `Optional` — Filter companies by plan ID (starts with plan_)
+
+
+
+
+
+-
+
+**planIds:** `Optional` — Filter companies by one or more plan IDs (each ID starts with plan_)
@@ -5767,6 +6220,38 @@ client.companies().countCompanies(
-
+**sortOrderColumn:** `Optional` — Column to sort by (e.g. name, created_at, last_seen_at)
+
+
+
+
+
+-
+
+**sortOrderDirection:** `Optional` — Direction to sort by (asc or desc)
+
+
+
+
+
+-
+
+**subscriptionStatuses:** `Optional` — Filter companies by one or more subscription statuses
+
+
+
+
+
+-
+
+**subscriptionTypes:** `Optional` — Filter companies by one or more subscription types
+
+
+
+
+
+-
+
**withoutFeatureOverrideFor:** `Optional` — Filter out companies that already have a company override for the specified feature ID
@@ -5783,6 +6268,14 @@ client.companies().countCompanies(
-
+**withoutSubscription:** `Optional` — Filter out companies that have a subscription
+
+
+
+
+
+-
+
**withSubscription:** `Optional` — Filter companies that have a subscription
@@ -5832,7 +6325,7 @@ client.companies().countCompaniesForAdvancedFilter(
.withoutPlan(true)
.withoutSubscription(true)
.sortOrderColumn("sort_order_column")
- .sortOrderDirection(CountCompaniesForAdvancedFilterRequestSortOrderDirection.ASC)
+ .sortOrderDirection(SortDirection.ASC)
.limit(1)
.offset(1)
.build()
@@ -5883,7 +6376,7 @@ client.companies().countCompaniesForAdvancedFilter(
-
-**subscriptionStatuses:** `Optional` — Filter companies by one or more subscription statuses (active, canceled, expired, incomplete, incomplete_expired, past_due, paused, trialing, unpaid)
+**subscriptionStatuses:** `Optional` — Filter companies by one or more subscription statuses (active, canceled, expired, incomplete, incomplete_expired, past_due, paused, trialing, unpaid)
@@ -5891,7 +6384,7 @@ client.companies().countCompaniesForAdvancedFilter(
-
-**subscriptionTypes:** `Optional` — Filter companies by one or more subscription types (paid, free, trial)
+**subscriptionTypes:** `Optional` — Filter companies by one or more subscription types (paid, free, trial)
@@ -5939,7 +6432,7 @@ client.companies().countCompaniesForAdvancedFilter(
-
-**sortOrderDirection:** `Optional` — Direction to sort by (asc or desc)
+**sortOrderDirection:** `Optional` — Direction to sort by (asc or desc)
@@ -6094,7 +6587,7 @@ client.companies().listCompaniesForAdvancedFilter(
.withoutPlan(true)
.withoutSubscription(true)
.sortOrderColumn("sort_order_column")
- .sortOrderDirection(ListCompaniesForAdvancedFilterRequestSortOrderDirection.ASC)
+ .sortOrderDirection(SortDirection.ASC)
.limit(1)
.offset(1)
.build()
@@ -6145,7 +6638,7 @@ client.companies().listCompaniesForAdvancedFilter(
-
-**subscriptionStatuses:** `Optional` — Filter companies by one or more subscription statuses (active, canceled, expired, incomplete, incomplete_expired, past_due, paused, trialing, unpaid)
+**subscriptionStatuses:** `Optional` — Filter companies by one or more subscription statuses (active, canceled, expired, incomplete, incomplete_expired, past_due, paused, trialing, unpaid)
@@ -6153,7 +6646,7 @@ client.companies().listCompaniesForAdvancedFilter(
-
-**subscriptionTypes:** `Optional` — Filter companies by one or more subscription types (paid, free, trial)
+**subscriptionTypes:** `Optional` — Filter companies by one or more subscription types (paid, free, trial)
@@ -6201,7 +6694,7 @@ client.companies().listCompaniesForAdvancedFilter(
-
-**sortOrderDirection:** `Optional` — Direction to sort by (asc or desc)
+**sortOrderDirection:** `Optional` — Direction to sort by (asc or desc)
@@ -6282,78 +6775,6 @@ client.companies().lookupCompany(
-
-
-
-
-client.companies.getActiveDeals() -> GetActiveDealsResponse
-
--
-
-#### 🔌 Usage
-
-
--
-
-
--
-
-```java
-client.companies().getActiveDeals(
- GetActiveDealsRequest
- .builder()
- .companyId("company_id")
- .dealStage("deal_stage")
- .limit(1)
- .offset(1)
- .build()
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
--
-
-
--
-
-**companyId:** `String`
-
-
-
-
-
--
-
-**dealStage:** `String`
-
-
-
-
-
--
-
-**limit:** `Optional` — Page limit (default 100)
-
-
-
-
-
--
-
-**offset:** `Optional` — Page offset (default 0)
-
-
-
-
-
-
-
@@ -6661,7 +7082,7 @@ client.companies().upsertCompanyTrait(
client.companies().listEntityKeyDefinitions(
ListEntityKeyDefinitionsRequest
.builder()
- .entityType(ListEntityKeyDefinitionsRequestEntityType.COMPANY)
+ .entityType(EntityType.COMPANY)
.q("q")
.limit(1)
.offset(1)
@@ -6681,7 +7102,7 @@ client.companies().listEntityKeyDefinitions(
-
-**entityType:** `Optional`
+**entityType:** `Optional`
@@ -6741,7 +7162,7 @@ client.companies().listEntityKeyDefinitions(
client.companies().countEntityKeyDefinitions(
CountEntityKeyDefinitionsRequest
.builder()
- .entityType(CountEntityKeyDefinitionsRequestEntityType.COMPANY)
+ .entityType(EntityType.COMPANY)
.q("q")
.limit(1)
.offset(1)
@@ -6761,7 +7182,7 @@ client.companies().countEntityKeyDefinitions(
-
-**entityType:** `Optional`
+**entityType:** `Optional`
@@ -6821,9 +7242,9 @@ client.companies().countEntityKeyDefinitions(
client.companies().listEntityTraitDefinitions(
ListEntityTraitDefinitionsRequest
.builder()
- .entityType(ListEntityTraitDefinitionsRequestEntityType.COMPANY)
+ .entityType(EntityType.COMPANY)
.q("q")
- .traitType(ListEntityTraitDefinitionsRequestTraitType.BOOLEAN)
+ .traitType(TraitType.BOOLEAN)
.limit(1)
.offset(1)
.build()
@@ -6842,7 +7263,7 @@ client.companies().listEntityTraitDefinitions(
-
-**entityType:** `Optional`
+**entityType:** `Optional`
@@ -6866,7 +7287,15 @@ client.companies().listEntityTraitDefinitions(
-
-**traitType:** `Optional`
+**traitType:** `Optional`
+
+
+
+
+
+-
+
+**traitTypes:** `Optional`
@@ -6910,11 +7339,11 @@ client.companies().listEntityTraitDefinitions(
client.companies().getOrCreateEntityTraitDefinition(
CreateEntityTraitDefinitionRequestBody
.builder()
- .entityType(CreateEntityTraitDefinitionRequestBodyEntityType.COMPANY)
+ .entityType(EntityType.COMPANY)
.hierarchy(
Arrays.asList("hierarchy")
)
- .traitType(CreateEntityTraitDefinitionRequestBodyTraitType.BOOLEAN)
+ .traitType(TraitType.BOOLEAN)
.build()
);
```
@@ -6939,7 +7368,7 @@ client.companies().getOrCreateEntityTraitDefinition(
-
-**entityType:** `CreateEntityTraitDefinitionRequestBodyEntityType`
+**entityType:** `EntityType`
@@ -6955,7 +7384,7 @@ client.companies().getOrCreateEntityTraitDefinition(
-
-**traitType:** `CreateEntityTraitDefinitionRequestBodyTraitType`
+**traitType:** `TraitType`
@@ -7024,7 +7453,7 @@ client.companies().updateEntityTraitDefinition(
"entity_trait_definition_id",
UpdateEntityTraitDefinitionRequestBody
.builder()
- .traitType(UpdateEntityTraitDefinitionRequestBodyTraitType.BOOLEAN)
+ .traitType(TraitType.BOOLEAN)
.build()
);
```
@@ -7057,7 +7486,7 @@ client.companies().updateEntityTraitDefinition(
-
-**traitType:** `UpdateEntityTraitDefinitionRequestBodyTraitType`
+**traitType:** `TraitType`
@@ -7085,9 +7514,9 @@ client.companies().updateEntityTraitDefinition(
client.companies().countEntityTraitDefinitions(
CountEntityTraitDefinitionsRequest
.builder()
- .entityType(CountEntityTraitDefinitionsRequestEntityType.COMPANY)
+ .entityType(EntityType.COMPANY)
.q("q")
- .traitType(CountEntityTraitDefinitionsRequestTraitType.BOOLEAN)
+ .traitType(TraitType.BOOLEAN)
.limit(1)
.offset(1)
.build()
@@ -7106,7 +7535,7 @@ client.companies().countEntityTraitDefinitions(
-
-**entityType:** `Optional`
+**entityType:** `Optional`
@@ -7130,7 +7559,15 @@ client.companies().countEntityTraitDefinitions(
-
-**traitType:** `Optional`
+**traitType:** `Optional`
+
+
+
+
+
+-
+
+**traitTypes:** `Optional`
@@ -7677,6 +8114,7 @@ client.companies().deletePlanTrait("plan_trait_id");
client.companies().updatePlanTraitsBulk(
UpdatePlanTraitBulkRequestBody
.builder()
+ .applyToExistingCompanies(true)
.planId("plan_id")
.traits(
Arrays.asList(
@@ -7703,6 +8141,14 @@ client.companies().updatePlanTraitsBulk(
-
+**applyToExistingCompanies:** `Boolean`
+
+
+
+
+
+-
+
**planId:** `String`
@@ -8448,7 +8894,7 @@ client.entitlements().createCompanyOverride(
.builder()
.companyId("company_id")
.featureId("feature_id")
- .valueType(CreateCompanyOverrideRequestBodyValueType.BOOLEAN)
+ .valueType(EntitlementValueType.BOOLEAN)
.build()
);
```
@@ -8553,7 +8999,7 @@ client.entitlements().createCompanyOverride(
-
-**valueType:** `CreateCompanyOverrideRequestBodyValueType`
+**valueType:** `EntitlementValueType`
@@ -8622,7 +9068,7 @@ client.entitlements().updateCompanyOverride(
"company_override_id",
UpdateCompanyOverrideRequestBody
.builder()
- .valueType(UpdateCompanyOverrideRequestBodyValueType.BOOLEAN)
+ .valueType(EntitlementValueType.BOOLEAN)
.build()
);
```
@@ -8719,7 +9165,7 @@ client.entitlements().updateCompanyOverride(
-
-**valueType:** `UpdateCompanyOverrideRequestBodyValueType`
+**valueType:** `EntitlementValueType`
@@ -9046,6 +9492,7 @@ client.entitlements().listFeatureUsage(
ListFeatureUsageRequest
.builder()
.companyId("company_id")
+ .includeUsageAggregation(true)
.q("q")
.withoutNegativeEntitlements(true)
.limit(1)
@@ -9090,6 +9537,14 @@ client.entitlements().listFeatureUsage(
-
+**includeUsageAggregation:** `Optional` — Include time-bucketed usage aggregation (today, this week, this month, billing period) for credit-based entitlements. Defaults to false for performance.
+
+
+
+
+
+-
+
**q:** `Optional`
@@ -9122,6 +9577,87 @@ client.entitlements().listFeatureUsage(
+
+
+
+
+client.entitlements.getFeatureUsageTimeSeries() -> GetFeatureUsageTimeSeriesResponse
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```java
+client.entitlements().getFeatureUsageTimeSeries(
+ GetFeatureUsageTimeSeriesRequest
+ .builder()
+ .companyId("company_id")
+ .endTime(OffsetDateTime.parse("2024-01-15T09:30:00Z"))
+ .featureId("feature_id")
+ .startTime(OffsetDateTime.parse("2024-01-15T09:30:00Z"))
+ .granularity(TimeSeriesGranularity.DAILY)
+ .build()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**companyId:** `String`
+
+
+
+
+
+-
+
+**endTime:** `OffsetDateTime`
+
+
+
+
+
+-
+
+**featureId:** `String`
+
+
+
+
+
+-
+
+**granularity:** `Optional`
+
+
+
+
+
+-
+
+**startTime:** `OffsetDateTime`
+
+
+
+
+
+
+
@@ -9143,6 +9679,7 @@ client.entitlements().countFeatureUsage(
CountFeatureUsageRequest
.builder()
.companyId("company_id")
+ .includeUsageAggregation(true)
.q("q")
.withoutNegativeEntitlements(true)
.limit(1)
@@ -9187,6 +9724,14 @@ client.entitlements().countFeatureUsage(
-
+**includeUsageAggregation:** `Optional` — Include time-bucketed usage aggregation (today, this week, this month, billing period) for credit-based entitlements. Defaults to false for performance.
+
+
+
+
+
+-
+
**q:** `Optional`
@@ -9385,6 +9930,7 @@ client.entitlements().listPlanEntitlements(
.builder()
.featureId("feature_id")
.planId("plan_id")
+ .planVersionId("plan_version_id")
.q("q")
.withMeteredProducts(true)
.limit(1)
@@ -9445,6 +9991,22 @@ client.entitlements().listPlanEntitlements(
-
+**planVersionId:** `Optional` — Filter plan entitlements by a single plan version ID (starting with plvr_)
+
+
+
+
+
+-
+
+**planVersionIds:** `Optional` — Filter plan entitlements by multiple plan version IDs (starting with plvr_)
+
+
+
+
+
+-
+
**q:** `Optional` — Search for plan entitlements by feature or company name
@@ -9499,7 +10061,7 @@ client.entitlements().createPlanEntitlement(
.builder()
.featureId("feature_id")
.planId("plan_id")
- .valueType(CreatePlanEntitlementRequestBodyValueType.BOOLEAN)
+ .valueType(EntitlementValueType.BOOLEAN)
.build()
);
```
@@ -9620,7 +10182,7 @@ client.entitlements().createPlanEntitlement(
-
-**priceBehavior:** `Optional`
+**priceBehavior:** `Optional`
@@ -9644,7 +10206,7 @@ client.entitlements().createPlanEntitlement(
-
-**tierMode:** `Optional`
+**tierMode:** `Optional`
@@ -9684,7 +10246,7 @@ client.entitlements().createPlanEntitlement(
-
-**valueType:** `CreatePlanEntitlementRequestBodyValueType`
+**valueType:** `EntitlementValueType`
@@ -9785,7 +10347,7 @@ client.entitlements().updatePlanEntitlement(
"plan_entitlement_id",
UpdatePlanEntitlementRequestBody
.builder()
- .valueType(UpdatePlanEntitlementRequestBodyValueType.BOOLEAN)
+ .valueType(EntitlementValueType.BOOLEAN)
.build()
);
```
@@ -9898,7 +10460,7 @@ client.entitlements().updatePlanEntitlement(
-
-**priceBehavior:** `Optional`
+**priceBehavior:** `Optional`
@@ -9922,7 +10484,7 @@ client.entitlements().updatePlanEntitlement(
-
-**tierMode:** `Optional`
+**tierMode:** `Optional`
@@ -9962,7 +10524,7 @@ client.entitlements().updatePlanEntitlement(
-
-**valueType:** `UpdatePlanEntitlementRequestBodyValueType`
+**valueType:** `EntitlementValueType`
@@ -10064,6 +10626,7 @@ client.entitlements().countPlanEntitlements(
.builder()
.featureId("feature_id")
.planId("plan_id")
+ .planVersionId("plan_version_id")
.q("q")
.withMeteredProducts(true)
.limit(1)
@@ -10124,7 +10687,7 @@ client.entitlements().countPlanEntitlements(
-
-**q:** `Optional` — Search for plan entitlements by feature or company name
+**planVersionId:** `Optional` — Filter plan entitlements by a single plan version ID (starting with plvr_)
@@ -10132,7 +10695,7 @@ client.entitlements().countPlanEntitlements(
-
-**withMeteredProducts:** `Optional` — Filter plan entitlements only with metered products
+**planVersionIds:** `Optional` — Filter plan entitlements by multiple plan version IDs (starting with plvr_)
@@ -10140,7 +10703,7 @@ client.entitlements().countPlanEntitlements(
-
-**limit:** `Optional` — Page limit (default 100)
+**q:** `Optional` — Search for plan entitlements by feature or company name
@@ -10148,11 +10711,81 @@ client.entitlements().countPlanEntitlements(
-
-**offset:** `Optional` — Page offset (default 0)
+**withMeteredProducts:** `Optional` — Filter plan entitlements only with metered products
-
+
+
+-
+
+**limit:** `Optional` — Page limit (default 100)
+
+
+
+
+
+-
+
+**offset:** `Optional` — Page offset (default 0)
+
+
+
+
+
+
+
+
+
+
+
+client.entitlements.duplicatePlanEntitlements(request) -> DuplicatePlanEntitlementsResponse
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```java
+client.entitlements().duplicatePlanEntitlements(
+ DuplicatePlanEntitlementsRequestBody
+ .builder()
+ .sourcePlanId("source_plan_id")
+ .targetPlanId("target_plan_id")
+ .build()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**sourcePlanId:** `String`
+
+
+
+
+
+-
+
+**targetPlanId:** `String`
+
+
+
+
@@ -10295,11 +10928,9 @@ client.plans().listPlans(
.forInitialPlan(true)
.forTrialExpiryPlan(true)
.hasProductId(true)
- .planType(ListPlansRequestPlanType.PLAN)
+ .planType(PlanType.PLAN)
.q("q")
- .requiresPaymentMethod(true)
.withoutEntitlementFor("without_entitlement_for")
- .withoutProductId(true)
.withoutPaidProductId(true)
.limit(1)
.offset(1)
@@ -10367,7 +10998,7 @@ client.plans().listPlans(
-
-**planType:** `Optional` — Filter by plan type
+**planType:** `Optional` — Filter by plan type
@@ -10383,14 +11014,6 @@ client.plans().listPlans(
-
-**requiresPaymentMethod:** `Optional` — Filter for plans that require a payment method (inverse of ForInitialPlan)
-
-
-
-
-
--
-
**withoutEntitlementFor:** `Optional` — Filter out plans that already have a plan entitlement for the specified feature ID
@@ -10399,14 +11022,6 @@ client.plans().listPlans(
-
-**withoutProductId:** `Optional` — Filter out plans that have a billing product ID
-
-
-
-
-
--
-
**withoutPaidProductId:** `Optional` — Filter out plans that have a paid billing product ID
@@ -10453,7 +11068,7 @@ client.plans().createPlan(
.builder()
.description("description")
.name("name")
- .planType(CreatePlanRequestBodyPlanType.PLAN)
+ .planType(PlanType.PLAN)
.build()
);
```
@@ -10470,31 +11085,7 @@ client.plans().createPlan(
-
-**description:** `String`
-
-
-
-
-
--
-
-**icon:** `Optional`
-
-
-
-
-
--
-
-**name:** `String`
-
-
-
-
-
--
-
-**planType:** `CreatePlanRequestBodyPlanType`
+**request:** `CreatePlanRequestBody`
@@ -10588,23 +11179,7 @@ client.plans().updatePlan(
-
-**description:** `Optional`
-
-
-
-
-
--
-
-**icon:** `Optional`
-
-
-
-
-
--
-
-**name:** `String`
+**request:** `UpdatePlanRequestBody`
@@ -10673,7 +11248,7 @@ client.plans().upsertBillingProductPlan(
"plan_id",
UpsertBillingProductRequestBody
.builder()
- .chargeType(UpsertBillingProductRequestBodyChargeType.ONE_TIME)
+ .chargeType(ChargeType.FREE)
.isTrialable(true)
.build()
);
@@ -10699,87 +11274,7 @@ client.plans().upsertBillingProductPlan(
-
-**billingProductId:** `Optional`
-
-
-
-
-
--
-
-**chargeType:** `UpsertBillingProductRequestBodyChargeType`
-
-
-
-
-
--
-
-**currency:** `Optional`
-
-
-
-
-
--
-
-**isTrialable:** `Boolean`
-
-
-
-
-
--
-
-**monthlyPrice:** `Optional`
-
-
-
-
-
--
-
-**monthlyPriceId:** `Optional`
-
-
-
-
-
--
-
-**oneTimePrice:** `Optional`
-
-
-
-
-
--
-
-**oneTimePriceId:** `Optional`
-
-
-
-
-
--
-
-**trialDays:** `Optional`
-
-
-
-
-
--
-
-**yearlyPrice:** `Optional`
-
-
-
-
-
--
-
-**yearlyPriceId:** `Optional`
+**request:** `UpsertBillingProductRequestBody`
@@ -10812,11 +11307,9 @@ client.plans().countPlans(
.forInitialPlan(true)
.forTrialExpiryPlan(true)
.hasProductId(true)
- .planType(CountPlansRequestPlanType.PLAN)
+ .planType(PlanType.PLAN)
.q("q")
- .requiresPaymentMethod(true)
.withoutEntitlementFor("without_entitlement_for")
- .withoutProductId(true)
.withoutPaidProductId(true)
.limit(1)
.offset(1)
@@ -10884,7 +11377,7 @@ client.plans().countPlans(
-
-**planType:** `Optional` — Filter by plan type
+**planType:** `Optional` — Filter by plan type
@@ -10900,14 +11393,6 @@ client.plans().countPlans(
-
-**requiresPaymentMethod:** `Optional` — Filter for plans that require a payment method (inverse of ForInitialPlan)
-
-
-
-
-
--
-
**withoutEntitlementFor:** `Optional` — Filter out plans that already have a plan entitlement for the specified feature ID
@@ -10916,14 +11401,6 @@ client.plans().countPlans(
-
-**withoutProductId:** `Optional` — Filter out plans that have a billing product ID
-
-
-
-
-
--
-
**withoutPaidProductId:** `Optional` — Filter out plans that have a paid billing product ID
@@ -11077,7 +11554,7 @@ client.components().listComponents(
client.components().createComponent(
CreateComponentRequestBody
.builder()
- .entityType(CreateComponentRequestBodyEntityType.ENTITLEMENT)
+ .entityType(ComponentEntityType.BILLING)
.name("name")
.build()
);
@@ -11103,7 +11580,7 @@ client.components().createComponent(
-
-**entityType:** `CreateComponentRequestBodyEntityType`
+**entityType:** `ComponentEntityType`
@@ -11212,7 +11689,7 @@ client.components().updateComponent(
-
-**entityType:** `Optional`
+**entityType:** `Optional`
@@ -11228,7 +11705,7 @@ client.components().updateComponent(
-
-**state:** `Optional`
+**state:** `Optional`
@@ -11397,8 +11874,8 @@ client.components().previewComponentData(
-## crm
-client.crm.upsertDealLineItemAssociation(request) -> UpsertDealLineItemAssociationResponse
+## dataexports
+client.dataexports.createDataExport(request) -> CreateDataExportResponse
-
@@ -11411,11 +11888,12 @@ client.components().previewComponentData(
-
```java
-client.crm().upsertDealLineItemAssociation(
- CreateCrmDealLineItemAssociationRequestBody
+client.dataexports().createDataExport(
+ CreateDataExportRequestBody
.builder()
- .dealExternalId("deal_external_id")
- .lineItemExternalId("line_item_external_id")
+ .exportType("company-feature-usage")
+ .metadata("metadata")
+ .outputFileType("csv")
.build()
);
```
@@ -11432,7 +11910,15 @@ client.crm().upsertDealLineItemAssociation(
-
-**dealExternalId:** `String`
+**exportType:** `String`
+
+
+
+
+
+-
+
+**metadata:** `String`
@@ -11440,7 +11926,7 @@ client.crm().upsertDealLineItemAssociation(
-
-**lineItemExternalId:** `String`
+**outputFileType:** `String`
@@ -11452,7 +11938,7 @@ client.crm().upsertDealLineItemAssociation(
-client.crm.upsertLineItem(request) -> UpsertLineItemResponse
+client.dataexports.getDataExportArtifact(dataExportId) -> InputStream
-
@@ -11465,16 +11951,7 @@ client.crm().upsertDealLineItemAssociation(
-
```java
-client.crm().upsertLineItem(
- CreateCrmLineItemRequestBody
- .builder()
- .amount("amount")
- .interval("interval")
- .lineItemExternalId("line_item_external_id")
- .productExternalId("product_external_id")
- .quantity(1)
- .build()
-);
+client.dataexports().getDataExportArtifact("data_export_id");
```
@@ -11489,474 +11966,24 @@ client.crm().upsertLineItem(
-
-**amount:** `String`
+**dataExportId:** `String` — data_export_id
-
-
--
-
-**discountPercentage:** `Optional`
-
-
--
-**interval:** `String`
-
+
+## events
+client.events.createEventBatch(request) -> CreateEventBatchResponse
-
-**lineItemExternalId:** `String`
-
-
-
-
-
--
-
-**productExternalId:** `String`
-
-
-
-
-
--
-
-**quantity:** `Integer`
-
-
-
-
-
--
-
-**termMonth:** `Optional`
-
-
-
-
-
--
-
-**totalDiscount:** `Optional`
-
-
-
-
-
-
-
-
-
-
-
-client.crm.upsertCrmDeal(request) -> UpsertCrmDealResponse
-
--
-
-#### 🔌 Usage
-
-
--
-
-
--
-
-```java
-client.crm().upsertCrmDeal(
- CreateCrmDealRequestBody
- .builder()
- .crmCompanyKey("crm_company_key")
- .crmType("crm_type")
- .dealExternalId("deal_external_id")
- .build()
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
--
-
-
--
-
-**arr:** `Optional`
-
-
-
-
-
--
-
-**crmCompanyId:** `Optional`
-
-
-
-
-
--
-
-**crmCompanyKey:** `String`
-
-
-
-
-
--
-
-**crmProductId:** `Optional`
-
-
-
-
-
--
-
-**crmType:** `String`
-
-
-
-
-
--
-
-**dealExternalId:** `String`
-
-
-
-
-
--
-
-**dealName:** `Optional`
-
-
-
-
-
--
-
-**dealStage:** `Optional`
-
-
-
-
-
--
-
-**mrr:** `Optional`
-
-
-
-
-
-
-
-
-
-
-
-client.crm.listCrmProducts() -> ListCrmProductsResponse
-
--
-
-#### 🔌 Usage
-
-
--
-
-
--
-
-```java
-client.crm().listCrmProducts(
- ListCrmProductsRequest
- .builder()
- .name("name")
- .limit(1)
- .offset(1)
- .build()
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
--
-
-
--
-
-**ids:** `Optional`
-
-
-
-
-
--
-
-**name:** `Optional`
-
-
-
-
-
--
-
-**limit:** `Optional` — Page limit (default 100)
-
-
-
-
-
--
-
-**offset:** `Optional` — Page offset (default 0)
-
-
-
-
-
-
-
-
-
-
-
-client.crm.upsertCrmProduct(request) -> UpsertCrmProductResponse
-
--
-
-#### 🔌 Usage
-
-
--
-
-
--
-
-```java
-client.crm().upsertCrmProduct(
- CreateCrmProductRequestBody
- .builder()
- .currency("currency")
- .description("description")
- .externalId("external_id")
- .interval("interval")
- .name("name")
- .price("price")
- .quantity(1)
- .sku("sku")
- .build()
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
--
-
-
--
-
-**currency:** `String`
-
-
-
-
-
--
-
-**description:** `String`
-
-
-
-
-
--
-
-**externalId:** `String`
-
-
-
-
-
--
-
-**interval:** `String`
-
-
-
-
-
--
-
-**name:** `String`
-
-
-
-
-
--
-
-**price:** `String`
-
-
-
-
-
--
-
-**quantity:** `Integer`
-
-
-
-
-
--
-
-**sku:** `String`
-
-
-
-
-
-
-
-
-
-
-
-## dataexports
-client.dataexports.createDataExport(request) -> CreateDataExportResponse
-
--
-
-#### 🔌 Usage
-
-
--
-
-
--
-
-```java
-client.dataexports().createDataExport(
- CreateDataExportRequestBody
- .builder()
- .exportType("company-feature-usage")
- .metadata("metadata")
- .outputFileType("csv")
- .build()
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
--
-
-
--
-
-**exportType:** `String`
-
-
-
-
-
--
-
-**metadata:** `String`
-
-
-
-
-
--
-
-**outputFileType:** `String`
-
-
-
-
-
-
-
-
-
-
-
-client.dataexports.getDataExportArtifact(dataExportId) -> InputStream
-
--
-
-#### 🔌 Usage
-
-
--
-
-
--
-
-```java
-client.dataexports().getDataExportArtifact("data_export_id");
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
--
-
-
--
-
-**dataExportId:** `String` — data_export_id
-
-
-
-
-
-
-
-
-
-
-
-## events
-client.events.createEventBatch(request) -> CreateEventBatchResponse
-
--
-
-#### 🔌 Usage
+#### 🔌 Usage
-
@@ -11972,7 +11999,7 @@ client.events().createEventBatch(
Arrays.asList(
CreateEventRequestBody
.builder()
- .eventType(CreateEventRequestBodyEventType.IDENTIFY)
+ .eventType(EventType.FLAG_CHECK)
.build()
)
)
@@ -12129,7 +12156,7 @@ client.events().listEvents(
-
-**eventTypes:** `Optional`
+**eventTypes:** `Optional`
@@ -12189,7 +12216,7 @@ client.events().listEvents(
client.events().createEvent(
CreateEventRequestBody
.builder()
- .eventType(CreateEventRequestBodyEventType.IDENTIFY)
+ .eventType(EventType.FLAG_CHECK)
.build()
);
```
@@ -12354,7 +12381,7 @@ client.features().listFeatures(
-
-**featureType:** `Optional` — Filter by one or more feature types (boolean, event, trait)
+**featureType:** `Optional` — Filter by one or more feature types (boolean, event, trait)
@@ -12407,7 +12434,7 @@ client.features().createFeature(
CreateFeatureRequestBody
.builder()
.description("description")
- .featureType(CreateFeatureRequestBodyFeatureType.BOOLEAN)
+ .featureType(FeatureType.BOOLEAN)
.name("name")
.build()
);
@@ -12441,7 +12468,7 @@ client.features().createFeature(
-
-**featureType:** `CreateFeatureRequestBodyFeatureType`
+**featureType:** `FeatureType`
@@ -12465,7 +12492,7 @@ client.features().createFeature(
-
-**lifecyclePhase:** `Optional`
+**lifecyclePhase:** `Optional`
@@ -12614,7 +12641,7 @@ client.features().updateFeature(
-
-**featureType:** `Optional`
+**featureType:** `Optional`
@@ -12638,7 +12665,7 @@ client.features().updateFeature(
-
-**lifecyclePhase:** `Optional`
+**lifecyclePhase:** `Optional`
@@ -12800,7 +12827,7 @@ client.features().countFeatures(
-
-**featureType:** `Optional` — Filter by one or more feature types (boolean, event, trait)
+**featureType:** `Optional` — Filter by one or more feature types (boolean, event, trait)
@@ -13177,15 +13204,163 @@ client.features().updateFlagRules(
-
-**flagId:** `String` — flag_id
+**flagId:** `String` — flag_id
+
+
+
+
+
+-
+
+**rules:** `List`
+
+
+
+
+
+
+
+
+
+
+
+client.features.checkFlag(key, request) -> CheckFlagResponse
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```java
+client.features().checkFlag(
+ "key",
+ CheckFlagRequestBody
+ .builder()
+ .build()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**key:** `String` — key
+
+
+
+
+
+-
+
+**request:** `CheckFlagRequestBody`
+
+
+
+
+
+
+
+
+
+
+
+client.features.checkFlags(request) -> CheckFlagsResponse
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```java
+client.features().checkFlags(
+ CheckFlagRequestBody
+ .builder()
+ .build()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**request:** `CheckFlagRequestBody`
+
+
+
+
+
+
+
+client.features.checkFlagsBulk(request) -> CheckFlagsBulkResponse
-
-**rules:** `List`
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```java
+client.features().checkFlagsBulk(
+ CheckFlagsBulkRequestBody
+ .builder()
+ .contexts(
+ Arrays.asList(
+ CheckFlagRequestBody
+ .builder()
+ .build()
+ )
+ )
+ .build()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**contexts:** `List`
@@ -13197,7 +13372,7 @@ client.features().updateFlagRules(
-client.features.checkFlag(key, request) -> CheckFlagResponse
+client.features.countFlags() -> CountFlagsResponse
-
@@ -13210,10 +13385,13 @@ client.features().updateFlagRules(
-
```java
-client.features().checkFlag(
- "key",
- CheckFlagRequestBody
+client.features().countFlags(
+ CountFlagsRequest
.builder()
+ .featureId("feature_id")
+ .q("q")
+ .limit(1)
+ .offset(1)
.build()
);
```
@@ -13230,7 +13408,7 @@ client.features().checkFlag(
-
-**key:** `String` — key
+**featureId:** `Optional`
@@ -13238,7 +13416,31 @@ client.features().checkFlag(
-
-**request:** `CheckFlagRequestBody`
+**ids:** `Optional`
+
+
+
+
+
+-
+
+**q:** `Optional` — Search by flag name, key, or ID
+
+
+
+
+
+-
+
+**limit:** `Optional` — Page limit (default 100)
+
+
+
+
+
+-
+
+**offset:** `Optional` — Page offset (default 0)
@@ -13250,7 +13452,8 @@ client.features().checkFlag(
-client.features.checkFlags(request) -> CheckFlagsResponse
+## planbundle
+client.planbundle.createPlanBundle(request) -> CreatePlanBundleResponse
-
@@ -13263,9 +13466,17 @@ client.features().checkFlag(
-
```java
-client.features().checkFlags(
- CheckFlagRequestBody
+client.planbundle().createPlanBundle(
+ CreatePlanBundleRequestBody
.builder()
+ .entitlements(
+ Arrays.asList(
+ PlanBundleEntitlementRequestBody
+ .builder()
+ .action(PlanBundleAction.CREATE)
+ .build()
+ )
+ )
.build()
);
```
@@ -13282,7 +13493,39 @@ client.features().checkFlags(
-
-**request:** `CheckFlagRequestBody`
+**billingProduct:** `Optional`
+
+
+
+
+
+-
+
+**creditGrants:** `Optional
>`
+
+
+
+
+
+-
+
+**entitlements:** `List`
+
+
+
+
+
+-
+
+**plan:** `Optional`
+
+
+
+
+
+-
+
+**traits:** `Optional
>`
@@ -13294,7 +13537,7 @@ client.features().checkFlags(
-client.features.countFlags() -> CountFlagsResponse
+client.planbundle.updatePlanBundle(planBundleId, request) -> UpdatePlanBundleResponse
-
@@ -13307,13 +13550,18 @@ client.features().checkFlags(
-
```java
-client.features().countFlags(
- CountFlagsRequest
+client.planbundle().updatePlanBundle(
+ "plan_bundle_id",
+ UpdatePlanBundleRequestBody
.builder()
- .featureId("feature_id")
- .q("q")
- .limit(1)
- .offset(1)
+ .entitlements(
+ Arrays.asList(
+ PlanBundleEntitlementRequestBody
+ .builder()
+ .action(PlanBundleAction.CREATE)
+ .build()
+ )
+ )
.build()
);
```
@@ -13330,7 +13578,7 @@ client.features().countFlags(
-
-**featureId:** `Optional`
+**planBundleId:** `String` — plan_bundle_id
@@ -13338,7 +13586,7 @@ client.features().countFlags(
-
-**ids:** `Optional`
+**billingProduct:** `Optional`
@@ -13346,7 +13594,7 @@ client.features().countFlags(
-
-**q:** `Optional` — Search by flag name, key, or ID
+**creditGrants:** `Optional
>`
@@ -13354,7 +13602,7 @@ client.features().countFlags(
-
-**limit:** `Optional` — Page limit (default 100)
+**entitlements:** `List`
@@ -13362,7 +13610,15 @@ client.features().countFlags(
-
-**offset:** `Optional` — Page offset (default 0)
+**plan:** `Optional`
+
+
+
+
+
+-
+
+**traits:** `Optional
>`
@@ -13448,10 +13704,14 @@ client.plangroups().createPlanGroup(
)
)
.preventDowngradesWhenOverLimit(true)
+ .preventSelfServiceDowngrade(true)
+ .prorationBehavior(ProrationBehavior.CREATE_PRORATIONS)
+ .showAsMonthlyPrices(true)
.showCredits(true)
+ .showFeatureDescription(true)
.showPeriodToggle(true)
.showZeroPriceAsFree(true)
- .syncCustomerBillingDetailsForTax(true)
+ .syncCustomerBillingDetails(true)
.build()
);
```
@@ -13588,6 +13848,62 @@ client.plangroups().createPlanGroup(
-
+**preventSelfServiceDowngrade:** `Boolean`
+
+
+
+
+
+-
+
+**preventSelfServiceDowngradeButtonText:** `Optional`
+
+
+
+
+
+-
+
+**preventSelfServiceDowngradeUrl:** `Optional`
+
+
+
+
+
+-
+
+**prorationBehavior:** `ProrationBehavior`
+
+
+
+
+
+-
+
+**scheduledDowngradeBehavior:** `Optional`
+
+
+
+
+
+-
+
+**scheduledDowngradePreventWhenOverLimit:** `Optional`
+
+
+
+
+
+-
+
+**showAsMonthlyPrices:** `Boolean`
+
+
+
+
+
+-
+
**showCredits:** `Boolean`
@@ -13596,6 +13912,14 @@ client.plangroups().createPlanGroup(
-
+**showFeatureDescription:** `Boolean`
+
+
+
+
+
+-
+
**showPeriodToggle:** `Boolean`
@@ -13612,7 +13936,7 @@ client.plangroups().createPlanGroup(
-
-**syncCustomerBillingDetailsForTax:** `Boolean`
+**syncCustomerBillingDetails:** `Boolean`
@@ -13705,10 +14029,14 @@ client.plangroups().updatePlanGroup(
)
)
.preventDowngradesWhenOverLimit(true)
+ .preventSelfServiceDowngrade(true)
+ .prorationBehavior(ProrationBehavior.CREATE_PRORATIONS)
+ .showAsMonthlyPrices(true)
.showCredits(true)
+ .showFeatureDescription(true)
.showPeriodToggle(true)
.showZeroPriceAsFree(true)
- .syncCustomerBillingDetailsForTax(true)
+ .syncCustomerBillingDetails(true)
.build()
);
```
@@ -13853,6 +14181,62 @@ client.plangroups().updatePlanGroup(
-
+**preventSelfServiceDowngrade:** `Boolean`
+
+
+
+
+
+-
+
+**preventSelfServiceDowngradeButtonText:** `Optional`
+
+
+
+
+
+-
+
+**preventSelfServiceDowngradeUrl:** `Optional`
+
+
+
+
+
+-
+
+**prorationBehavior:** `ProrationBehavior`
+
+
+
+
+
+-
+
+**scheduledDowngradeBehavior:** `Optional`
+
+
+
+
+
+-
+
+**scheduledDowngradePreventWhenOverLimit:** `Optional`
+
+
+
+
+
+-
+
+**showAsMonthlyPrices:** `Boolean`
+
+
+
+
+
+-
+
**showCredits:** `Boolean`
@@ -13861,6 +14245,14 @@ client.plangroups().updatePlanGroup(
-
+**showFeatureDescription:** `Boolean`
+
+
+
+
+
+-
+
**showPeriodToggle:** `Boolean`
@@ -13877,7 +14269,7 @@ client.plangroups().updatePlanGroup(
-
-**syncCustomerBillingDetailsForTax:** `Boolean`
+**syncCustomerBillingDetails:** `Boolean`
@@ -14262,7 +14654,7 @@ client.webhooks().createWebhook(
.builder()
.name("name")
.requestTypes(
- Arrays.asList(CreateWebhookRequestBodyRequestTypesItem.COMPANY_UPDATED)
+ Arrays.asList(WebhookRequestType.SUBSCRIPTION_TRIAL_ENDED)
)
.url("url")
.build()
@@ -14305,7 +14697,7 @@ client.webhooks().createWebhook(
-
-**requestTypes:** `List`
+**requestTypes:** `List`
@@ -14430,7 +14822,7 @@ client.webhooks().updateWebhook(
-
-**requestTypes:** `Optional
>`
+**requestTypes:** `Optional>`
@@ -14438,7 +14830,7 @@ client.webhooks().updateWebhook(
-
-**status:** `Optional`
+**status:** `Optional`
diff --git a/src/main/java/com/schematic/api/AsyncBaseSchematic.java b/src/main/java/com/schematic/api/AsyncBaseSchematic.java
index ee22084..f3f5133 100644
--- a/src/main/java/com/schematic/api/AsyncBaseSchematic.java
+++ b/src/main/java/com/schematic/api/AsyncBaseSchematic.java
@@ -13,11 +13,11 @@
import com.schematic.api.resources.companies.AsyncCompaniesClient;
import com.schematic.api.resources.components.AsyncComponentsClient;
import com.schematic.api.resources.credits.AsyncCreditsClient;
-import com.schematic.api.resources.crm.AsyncCrmClient;
import com.schematic.api.resources.dataexports.AsyncDataexportsClient;
import com.schematic.api.resources.entitlements.AsyncEntitlementsClient;
import com.schematic.api.resources.events.AsyncEventsClient;
import com.schematic.api.resources.features.AsyncFeaturesClient;
+import com.schematic.api.resources.planbundle.AsyncPlanbundleClient;
import com.schematic.api.resources.plangroups.AsyncPlangroupsClient;
import com.schematic.api.resources.plans.AsyncPlansClient;
import com.schematic.api.resources.webhooks.AsyncWebhooksClient;
@@ -45,14 +45,14 @@ public class AsyncBaseSchematic {
protected final Supplier componentsClient;
- protected final Supplier crmClient;
-
protected final Supplier dataexportsClient;
protected final Supplier eventsClient;
protected final Supplier featuresClient;
+ protected final Supplier planbundleClient;
+
protected final Supplier plangroupsClient;
protected final Supplier accesstokensClient;
@@ -70,10 +70,10 @@ public AsyncBaseSchematic(ClientOptions clientOptions) {
this.entitlementsClient = Suppliers.memoize(() -> new AsyncEntitlementsClient(clientOptions));
this.plansClient = Suppliers.memoize(() -> new AsyncPlansClient(clientOptions));
this.componentsClient = Suppliers.memoize(() -> new AsyncComponentsClient(clientOptions));
- this.crmClient = Suppliers.memoize(() -> new AsyncCrmClient(clientOptions));
this.dataexportsClient = Suppliers.memoize(() -> new AsyncDataexportsClient(clientOptions));
this.eventsClient = Suppliers.memoize(() -> new AsyncEventsClient(clientOptions));
this.featuresClient = Suppliers.memoize(() -> new AsyncFeaturesClient(clientOptions));
+ this.planbundleClient = Suppliers.memoize(() -> new AsyncPlanbundleClient(clientOptions));
this.plangroupsClient = Suppliers.memoize(() -> new AsyncPlangroupsClient(clientOptions));
this.accesstokensClient = Suppliers.memoize(() -> new AsyncAccesstokensClient(clientOptions));
this.webhooksClient = Suppliers.memoize(() -> new AsyncWebhooksClient(clientOptions));
@@ -140,10 +140,6 @@ public AsyncComponentsClient components() {
return this.componentsClient.get();
}
- public AsyncCrmClient crm() {
- return this.crmClient.get();
- }
-
public AsyncDataexportsClient dataexports() {
return this.dataexportsClient.get();
}
@@ -156,6 +152,10 @@ public AsyncFeaturesClient features() {
return this.featuresClient.get();
}
+ public AsyncPlanbundleClient planbundle() {
+ return this.planbundleClient.get();
+ }
+
public AsyncPlangroupsClient plangroups() {
return this.plangroupsClient.get();
}
diff --git a/src/main/java/com/schematic/api/BaseSchematic.java b/src/main/java/com/schematic/api/BaseSchematic.java
index bbfaa4e..2fba31a 100644
--- a/src/main/java/com/schematic/api/BaseSchematic.java
+++ b/src/main/java/com/schematic/api/BaseSchematic.java
@@ -11,10 +11,12 @@
import com.schematic.api.resources.checkout.CheckoutClient;
import com.schematic.api.resources.companies.CompaniesClient;
import com.schematic.api.resources.components.ComponentsClient;
-import com.schematic.api.resources.crm.CrmClient;
+import com.schematic.api.resources.credits.CreditsClient;
+import com.schematic.api.resources.dataexports.DataexportsClient;
import com.schematic.api.resources.entitlements.EntitlementsClient;
import com.schematic.api.resources.events.EventsClient;
import com.schematic.api.resources.features.FeaturesClient;
+import com.schematic.api.resources.planbundle.PlanbundleClient;
import com.schematic.api.resources.plangroups.PlangroupsClient;
import com.schematic.api.resources.plans.PlansClient;
import com.schematic.api.resources.webhooks.WebhooksClient;
@@ -35,14 +37,18 @@ public class BaseSchematic {
protected final Supplier entitlementsClient;
+ protected final Supplier creditsClient;
+
protected final Supplier componentsClient;
- protected final Supplier crmClient;
+ protected final Supplier dataexportsClient;
protected final Supplier eventsClient;
protected final Supplier plansClient;
+ protected final Supplier planbundleClient;
+
protected final Supplier plangroupsClient;
protected final Supplier accesstokensClient;
@@ -58,9 +64,11 @@ public BaseSchematic(ClientOptions clientOptions) {
this.companiesClient = Suppliers.memoize(() -> new CompaniesClient(clientOptions));
this.entitlementsClient = Suppliers.memoize(() -> new EntitlementsClient(clientOptions));
this.componentsClient = Suppliers.memoize(() -> new ComponentsClient(clientOptions));
- this.crmClient = Suppliers.memoize(() -> new CrmClient(clientOptions));
+ this.creditsClient = Suppliers.memoize(() -> new CreditsClient(clientOptions));
+ this.dataexportsClient = Suppliers.memoize(() -> new DataexportsClient(clientOptions));
this.eventsClient = Suppliers.memoize(() -> new EventsClient(clientOptions));
this.plansClient = Suppliers.memoize(() -> new PlansClient(clientOptions));
+ this.planbundleClient = Suppliers.memoize(() -> new PlanbundleClient(clientOptions));
this.plangroupsClient = Suppliers.memoize(() -> new PlangroupsClient(clientOptions));
this.accesstokensClient = Suppliers.memoize(() -> new AccesstokensClient(clientOptions));
this.webhooksClient = Suppliers.memoize(() -> new WebhooksClient(clientOptions));
@@ -94,8 +102,12 @@ public ComponentsClient components() {
return this.componentsClient.get();
}
- public CrmClient crm() {
- return this.crmClient.get();
+ public CreditsClient credits() {
+ return this.creditsClient.get();
+ }
+
+ public DataexportsClient dataexports() {
+ return this.dataexportsClient.get();
}
public EventsClient events() {
@@ -106,6 +118,10 @@ public PlansClient plans() {
return this.plansClient.get();
}
+ public PlanbundleClient planbundle() {
+ return this.planbundleClient.get();
+ }
+
public PlangroupsClient plangroups() {
return this.plangroupsClient.get();
}
diff --git a/src/main/java/com/schematic/api/Schematic.java b/src/main/java/com/schematic/api/Schematic.java
index 26ae85a..8bf13c4 100644
--- a/src/main/java/com/schematic/api/Schematic.java
+++ b/src/main/java/com/schematic/api/Schematic.java
@@ -12,11 +12,11 @@
import com.schematic.api.resources.features.types.CheckFlagResponse;
import com.schematic.api.types.CheckFlagRequestBody;
import com.schematic.api.types.CreateEventRequestBody;
-import com.schematic.api.types.CreateEventRequestBodyEventType;
import com.schematic.api.types.EventBody;
import com.schematic.api.types.EventBodyIdentify;
import com.schematic.api.types.EventBodyIdentifyCompany;
import com.schematic.api.types.EventBodyTrack;
+import com.schematic.api.types.EventType;
import java.time.Duration;
import java.time.OffsetDateTime;
import java.util.Collections;
@@ -212,7 +212,7 @@ public void identify(
.build();
CreateEventRequestBody event = CreateEventRequestBody.builder()
- .eventType(CreateEventRequestBodyEventType.IDENTIFY)
+ .eventType(EventType.IDENTIFY)
.body(EventBody.of(body))
.sentAt(OffsetDateTime.now())
.build();
@@ -246,7 +246,7 @@ public void track(
.build();
CreateEventRequestBody event = CreateEventRequestBody.builder()
- .eventType(CreateEventRequestBodyEventType.TRACK)
+ .eventType(EventType.TRACK)
.body(EventBody.of(body))
.sentAt(OffsetDateTime.now())
.build();
diff --git a/src/main/java/com/schematic/api/core/ClientOptions.java b/src/main/java/com/schematic/api/core/ClientOptions.java
index a1f67f1..4c74d33 100644
--- a/src/main/java/com/schematic/api/core/ClientOptions.java
+++ b/src/main/java/com/schematic/api/core/ClientOptions.java
@@ -32,10 +32,10 @@ private ClientOptions(
this.headers.putAll(headers);
this.headers.putAll(new HashMap() {
{
- put("User-Agent", "com.schematichq:schematic-java/1.2.0");
+ put("User-Agent", "com.schematichq:schematic-java/1.3.0");
put("X-Fern-Language", "JAVA");
put("X-Fern-SDK-Name", "com.schematic.fern:api-sdk");
- put("X-Fern-SDK-Version", "1.2.0");
+ put("X-Fern-SDK-Version", "1.3.0");
}
});
this.headerSuppliers = headerSuppliers;
diff --git a/src/main/java/com/schematic/api/resources/accesstokens/requests/IssueTemporaryAccessTokenRequestBody.java b/src/main/java/com/schematic/api/resources/accesstokens/requests/IssueTemporaryAccessTokenRequestBody.java
index 0aa459d..9990e0d 100644
--- a/src/main/java/com/schematic/api/resources/accesstokens/requests/IssueTemporaryAccessTokenRequestBody.java
+++ b/src/main/java/com/schematic/api/resources/accesstokens/requests/IssueTemporaryAccessTokenRequestBody.java
@@ -16,16 +16,21 @@
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = IssueTemporaryAccessTokenRequestBody.Builder.class)
public final class IssueTemporaryAccessTokenRequestBody {
private final Map lookup;
+ private final String resourceType;
+
private final Map additionalProperties;
- private IssueTemporaryAccessTokenRequestBody(Map lookup, Map additionalProperties) {
+ private IssueTemporaryAccessTokenRequestBody(
+ Map lookup, String resourceType, Map additionalProperties) {
this.lookup = lookup;
+ this.resourceType = resourceType;
this.additionalProperties = additionalProperties;
}
@@ -36,7 +41,7 @@ public Map getLookup() {
@JsonProperty("resource_type")
public String getResourceType() {
- return "company";
+ return resourceType;
}
@java.lang.Override
@@ -52,12 +57,12 @@ public Map getAdditionalProperties() {
}
private boolean equalTo(IssueTemporaryAccessTokenRequestBody other) {
- return lookup.equals(other.lookup);
+ return lookup.equals(other.lookup) && resourceType.equals(other.resourceType);
}
@java.lang.Override
public int hashCode() {
- return Objects.hash(this.lookup);
+ return Objects.hash(this.lookup, this.resourceType);
}
@java.lang.Override
@@ -65,12 +70,30 @@ public String toString() {
return ObjectMappers.stringify(this);
}
- public static Builder builder() {
+ public static ResourceTypeStage builder() {
return new Builder();
}
+ public interface ResourceTypeStage {
+ _FinalStage resourceType(@NotNull String resourceType);
+
+ Builder from(IssueTemporaryAccessTokenRequestBody other);
+ }
+
+ public interface _FinalStage {
+ IssueTemporaryAccessTokenRequestBody build();
+
+ _FinalStage lookup(Map lookup);
+
+ _FinalStage putAllLookup(Map lookup);
+
+ _FinalStage lookup(String key, String value);
+ }
+
@JsonIgnoreProperties(ignoreUnknown = true)
- public static final class Builder {
+ public static final class Builder implements ResourceTypeStage, _FinalStage {
+ private String resourceType;
+
private Map lookup = new LinkedHashMap<>();
@JsonAnySetter
@@ -78,34 +101,47 @@ public static final class Builder {
private Builder() {}
+ @java.lang.Override
public Builder from(IssueTemporaryAccessTokenRequestBody other) {
lookup(other.getLookup());
+ resourceType(other.getResourceType());
return this;
}
- @JsonSetter(value = "lookup", nulls = Nulls.SKIP)
- public Builder lookup(Map lookup) {
- this.lookup.clear();
- if (lookup != null) {
- this.lookup.putAll(lookup);
- }
+ @java.lang.Override
+ @JsonSetter("resource_type")
+ public _FinalStage resourceType(@NotNull String resourceType) {
+ this.resourceType = Objects.requireNonNull(resourceType, "resourceType must not be null");
+ return this;
+ }
+
+ @java.lang.Override
+ public _FinalStage lookup(String key, String value) {
+ this.lookup.put(key, value);
return this;
}
- public Builder putAllLookup(Map lookup) {
+ @java.lang.Override
+ public _FinalStage putAllLookup(Map lookup) {
if (lookup != null) {
this.lookup.putAll(lookup);
}
return this;
}
- public Builder lookup(String key, String value) {
- this.lookup.put(key, value);
+ @java.lang.Override
+ @JsonSetter(value = "lookup", nulls = Nulls.SKIP)
+ public _FinalStage lookup(Map lookup) {
+ this.lookup.clear();
+ if (lookup != null) {
+ this.lookup.putAll(lookup);
+ }
return this;
}
+ @java.lang.Override
public IssueTemporaryAccessTokenRequestBody build() {
- return new IssueTemporaryAccessTokenRequestBody(lookup, additionalProperties);
+ return new IssueTemporaryAccessTokenRequestBody(lookup, resourceType, additionalProperties);
}
}
}
diff --git a/src/main/java/com/schematic/api/resources/accounts/AccountsClient.java b/src/main/java/com/schematic/api/resources/accounts/AccountsClient.java
index 44c7be5..45393d5 100644
--- a/src/main/java/com/schematic/api/resources/accounts/AccountsClient.java
+++ b/src/main/java/com/schematic/api/resources/accounts/AccountsClient.java
@@ -7,24 +7,29 @@
import com.schematic.api.core.RequestOptions;
import com.schematic.api.resources.accounts.requests.CountApiKeysRequest;
import com.schematic.api.resources.accounts.requests.CountApiRequestsRequest;
+import com.schematic.api.resources.accounts.requests.CountAuditLogsRequest;
import com.schematic.api.resources.accounts.requests.CreateApiKeyRequestBody;
import com.schematic.api.resources.accounts.requests.CreateEnvironmentRequestBody;
import com.schematic.api.resources.accounts.requests.ListApiKeysRequest;
import com.schematic.api.resources.accounts.requests.ListApiRequestsRequest;
+import com.schematic.api.resources.accounts.requests.ListAuditLogsRequest;
import com.schematic.api.resources.accounts.requests.ListEnvironmentsRequest;
import com.schematic.api.resources.accounts.requests.UpdateApiKeyRequestBody;
import com.schematic.api.resources.accounts.requests.UpdateEnvironmentRequestBody;
import com.schematic.api.resources.accounts.types.CountApiKeysResponse;
import com.schematic.api.resources.accounts.types.CountApiRequestsResponse;
+import com.schematic.api.resources.accounts.types.CountAuditLogsResponse;
import com.schematic.api.resources.accounts.types.CreateApiKeyResponse;
import com.schematic.api.resources.accounts.types.CreateEnvironmentResponse;
import com.schematic.api.resources.accounts.types.DeleteApiKeyResponse;
import com.schematic.api.resources.accounts.types.DeleteEnvironmentResponse;
import com.schematic.api.resources.accounts.types.GetApiKeyResponse;
import com.schematic.api.resources.accounts.types.GetApiRequestResponse;
+import com.schematic.api.resources.accounts.types.GetAuditLogResponse;
import com.schematic.api.resources.accounts.types.GetEnvironmentResponse;
import com.schematic.api.resources.accounts.types.ListApiKeysResponse;
import com.schematic.api.resources.accounts.types.ListApiRequestsResponse;
+import com.schematic.api.resources.accounts.types.ListAuditLogsResponse;
import com.schematic.api.resources.accounts.types.ListEnvironmentsResponse;
import com.schematic.api.resources.accounts.types.QuickstartResponse;
import com.schematic.api.resources.accounts.types.UpdateApiKeyResponse;
@@ -132,6 +137,38 @@ public CountApiRequestsResponse countApiRequests(CountApiRequestsRequest request
return this.rawClient.countApiRequests(request, requestOptions).body();
}
+ public ListAuditLogsResponse listAuditLogs() {
+ return this.rawClient.listAuditLogs().body();
+ }
+
+ public ListAuditLogsResponse listAuditLogs(ListAuditLogsRequest request) {
+ return this.rawClient.listAuditLogs(request).body();
+ }
+
+ public ListAuditLogsResponse listAuditLogs(ListAuditLogsRequest request, RequestOptions requestOptions) {
+ return this.rawClient.listAuditLogs(request, requestOptions).body();
+ }
+
+ public GetAuditLogResponse getAuditLog(String auditLogId) {
+ return this.rawClient.getAuditLog(auditLogId).body();
+ }
+
+ public GetAuditLogResponse getAuditLog(String auditLogId, RequestOptions requestOptions) {
+ return this.rawClient.getAuditLog(auditLogId, requestOptions).body();
+ }
+
+ public CountAuditLogsResponse countAuditLogs() {
+ return this.rawClient.countAuditLogs().body();
+ }
+
+ public CountAuditLogsResponse countAuditLogs(CountAuditLogsRequest request) {
+ return this.rawClient.countAuditLogs(request).body();
+ }
+
+ public CountAuditLogsResponse countAuditLogs(CountAuditLogsRequest request, RequestOptions requestOptions) {
+ return this.rawClient.countAuditLogs(request, requestOptions).body();
+ }
+
public ListEnvironmentsResponse listEnvironments() {
return this.rawClient.listEnvironments().body();
}
diff --git a/src/main/java/com/schematic/api/resources/accounts/AsyncAccountsClient.java b/src/main/java/com/schematic/api/resources/accounts/AsyncAccountsClient.java
index a7b11ac..0e7b1a4 100644
--- a/src/main/java/com/schematic/api/resources/accounts/AsyncAccountsClient.java
+++ b/src/main/java/com/schematic/api/resources/accounts/AsyncAccountsClient.java
@@ -7,24 +7,29 @@
import com.schematic.api.core.RequestOptions;
import com.schematic.api.resources.accounts.requests.CountApiKeysRequest;
import com.schematic.api.resources.accounts.requests.CountApiRequestsRequest;
+import com.schematic.api.resources.accounts.requests.CountAuditLogsRequest;
import com.schematic.api.resources.accounts.requests.CreateApiKeyRequestBody;
import com.schematic.api.resources.accounts.requests.CreateEnvironmentRequestBody;
import com.schematic.api.resources.accounts.requests.ListApiKeysRequest;
import com.schematic.api.resources.accounts.requests.ListApiRequestsRequest;
+import com.schematic.api.resources.accounts.requests.ListAuditLogsRequest;
import com.schematic.api.resources.accounts.requests.ListEnvironmentsRequest;
import com.schematic.api.resources.accounts.requests.UpdateApiKeyRequestBody;
import com.schematic.api.resources.accounts.requests.UpdateEnvironmentRequestBody;
import com.schematic.api.resources.accounts.types.CountApiKeysResponse;
import com.schematic.api.resources.accounts.types.CountApiRequestsResponse;
+import com.schematic.api.resources.accounts.types.CountAuditLogsResponse;
import com.schematic.api.resources.accounts.types.CreateApiKeyResponse;
import com.schematic.api.resources.accounts.types.CreateEnvironmentResponse;
import com.schematic.api.resources.accounts.types.DeleteApiKeyResponse;
import com.schematic.api.resources.accounts.types.DeleteEnvironmentResponse;
import com.schematic.api.resources.accounts.types.GetApiKeyResponse;
import com.schematic.api.resources.accounts.types.GetApiRequestResponse;
+import com.schematic.api.resources.accounts.types.GetAuditLogResponse;
import com.schematic.api.resources.accounts.types.GetEnvironmentResponse;
import com.schematic.api.resources.accounts.types.ListApiKeysResponse;
import com.schematic.api.resources.accounts.types.ListApiRequestsResponse;
+import com.schematic.api.resources.accounts.types.ListAuditLogsResponse;
import com.schematic.api.resources.accounts.types.ListEnvironmentsResponse;
import com.schematic.api.resources.accounts.types.QuickstartResponse;
import com.schematic.api.resources.accounts.types.UpdateApiKeyResponse;
@@ -138,6 +143,40 @@ public CompletableFuture countApiRequests(
return this.rawClient.countApiRequests(request, requestOptions).thenApply(response -> response.body());
}
+ public CompletableFuture listAuditLogs() {
+ return this.rawClient.listAuditLogs().thenApply(response -> response.body());
+ }
+
+ public CompletableFuture listAuditLogs(ListAuditLogsRequest request) {
+ return this.rawClient.listAuditLogs(request).thenApply(response -> response.body());
+ }
+
+ public CompletableFuture listAuditLogs(
+ ListAuditLogsRequest request, RequestOptions requestOptions) {
+ return this.rawClient.listAuditLogs(request, requestOptions).thenApply(response -> response.body());
+ }
+
+ public CompletableFuture getAuditLog(String auditLogId) {
+ return this.rawClient.getAuditLog(auditLogId).thenApply(response -> response.body());
+ }
+
+ public CompletableFuture getAuditLog(String auditLogId, RequestOptions requestOptions) {
+ return this.rawClient.getAuditLog(auditLogId, requestOptions).thenApply(response -> response.body());
+ }
+
+ public CompletableFuture countAuditLogs() {
+ return this.rawClient.countAuditLogs().thenApply(response -> response.body());
+ }
+
+ public CompletableFuture countAuditLogs(CountAuditLogsRequest request) {
+ return this.rawClient.countAuditLogs(request).thenApply(response -> response.body());
+ }
+
+ public CompletableFuture countAuditLogs(
+ CountAuditLogsRequest request, RequestOptions requestOptions) {
+ return this.rawClient.countAuditLogs(request, requestOptions).thenApply(response -> response.body());
+ }
+
public CompletableFuture listEnvironments() {
return this.rawClient.listEnvironments().thenApply(response -> response.body());
}
diff --git a/src/main/java/com/schematic/api/resources/accounts/AsyncRawAccountsClient.java b/src/main/java/com/schematic/api/resources/accounts/AsyncRawAccountsClient.java
index caf2ae4..c951ef4 100644
--- a/src/main/java/com/schematic/api/resources/accounts/AsyncRawAccountsClient.java
+++ b/src/main/java/com/schematic/api/resources/accounts/AsyncRawAccountsClient.java
@@ -19,24 +19,29 @@
import com.schematic.api.errors.UnauthorizedError;
import com.schematic.api.resources.accounts.requests.CountApiKeysRequest;
import com.schematic.api.resources.accounts.requests.CountApiRequestsRequest;
+import com.schematic.api.resources.accounts.requests.CountAuditLogsRequest;
import com.schematic.api.resources.accounts.requests.CreateApiKeyRequestBody;
import com.schematic.api.resources.accounts.requests.CreateEnvironmentRequestBody;
import com.schematic.api.resources.accounts.requests.ListApiKeysRequest;
import com.schematic.api.resources.accounts.requests.ListApiRequestsRequest;
+import com.schematic.api.resources.accounts.requests.ListAuditLogsRequest;
import com.schematic.api.resources.accounts.requests.ListEnvironmentsRequest;
import com.schematic.api.resources.accounts.requests.UpdateApiKeyRequestBody;
import com.schematic.api.resources.accounts.requests.UpdateEnvironmentRequestBody;
import com.schematic.api.resources.accounts.types.CountApiKeysResponse;
import com.schematic.api.resources.accounts.types.CountApiRequestsResponse;
+import com.schematic.api.resources.accounts.types.CountAuditLogsResponse;
import com.schematic.api.resources.accounts.types.CreateApiKeyResponse;
import com.schematic.api.resources.accounts.types.CreateEnvironmentResponse;
import com.schematic.api.resources.accounts.types.DeleteApiKeyResponse;
import com.schematic.api.resources.accounts.types.DeleteEnvironmentResponse;
import com.schematic.api.resources.accounts.types.GetApiKeyResponse;
import com.schematic.api.resources.accounts.types.GetApiRequestResponse;
+import com.schematic.api.resources.accounts.types.GetAuditLogResponse;
import com.schematic.api.resources.accounts.types.GetEnvironmentResponse;
import com.schematic.api.resources.accounts.types.ListApiKeysResponse;
import com.schematic.api.resources.accounts.types.ListApiRequestsResponse;
+import com.schematic.api.resources.accounts.types.ListAuditLogsResponse;
import com.schematic.api.resources.accounts.types.ListEnvironmentsResponse;
import com.schematic.api.resources.accounts.types.QuickstartResponse;
import com.schematic.api.resources.accounts.types.UpdateApiKeyResponse;
@@ -889,6 +894,295 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) {
return future;
}
+ public CompletableFuture> listAuditLogs() {
+ return listAuditLogs(ListAuditLogsRequest.builder().build());
+ }
+
+ public CompletableFuture> listAuditLogs(
+ ListAuditLogsRequest request) {
+ return listAuditLogs(request, null);
+ }
+
+ public CompletableFuture> listAuditLogs(
+ ListAuditLogsRequest request, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("audit-log");
+ if (request.getActorType().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "actor_type", request.getActorType().get(), false);
+ }
+ if (request.getEnvironmentId().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "environment_id", request.getEnvironmentId().get(), false);
+ }
+ if (request.getQ().isPresent()) {
+ QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().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);
+ }
+ 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()) {
+ if (response.isSuccessful()) {
+ future.complete(new BaseSchematicHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), ListAuditLogsResponse.class),
+ response));
+ return;
+ }
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ 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
+ }
+ future.completeExceptionally(new BaseSchematicApiException(
+ "Error with status code " + response.code(),
+ response.code(),
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ 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> getAuditLog(String auditLogId) {
+ return getAuditLog(auditLogId, null);
+ }
+
+ public CompletableFuture> getAuditLog(
+ String auditLogId, RequestOptions requestOptions) {
+ HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("audit-log")
+ .addPathSegment(auditLogId)
+ .build();
+ Request okhttpRequest = new Request.Builder()
+ .url(httpUrl)
+ .method("GET", null)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json")
+ .build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ 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<>(
+ ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), GetAuditLogResponse.class),
+ response));
+ return;
+ }
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ try {
+ switch (response.code()) {
+ case 401:
+ future.completeExceptionally(new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ case 403:
+ future.completeExceptionally(new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ case 404:
+ future.completeExceptionally(new NotFoundError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ case 500:
+ future.completeExceptionally(new InternalServerError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ future.completeExceptionally(new BaseSchematicApiException(
+ "Error with status code " + response.code(),
+ response.code(),
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ 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> countAuditLogs() {
+ return countAuditLogs(CountAuditLogsRequest.builder().build());
+ }
+
+ public CompletableFuture> countAuditLogs(
+ CountAuditLogsRequest request) {
+ return countAuditLogs(request, null);
+ }
+
+ public CompletableFuture> countAuditLogs(
+ CountAuditLogsRequest request, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("audit-log/count");
+ if (request.getActorType().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "actor_type", request.getActorType().get(), false);
+ }
+ if (request.getEnvironmentId().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "environment_id", request.getEnvironmentId().get(), false);
+ }
+ if (request.getQ().isPresent()) {
+ QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().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);
+ }
+ 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()) {
+ if (response.isSuccessful()) {
+ future.complete(new BaseSchematicHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(
+ responseBody.string(), CountAuditLogsResponse.class),
+ response));
+ return;
+ }
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ 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
+ }
+ future.completeExceptionally(new BaseSchematicApiException(
+ "Error with status code " + response.code(),
+ response.code(),
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ 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> listEnvironments() {
return listEnvironments(ListEnvironmentsRequest.builder().build());
}
diff --git a/src/main/java/com/schematic/api/resources/accounts/RawAccountsClient.java b/src/main/java/com/schematic/api/resources/accounts/RawAccountsClient.java
index 808a848..170a7d8 100644
--- a/src/main/java/com/schematic/api/resources/accounts/RawAccountsClient.java
+++ b/src/main/java/com/schematic/api/resources/accounts/RawAccountsClient.java
@@ -19,24 +19,29 @@
import com.schematic.api.errors.UnauthorizedError;
import com.schematic.api.resources.accounts.requests.CountApiKeysRequest;
import com.schematic.api.resources.accounts.requests.CountApiRequestsRequest;
+import com.schematic.api.resources.accounts.requests.CountAuditLogsRequest;
import com.schematic.api.resources.accounts.requests.CreateApiKeyRequestBody;
import com.schematic.api.resources.accounts.requests.CreateEnvironmentRequestBody;
import com.schematic.api.resources.accounts.requests.ListApiKeysRequest;
import com.schematic.api.resources.accounts.requests.ListApiRequestsRequest;
+import com.schematic.api.resources.accounts.requests.ListAuditLogsRequest;
import com.schematic.api.resources.accounts.requests.ListEnvironmentsRequest;
import com.schematic.api.resources.accounts.requests.UpdateApiKeyRequestBody;
import com.schematic.api.resources.accounts.requests.UpdateEnvironmentRequestBody;
import com.schematic.api.resources.accounts.types.CountApiKeysResponse;
import com.schematic.api.resources.accounts.types.CountApiRequestsResponse;
+import com.schematic.api.resources.accounts.types.CountAuditLogsResponse;
import com.schematic.api.resources.accounts.types.CreateApiKeyResponse;
import com.schematic.api.resources.accounts.types.CreateEnvironmentResponse;
import com.schematic.api.resources.accounts.types.DeleteApiKeyResponse;
import com.schematic.api.resources.accounts.types.DeleteEnvironmentResponse;
import com.schematic.api.resources.accounts.types.GetApiKeyResponse;
import com.schematic.api.resources.accounts.types.GetApiRequestResponse;
+import com.schematic.api.resources.accounts.types.GetAuditLogResponse;
import com.schematic.api.resources.accounts.types.GetEnvironmentResponse;
import com.schematic.api.resources.accounts.types.ListApiKeysResponse;
import com.schematic.api.resources.accounts.types.ListApiRequestsResponse;
+import com.schematic.api.resources.accounts.types.ListAuditLogsResponse;
import com.schematic.api.resources.accounts.types.ListEnvironmentsResponse;
import com.schematic.api.resources.accounts.types.QuickstartResponse;
import com.schematic.api.resources.accounts.types.UpdateApiKeyResponse;
@@ -674,6 +679,225 @@ public BaseSchematicHttpResponse countApiRequests(
}
}
+ public BaseSchematicHttpResponse listAuditLogs() {
+ return listAuditLogs(ListAuditLogsRequest.builder().build());
+ }
+
+ public BaseSchematicHttpResponse listAuditLogs(ListAuditLogsRequest request) {
+ return listAuditLogs(request, null);
+ }
+
+ public BaseSchematicHttpResponse listAuditLogs(
+ ListAuditLogsRequest request, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("audit-log");
+ if (request.getActorType().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "actor_type", request.getActorType().get(), false);
+ }
+ if (request.getEnvironmentId().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "environment_id", request.getEnvironmentId().get(), false);
+ }
+ if (request.getQ().isPresent()) {
+ QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().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);
+ }
+ 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();
+ if (response.isSuccessful()) {
+ return new BaseSchematicHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), ListAuditLogsResponse.class),
+ response);
+ }
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ 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
+ }
+ throw new BaseSchematicApiException(
+ "Error with status code " + response.code(),
+ response.code(),
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response);
+ } catch (IOException e) {
+ throw new BaseSchematicException("Network error executing HTTP request", e);
+ }
+ }
+
+ public BaseSchematicHttpResponse getAuditLog(String auditLogId) {
+ return getAuditLog(auditLogId, null);
+ }
+
+ public BaseSchematicHttpResponse getAuditLog(
+ String auditLogId, RequestOptions requestOptions) {
+ HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("audit-log")
+ .addPathSegment(auditLogId)
+ .build();
+ Request okhttpRequest = new Request.Builder()
+ .url(httpUrl)
+ .method("GET", null)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json")
+ .build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ try (Response response = client.newCall(okhttpRequest).execute()) {
+ ResponseBody responseBody = response.body();
+ if (response.isSuccessful()) {
+ return new BaseSchematicHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), GetAuditLogResponse.class),
+ response);
+ }
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ try {
+ switch (response.code()) {
+ case 401:
+ throw new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ case 403:
+ throw new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ case 404:
+ throw new NotFoundError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ case 500:
+ throw new InternalServerError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ throw new BaseSchematicApiException(
+ "Error with status code " + response.code(),
+ response.code(),
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response);
+ } catch (IOException e) {
+ throw new BaseSchematicException("Network error executing HTTP request", e);
+ }
+ }
+
+ public BaseSchematicHttpResponse countAuditLogs() {
+ return countAuditLogs(CountAuditLogsRequest.builder().build());
+ }
+
+ public BaseSchematicHttpResponse countAuditLogs(CountAuditLogsRequest request) {
+ return countAuditLogs(request, null);
+ }
+
+ public BaseSchematicHttpResponse countAuditLogs(
+ CountAuditLogsRequest request, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("audit-log/count");
+ if (request.getActorType().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "actor_type", request.getActorType().get(), false);
+ }
+ if (request.getEnvironmentId().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "environment_id", request.getEnvironmentId().get(), false);
+ }
+ if (request.getQ().isPresent()) {
+ QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().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);
+ }
+ 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();
+ if (response.isSuccessful()) {
+ return new BaseSchematicHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), CountAuditLogsResponse.class),
+ response);
+ }
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ 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
+ }
+ throw new BaseSchematicApiException(
+ "Error with status code " + response.code(),
+ response.code(),
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
+ response);
+ } catch (IOException e) {
+ throw new BaseSchematicException("Network error executing HTTP request", e);
+ }
+ }
+
public BaseSchematicHttpResponse listEnvironments() {
return listEnvironments(ListEnvironmentsRequest.builder().build());
}
diff --git a/src/main/java/com/schematic/api/resources/crm/types/ListCrmProductsParams.java b/src/main/java/com/schematic/api/resources/accounts/requests/CountAuditLogsRequest.java
similarity index 55%
rename from src/main/java/com/schematic/api/resources/crm/types/ListCrmProductsParams.java
rename to src/main/java/com/schematic/api/resources/accounts/requests/CountAuditLogsRequest.java
index dbaca93..16adb04 100644
--- a/src/main/java/com/schematic/api/resources/crm/types/ListCrmProductsParams.java
+++ b/src/main/java/com/schematic/api/resources/accounts/requests/CountAuditLogsRequest.java
@@ -1,7 +1,7 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/
-package com.schematic.api.resources.crm.types;
+package com.schematic.api.resources.accounts.requests;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
@@ -12,41 +12,55 @@
import com.fasterxml.jackson.annotation.Nulls;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.schematic.api.core.ObjectMappers;
+import com.schematic.api.types.ActorType;
import java.util.HashMap;
-import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
-@JsonDeserialize(builder = ListCrmProductsParams.Builder.class)
-public final class ListCrmProductsParams {
- private final Optional> ids;
+@JsonDeserialize(builder = CountAuditLogsRequest.Builder.class)
+public final class CountAuditLogsRequest {
+ private final Optional actorType;
- private final Optional limit;
+ private final Optional environmentId;
+
+ private final Optional q;
- private final Optional name;
+ private final Optional limit;
private final Optional offset;
private final Map additionalProperties;
- private ListCrmProductsParams(
- Optional> ids,
+ private CountAuditLogsRequest(
+ Optional actorType,
+ Optional environmentId,
+ Optional q,
Optional limit,
- Optional name,
Optional offset,
Map additionalProperties) {
- this.ids = ids;
+ this.actorType = actorType;
+ this.environmentId = environmentId;
+ this.q = q;
this.limit = limit;
- this.name = name;
this.offset = offset;
this.additionalProperties = additionalProperties;
}
- @JsonProperty("ids")
- public Optional> getIds() {
- return ids;
+ @JsonProperty("actor_type")
+ public Optional getActorType() {
+ return actorType;
+ }
+
+ @JsonProperty("environment_id")
+ public Optional getEnvironmentId() {
+ return environmentId;
+ }
+
+ @JsonProperty("q")
+ public Optional getQ() {
+ return q;
}
/**
@@ -57,11 +71,6 @@ public Optional getLimit() {
return limit;
}
- @JsonProperty("name")
- public Optional getName() {
- return name;
- }
-
/**
* @return Page offset (default 0)
*/
@@ -73,7 +82,7 @@ public Optional getOffset() {
@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
- return other instanceof ListCrmProductsParams && equalTo((ListCrmProductsParams) other);
+ return other instanceof CountAuditLogsRequest && equalTo((CountAuditLogsRequest) other);
}
@JsonAnyGetter
@@ -81,16 +90,17 @@ public Map getAdditionalProperties() {
return this.additionalProperties;
}
- private boolean equalTo(ListCrmProductsParams other) {
- return ids.equals(other.ids)
+ private boolean equalTo(CountAuditLogsRequest other) {
+ return actorType.equals(other.actorType)
+ && environmentId.equals(other.environmentId)
+ && q.equals(other.q)
&& limit.equals(other.limit)
- && name.equals(other.name)
&& offset.equals(other.offset);
}
@java.lang.Override
public int hashCode() {
- return Objects.hash(this.ids, this.limit, this.name, this.offset);
+ return Objects.hash(this.actorType, this.environmentId, this.q, this.limit, this.offset);
}
@java.lang.Override
@@ -104,11 +114,13 @@ public static Builder builder() {
@JsonIgnoreProperties(ignoreUnknown = true)
public static final class Builder {
- private Optional> ids = Optional.empty();
+ private Optional actorType = Optional.empty();
- private Optional limit = Optional.empty();
+ private Optional environmentId = Optional.empty();
- private Optional name = Optional.empty();
+ private Optional q = Optional.empty();
+
+ private Optional limit = Optional.empty();
private Optional offset = Optional.empty();
@@ -117,22 +129,45 @@ public static final class Builder {
private Builder() {}
- public Builder from(ListCrmProductsParams other) {
- ids(other.getIds());
+ public Builder from(CountAuditLogsRequest other) {
+ actorType(other.getActorType());
+ environmentId(other.getEnvironmentId());
+ q(other.getQ());
limit(other.getLimit());
- name(other.getName());
offset(other.getOffset());
return this;
}
- @JsonSetter(value = "ids", nulls = Nulls.SKIP)
- public Builder ids(Optional> ids) {
- this.ids = ids;
+ @JsonSetter(value = "actor_type", nulls = Nulls.SKIP)
+ public Builder actorType(Optional actorType) {
+ this.actorType = actorType;
+ return this;
+ }
+
+ public Builder actorType(ActorType actorType) {
+ this.actorType = Optional.ofNullable(actorType);
return this;
}
- public Builder ids(List ids) {
- this.ids = Optional.ofNullable(ids);
+ @JsonSetter(value = "environment_id", nulls = Nulls.SKIP)
+ public Builder environmentId(Optional environmentId) {
+ this.environmentId = environmentId;
+ return this;
+ }
+
+ public Builder environmentId(String environmentId) {
+ this.environmentId = Optional.ofNullable(environmentId);
+ return this;
+ }
+
+ @JsonSetter(value = "q", nulls = Nulls.SKIP)
+ public Builder q(Optional q) {
+ this.q = q;
+ return this;
+ }
+
+ public Builder q(String q) {
+ this.q = Optional.ofNullable(q);
return this;
}
@@ -150,17 +185,6 @@ public Builder limit(Integer limit) {
return this;
}
- @JsonSetter(value = "name", nulls = Nulls.SKIP)
- public Builder name(Optional name) {
- this.name = name;
- return this;
- }
-
- public Builder name(String name) {
- this.name = Optional.ofNullable(name);
- return this;
- }
-
/**
* Page offset (default 0)
*/
@@ -175,8 +199,8 @@ public Builder offset(Integer offset) {
return this;
}
- public ListCrmProductsParams build() {
- return new ListCrmProductsParams(ids, limit, name, offset, additionalProperties);
+ public CountAuditLogsRequest build() {
+ return new CountAuditLogsRequest(actorType, environmentId, q, limit, offset, additionalProperties);
}
}
}
diff --git a/src/main/java/com/schematic/api/resources/accounts/requests/CreateEnvironmentRequestBody.java b/src/main/java/com/schematic/api/resources/accounts/requests/CreateEnvironmentRequestBody.java
index 84db934..b252591 100644
--- a/src/main/java/com/schematic/api/resources/accounts/requests/CreateEnvironmentRequestBody.java
+++ b/src/main/java/com/schematic/api/resources/accounts/requests/CreateEnvironmentRequestBody.java
@@ -11,7 +11,7 @@
import com.fasterxml.jackson.annotation.JsonSetter;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.schematic.api.core.ObjectMappers;
-import com.schematic.api.resources.accounts.types.CreateEnvironmentRequestBodyEnvironmentType;
+import com.schematic.api.types.EnvironmentType;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
@@ -20,23 +20,21 @@
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = CreateEnvironmentRequestBody.Builder.class)
public final class CreateEnvironmentRequestBody {
- private final CreateEnvironmentRequestBodyEnvironmentType environmentType;
+ private final EnvironmentType environmentType;
private final String name;
private final Map additionalProperties;
private CreateEnvironmentRequestBody(
- CreateEnvironmentRequestBodyEnvironmentType environmentType,
- String name,
- Map additionalProperties) {
+ EnvironmentType environmentType, String name, Map additionalProperties) {
this.environmentType = environmentType;
this.name = name;
this.additionalProperties = additionalProperties;
}
@JsonProperty("environment_type")
- public CreateEnvironmentRequestBodyEnvironmentType getEnvironmentType() {
+ public EnvironmentType getEnvironmentType() {
return environmentType;
}
@@ -75,7 +73,7 @@ public static EnvironmentTypeStage builder() {
}
public interface EnvironmentTypeStage {
- NameStage environmentType(@NotNull CreateEnvironmentRequestBodyEnvironmentType environmentType);
+ NameStage environmentType(@NotNull EnvironmentType environmentType);
Builder from(CreateEnvironmentRequestBody other);
}
@@ -90,7 +88,7 @@ public interface _FinalStage {
@JsonIgnoreProperties(ignoreUnknown = true)
public static final class Builder implements EnvironmentTypeStage, NameStage, _FinalStage {
- private CreateEnvironmentRequestBodyEnvironmentType environmentType;
+ private EnvironmentType environmentType;
private String name;
@@ -108,7 +106,7 @@ public Builder from(CreateEnvironmentRequestBody other) {
@java.lang.Override
@JsonSetter("environment_type")
- public NameStage environmentType(@NotNull CreateEnvironmentRequestBodyEnvironmentType environmentType) {
+ public NameStage environmentType(@NotNull EnvironmentType environmentType) {
this.environmentType = Objects.requireNonNull(environmentType, "environmentType must not be null");
return this;
}
diff --git a/src/main/java/com/schematic/api/resources/crm/requests/ListCrmProductsRequest.java b/src/main/java/com/schematic/api/resources/accounts/requests/ListAuditLogsRequest.java
similarity index 56%
rename from src/main/java/com/schematic/api/resources/crm/requests/ListCrmProductsRequest.java
rename to src/main/java/com/schematic/api/resources/accounts/requests/ListAuditLogsRequest.java
index 10bdd70..a4577da 100644
--- a/src/main/java/com/schematic/api/resources/crm/requests/ListCrmProductsRequest.java
+++ b/src/main/java/com/schematic/api/resources/accounts/requests/ListAuditLogsRequest.java
@@ -1,7 +1,7 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/
-package com.schematic.api.resources.crm.requests;
+package com.schematic.api.resources.accounts.requests;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
@@ -12,19 +12,20 @@
import com.fasterxml.jackson.annotation.Nulls;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.schematic.api.core.ObjectMappers;
-import java.util.Collections;
+import com.schematic.api.types.ActorType;
import java.util.HashMap;
-import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
-@JsonDeserialize(builder = ListCrmProductsRequest.Builder.class)
-public final class ListCrmProductsRequest {
- private final Optional> ids;
+@JsonDeserialize(builder = ListAuditLogsRequest.Builder.class)
+public final class ListAuditLogsRequest {
+ private final Optional actorType;
- private final Optional name;
+ private final Optional environmentId;
+
+ private final Optional q;
private final Optional limit;
@@ -32,27 +33,34 @@ public final class ListCrmProductsRequest {
private final Map additionalProperties;
- private ListCrmProductsRequest(
- Optional> ids,
- Optional name,
+ private ListAuditLogsRequest(
+ Optional actorType,
+ Optional environmentId,
+ Optional q,
Optional limit,
Optional offset,
Map additionalProperties) {
- this.ids = ids;
- this.name = name;
+ this.actorType = actorType;
+ this.environmentId = environmentId;
+ this.q = q;
this.limit = limit;
this.offset = offset;
this.additionalProperties = additionalProperties;
}
- @JsonProperty("ids")
- public Optional> getIds() {
- return ids;
+ @JsonProperty("actor_type")
+ public Optional getActorType() {
+ return actorType;
+ }
+
+ @JsonProperty("environment_id")
+ public Optional getEnvironmentId() {
+ return environmentId;
}
- @JsonProperty("name")
- public Optional getName() {
- return name;
+ @JsonProperty("q")
+ public Optional getQ() {
+ return q;
}
/**
@@ -74,7 +82,7 @@ public Optional getOffset() {
@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
- return other instanceof ListCrmProductsRequest && equalTo((ListCrmProductsRequest) other);
+ return other instanceof ListAuditLogsRequest && equalTo((ListAuditLogsRequest) other);
}
@JsonAnyGetter
@@ -82,16 +90,17 @@ public Map getAdditionalProperties() {
return this.additionalProperties;
}
- private boolean equalTo(ListCrmProductsRequest other) {
- return ids.equals(other.ids)
- && name.equals(other.name)
+ private boolean equalTo(ListAuditLogsRequest other) {
+ return actorType.equals(other.actorType)
+ && environmentId.equals(other.environmentId)
+ && q.equals(other.q)
&& limit.equals(other.limit)
&& offset.equals(other.offset);
}
@java.lang.Override
public int hashCode() {
- return Objects.hash(this.ids, this.name, this.limit, this.offset);
+ return Objects.hash(this.actorType, this.environmentId, this.q, this.limit, this.offset);
}
@java.lang.Override
@@ -105,9 +114,11 @@ public static Builder builder() {
@JsonIgnoreProperties(ignoreUnknown = true)
public static final class Builder {
- private Optional> ids = Optional.empty();
+ private Optional actorType = Optional.empty();
+
+ private Optional environmentId = Optional.empty();
- private Optional name = Optional.empty();
+ private Optional q = Optional.empty();
private Optional limit = Optional.empty();
@@ -118,38 +129,45 @@ public static final class Builder {
private Builder() {}
- public Builder from(ListCrmProductsRequest other) {
- ids(other.getIds());
- name(other.getName());
+ public Builder from(ListAuditLogsRequest other) {
+ actorType(other.getActorType());
+ environmentId(other.getEnvironmentId());
+ q(other.getQ());
limit(other.getLimit());
offset(other.getOffset());
return this;
}
- @JsonSetter(value = "ids", nulls = Nulls.SKIP)
- public Builder ids(Optional> ids) {
- this.ids = ids;
+ @JsonSetter(value = "actor_type", nulls = Nulls.SKIP)
+ public Builder actorType(Optional actorType) {
+ this.actorType = actorType;
+ return this;
+ }
+
+ public Builder actorType(ActorType actorType) {
+ this.actorType = Optional.ofNullable(actorType);
return this;
}
- public Builder ids(List ids) {
- this.ids = Optional.ofNullable(ids);
+ @JsonSetter(value = "environment_id", nulls = Nulls.SKIP)
+ public Builder environmentId(Optional environmentId) {
+ this.environmentId = environmentId;
return this;
}
- public Builder ids(String ids) {
- this.ids = Optional.of(Collections.singletonList(ids));
+ public Builder environmentId(String environmentId) {
+ this.environmentId = Optional.ofNullable(environmentId);
return this;
}
- @JsonSetter(value = "name", nulls = Nulls.SKIP)
- public Builder name(Optional name) {
- this.name = name;
+ @JsonSetter(value = "q", nulls = Nulls.SKIP)
+ public Builder q(Optional q) {
+ this.q = q;
return this;
}
- public Builder name(String name) {
- this.name = Optional.ofNullable(name);
+ public Builder q(String q) {
+ this.q = Optional.ofNullable(q);
return this;
}
@@ -181,8 +199,8 @@ public Builder offset(Integer offset) {
return this;
}
- public ListCrmProductsRequest build() {
- return new ListCrmProductsRequest(ids, name, limit, offset, additionalProperties);
+ public ListAuditLogsRequest build() {
+ return new ListAuditLogsRequest(actorType, environmentId, q, limit, offset, additionalProperties);
}
}
}
diff --git a/src/main/java/com/schematic/api/resources/accounts/requests/UpdateEnvironmentRequestBody.java b/src/main/java/com/schematic/api/resources/accounts/requests/UpdateEnvironmentRequestBody.java
index 43537d0..65510f4 100644
--- a/src/main/java/com/schematic/api/resources/accounts/requests/UpdateEnvironmentRequestBody.java
+++ b/src/main/java/com/schematic/api/resources/accounts/requests/UpdateEnvironmentRequestBody.java
@@ -12,7 +12,7 @@
import com.fasterxml.jackson.annotation.Nulls;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.schematic.api.core.ObjectMappers;
-import com.schematic.api.resources.accounts.types.UpdateEnvironmentRequestBodyEnvironmentType;
+import com.schematic.api.types.EnvironmentType;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
@@ -21,14 +21,14 @@
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = UpdateEnvironmentRequestBody.Builder.class)
public final class UpdateEnvironmentRequestBody {
- private final Optional environmentType;
+ private final Optional environmentType;
private final Optional name;
private final Map additionalProperties;
private UpdateEnvironmentRequestBody(
- Optional environmentType,
+ Optional environmentType,
Optional name,
Map additionalProperties) {
this.environmentType = environmentType;
@@ -37,7 +37,7 @@ private UpdateEnvironmentRequestBody(
}
@JsonProperty("environment_type")
- public Optional getEnvironmentType() {
+ public Optional getEnvironmentType() {
return environmentType;
}
@@ -77,7 +77,7 @@ public static Builder builder() {
@JsonIgnoreProperties(ignoreUnknown = true)
public static final class Builder {
- private Optional environmentType = Optional.empty();
+ private Optional environmentType = Optional.empty();
private Optional name = Optional.empty();
@@ -93,12 +93,12 @@ public Builder from(UpdateEnvironmentRequestBody other) {
}
@JsonSetter(value = "environment_type", nulls = Nulls.SKIP)
- public Builder environmentType(Optional environmentType) {
+ public Builder environmentType(Optional environmentType) {
this.environmentType = environmentType;
return this;
}
- public Builder environmentType(UpdateEnvironmentRequestBodyEnvironmentType environmentType) {
+ public Builder environmentType(EnvironmentType environmentType) {
this.environmentType = Optional.ofNullable(environmentType);
return this;
}
diff --git a/src/main/java/com/schematic/api/resources/accounts/types/CountAuditLogsParams.java b/src/main/java/com/schematic/api/resources/accounts/types/CountAuditLogsParams.java
new file mode 100644
index 0000000..0901ea8
--- /dev/null
+++ b/src/main/java/com/schematic/api/resources/accounts/types/CountAuditLogsParams.java
@@ -0,0 +1,206 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.schematic.api.resources.accounts.types;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.schematic.api.core.ObjectMappers;
+import com.schematic.api.types.ActorType;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = CountAuditLogsParams.Builder.class)
+public final class CountAuditLogsParams {
+ private final Optional actorType;
+
+ private final Optional environmentId;
+
+ private final Optional limit;
+
+ private final Optional offset;
+
+ private final Optional q;
+
+ private final Map additionalProperties;
+
+ private CountAuditLogsParams(
+ Optional actorType,
+ Optional environmentId,
+ Optional limit,
+ Optional offset,
+ Optional q,
+ Map additionalProperties) {
+ this.actorType = actorType;
+ this.environmentId = environmentId;
+ this.limit = limit;
+ this.offset = offset;
+ this.q = q;
+ this.additionalProperties = additionalProperties;
+ }
+
+ @JsonProperty("actor_type")
+ public Optional getActorType() {
+ return actorType;
+ }
+
+ @JsonProperty("environment_id")
+ public Optional getEnvironmentId() {
+ return environmentId;
+ }
+
+ /**
+ * @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("q")
+ public Optional getQ() {
+ return q;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof CountAuditLogsParams && equalTo((CountAuditLogsParams) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(CountAuditLogsParams other) {
+ return actorType.equals(other.actorType)
+ && environmentId.equals(other.environmentId)
+ && limit.equals(other.limit)
+ && offset.equals(other.offset)
+ && q.equals(other.q);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.actorType, this.environmentId, this.limit, this.offset, this.q);
+ }
+
+ @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 actorType = Optional.empty();
+
+ private Optional environmentId = Optional.empty();
+
+ private Optional limit = Optional.empty();
+
+ private Optional offset = Optional.empty();
+
+ private Optional q = Optional.empty();
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ public Builder from(CountAuditLogsParams other) {
+ actorType(other.getActorType());
+ environmentId(other.getEnvironmentId());
+ limit(other.getLimit());
+ offset(other.getOffset());
+ q(other.getQ());
+ return this;
+ }
+
+ @JsonSetter(value = "actor_type", nulls = Nulls.SKIP)
+ public Builder actorType(Optional actorType) {
+ this.actorType = actorType;
+ return this;
+ }
+
+ public Builder actorType(ActorType actorType) {
+ this.actorType = Optional.ofNullable(actorType);
+ return this;
+ }
+
+ @JsonSetter(value = "environment_id", nulls = Nulls.SKIP)
+ public Builder environmentId(Optional environmentId) {
+ this.environmentId = environmentId;
+ return this;
+ }
+
+ public Builder environmentId(String environmentId) {
+ this.environmentId = Optional.ofNullable(environmentId);
+ 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(Integer 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(Integer offset) {
+ this.offset = Optional.ofNullable(offset);
+ return this;
+ }
+
+ @JsonSetter(value = "q", nulls = Nulls.SKIP)
+ public Builder q(Optional q) {
+ this.q = q;
+ return this;
+ }
+
+ public Builder q(String q) {
+ this.q = Optional.ofNullable(q);
+ return this;
+ }
+
+ public CountAuditLogsParams build() {
+ return new CountAuditLogsParams(actorType, environmentId, limit, offset, q, additionalProperties);
+ }
+ }
+}
diff --git a/src/main/java/com/schematic/api/resources/accounts/types/CountAuditLogsResponse.java b/src/main/java/com/schematic/api/resources/accounts/types/CountAuditLogsResponse.java
new file mode 100644
index 0000000..719a9a1
--- /dev/null
+++ b/src/main/java/com/schematic/api/resources/accounts/types/CountAuditLogsResponse.java
@@ -0,0 +1,137 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.schematic.api.resources.accounts.types;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.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 = CountAuditLogsResponse.Builder.class)
+public final class CountAuditLogsResponse {
+ private final CountResponse data;
+
+ private final CountAuditLogsParams params;
+
+ private final Map additionalProperties;
+
+ private CountAuditLogsResponse(
+ CountResponse data, CountAuditLogsParams 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 CountAuditLogsParams getParams() {
+ return params;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof CountAuditLogsResponse && equalTo((CountAuditLogsResponse) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(CountAuditLogsResponse 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(CountAuditLogsResponse other);
+ }
+
+ public interface ParamsStage {
+ /**
+ * Input parameters
+ */
+ _FinalStage params(@NotNull CountAuditLogsParams params);
+ }
+
+ public interface _FinalStage {
+ CountAuditLogsResponse build();
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder implements DataStage, ParamsStage, _FinalStage {
+ private CountResponse data;
+
+ private CountAuditLogsParams params;
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ @java.lang.Override
+ public Builder from(CountAuditLogsResponse 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 CountAuditLogsParams params) {
+ this.params = Objects.requireNonNull(params, "params must not be null");
+ return this;
+ }
+
+ @java.lang.Override
+ public CountAuditLogsResponse build() {
+ return new CountAuditLogsResponse(data, params, additionalProperties);
+ }
+ }
+}
diff --git a/src/main/java/com/schematic/api/resources/crm/types/UpsertCrmDealResponse.java b/src/main/java/com/schematic/api/resources/accounts/types/GetAuditLogResponse.java
similarity index 78%
rename from src/main/java/com/schematic/api/resources/crm/types/UpsertCrmDealResponse.java
rename to src/main/java/com/schematic/api/resources/accounts/types/GetAuditLogResponse.java
index 17987f3..23982de 100644
--- a/src/main/java/com/schematic/api/resources/crm/types/UpsertCrmDealResponse.java
+++ b/src/main/java/com/schematic/api/resources/accounts/types/GetAuditLogResponse.java
@@ -1,7 +1,7 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/
-package com.schematic.api.resources.crm.types;
+package com.schematic.api.resources.accounts.types;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
@@ -13,7 +13,7 @@
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.schematic.api.core.ObjectMappers;
-import com.schematic.api.types.CrmDealResponseData;
+import com.schematic.api.types.AuditLogResponseData;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
@@ -21,23 +21,23 @@
import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
-@JsonDeserialize(builder = UpsertCrmDealResponse.Builder.class)
-public final class UpsertCrmDealResponse {
- private final CrmDealResponseData data;
+@JsonDeserialize(builder = GetAuditLogResponse.Builder.class)
+public final class GetAuditLogResponse {
+ private final AuditLogResponseData data;
private final Map params;
private final Map additionalProperties;
- private UpsertCrmDealResponse(
- CrmDealResponseData data, Map params, Map additionalProperties) {
+ private GetAuditLogResponse(
+ AuditLogResponseData data, Map params, Map additionalProperties) {
this.data = data;
this.params = params;
this.additionalProperties = additionalProperties;
}
@JsonProperty("data")
- public CrmDealResponseData getData() {
+ public AuditLogResponseData getData() {
return data;
}
@@ -52,7 +52,7 @@ public Map getParams() {
@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
- return other instanceof UpsertCrmDealResponse && equalTo((UpsertCrmDealResponse) other);
+ return other instanceof GetAuditLogResponse && equalTo((GetAuditLogResponse) other);
}
@JsonAnyGetter
@@ -60,7 +60,7 @@ public Map getAdditionalProperties() {
return this.additionalProperties;
}
- private boolean equalTo(UpsertCrmDealResponse other) {
+ private boolean equalTo(GetAuditLogResponse other) {
return data.equals(other.data) && params.equals(other.params);
}
@@ -79,13 +79,13 @@ public static DataStage builder() {
}
public interface DataStage {
- _FinalStage data(@NotNull CrmDealResponseData data);
+ _FinalStage data(@NotNull AuditLogResponseData data);
- Builder from(UpsertCrmDealResponse other);
+ Builder from(GetAuditLogResponse other);
}
public interface _FinalStage {
- UpsertCrmDealResponse build();
+ GetAuditLogResponse build();
/**
* Input parameters
@@ -99,7 +99,7 @@ public interface _FinalStage {
@JsonIgnoreProperties(ignoreUnknown = true)
public static final class Builder implements DataStage, _FinalStage {
- private CrmDealResponseData data;
+ private AuditLogResponseData data;
private Map params = new LinkedHashMap<>();
@@ -109,7 +109,7 @@ public static final class Builder implements DataStage, _FinalStage {
private Builder() {}
@java.lang.Override
- public Builder from(UpsertCrmDealResponse other) {
+ public Builder from(GetAuditLogResponse other) {
data(other.getData());
params(other.getParams());
return this;
@@ -117,7 +117,7 @@ public Builder from(UpsertCrmDealResponse other) {
@java.lang.Override
@JsonSetter("data")
- public _FinalStage data(@NotNull CrmDealResponseData data) {
+ public _FinalStage data(@NotNull AuditLogResponseData data) {
this.data = Objects.requireNonNull(data, "data must not be null");
return this;
}
@@ -158,8 +158,8 @@ public _FinalStage params(Map params) {
}
@java.lang.Override
- public UpsertCrmDealResponse build() {
- return new UpsertCrmDealResponse(data, params, additionalProperties);
+ public GetAuditLogResponse build() {
+ return new GetAuditLogResponse(data, params, additionalProperties);
}
}
}
diff --git a/src/main/java/com/schematic/api/resources/accounts/types/ListAuditLogsParams.java b/src/main/java/com/schematic/api/resources/accounts/types/ListAuditLogsParams.java
new file mode 100644
index 0000000..2d7380e
--- /dev/null
+++ b/src/main/java/com/schematic/api/resources/accounts/types/ListAuditLogsParams.java
@@ -0,0 +1,206 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.schematic.api.resources.accounts.types;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.schematic.api.core.ObjectMappers;
+import com.schematic.api.types.ActorType;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = ListAuditLogsParams.Builder.class)
+public final class ListAuditLogsParams {
+ private final Optional actorType;
+
+ private final Optional environmentId;
+
+ private final Optional limit;
+
+ private final Optional offset;
+
+ private final Optional q;
+
+ private final Map additionalProperties;
+
+ private ListAuditLogsParams(
+ Optional actorType,
+ Optional environmentId,
+ Optional limit,
+ Optional offset,
+ Optional q,
+ Map additionalProperties) {
+ this.actorType = actorType;
+ this.environmentId = environmentId;
+ this.limit = limit;
+ this.offset = offset;
+ this.q = q;
+ this.additionalProperties = additionalProperties;
+ }
+
+ @JsonProperty("actor_type")
+ public Optional getActorType() {
+ return actorType;
+ }
+
+ @JsonProperty("environment_id")
+ public Optional getEnvironmentId() {
+ return environmentId;
+ }
+
+ /**
+ * @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("q")
+ public Optional getQ() {
+ return q;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof ListAuditLogsParams && equalTo((ListAuditLogsParams) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(ListAuditLogsParams other) {
+ return actorType.equals(other.actorType)
+ && environmentId.equals(other.environmentId)
+ && limit.equals(other.limit)
+ && offset.equals(other.offset)
+ && q.equals(other.q);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.actorType, this.environmentId, this.limit, this.offset, this.q);
+ }
+
+ @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 actorType = Optional.empty();
+
+ private Optional environmentId = Optional.empty();
+
+ private Optional limit = Optional.empty();
+
+ private Optional offset = Optional.empty();
+
+ private Optional q = Optional.empty();
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ public Builder from(ListAuditLogsParams other) {
+ actorType(other.getActorType());
+ environmentId(other.getEnvironmentId());
+ limit(other.getLimit());
+ offset(other.getOffset());
+ q(other.getQ());
+ return this;
+ }
+
+ @JsonSetter(value = "actor_type", nulls = Nulls.SKIP)
+ public Builder actorType(Optional actorType) {
+ this.actorType = actorType;
+ return this;
+ }
+
+ public Builder actorType(ActorType actorType) {
+ this.actorType = Optional.ofNullable(actorType);
+ return this;
+ }
+
+ @JsonSetter(value = "environment_id", nulls = Nulls.SKIP)
+ public Builder environmentId(Optional environmentId) {
+ this.environmentId = environmentId;
+ return this;
+ }
+
+ public Builder environmentId(String environmentId) {
+ this.environmentId = Optional.ofNullable(environmentId);
+ 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(Integer 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(Integer offset) {
+ this.offset = Optional.ofNullable(offset);
+ return this;
+ }
+
+ @JsonSetter(value = "q", nulls = Nulls.SKIP)
+ public Builder q(Optional q) {
+ this.q = q;
+ return this;
+ }
+
+ public Builder q(String q) {
+ this.q = Optional.ofNullable(q);
+ return this;
+ }
+
+ public ListAuditLogsParams build() {
+ return new ListAuditLogsParams(actorType, environmentId, limit, offset, q, additionalProperties);
+ }
+ }
+}
diff --git a/src/main/java/com/schematic/api/resources/crm/types/ListCrmProductsResponse.java b/src/main/java/com/schematic/api/resources/accounts/types/ListAuditLogsResponse.java
similarity index 66%
rename from src/main/java/com/schematic/api/resources/crm/types/ListCrmProductsResponse.java
rename to src/main/java/com/schematic/api/resources/accounts/types/ListAuditLogsResponse.java
index 1733a46..da1c515 100644
--- a/src/main/java/com/schematic/api/resources/crm/types/ListCrmProductsResponse.java
+++ b/src/main/java/com/schematic/api/resources/accounts/types/ListAuditLogsResponse.java
@@ -1,7 +1,7 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/
-package com.schematic.api.resources.crm.types;
+package com.schematic.api.resources.accounts.types;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
@@ -12,7 +12,7 @@
import com.fasterxml.jackson.annotation.Nulls;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.schematic.api.core.ObjectMappers;
-import com.schematic.api.types.CrmProductResponseData;
+import com.schematic.api.types.AuditLogListResponseData;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -21,23 +21,23 @@
import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
-@JsonDeserialize(builder = ListCrmProductsResponse.Builder.class)
-public final class ListCrmProductsResponse {
- private final List data;
+@JsonDeserialize(builder = ListAuditLogsResponse.Builder.class)
+public final class ListAuditLogsResponse {
+ private final List data;
- private final ListCrmProductsParams params;
+ private final ListAuditLogsParams params;
private final Map additionalProperties;
- private ListCrmProductsResponse(
- List data, ListCrmProductsParams params, Map additionalProperties) {
+ private ListAuditLogsResponse(
+ List data, ListAuditLogsParams params, Map additionalProperties) {
this.data = data;
this.params = params;
this.additionalProperties = additionalProperties;
}
@JsonProperty("data")
- public List getData() {
+ public List getData() {
return data;
}
@@ -45,14 +45,14 @@ public List getData() {
* @return Input parameters
*/
@JsonProperty("params")
- public ListCrmProductsParams getParams() {
+ public ListAuditLogsParams getParams() {
return params;
}
@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
- return other instanceof ListCrmProductsResponse && equalTo((ListCrmProductsResponse) other);
+ return other instanceof ListAuditLogsResponse && equalTo((ListAuditLogsResponse) other);
}
@JsonAnyGetter
@@ -60,7 +60,7 @@ public Map