diff --git a/.fernignore b/.fernignore
index f34ea1d..4d42dce 100644
--- a/.fernignore
+++ b/.fernignore
@@ -19,3 +19,4 @@ src/test/java/com/schematic/api/TestOfflineMode.java
src/test/java/com/schematic/api/TestReadme.java
src/test/java/com/schematic/api/TestSchematic.java
src/test/java/com/schematic/webhook/
+changelog.md
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
deleted file mode 100644
index 5ce2ae1..0000000
--- a/.github/CODEOWNERS
+++ /dev/null
@@ -1 +0,0 @@
-* @SchematicHQ/devtools
diff --git a/build.gradle b/build.gradle
index 1d74354..45e6f08 100644
--- a/build.gradle
+++ b/build.gradle
@@ -49,7 +49,7 @@ java {
group = 'com.schematichq'
-version = '1.2.0'
+version = '1.2.1'
jar {
dependsOn(":generatePomFileForMavenPublication")
@@ -80,7 +80,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.schematichq'
artifactId = 'schematic-java'
- version = '1.2.0'
+ version = '1.2.1'
from components.java
pom {
name = 'schematic'
diff --git a/changelog.md b/changelog.md
new file mode 100644
index 0000000..16b7f94
--- /dev/null
+++ b/changelog.md
@@ -0,0 +1,4 @@
+## 1.2.1 - 2026-01-06
+* SDK regeneration
+* Unable to analyze changes with AI, incrementing PATCH version.
+
diff --git a/reference.md b/reference.md
index 4960436..36f1113 100644
--- a/reference.md
+++ b/reference.md
@@ -706,7 +706,7 @@ client.accounts().listEnvironments(
client.accounts().createEnvironment(
CreateEnvironmentRequestBody
.builder()
- .environmentType(CreateEnvironmentRequestBodyEnvironmentType.DEVELOPMENT)
+ .environmentType(EnvironmentType.DEVELOPMENT)
.name("name")
.build()
);
@@ -724,7 +724,7 @@ client.accounts().createEnvironment(
-
-**environmentType:** `CreateEnvironmentRequestBodyEnvironmentType`
+**environmentType:** `EnvironmentType`
@@ -825,7 +825,7 @@ client.accounts().updateEnvironment(
-
-**environmentType:** `Optional`
+**environmentType:** `Optional`
@@ -1117,7 +1117,6 @@ client.billing().upsertBillingCustomer(
.builder()
.email("email")
.externalId("external_id")
- .failedToImport(true)
.meta(
new HashMap() {{
put("key", "value");
@@ -1172,7 +1171,7 @@ client.billing().upsertBillingCustomer(
-
-**failedToImport:** `Boolean`
+**meta:** `Map`
@@ -1180,7 +1179,7 @@ client.billing().upsertBillingCustomer(
-
-**meta:** `Map`
+**name:** `String`
@@ -1188,7 +1187,7 @@ client.billing().upsertBillingCustomer(
-
-**name:** `String`
+**providerType:** `Optional`
@@ -1217,7 +1216,7 @@ client.billing().listCustomersWithSubscriptions(
ListCustomersWithSubscriptionsRequest
.builder()
.name("name")
- .failedToImport(true)
+ .providerType(BillingProviderType.SCHEMATIC)
.q("q")
.limit(1)
.offset(1)
@@ -1253,7 +1252,7 @@ client.billing().listCustomersWithSubscriptions(
-
-**failedToImport:** `Optional`
+**providerType:** `Optional`
@@ -1306,7 +1305,7 @@ client.billing().countCustomers(
CountCustomersRequest
.builder()
.name("name")
- .failedToImport(true)
+ .providerType(BillingProviderType.SCHEMATIC)
.q("q")
.limit(1)
.offset(1)
@@ -1342,7 +1341,7 @@ client.billing().countCustomers(
-
-**failedToImport:** `Optional`
+**providerType:** `Optional`
@@ -1940,7 +1939,7 @@ client.billing().upsertPaymentMethod(
-client.billing.searchBillingPrices() -> SearchBillingPricesResponse
+client.billing.listBillingPrices() -> ListBillingPricesResponse
-
@@ -1953,18 +1952,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 +2008,7 @@ client.billing().searchBillingPrices(
-
-**productId:** `Optional`
+**interval:** `Optional`
@@ -2015,7 +2016,7 @@ client.billing().searchBillingPrices(
-
-**interval:** `Optional`
+**isActive:** `Optional` — Filter for active prices on active products (defaults to true if not specified)
@@ -2031,6 +2032,30 @@ client.billing().searchBillingPrices(
-
+**productId:** `Optional`
+
+
+
+
+
+-
+
+**productIds:** `Optional`
+
+
+
+
+
+-
+
+**providerType:** `Optional`
+
+
+
+
+
+-
+
**q:** `Optional`
@@ -2039,7 +2064,7 @@ client.billing().searchBillingPrices(
-
-**requiresPaymentMethod:** `Optional` — Filter for prices that require a payment method (inverse of ForInitialPlan)
+**tiersMode:** `Optional`
@@ -2047,7 +2072,7 @@ client.billing().searchBillingPrices(
-
-**tiersMode:** `Optional`
+**usageType:** `Optional`
@@ -2055,7 +2080,7 @@ client.billing().searchBillingPrices(
-
-**usageType:** `Optional`
+**withMeter:** `Optional` — Filter for prices with a meter
@@ -2099,7 +2124,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 +2140,7 @@ client.billing().upsertBillingPrice(
)
)
.productExternalId("product_external_id")
- .usageType(CreateBillingPriceRequestBodyUsageType.LICENSED)
+ .usageType(BillingPriceUsageType.LICENSED)
.build()
);
```
@@ -2132,7 +2157,7 @@ client.billing().upsertBillingPrice(
-
-**billingScheme:** `CreateBillingPriceRequestBodyBillingScheme`
+**billingScheme:** `BillingPriceScheme`
@@ -2228,7 +2253,7 @@ client.billing().upsertBillingPrice(
-
-**tiersMode:** `Optional`
+**providerType:** `Optional`
@@ -2236,7 +2261,15 @@ client.billing().upsertBillingPrice(
-
-**usageType:** `CreateBillingPriceRequestBodyUsageType`
+**tiersMode:** `Optional`
+
+
+
+
+
+-
+
+**usageType:** `BillingPriceUsageType`
@@ -2288,7 +2321,7 @@ client.billing().deleteBillingProduct("billing_id");
-client.billing.listProductPrices() -> ListProductPricesResponse
+client.billing.listBillingProductPrices() -> ListBillingProductPricesResponse
-
@@ -2301,17 +2334,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,6 +2366,22 @@ client.billing().listProductPrices(
-
+**forInitialPlan:** `Optional` — Filter for prices valid for initial plans (free prices only)
+
+
+
+
+
+-
+
+**forTrialExpiryPlan:** `Optional` — Filter for prices valid for trial expiry plans (free prices only)
+
+
+
+
+
+-
+
**ids:** `Optional`
@@ -2338,7 +2390,7 @@ client.billing().listProductPrices(
-
-**name:** `Optional`
+**interval:** `Optional`
@@ -2346,7 +2398,7 @@ client.billing().listProductPrices(
-
-**q:** `Optional`
+**isActive:** `Optional` — Filter for active prices on active products (defaults to true if not specified)
@@ -2354,7 +2406,7 @@ client.billing().listProductPrices(
-
-**priceUsageType:** `Optional`
+**price:** `Optional`
@@ -2362,7 +2414,7 @@ client.billing().listProductPrices(
-
-**withoutLinkedToPlan:** `Optional` — Filter products that are not linked to any plan
+**productId:** `Optional`
@@ -2370,7 +2422,7 @@ client.billing().listProductPrices(
-
-**withOneTimeCharges:** `Optional` — Filter products that are one time charges
+**productIds:** `Optional`
@@ -2378,7 +2430,7 @@ client.billing().listProductPrices(
-
-**withZeroPrice:** `Optional` — Filter products that have zero price for free subscription type
+**providerType:** `Optional`
@@ -2386,7 +2438,23 @@ client.billing().listProductPrices(
-
-**withPricesOnly:** `Optional` — Filter products that have prices
+**q:** `Optional`
+
+
+
+
+
+-
+
+**tiersMode:** `Optional`
+
+
+
+
+
+-
+
+**usageType:** `Optional`
@@ -2394,7 +2462,7 @@ client.billing().listProductPrices(
-
-**isActive:** `Optional` — Filter products that are active
+**withMeter:** `Optional` — Filter for prices with a meter
@@ -2523,6 +2591,14 @@ client.billing().upsertBillingProduct(
**price:** `Double`
+
+
+
+
+-
+
+**providerType:** `Optional`
+
@@ -2549,14 +2625,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 +2660,14 @@ client.billing().listBillingProducts(
-
+**isActive:** `Optional` — Filter products that are active. Defaults to true if not specified
+
+
+
+
+
+-
+
**name:** `Optional`
@@ -2591,7 +2676,7 @@ client.billing().listBillingProducts(
-
-**q:** `Optional`
+**priceUsageType:** `Optional`
@@ -2599,7 +2684,7 @@ client.billing().listBillingProducts(
-
-**priceUsageType:** `Optional`
+**providerType:** `Optional`
@@ -2607,7 +2692,7 @@ client.billing().listBillingProducts(
-
-**withoutLinkedToPlan:** `Optional` — Filter products that are not linked to any plan
+**q:** `Optional`
@@ -2623,7 +2708,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 +2716,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 +2724,7 @@ client.billing().listBillingProducts(
-
-**isActive:** `Optional` — Filter products that are active
+**withoutLinkedToPlan:** `Optional` — Filter products that are not linked to any plan
@@ -2683,14 +2768,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 +2803,14 @@ client.billing().countBillingProducts(
-
+**isActive:** `Optional` — Filter products that are active. Defaults to true if not specified
+
+
+
+
+
+-
+
**name:** `Optional`
@@ -2725,7 +2819,7 @@ client.billing().countBillingProducts(
-
-**q:** `Optional`
+**priceUsageType:** `Optional`
@@ -2733,7 +2827,7 @@ client.billing().countBillingProducts(
-
-**priceUsageType:** `Optional`
+**providerType:** `Optional`
@@ -2741,7 +2835,7 @@ client.billing().countBillingProducts(
-
-**withoutLinkedToPlan:** `Optional` — Filter products that are not linked to any plan
+**q:** `Optional`
@@ -2757,7 +2851,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 +2859,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 +2867,7 @@ client.billing().countBillingProducts(
-
-**isActive:** `Optional` — Filter products that are active
+**withoutLinkedToPlan:** `Optional` — Filter products that are not linked to any plan
@@ -2842,7 +2936,7 @@ client.billing().upsertBillingSubscription(
.priceExternalId("price_external_id")
.productExternalId("product_external_id")
.quantity(1)
- .usageType(BillingProductPricingUsageType.LICENSED)
+ .usageType(BillingPriceUsageType.LICENSED)
.build()
)
)
@@ -2864,6 +2958,14 @@ client.billing().upsertBillingSubscription(
-
+**applicationId:** `Optional`
+
+
+
+
+
+-
+
**cancelAt:** `Optional`
@@ -3000,7 +3102,7 @@ client.billing().upsertBillingSubscription(
-
-**trialEndSetting:** `Optional`
+**trialEndSetting:** `Optional`
@@ -3119,7 +3221,7 @@ client.credits().createBillingCredit(
-
-**burnStrategy:** `Optional`
+**burnStrategy:** `Optional`
@@ -3135,7 +3237,7 @@ client.credits().createBillingCredit(
-
-**defaultExpiryUnit:** `Optional`
+**defaultExpiryUnit:** `Optional`
@@ -3151,7 +3253,7 @@ client.credits().createBillingCredit(
-
-**defaultRolloverPolicy:** `Optional`
+**defaultRolloverPolicy:** `Optional`
@@ -3302,7 +3404,7 @@ client.credits().updateBillingCredit(
-
-**burnStrategy:** `Optional`
+**burnStrategy:** `Optional`
@@ -3310,7 +3412,7 @@ client.credits().updateBillingCredit(
-
-**defaultExpiryUnit:** `Optional`
+**defaultExpiryUnit:** `Optional`
@@ -3326,7 +3428,7 @@ client.credits().updateBillingCredit(
-
-**defaultRolloverPolicy:** `Optional`
+**defaultRolloverPolicy:** `Optional`
@@ -3451,7 +3553,7 @@ client.credits().listCreditBundles(
ListCreditBundlesRequest
.builder()
.creditId("credit_id")
- .status(ListCreditBundlesRequestStatus.ACTIVE)
+ .status(BillingCreditBundleStatus.ACTIVE)
.bundleType("fixed")
.limit(1)
.offset(1)
@@ -3487,7 +3589,7 @@ client.credits().listCreditBundles(
-
-**status:** `Optional`
+**status:** `Optional`
@@ -3591,7 +3693,7 @@ client.credits().createCreditBundle(
-
-**expiryType:** `Optional`
+**expiryType:** `Optional`
@@ -3599,7 +3701,7 @@ client.credits().createCreditBundle(
-
-**expiryUnit:** `Optional`
+**expiryUnit:** `Optional`
@@ -3639,7 +3741,7 @@ client.credits().createCreditBundle(
-
-**status:** `Optional`
+**status:** `Optional`
@@ -3742,7 +3844,7 @@ client.credits().updateCreditBundleDetails(
-
-**expiryType:** `Optional`
+**expiryType:** `Optional`
@@ -3750,7 +3852,7 @@ client.credits().updateCreditBundleDetails(
-
-**expiryUnit:** `Optional`
+**expiryUnit:** `Optional`
@@ -3790,7 +3892,7 @@ client.credits().updateCreditBundleDetails(
-
-**status:** `Optional`
+**status:** `Optional`
@@ -3859,7 +3961,7 @@ client.credits().countCreditBundles(
CountCreditBundlesRequest
.builder()
.creditId("credit_id")
- .status(CountCreditBundlesRequestStatus.ACTIVE)
+ .status(BillingCreditBundleStatus.ACTIVE)
.bundleType("fixed")
.limit(1)
.offset(1)
@@ -3895,7 +3997,7 @@ client.credits().countCreditBundles(
-
-**status:** `Optional`
+**status:** `Optional`
@@ -4043,7 +4145,7 @@ client.credits().zeroOutGrant(
-
-**reason:** `Optional`
+**reason:** `Optional`
@@ -4074,7 +4176,7 @@ client.credits().grantBillingCreditsToCompany(
.companyId("company_id")
.creditId("credit_id")
.quantity(1)
- .reason("reason")
+ .reason(BillingCreditGrantReason.BILLING_CREDIT_AUTO_TOPUP)
.build()
);
```
@@ -4123,7 +4225,7 @@ client.credits().grantBillingCreditsToCompany(
-
-**expiryType:** `Optional`
+**expiryType:** `Optional`
@@ -4131,7 +4233,7 @@ client.credits().grantBillingCreditsToCompany(
-
-**expiryUnit:** `Optional`
+**expiryUnit:** `Optional`
@@ -4155,7 +4257,23 @@ client.credits().grantBillingCreditsToCompany(
-
-**reason:** `String`
+**reason:** `BillingCreditGrantReason`
+
+
+
+
+
+-
+
+**renewalEnabled:** `Optional`
+
+
+
+
+
+-
+
+**renewalPeriod:** `Optional`
@@ -4184,8 +4302,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 +4330,7 @@ client.credits().listCompanyGrants(
-
-**order:** `Optional`
+**order:** `Optional`
@@ -4220,7 +4338,7 @@ client.credits().listCompanyGrants(
-
-**dir:** `Optional`
+**dir:** `Optional`
@@ -4407,7 +4525,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 +4572,7 @@ client.credits().getEnrichedCreditLedger(
-
-**period:** `GetEnrichedCreditLedgerRequestPeriod`
+**period:** `CreditLedgerPeriod`
@@ -4515,7 +4633,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 +4680,7 @@ client.credits().countCreditLedger(
-
-**period:** `CountCreditLedgerRequestPeriod`
+**period:** `CreditLedgerPeriod`
@@ -4713,8 +4831,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()
);
```
@@ -4739,6 +4857,62 @@ client.credits().createBillingPlanCreditGrant(
-
+**autoTopupAmount:** `Optional`
+
+
+
+
+
+-
+
+**autoTopupAmountType:** `Optional`
+
+
+
+
+
+-
+
+**autoTopupEnabled:** `Optional`
+
+
+
+
+
+-
+
+**autoTopupExpiryType:** `Optional`
+
+
+
+
+
+-
+
+**autoTopupExpiryUnit:** `Optional`
+
+
+
+
+
+-
+
+**autoTopupExpiryUnitCount:** `Optional`
+
+
+
+
+
+-
+
+**autoTopupThresholdPercent:** `Optional`
+
+
+
+
+
+-
+
**creditAmount:** `Integer`
@@ -4755,7 +4929,7 @@ client.credits().createBillingPlanCreditGrant(
-
-**expiryType:** `Optional`
+**expiryType:** `Optional`
@@ -4763,7 +4937,7 @@ client.credits().createBillingPlanCreditGrant(
-
-**expiryUnit:** `Optional`
+**expiryUnit:** `Optional`
@@ -4787,7 +4961,7 @@ client.credits().createBillingPlanCreditGrant(
-
-**resetCadence:** `CreateBillingPlanCreditGrantRequestBodyResetCadence`
+**resetCadence:** `BillingPlanCreditGrantResetCadence`
@@ -4795,7 +4969,7 @@ client.credits().createBillingPlanCreditGrant(
-
-**resetStart:** `CreateBillingPlanCreditGrantRequestBodyResetStart`
+**resetStart:** `BillingPlanCreditGrantResetStart`
@@ -4803,7 +4977,7 @@ client.credits().createBillingPlanCreditGrant(
-
-**resetType:** `Optional`
+**resetType:** `Optional`
@@ -4832,8 +5006,8 @@ client.credits().updateBillingPlanCreditGrant(
"plan_grant_id",
UpdateBillingPlanCreditGrantRequestBody
.builder()
- .resetCadence(UpdateBillingPlanCreditGrantRequestBodyResetCadence.MONTHLY)
- .resetStart(UpdateBillingPlanCreditGrantRequestBodyResetStart.BILLING_PERIOD)
+ .resetCadence(BillingPlanCreditGrantResetCadence.DAILY)
+ .resetStart(BillingPlanCreditGrantResetStart.BILLING_PERIOD)
.build()
);
```
@@ -4866,7 +5040,7 @@ client.credits().updateBillingPlanCreditGrant(
-
-**creditAmount:** `Optional`
+**autoTopupAmount:** `Optional`
@@ -4874,7 +5048,7 @@ client.credits().updateBillingPlanCreditGrant(
-
-**expiryType:** `Optional`
+**autoTopupAmountType:** `Optional`
@@ -4882,7 +5056,7 @@ client.credits().updateBillingPlanCreditGrant(
-
-**expiryUnit:** `Optional`
+**autoTopupEnabled:** `Optional`
@@ -4890,7 +5064,7 @@ client.credits().updateBillingPlanCreditGrant(
-
-**expiryUnitCount:** `Optional`
+**autoTopupExpiryType:** `Optional`
@@ -4898,7 +5072,7 @@ client.credits().updateBillingPlanCreditGrant(
-
-**resetCadence:** `UpdateBillingPlanCreditGrantRequestBodyResetCadence`
+**autoTopupExpiryUnit:** `Optional`
@@ -4906,7 +5080,7 @@ client.credits().updateBillingPlanCreditGrant(
-
-**resetStart:** `UpdateBillingPlanCreditGrantRequestBodyResetStart`
+**autoTopupExpiryUnitCount:** `Optional`
@@ -4914,53 +5088,55 @@ client.credits().updateBillingPlanCreditGrant(
-
-**resetType:** `Optional`
+**autoTopupThresholdPercent:** `Optional`
-
-
+
+-
+**creditAmount:** `Optional`
+
-
-client.credits.deleteBillingPlanCreditGrant(planGrantId) -> DeleteBillingPlanCreditGrantResponse
-
-#### 🔌 Usage
+**expiryType:** `Optional`
+
+
+
-
+**expiryUnit:** `Optional`
+
+
+
+
-
-```java
-client.credits().deleteBillingPlanCreditGrant(
- "plan_grant_id",
- DeleteBillingPlanCreditGrantRequest
- .builder()
- .applyToExisting(true)
- .build()
-);
-```
-
-
+**expiryUnitCount:** `Optional`
+
-#### ⚙️ Parameters
-
-
+**resetCadence:** `BillingPlanCreditGrantResetCadence`
+
+
+
+
-
-**planGrantId:** `String` — plan_grant_id
+**resetStart:** `BillingPlanCreditGrantResetStart`
@@ -4968,7 +5144,7 @@ client.credits().deleteBillingPlanCreditGrant(
-
-**applyToExisting:** `Optional`
+**resetType:** `Optional`
@@ -4980,7 +5156,7 @@ client.credits().deleteBillingPlanCreditGrant(
-client.credits.countBillingPlanCreditGrants() -> CountBillingPlanCreditGrantsResponse
+client.credits.deleteBillingPlanCreditGrant(planGrantId) -> DeleteBillingPlanCreditGrantResponse
-
@@ -4993,8 +5169,62 @@ client.credits().deleteBillingPlanCreditGrant(
-
```java
-client.credits().countBillingPlanCreditGrants(
- CountBillingPlanCreditGrantsRequest
+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")
@@ -5410,6 +5640,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.
+
+
+
+
+
+
+
@@ -5677,7 +5968,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 +5992,22 @@ client.companies().deleteCompany("company_id");
**companyId:** `String` — company_id
+
+
+
+
+-
+
+**cancelSubscription:** `Optional`
+
+
+
+
+
+-
+
+**prorate:** `Optional`
+
@@ -5832,7 +6146,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 +6197,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 +6205,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 +6253,7 @@ client.companies().countCompaniesForAdvancedFilter(
-
-**sortOrderDirection:** `Optional` — Direction to sort by (asc or desc)
+**sortOrderDirection:** `Optional` — Direction to sort by (asc or desc)
@@ -6094,7 +6408,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 +6459,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 +6467,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 +6515,7 @@ client.companies().listCompaniesForAdvancedFilter(
-
-**sortOrderDirection:** `Optional` — Direction to sort by (asc or desc)
+**sortOrderDirection:** `Optional` — Direction to sort by (asc or desc)
@@ -6282,78 +6596,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 +6903,7 @@ client.companies().upsertCompanyTrait(
client.companies().listEntityKeyDefinitions(
ListEntityKeyDefinitionsRequest
.builder()
- .entityType(ListEntityKeyDefinitionsRequestEntityType.COMPANY)
+ .entityType(EntityType.COMPANY)
.q("q")
.limit(1)
.offset(1)
@@ -6681,7 +6923,7 @@ client.companies().listEntityKeyDefinitions(
-
-**entityType:** `Optional`
+**entityType:** `Optional`
@@ -6741,7 +6983,7 @@ client.companies().listEntityKeyDefinitions(
client.companies().countEntityKeyDefinitions(
CountEntityKeyDefinitionsRequest
.builder()
- .entityType(CountEntityKeyDefinitionsRequestEntityType.COMPANY)
+ .entityType(EntityType.COMPANY)
.q("q")
.limit(1)
.offset(1)
@@ -6761,7 +7003,7 @@ client.companies().countEntityKeyDefinitions(
-
-**entityType:** `Optional`
+**entityType:** `Optional`
@@ -6821,9 +7063,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 +7084,7 @@ client.companies().listEntityTraitDefinitions(
-
-**entityType:** `Optional`
+**entityType:** `Optional`
@@ -6866,7 +7108,15 @@ client.companies().listEntityTraitDefinitions(
-
-**traitType:** `Optional`
+**traitType:** `Optional`
+
+
+
+
+
+-
+
+**traitTypes:** `Optional`
@@ -6910,11 +7160,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 +7189,7 @@ client.companies().getOrCreateEntityTraitDefinition(
-
-**entityType:** `CreateEntityTraitDefinitionRequestBodyEntityType`
+**entityType:** `EntityType`
@@ -6955,7 +7205,7 @@ client.companies().getOrCreateEntityTraitDefinition(
-
-**traitType:** `CreateEntityTraitDefinitionRequestBodyTraitType`
+**traitType:** `TraitType`
@@ -7024,7 +7274,7 @@ client.companies().updateEntityTraitDefinition(
"entity_trait_definition_id",
UpdateEntityTraitDefinitionRequestBody
.builder()
- .traitType(UpdateEntityTraitDefinitionRequestBodyTraitType.BOOLEAN)
+ .traitType(TraitType.BOOLEAN)
.build()
);
```
@@ -7057,7 +7307,7 @@ client.companies().updateEntityTraitDefinition(
-
-**traitType:** `UpdateEntityTraitDefinitionRequestBodyTraitType`
+**traitType:** `TraitType`
@@ -7085,9 +7335,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 +7356,7 @@ client.companies().countEntityTraitDefinitions(
-
-**entityType:** `Optional`
+**entityType:** `Optional`
@@ -7130,7 +7380,15 @@ client.companies().countEntityTraitDefinitions(
-
-**traitType:** `Optional`
+**traitType:** `Optional`
+
+
+
+
+
+-
+
+**traitTypes:** `Optional`
@@ -7677,6 +7935,7 @@ client.companies().deletePlanTrait("plan_trait_id");
client.companies().updatePlanTraitsBulk(
UpdatePlanTraitBulkRequestBody
.builder()
+ .applyToExistingCompanies(true)
.planId("plan_id")
.traits(
Arrays.asList(
@@ -7703,6 +7962,14 @@ client.companies().updatePlanTraitsBulk(
-
+**applyToExistingCompanies:** `Boolean`
+
+
+
+
+
+-
+
**planId:** `String`
@@ -8448,7 +8715,7 @@ client.entitlements().createCompanyOverride(
.builder()
.companyId("company_id")
.featureId("feature_id")
- .valueType(CreateCompanyOverrideRequestBodyValueType.BOOLEAN)
+ .valueType(EntitlementValueType.BOOLEAN)
.build()
);
```
@@ -8553,7 +8820,7 @@ client.entitlements().createCompanyOverride(
-
-**valueType:** `CreateCompanyOverrideRequestBodyValueType`
+**valueType:** `EntitlementValueType`
@@ -8622,7 +8889,7 @@ client.entitlements().updateCompanyOverride(
"company_override_id",
UpdateCompanyOverrideRequestBody
.builder()
- .valueType(UpdateCompanyOverrideRequestBodyValueType.BOOLEAN)
+ .valueType(EntitlementValueType.BOOLEAN)
.build()
);
```
@@ -8719,7 +8986,7 @@ client.entitlements().updateCompanyOverride(
-
-**valueType:** `UpdateCompanyOverrideRequestBodyValueType`
+**valueType:** `EntitlementValueType`
@@ -9046,6 +9313,7 @@ client.entitlements().listFeatureUsage(
ListFeatureUsageRequest
.builder()
.companyId("company_id")
+ .includeUsageAggregation(true)
.q("q")
.withoutNegativeEntitlements(true)
.limit(1)
@@ -9090,6 +9358,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`
@@ -9143,6 +9419,7 @@ client.entitlements().countFeatureUsage(
CountFeatureUsageRequest
.builder()
.companyId("company_id")
+ .includeUsageAggregation(true)
.q("q")
.withoutNegativeEntitlements(true)
.limit(1)
@@ -9187,6 +9464,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`
@@ -9499,7 +9784,7 @@ client.entitlements().createPlanEntitlement(
.builder()
.featureId("feature_id")
.planId("plan_id")
- .valueType(CreatePlanEntitlementRequestBodyValueType.BOOLEAN)
+ .valueType(EntitlementValueType.BOOLEAN)
.build()
);
```
@@ -9620,7 +9905,7 @@ client.entitlements().createPlanEntitlement(
-
-**priceBehavior:** `Optional`
+**priceBehavior:** `Optional`
@@ -9644,7 +9929,7 @@ client.entitlements().createPlanEntitlement(
-
-**tierMode:** `Optional`
+**tierMode:** `Optional`
@@ -9684,7 +9969,7 @@ client.entitlements().createPlanEntitlement(
-
-**valueType:** `CreatePlanEntitlementRequestBodyValueType`
+**valueType:** `EntitlementValueType`
@@ -9785,7 +10070,7 @@ client.entitlements().updatePlanEntitlement(
"plan_entitlement_id",
UpdatePlanEntitlementRequestBody
.builder()
- .valueType(UpdatePlanEntitlementRequestBodyValueType.BOOLEAN)
+ .valueType(EntitlementValueType.BOOLEAN)
.build()
);
```
@@ -9898,7 +10183,7 @@ client.entitlements().updatePlanEntitlement(
-
-**priceBehavior:** `Optional`
+**priceBehavior:** `Optional`
@@ -9922,7 +10207,7 @@ client.entitlements().updatePlanEntitlement(
-
-**tierMode:** `Optional`
+**tierMode:** `Optional`
@@ -9962,7 +10247,7 @@ client.entitlements().updatePlanEntitlement(
-
-**valueType:** `UpdatePlanEntitlementRequestBodyValueType`
+**valueType:** `EntitlementValueType`
@@ -10160,7 +10445,7 @@ client.entitlements().countPlanEntitlements(
-client.entitlements.getFeatureUsageByCompany() -> GetFeatureUsageByCompanyResponse
+client.entitlements.duplicatePlanEntitlements(request) -> DuplicatePlanEntitlementsResponse
-
@@ -10173,14 +10458,11 @@ client.entitlements().countPlanEntitlements(
-
```java
-client.entitlements().getFeatureUsageByCompany(
- GetFeatureUsageByCompanyRequest
+client.entitlements().duplicatePlanEntitlements(
+ DuplicatePlanEntitlementsRequestBody
.builder()
- .keys(
- new HashMap() {{
- put("keys", "keys");
- }}
- )
+ .sourcePlanId("source_plan_id")
+ .targetPlanId("target_plan_id")
.build()
);
```
@@ -10197,7 +10479,15 @@ client.entitlements().getFeatureUsageByCompany(
-
-**keys:** `Map` — Key/value pairs
+**sourcePlanId:** `String`
+
+
+
+
+
+-
+
+**targetPlanId:** `String`
@@ -10209,8 +10499,7 @@ client.entitlements().getFeatureUsageByCompany(
-## plans
-client.plans.updateCompanyPlans(companyPlanId, request) -> UpdateCompanyPlansResponse
+client.entitlements.getFeatureUsageByCompany() -> GetFeatureUsageByCompanyResponse
-
@@ -10223,14 +10512,64 @@ client.entitlements().getFeatureUsageByCompany(
-
```java
-client.plans().updateCompanyPlans(
- "company_plan_id",
- UpdateCompanyPlansRequestBody
+client.entitlements().getFeatureUsageByCompany(
+ GetFeatureUsageByCompanyRequest
.builder()
- .addOnIds(
- Arrays.asList("add_on_ids")
- )
- .build()
+ .keys(
+ new HashMap() {{
+ put("keys", "keys");
+ }}
+ )
+ .build()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**keys:** `Map` — Key/value pairs
+
+
+
+
+
+
+
+
+
+
+
+## plans
+client.plans.updateCompanyPlans(companyPlanId, request) -> UpdateCompanyPlansResponse
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```java
+client.plans().updateCompanyPlans(
+ "company_plan_id",
+ UpdateCompanyPlansRequestBody
+ .builder()
+ .addOnIds(
+ Arrays.asList("add_on_ids")
+ )
+ .build()
);
```
@@ -10295,11 +10634,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 +10704,7 @@ client.plans().listPlans(
-
-**planType:** `Optional` — Filter by plan type
+**planType:** `Optional` — Filter by plan type
@@ -10383,14 +10720,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 +10728,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 +10774,7 @@ client.plans().createPlan(
.builder()
.description("description")
.name("name")
- .planType(CreatePlanRequestBodyPlanType.PLAN)
+ .planType(PlanType.PLAN)
.build()
);
```
@@ -10494,7 +10815,7 @@ client.plans().createPlan(
-
-**planType:** `CreatePlanRequestBodyPlanType`
+**planType:** `PlanType`
@@ -10673,7 +10994,7 @@ client.plans().upsertBillingProductPlan(
"plan_id",
UpsertBillingProductRequestBody
.builder()
- .chargeType(UpsertBillingProductRequestBodyChargeType.ONE_TIME)
+ .chargeType(ChargeType.FREE)
.isTrialable(true)
.build()
);
@@ -10707,7 +11028,7 @@ client.plans().upsertBillingProductPlan(
-
-**chargeType:** `UpsertBillingProductRequestBodyChargeType`
+**chargeType:** `ChargeType`
@@ -10812,11 +11133,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 +11203,7 @@ client.plans().countPlans(
-
-**planType:** `Optional` — Filter by plan type
+**planType:** `Optional` — Filter by plan type
@@ -10900,14 +11219,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 +11227,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 +11380,7 @@ client.components().listComponents(
client.components().createComponent(
CreateComponentRequestBody
.builder()
- .entityType(CreateComponentRequestBodyEntityType.ENTITLEMENT)
+ .entityType(ComponentEntityType.BILLING)
.name("name")
.build()
);
@@ -11095,401 +11398,7 @@ client.components().createComponent(
-
-**ast:** `Optional
-
-
-
--
-
-**entityType:** `CreateComponentRequestBodyEntityType`
-
-
-
-
-
--
-
-**name:** `String`
-
-
-
-
-
-
-
-
-
-
-
-client.components.getComponent(componentId) -> GetComponentResponse
-
--
-
-#### 🔌 Usage
-
-
--
-
-
--
-
-```java
-client.components().getComponent("component_id");
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
--
-
-
--
-
-**componentId:** `String` — component_id
-
-
-
-
-
-
-
-
-
-
-
-client.components.updateComponent(componentId, request) -> UpdateComponentResponse
-
--
-
-#### 🔌 Usage
-
-
--
-
-
--
-
-```java
-client.components().updateComponent(
- "component_id",
- UpdateComponentRequestBody
- .builder()
- .build()
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
--
-
-
--
-
-**componentId:** `String` — component_id
-
-
-
-
-
--
-
-**ast:** `Optional
-
-
-
--
-
-**entityType:** `Optional`
-
-
-
-
-
--
-
-**name:** `Optional`
-
-
-
-
-
--
-
-**state:** `Optional`
-
-
-
-
-
-
-
-
-
-
-
-client.components.deleteComponent(componentId) -> DeleteComponentResponse
-
--
-
-#### 🔌 Usage
-
-
--
-
-
--
-
-```java
-client.components().deleteComponent("component_id");
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
--
-
-
--
-
-**componentId:** `String` — component_id
-
-
-
-
-
-
-
-
-
-
-
-client.components.countComponents() -> CountComponentsResponse
-
--
-
-#### 🔌 Usage
-
-
--
-
-
--
-
-```java
-client.components().countComponents(
- CountComponentsRequest
- .builder()
- .q("q")
- .limit(1)
- .offset(1)
- .build()
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
--
-
-
--
-
-**q:** `Optional`
-
-
-
-
-
--
-
-**limit:** `Optional` — Page limit (default 100)
-
-
-
-
-
--
-
-**offset:** `Optional` — Page offset (default 0)
-
-
-
-
-
-
-
-
-
-
-
-client.components.previewComponentData() -> PreviewComponentDataResponse
-
--
-
-#### 🔌 Usage
-
-
--
-
-
--
-
-```java
-client.components().previewComponentData(
- PreviewComponentDataRequest
- .builder()
- .companyId("company_id")
- .componentId("component_id")
- .build()
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
--
-
-
--
-
-**companyId:** `Optional`
-
-
-
-
-
--
-
-**componentId:** `Optional`
-
-
-
-
-
-
-
-
-
-
-
-## crm
-client.crm.upsertDealLineItemAssociation(request) -> UpsertDealLineItemAssociationResponse
-
--
-
-#### 🔌 Usage
-
-
--
-
-
--
-
-```java
-client.crm().upsertDealLineItemAssociation(
- CreateCrmDealLineItemAssociationRequestBody
- .builder()
- .dealExternalId("deal_external_id")
- .lineItemExternalId("line_item_external_id")
- .build()
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
--
-
-
--
-
-**dealExternalId:** `String`
-
-
-
-
-
--
-
-**lineItemExternalId:** `String`
-
-
-
-
-
-
-
-
-
-
-
-client.crm.upsertLineItem(request) -> UpsertLineItemResponse
-
--
-
-#### 🔌 Usage
-
-
--
-
-
--
-
-```java
-client.crm().upsertLineItem(
- CreateCrmLineItemRequestBody
- .builder()
- .amount("amount")
- .interval("interval")
- .lineItemExternalId("line_item_external_id")
- .productExternalId("product_external_id")
- .quantity(1)
- .build()
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
--
-
-
--
-
-**amount:** `String`
+**ast:** `Optional
@@ -11497,7 +11406,7 @@ client.crm().upsertLineItem(
-
-**discountPercentage:** `Optional`
+**entityType:** `ComponentEntityType`
@@ -11505,47 +11414,47 @@ client.crm().upsertLineItem(
-
-**interval:** `String`
+**name:** `String`
+
+
-
--
-**lineItemExternalId:** `String`
-
+
+client.components.getComponent(componentId) -> GetComponentResponse
-
-**productExternalId:** `String`
-
-
-
+#### 🔌 Usage
-
-**quantity:** `Integer`
-
-
-
-
-
-**termMonth:** `Optional`
-
+```java
+client.components().getComponent("component_id");
+```
+
+
+
+#### ⚙️ Parameters
-
-**totalDiscount:** `Optional`
+
+-
+
+**componentId:** `String` — component_id
@@ -11557,7 +11466,7 @@ client.crm().upsertLineItem(
-client.crm.upsertCrmDeal(request) -> UpsertCrmDealResponse
+client.components.updateComponent(componentId, request) -> UpdateComponentResponse
-
@@ -11570,12 +11479,10 @@ client.crm().upsertLineItem(
-
```java
-client.crm().upsertCrmDeal(
- CreateCrmDealRequestBody
+client.components().updateComponent(
+ "component_id",
+ UpdateComponentRequestBody
.builder()
- .crmCompanyKey("crm_company_key")
- .crmType("crm_type")
- .dealExternalId("deal_external_id")
.build()
);
```
@@ -11592,7 +11499,7 @@ client.crm().upsertCrmDeal(
-
-**arr:** `Optional`
+**componentId:** `String` — component_id
@@ -11600,7 +11507,7 @@ client.crm().upsertCrmDeal(
-
-**crmCompanyId:** `Optional`
+**ast:** `Optional
@@ -11608,7 +11515,7 @@ client.crm().upsertCrmDeal(
-
-**crmCompanyKey:** `String`
+**entityType:** `Optional`
@@ -11616,7 +11523,7 @@ client.crm().upsertCrmDeal(
-
-**crmProductId:** `Optional`
+**name:** `Optional`
@@ -11624,39 +11531,47 @@ client.crm().upsertCrmDeal(
-
-**crmType:** `String`
+**state:** `Optional`
+
+
-
--
-**dealExternalId:** `String`
-
+
+client.components.deleteComponent(componentId) -> DeleteComponentResponse
-
-**dealName:** `Optional`
-
-
-
+#### 🔌 Usage
-
-**dealStage:** `Optional`
-
+
+-
+
+```java
+client.components().deleteComponent("component_id");
+```
+
+
+#### ⚙️ Parameters
+
+
+-
+
-
-**mrr:** `Optional`
+**componentId:** `String` — component_id
@@ -11668,7 +11583,7 @@ client.crm().upsertCrmDeal(
-client.crm.listCrmProducts() -> ListCrmProductsResponse
+client.components.countComponents() -> CountComponentsResponse
-
@@ -11681,10 +11596,10 @@ client.crm().upsertCrmDeal(
-
```java
-client.crm().listCrmProducts(
- ListCrmProductsRequest
+client.components().countComponents(
+ CountComponentsRequest
.builder()
- .name("name")
+ .q("q")
.limit(1)
.offset(1)
.build()
@@ -11703,15 +11618,7 @@ client.crm().listCrmProducts(
-
-**ids:** `Optional`
-
-
-
-
-
--
-
-**name:** `Optional`
+**q:** `Optional`
@@ -11739,7 +11646,7 @@ client.crm().listCrmProducts(
-client.crm.upsertCrmProduct(request) -> UpsertCrmProductResponse
+client.components.previewComponentData() -> PreviewComponentDataResponse
-
@@ -11752,17 +11659,11 @@ client.crm().listCrmProducts(
-
```java
-client.crm().upsertCrmProduct(
- CreateCrmProductRequestBody
+client.components().previewComponentData(
+ PreviewComponentDataRequest
.builder()
- .currency("currency")
- .description("description")
- .externalId("external_id")
- .interval("interval")
- .name("name")
- .price("price")
- .quantity(1)
- .sku("sku")
+ .companyId("company_id")
+ .componentId("component_id")
.build()
);
```
@@ -11779,55 +11680,7 @@ client.crm().upsertCrmProduct(
-
-**currency:** `String`
-
-
-
-
-
--
-
-**description:** `String`
-
-
-
-
-
--
-
-**externalId:** `String`
-
-
-
-
-
--
-
-**interval:** `String`
-
-
-
-
-
--
-
-**name:** `String`
-
-
-
-
-
--
-
-**price:** `String`
-
-
-
-
-
--
-
-**quantity:** `Integer`
+**companyId:** `Optional`
@@ -11835,7 +11688,7 @@ client.crm().upsertCrmProduct(
-
-**sku:** `String`
+**componentId:** `Optional`
@@ -11972,7 +11825,7 @@ client.events().createEventBatch(
Arrays.asList(
CreateEventRequestBody
.builder()
- .eventType(CreateEventRequestBodyEventType.IDENTIFY)
+ .eventType(EventType.FLAG_CHECK)
.build()
)
)
@@ -12129,7 +11982,7 @@ client.events().listEvents(
-
-**eventTypes:** `Optional`
+**eventTypes:** `Optional`
@@ -12189,7 +12042,7 @@ client.events().listEvents(
client.events().createEvent(
CreateEventRequestBody
.builder()
- .eventType(CreateEventRequestBodyEventType.IDENTIFY)
+ .eventType(EventType.FLAG_CHECK)
.build()
);
```
@@ -12354,7 +12207,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 +12260,7 @@ client.features().createFeature(
CreateFeatureRequestBody
.builder()
.description("description")
- .featureType(CreateFeatureRequestBodyFeatureType.BOOLEAN)
+ .featureType(FeatureType.BOOLEAN)
.name("name")
.build()
);
@@ -12441,7 +12294,7 @@ client.features().createFeature(
-
-**featureType:** `CreateFeatureRequestBodyFeatureType`
+**featureType:** `FeatureType`
@@ -12465,7 +12318,7 @@ client.features().createFeature(
-
-**lifecyclePhase:** `Optional`
+**lifecyclePhase:** `Optional`
@@ -12614,7 +12467,7 @@ client.features().updateFeature(
-
-**featureType:** `Optional`
+**featureType:** `Optional`
@@ -12638,7 +12491,7 @@ client.features().updateFeature(
-
-**lifecyclePhase:** `Optional`
+**lifecyclePhase:** `Optional`
@@ -12800,7 +12653,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)
@@ -13290,6 +13143,57 @@ client.features().checkFlags(
+
+
+
+
+client.features.checkFlagsBulk(request) -> CheckFlagsBulkResponse
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```java
+client.features().checkFlagsBulk(
+ CheckFlagsBulkRequestBody
+ .builder()
+ .contexts(
+ Arrays.asList(
+ CheckFlagRequestBody
+ .builder()
+ .build()
+ )
+ )
+ .build()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**contexts:** `List`
+
+
+
+
+
+
+
@@ -13448,10 +13352,13 @@ client.plangroups().createPlanGroup(
)
)
.preventDowngradesWhenOverLimit(true)
+ .preventSelfServiceDowngrade(true)
+ .prorationBehavior(ProrationBehavior.CREATE_PRORATIONS)
+ .showAsMonthlyPrices(true)
.showCredits(true)
.showPeriodToggle(true)
.showZeroPriceAsFree(true)
- .syncCustomerBillingDetailsForTax(true)
+ .syncCustomerBillingDetails(true)
.build()
);
```
@@ -13588,6 +13495,46 @@ client.plangroups().createPlanGroup(
-
+**preventSelfServiceDowngrade:** `Boolean`
+
+
+
+
+
+-
+
+**preventSelfServiceDowngradeButtonText:** `Optional`
+
+
+
+
+
+-
+
+**preventSelfServiceDowngradeUrl:** `Optional`
+
+
+
+
+
+-
+
+**prorationBehavior:** `ProrationBehavior`
+
+
+
+
+
+-
+
+**showAsMonthlyPrices:** `Boolean`
+
+
+
+
+
+-
+
**showCredits:** `Boolean`
@@ -13612,7 +13559,7 @@ client.plangroups().createPlanGroup(
-
-**syncCustomerBillingDetailsForTax:** `Boolean`
+**syncCustomerBillingDetails:** `Boolean`
@@ -13705,10 +13652,13 @@ client.plangroups().updatePlanGroup(
)
)
.preventDowngradesWhenOverLimit(true)
+ .preventSelfServiceDowngrade(true)
+ .prorationBehavior(ProrationBehavior.CREATE_PRORATIONS)
+ .showAsMonthlyPrices(true)
.showCredits(true)
.showPeriodToggle(true)
.showZeroPriceAsFree(true)
- .syncCustomerBillingDetailsForTax(true)
+ .syncCustomerBillingDetails(true)
.build()
);
```
@@ -13853,6 +13803,46 @@ client.plangroups().updatePlanGroup(
-
+**preventSelfServiceDowngrade:** `Boolean`
+
+
+
+
+
+-
+
+**preventSelfServiceDowngradeButtonText:** `Optional`
+
+
+
+
+
+-
+
+**preventSelfServiceDowngradeUrl:** `Optional`
+
+
+
+
+
+-
+
+**prorationBehavior:** `ProrationBehavior`
+
+
+
+
+
+-
+
+**showAsMonthlyPrices:** `Boolean`
+
+
+
+
+
+-
+
**showCredits:** `Boolean`
@@ -13877,7 +13867,7 @@ client.plangroups().updatePlanGroup(
-
-**syncCustomerBillingDetailsForTax:** `Boolean`
+**syncCustomerBillingDetails:** `Boolean`
@@ -14262,7 +14252,7 @@ client.webhooks().createWebhook(
.builder()
.name("name")
.requestTypes(
- Arrays.asList(CreateWebhookRequestBodyRequestTypesItem.COMPANY_UPDATED)
+ Arrays.asList(WebhookRequestType.SUBSCRIPTION_TRIAL_ENDED)
)
.url("url")
.build()
@@ -14305,7 +14295,7 @@ client.webhooks().createWebhook(
-
-**requestTypes:** `List`
+**requestTypes:** `List`
@@ -14430,7 +14420,7 @@ client.webhooks().updateWebhook(
-
-**requestTypes:** `Optional
>`
+**requestTypes:** `Optional>`
@@ -14438,7 +14428,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..5c4b805 100644
--- a/src/main/java/com/schematic/api/AsyncBaseSchematic.java
+++ b/src/main/java/com/schematic/api/AsyncBaseSchematic.java
@@ -13,7 +13,6 @@
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;
@@ -45,8 +44,6 @@ public class AsyncBaseSchematic {
protected final Supplier componentsClient;
- protected final Supplier crmClient;
-
protected final Supplier dataexportsClient;
protected final Supplier eventsClient;
@@ -70,7 +67,6 @@ 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));
@@ -140,10 +136,6 @@ public AsyncComponentsClient components() {
return this.componentsClient.get();
}
- public AsyncCrmClient crm() {
- return this.crmClient.get();
- }
-
public AsyncDataexportsClient dataexports() {
return this.dataexportsClient.get();
}
diff --git a/src/main/java/com/schematic/api/core/ClientOptions.java b/src/main/java/com/schematic/api/core/ClientOptions.java
index a1f67f1..7aeaa8d 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/AUTO");
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.2.1");
}
});
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/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/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/UpdateEnvironmentRequestBodyEnvironmentType.java b/src/main/java/com/schematic/api/resources/accounts/types/UpdateEnvironmentRequestBodyEnvironmentType.java
deleted file mode 100644
index 39d9ea7..0000000
--- a/src/main/java/com/schematic/api/resources/accounts/types/UpdateEnvironmentRequestBodyEnvironmentType.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- * This file was auto-generated by Fern from our API Definition.
- */
-package com.schematic.api.resources.accounts.types;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonValue;
-
-public final class UpdateEnvironmentRequestBodyEnvironmentType {
- public static final UpdateEnvironmentRequestBodyEnvironmentType DEVELOPMENT =
- new UpdateEnvironmentRequestBodyEnvironmentType(Value.DEVELOPMENT, "development");
-
- public static final UpdateEnvironmentRequestBodyEnvironmentType STAGING =
- new UpdateEnvironmentRequestBodyEnvironmentType(Value.STAGING, "staging");
-
- public static final UpdateEnvironmentRequestBodyEnvironmentType PRODUCTION =
- new UpdateEnvironmentRequestBodyEnvironmentType(Value.PRODUCTION, "production");
-
- private final Value value;
-
- private final String string;
-
- UpdateEnvironmentRequestBodyEnvironmentType(Value value, String string) {
- this.value = value;
- this.string = string;
- }
-
- public Value getEnumValue() {
- return value;
- }
-
- @java.lang.Override
- @JsonValue
- public String toString() {
- return this.string;
- }
-
- @java.lang.Override
- public boolean equals(Object other) {
- return (this == other)
- || (other instanceof UpdateEnvironmentRequestBodyEnvironmentType
- && this.string.equals(((UpdateEnvironmentRequestBodyEnvironmentType) other).string));
- }
-
- @java.lang.Override
- public int hashCode() {
- return this.string.hashCode();
- }
-
- public T visit(Visitor visitor) {
- switch (value) {
- case DEVELOPMENT:
- return visitor.visitDevelopment();
- case STAGING:
- return visitor.visitStaging();
- case PRODUCTION:
- return visitor.visitProduction();
- case UNKNOWN:
- default:
- return visitor.visitUnknown(string);
- }
- }
-
- @JsonCreator(mode = JsonCreator.Mode.DELEGATING)
- public static UpdateEnvironmentRequestBodyEnvironmentType valueOf(String value) {
- switch (value) {
- case "development":
- return DEVELOPMENT;
- case "staging":
- return STAGING;
- case "production":
- return PRODUCTION;
- default:
- return new UpdateEnvironmentRequestBodyEnvironmentType(Value.UNKNOWN, value);
- }
- }
-
- public enum Value {
- DEVELOPMENT,
-
- STAGING,
-
- PRODUCTION,
-
- UNKNOWN
- }
-
- public interface Visitor {
- T visitDevelopment();
-
- T visitStaging();
-
- T visitProduction();
-
- T visitUnknown(String unknownType);
- }
-}
diff --git a/src/main/java/com/schematic/api/resources/billing/AsyncBillingClient.java b/src/main/java/com/schematic/api/resources/billing/AsyncBillingClient.java
index da31034..df85784 100644
--- a/src/main/java/com/schematic/api/resources/billing/AsyncBillingClient.java
+++ b/src/main/java/com/schematic/api/resources/billing/AsyncBillingClient.java
@@ -15,26 +15,26 @@
import com.schematic.api.resources.billing.requests.CreateInvoiceRequestBody;
import com.schematic.api.resources.billing.requests.CreateMeterRequestBody;
import com.schematic.api.resources.billing.requests.CreatePaymentMethodRequestBody;
+import com.schematic.api.resources.billing.requests.ListBillingPricesRequest;
+import com.schematic.api.resources.billing.requests.ListBillingProductPricesRequest;
import com.schematic.api.resources.billing.requests.ListBillingProductsRequest;
import com.schematic.api.resources.billing.requests.ListCouponsRequest;
import com.schematic.api.resources.billing.requests.ListCustomersWithSubscriptionsRequest;
import com.schematic.api.resources.billing.requests.ListInvoicesRequest;
import com.schematic.api.resources.billing.requests.ListMetersRequest;
import com.schematic.api.resources.billing.requests.ListPaymentMethodsRequest;
-import com.schematic.api.resources.billing.requests.ListProductPricesRequest;
-import com.schematic.api.resources.billing.requests.SearchBillingPricesRequest;
import com.schematic.api.resources.billing.types.CountBillingProductsResponse;
import com.schematic.api.resources.billing.types.CountCustomersResponse;
import com.schematic.api.resources.billing.types.DeleteBillingProductResponse;
import com.schematic.api.resources.billing.types.DeleteProductPriceResponse;
+import com.schematic.api.resources.billing.types.ListBillingPricesResponse;
+import com.schematic.api.resources.billing.types.ListBillingProductPricesResponse;
import com.schematic.api.resources.billing.types.ListBillingProductsResponse;
import com.schematic.api.resources.billing.types.ListCouponsResponse;
import com.schematic.api.resources.billing.types.ListCustomersWithSubscriptionsResponse;
import com.schematic.api.resources.billing.types.ListInvoicesResponse;
import com.schematic.api.resources.billing.types.ListMetersResponse;
import com.schematic.api.resources.billing.types.ListPaymentMethodsResponse;
-import com.schematic.api.resources.billing.types.ListProductPricesResponse;
-import com.schematic.api.resources.billing.types.SearchBillingPricesResponse;
import com.schematic.api.resources.billing.types.UpsertBillingCouponResponse;
import com.schematic.api.resources.billing.types.UpsertBillingCustomerResponse;
import com.schematic.api.resources.billing.types.UpsertBillingMeterResponse;
@@ -180,17 +180,17 @@ public CompletableFuture upsertPaymentMethod(
return this.rawClient.upsertPaymentMethod(request, requestOptions).thenApply(response -> response.body());
}
- public CompletableFuture searchBillingPrices() {
- return this.rawClient.searchBillingPrices().thenApply(response -> response.body());
+ public CompletableFuture listBillingPrices() {
+ return this.rawClient.listBillingPrices().thenApply(response -> response.body());
}
- public CompletableFuture searchBillingPrices(SearchBillingPricesRequest request) {
- return this.rawClient.searchBillingPrices(request).thenApply(response -> response.body());
+ public CompletableFuture listBillingPrices(ListBillingPricesRequest request) {
+ return this.rawClient.listBillingPrices(request).thenApply(response -> response.body());
}
- public CompletableFuture searchBillingPrices(
- SearchBillingPricesRequest request, RequestOptions requestOptions) {
- return this.rawClient.searchBillingPrices(request, requestOptions).thenApply(response -> response.body());
+ public CompletableFuture listBillingPrices(
+ ListBillingPricesRequest request, RequestOptions requestOptions) {
+ return this.rawClient.listBillingPrices(request, requestOptions).thenApply(response -> response.body());
}
public CompletableFuture upsertBillingPrice(CreateBillingPriceRequestBody request) {
@@ -211,17 +211,18 @@ public CompletableFuture deleteBillingProduct(
return this.rawClient.deleteBillingProduct(billingId, requestOptions).thenApply(response -> response.body());
}
- public CompletableFuture listProductPrices() {
- return this.rawClient.listProductPrices().thenApply(response -> response.body());
+ public CompletableFuture listBillingProductPrices() {
+ return this.rawClient.listBillingProductPrices().thenApply(response -> response.body());
}
- public CompletableFuture listProductPrices(ListProductPricesRequest request) {
- return this.rawClient.listProductPrices(request).thenApply(response -> response.body());
+ public CompletableFuture listBillingProductPrices(
+ ListBillingProductPricesRequest request) {
+ return this.rawClient.listBillingProductPrices(request).thenApply(response -> response.body());
}
- public CompletableFuture listProductPrices(
- ListProductPricesRequest request, RequestOptions requestOptions) {
- return this.rawClient.listProductPrices(request, requestOptions).thenApply(response -> response.body());
+ public CompletableFuture listBillingProductPrices(
+ ListBillingProductPricesRequest request, RequestOptions requestOptions) {
+ return this.rawClient.listBillingProductPrices(request, requestOptions).thenApply(response -> response.body());
}
public CompletableFuture deleteProductPrice(String billingId) {
diff --git a/src/main/java/com/schematic/api/resources/billing/AsyncRawBillingClient.java b/src/main/java/com/schematic/api/resources/billing/AsyncRawBillingClient.java
index 975d9b0..44cda57 100644
--- a/src/main/java/com/schematic/api/resources/billing/AsyncRawBillingClient.java
+++ b/src/main/java/com/schematic/api/resources/billing/AsyncRawBillingClient.java
@@ -27,26 +27,26 @@
import com.schematic.api.resources.billing.requests.CreateInvoiceRequestBody;
import com.schematic.api.resources.billing.requests.CreateMeterRequestBody;
import com.schematic.api.resources.billing.requests.CreatePaymentMethodRequestBody;
+import com.schematic.api.resources.billing.requests.ListBillingPricesRequest;
+import com.schematic.api.resources.billing.requests.ListBillingProductPricesRequest;
import com.schematic.api.resources.billing.requests.ListBillingProductsRequest;
import com.schematic.api.resources.billing.requests.ListCouponsRequest;
import com.schematic.api.resources.billing.requests.ListCustomersWithSubscriptionsRequest;
import com.schematic.api.resources.billing.requests.ListInvoicesRequest;
import com.schematic.api.resources.billing.requests.ListMetersRequest;
import com.schematic.api.resources.billing.requests.ListPaymentMethodsRequest;
-import com.schematic.api.resources.billing.requests.ListProductPricesRequest;
-import com.schematic.api.resources.billing.requests.SearchBillingPricesRequest;
import com.schematic.api.resources.billing.types.CountBillingProductsResponse;
import com.schematic.api.resources.billing.types.CountCustomersResponse;
import com.schematic.api.resources.billing.types.DeleteBillingProductResponse;
import com.schematic.api.resources.billing.types.DeleteProductPriceResponse;
+import com.schematic.api.resources.billing.types.ListBillingPricesResponse;
+import com.schematic.api.resources.billing.types.ListBillingProductPricesResponse;
import com.schematic.api.resources.billing.types.ListBillingProductsResponse;
import com.schematic.api.resources.billing.types.ListCouponsResponse;
import com.schematic.api.resources.billing.types.ListCustomersWithSubscriptionsResponse;
import com.schematic.api.resources.billing.types.ListInvoicesResponse;
import com.schematic.api.resources.billing.types.ListMetersResponse;
import com.schematic.api.resources.billing.types.ListPaymentMethodsResponse;
-import com.schematic.api.resources.billing.types.ListProductPricesResponse;
-import com.schematic.api.resources.billing.types.SearchBillingPricesResponse;
import com.schematic.api.resources.billing.types.UpsertBillingCouponResponse;
import com.schematic.api.resources.billing.types.UpsertBillingCustomerResponse;
import com.schematic.api.resources.billing.types.UpsertBillingMeterResponse;
@@ -381,9 +381,9 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) {
QueryStringMapper.addQueryParameter(
httpUrl, "name", request.getName().get(), false);
}
- if (request.getFailedToImport().isPresent()) {
+ if (request.getProviderType().isPresent()) {
QueryStringMapper.addQueryParameter(
- httpUrl, "failed_to_import", request.getFailedToImport().get(), false);
+ httpUrl, "provider_type", request.getProviderType().get(), false);
}
if (request.getQ().isPresent()) {
QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().get(), false);
@@ -492,9 +492,9 @@ public CompletableFuture> coun
QueryStringMapper.addQueryParameter(
httpUrl, "name", request.getName().get(), false);
}
- if (request.getFailedToImport().isPresent()) {
+ if (request.getProviderType().isPresent()) {
QueryStringMapper.addQueryParameter(
- httpUrl, "failed_to_import", request.getFailedToImport().get(), false);
+ httpUrl, "provider_type", request.getProviderType().get(), false);
}
if (request.getQ().isPresent()) {
QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().get(), false);
@@ -1149,17 +1149,17 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) {
return future;
}
- public CompletableFuture> searchBillingPrices() {
- return searchBillingPrices(SearchBillingPricesRequest.builder().build());
+ public CompletableFuture> listBillingPrices() {
+ return listBillingPrices(ListBillingPricesRequest.builder().build());
}
- public CompletableFuture> searchBillingPrices(
- SearchBillingPricesRequest request) {
- return searchBillingPrices(request, null);
+ public CompletableFuture> listBillingPrices(
+ ListBillingPricesRequest request) {
+ return listBillingPrices(request, null);
}
- public CompletableFuture> searchBillingPrices(
- SearchBillingPricesRequest request, RequestOptions requestOptions) {
+ public CompletableFuture> listBillingPrices(
+ ListBillingPricesRequest request, RequestOptions requestOptions) {
HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
.newBuilder()
.addPathSegments("billing/price");
@@ -1174,27 +1174,28 @@ public CompletableFuture>
request.getForTrialExpiryPlan().get(),
false);
}
- if (request.getProductId().isPresent()) {
- QueryStringMapper.addQueryParameter(
- httpUrl, "product_id", request.getProductId().get(), false);
- }
if (request.getInterval().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "interval", request.getInterval().get(), false);
}
+ if (request.getIsActive().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "is_active", request.getIsActive().get(), false);
+ }
if (request.getPrice().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "price", request.getPrice().get(), false);
}
- if (request.getQ().isPresent()) {
- QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().get(), false);
+ if (request.getProductId().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "product_id", request.getProductId().get(), false);
}
- if (request.getRequiresPaymentMethod().isPresent()) {
+ if (request.getProviderType().isPresent()) {
QueryStringMapper.addQueryParameter(
- httpUrl,
- "requires_payment_method",
- request.getRequiresPaymentMethod().get(),
- false);
+ httpUrl, "provider_type", request.getProviderType().get(), false);
+ }
+ if (request.getQ().isPresent()) {
+ QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().get(), false);
}
if (request.getTiersMode().isPresent()) {
QueryStringMapper.addQueryParameter(
@@ -1204,6 +1205,10 @@ public CompletableFuture>
QueryStringMapper.addQueryParameter(
httpUrl, "usage_type", request.getUsageType().get(), false);
}
+ if (request.getWithMeter().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "with_meter", request.getWithMeter().get(), false);
+ }
if (request.getLimit().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "limit", request.getLimit().get(), false);
@@ -1215,6 +1220,10 @@ public CompletableFuture>
if (request.getIds().isPresent()) {
QueryStringMapper.addQueryParameter(httpUrl, "ids", request.getIds().get(), true);
}
+ if (request.getProductIds().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "product_ids", request.getProductIds().get(), true);
+ }
Request.Builder _requestBuilder = new Request.Builder()
.url(httpUrl.build())
.method("GET", null)
@@ -1225,7 +1234,7 @@ public CompletableFuture>
if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
client = clientOptions.httpClientWithTimeout(requestOptions);
}
- CompletableFuture> future = new CompletableFuture<>();
+ CompletableFuture> future = new CompletableFuture<>();
client.newCall(okhttpRequest).enqueue(new Callback() {
@Override
public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
@@ -1233,7 +1242,7 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO
if (response.isSuccessful()) {
future.complete(new BaseSchematicHttpResponse<>(
ObjectMappers.JSON_MAPPER.readValue(
- responseBody.string(), SearchBillingPricesResponse.class),
+ responseBody.string(), ListBillingPricesResponse.class),
response));
return;
}
@@ -1465,56 +1474,66 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) {
return future;
}
- public CompletableFuture> listProductPrices() {
- return listProductPrices(ListProductPricesRequest.builder().build());
+ public CompletableFuture> listBillingProductPrices() {
+ return listBillingProductPrices(
+ ListBillingProductPricesRequest.builder().build());
}
- public CompletableFuture> listProductPrices(
- ListProductPricesRequest request) {
- return listProductPrices(request, null);
+ public CompletableFuture> listBillingProductPrices(
+ ListBillingProductPricesRequest request) {
+ return listBillingProductPrices(request, null);
}
- public CompletableFuture> listProductPrices(
- ListProductPricesRequest request, RequestOptions requestOptions) {
+ public CompletableFuture> listBillingProductPrices(
+ ListBillingProductPricesRequest request, RequestOptions requestOptions) {
HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
.newBuilder()
.addPathSegments("billing/product/prices");
- if (request.getName().isPresent()) {
+ if (request.getForInitialPlan().isPresent()) {
QueryStringMapper.addQueryParameter(
- httpUrl, "name", request.getName().get(), false);
+ httpUrl, "for_initial_plan", request.getForInitialPlan().get(), false);
}
- if (request.getQ().isPresent()) {
- QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().get(), false);
+ if (request.getForTrialExpiryPlan().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl,
+ "for_trial_expiry_plan",
+ request.getForTrialExpiryPlan().get(),
+ false);
}
- if (request.getPriceUsageType().isPresent()) {
+ if (request.getInterval().isPresent()) {
QueryStringMapper.addQueryParameter(
- httpUrl, "price_usage_type", request.getPriceUsageType().get(), false);
+ httpUrl, "interval", request.getInterval().get(), false);
}
- if (request.getWithoutLinkedToPlan().isPresent()) {
+ if (request.getIsActive().isPresent()) {
QueryStringMapper.addQueryParameter(
- httpUrl,
- "without_linked_to_plan",
- request.getWithoutLinkedToPlan().get(),
- false);
+ httpUrl, "is_active", request.getIsActive().get(), false);
}
- if (request.getWithOneTimeCharges().isPresent()) {
+ if (request.getPrice().isPresent()) {
QueryStringMapper.addQueryParameter(
- httpUrl,
- "with_one_time_charges",
- request.getWithOneTimeCharges().get(),
- false);
+ httpUrl, "price", request.getPrice().get(), false);
}
- if (request.getWithZeroPrice().isPresent()) {
+ if (request.getProductId().isPresent()) {
QueryStringMapper.addQueryParameter(
- httpUrl, "with_zero_price", request.getWithZeroPrice().get(), false);
+ httpUrl, "product_id", request.getProductId().get(), false);
}
- if (request.getWithPricesOnly().isPresent()) {
+ if (request.getProviderType().isPresent()) {
QueryStringMapper.addQueryParameter(
- httpUrl, "with_prices_only", request.getWithPricesOnly().get(), false);
+ httpUrl, "provider_type", request.getProviderType().get(), false);
}
- if (request.getIsActive().isPresent()) {
+ if (request.getQ().isPresent()) {
+ QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().get(), false);
+ }
+ if (request.getTiersMode().isPresent()) {
QueryStringMapper.addQueryParameter(
- httpUrl, "is_active", request.getIsActive().get(), false);
+ httpUrl, "tiers_mode", request.getTiersMode().get(), false);
+ }
+ if (request.getUsageType().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "usage_type", request.getUsageType().get(), false);
+ }
+ if (request.getWithMeter().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "with_meter", request.getWithMeter().get(), false);
}
if (request.getLimit().isPresent()) {
QueryStringMapper.addQueryParameter(
@@ -1527,6 +1546,10 @@ public CompletableFuture> l
if (request.getIds().isPresent()) {
QueryStringMapper.addQueryParameter(httpUrl, "ids", request.getIds().get(), true);
}
+ if (request.getProductIds().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "product_ids", request.getProductIds().get(), true);
+ }
Request.Builder _requestBuilder = new Request.Builder()
.url(httpUrl.build())
.method("GET", null)
@@ -1537,7 +1560,8 @@ public CompletableFuture> l
if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
client = clientOptions.httpClientWithTimeout(requestOptions);
}
- CompletableFuture> future = new CompletableFuture<>();
+ CompletableFuture> future =
+ new CompletableFuture<>();
client.newCall(okhttpRequest).enqueue(new Callback() {
@Override
public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
@@ -1545,7 +1569,7 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO
if (response.isSuccessful()) {
future.complete(new BaseSchematicHttpResponse<>(
ObjectMappers.JSON_MAPPER.readValue(
- responseBody.string(), ListProductPricesResponse.class),
+ responseBody.string(), ListBillingProductPricesResponse.class),
response));
return;
}
@@ -1791,23 +1815,24 @@ public CompletableFuture>
HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
.newBuilder()
.addPathSegments("billing/products");
+ if (request.getIsActive().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "is_active", request.getIsActive().get(), false);
+ }
if (request.getName().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "name", request.getName().get(), false);
}
- if (request.getQ().isPresent()) {
- QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().get(), false);
- }
if (request.getPriceUsageType().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "price_usage_type", request.getPriceUsageType().get(), false);
}
- if (request.getWithoutLinkedToPlan().isPresent()) {
+ if (request.getProviderType().isPresent()) {
QueryStringMapper.addQueryParameter(
- httpUrl,
- "without_linked_to_plan",
- request.getWithoutLinkedToPlan().get(),
- false);
+ httpUrl, "provider_type", request.getProviderType().get(), false);
+ }
+ if (request.getQ().isPresent()) {
+ QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().get(), false);
}
if (request.getWithOneTimeCharges().isPresent()) {
QueryStringMapper.addQueryParameter(
@@ -1816,17 +1841,20 @@ public CompletableFuture>
request.getWithOneTimeCharges().get(),
false);
}
- if (request.getWithZeroPrice().isPresent()) {
- QueryStringMapper.addQueryParameter(
- httpUrl, "with_zero_price", request.getWithZeroPrice().get(), false);
- }
if (request.getWithPricesOnly().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "with_prices_only", request.getWithPricesOnly().get(), false);
}
- if (request.getIsActive().isPresent()) {
+ if (request.getWithZeroPrice().isPresent()) {
QueryStringMapper.addQueryParameter(
- httpUrl, "is_active", request.getIsActive().get(), false);
+ httpUrl, "with_zero_price", request.getWithZeroPrice().get(), false);
+ }
+ if (request.getWithoutLinkedToPlan().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl,
+ "without_linked_to_plan",
+ request.getWithoutLinkedToPlan().get(),
+ false);
}
if (request.getLimit().isPresent()) {
QueryStringMapper.addQueryParameter(
@@ -1926,23 +1954,24 @@ public CompletableFuture
HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
.newBuilder()
.addPathSegments("billing/products/count");
+ if (request.getIsActive().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "is_active", request.getIsActive().get(), false);
+ }
if (request.getName().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "name", request.getName().get(), false);
}
- if (request.getQ().isPresent()) {
- QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().get(), false);
- }
if (request.getPriceUsageType().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "price_usage_type", request.getPriceUsageType().get(), false);
}
- if (request.getWithoutLinkedToPlan().isPresent()) {
+ if (request.getProviderType().isPresent()) {
QueryStringMapper.addQueryParameter(
- httpUrl,
- "without_linked_to_plan",
- request.getWithoutLinkedToPlan().get(),
- false);
+ httpUrl, "provider_type", request.getProviderType().get(), false);
+ }
+ if (request.getQ().isPresent()) {
+ QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().get(), false);
}
if (request.getWithOneTimeCharges().isPresent()) {
QueryStringMapper.addQueryParameter(
@@ -1951,17 +1980,20 @@ public CompletableFuture
request.getWithOneTimeCharges().get(),
false);
}
- if (request.getWithZeroPrice().isPresent()) {
- QueryStringMapper.addQueryParameter(
- httpUrl, "with_zero_price", request.getWithZeroPrice().get(), false);
- }
if (request.getWithPricesOnly().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "with_prices_only", request.getWithPricesOnly().get(), false);
}
- if (request.getIsActive().isPresent()) {
+ if (request.getWithZeroPrice().isPresent()) {
QueryStringMapper.addQueryParameter(
- httpUrl, "is_active", request.getIsActive().get(), false);
+ httpUrl, "with_zero_price", request.getWithZeroPrice().get(), false);
+ }
+ if (request.getWithoutLinkedToPlan().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl,
+ "without_linked_to_plan",
+ request.getWithoutLinkedToPlan().get(),
+ false);
}
if (request.getLimit().isPresent()) {
QueryStringMapper.addQueryParameter(
diff --git a/src/main/java/com/schematic/api/resources/billing/BillingClient.java b/src/main/java/com/schematic/api/resources/billing/BillingClient.java
index 6fa2651..e65d999 100644
--- a/src/main/java/com/schematic/api/resources/billing/BillingClient.java
+++ b/src/main/java/com/schematic/api/resources/billing/BillingClient.java
@@ -15,26 +15,26 @@
import com.schematic.api.resources.billing.requests.CreateInvoiceRequestBody;
import com.schematic.api.resources.billing.requests.CreateMeterRequestBody;
import com.schematic.api.resources.billing.requests.CreatePaymentMethodRequestBody;
+import com.schematic.api.resources.billing.requests.ListBillingPricesRequest;
+import com.schematic.api.resources.billing.requests.ListBillingProductPricesRequest;
import com.schematic.api.resources.billing.requests.ListBillingProductsRequest;
import com.schematic.api.resources.billing.requests.ListCouponsRequest;
import com.schematic.api.resources.billing.requests.ListCustomersWithSubscriptionsRequest;
import com.schematic.api.resources.billing.requests.ListInvoicesRequest;
import com.schematic.api.resources.billing.requests.ListMetersRequest;
import com.schematic.api.resources.billing.requests.ListPaymentMethodsRequest;
-import com.schematic.api.resources.billing.requests.ListProductPricesRequest;
-import com.schematic.api.resources.billing.requests.SearchBillingPricesRequest;
import com.schematic.api.resources.billing.types.CountBillingProductsResponse;
import com.schematic.api.resources.billing.types.CountCustomersResponse;
import com.schematic.api.resources.billing.types.DeleteBillingProductResponse;
import com.schematic.api.resources.billing.types.DeleteProductPriceResponse;
+import com.schematic.api.resources.billing.types.ListBillingPricesResponse;
+import com.schematic.api.resources.billing.types.ListBillingProductPricesResponse;
import com.schematic.api.resources.billing.types.ListBillingProductsResponse;
import com.schematic.api.resources.billing.types.ListCouponsResponse;
import com.schematic.api.resources.billing.types.ListCustomersWithSubscriptionsResponse;
import com.schematic.api.resources.billing.types.ListInvoicesResponse;
import com.schematic.api.resources.billing.types.ListMetersResponse;
import com.schematic.api.resources.billing.types.ListPaymentMethodsResponse;
-import com.schematic.api.resources.billing.types.ListProductPricesResponse;
-import com.schematic.api.resources.billing.types.SearchBillingPricesResponse;
import com.schematic.api.resources.billing.types.UpsertBillingCouponResponse;
import com.schematic.api.resources.billing.types.UpsertBillingCustomerResponse;
import com.schematic.api.resources.billing.types.UpsertBillingMeterResponse;
@@ -174,17 +174,17 @@ public UpsertPaymentMethodResponse upsertPaymentMethod(
return this.rawClient.upsertPaymentMethod(request, requestOptions).body();
}
- public SearchBillingPricesResponse searchBillingPrices() {
- return this.rawClient.searchBillingPrices().body();
+ public ListBillingPricesResponse listBillingPrices() {
+ return this.rawClient.listBillingPrices().body();
}
- public SearchBillingPricesResponse searchBillingPrices(SearchBillingPricesRequest request) {
- return this.rawClient.searchBillingPrices(request).body();
+ public ListBillingPricesResponse listBillingPrices(ListBillingPricesRequest request) {
+ return this.rawClient.listBillingPrices(request).body();
}
- public SearchBillingPricesResponse searchBillingPrices(
- SearchBillingPricesRequest request, RequestOptions requestOptions) {
- return this.rawClient.searchBillingPrices(request, requestOptions).body();
+ public ListBillingPricesResponse listBillingPrices(
+ ListBillingPricesRequest request, RequestOptions requestOptions) {
+ return this.rawClient.listBillingPrices(request, requestOptions).body();
}
public UpsertBillingPriceResponse upsertBillingPrice(CreateBillingPriceRequestBody request) {
@@ -204,17 +204,17 @@ public DeleteBillingProductResponse deleteBillingProduct(String billingId, Reque
return this.rawClient.deleteBillingProduct(billingId, requestOptions).body();
}
- public ListProductPricesResponse listProductPrices() {
- return this.rawClient.listProductPrices().body();
+ public ListBillingProductPricesResponse listBillingProductPrices() {
+ return this.rawClient.listBillingProductPrices().body();
}
- public ListProductPricesResponse listProductPrices(ListProductPricesRequest request) {
- return this.rawClient.listProductPrices(request).body();
+ public ListBillingProductPricesResponse listBillingProductPrices(ListBillingProductPricesRequest request) {
+ return this.rawClient.listBillingProductPrices(request).body();
}
- public ListProductPricesResponse listProductPrices(
- ListProductPricesRequest request, RequestOptions requestOptions) {
- return this.rawClient.listProductPrices(request, requestOptions).body();
+ public ListBillingProductPricesResponse listBillingProductPrices(
+ ListBillingProductPricesRequest request, RequestOptions requestOptions) {
+ return this.rawClient.listBillingProductPrices(request, requestOptions).body();
}
public DeleteProductPriceResponse deleteProductPrice(String billingId) {
diff --git a/src/main/java/com/schematic/api/resources/billing/RawBillingClient.java b/src/main/java/com/schematic/api/resources/billing/RawBillingClient.java
index bc7a7f0..52a949f 100644
--- a/src/main/java/com/schematic/api/resources/billing/RawBillingClient.java
+++ b/src/main/java/com/schematic/api/resources/billing/RawBillingClient.java
@@ -27,26 +27,26 @@
import com.schematic.api.resources.billing.requests.CreateInvoiceRequestBody;
import com.schematic.api.resources.billing.requests.CreateMeterRequestBody;
import com.schematic.api.resources.billing.requests.CreatePaymentMethodRequestBody;
+import com.schematic.api.resources.billing.requests.ListBillingPricesRequest;
+import com.schematic.api.resources.billing.requests.ListBillingProductPricesRequest;
import com.schematic.api.resources.billing.requests.ListBillingProductsRequest;
import com.schematic.api.resources.billing.requests.ListCouponsRequest;
import com.schematic.api.resources.billing.requests.ListCustomersWithSubscriptionsRequest;
import com.schematic.api.resources.billing.requests.ListInvoicesRequest;
import com.schematic.api.resources.billing.requests.ListMetersRequest;
import com.schematic.api.resources.billing.requests.ListPaymentMethodsRequest;
-import com.schematic.api.resources.billing.requests.ListProductPricesRequest;
-import com.schematic.api.resources.billing.requests.SearchBillingPricesRequest;
import com.schematic.api.resources.billing.types.CountBillingProductsResponse;
import com.schematic.api.resources.billing.types.CountCustomersResponse;
import com.schematic.api.resources.billing.types.DeleteBillingProductResponse;
import com.schematic.api.resources.billing.types.DeleteProductPriceResponse;
+import com.schematic.api.resources.billing.types.ListBillingPricesResponse;
+import com.schematic.api.resources.billing.types.ListBillingProductPricesResponse;
import com.schematic.api.resources.billing.types.ListBillingProductsResponse;
import com.schematic.api.resources.billing.types.ListCouponsResponse;
import com.schematic.api.resources.billing.types.ListCustomersWithSubscriptionsResponse;
import com.schematic.api.resources.billing.types.ListInvoicesResponse;
import com.schematic.api.resources.billing.types.ListMetersResponse;
import com.schematic.api.resources.billing.types.ListPaymentMethodsResponse;
-import com.schematic.api.resources.billing.types.ListProductPricesResponse;
-import com.schematic.api.resources.billing.types.SearchBillingPricesResponse;
import com.schematic.api.resources.billing.types.UpsertBillingCouponResponse;
import com.schematic.api.resources.billing.types.UpsertBillingCustomerResponse;
import com.schematic.api.resources.billing.types.UpsertBillingMeterResponse;
@@ -303,9 +303,9 @@ public BaseSchematicHttpResponse listCus
QueryStringMapper.addQueryParameter(
httpUrl, "name", request.getName().get(), false);
}
- if (request.getFailedToImport().isPresent()) {
+ if (request.getProviderType().isPresent()) {
QueryStringMapper.addQueryParameter(
- httpUrl, "failed_to_import", request.getFailedToImport().get(), false);
+ httpUrl, "provider_type", request.getProviderType().get(), false);
}
if (request.getQ().isPresent()) {
QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().get(), false);
@@ -389,9 +389,9 @@ public BaseSchematicHttpResponse countCustomers(
QueryStringMapper.addQueryParameter(
httpUrl, "name", request.getName().get(), false);
}
- if (request.getFailedToImport().isPresent()) {
+ if (request.getProviderType().isPresent()) {
QueryStringMapper.addQueryParameter(
- httpUrl, "failed_to_import", request.getFailedToImport().get(), false);
+ httpUrl, "provider_type", request.getProviderType().get(), false);
}
if (request.getQ().isPresent()) {
QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().get(), false);
@@ -876,17 +876,16 @@ public BaseSchematicHttpResponse upsertPaymentMetho
}
}
- public BaseSchematicHttpResponse searchBillingPrices() {
- return searchBillingPrices(SearchBillingPricesRequest.builder().build());
+ public BaseSchematicHttpResponse listBillingPrices() {
+ return listBillingPrices(ListBillingPricesRequest.builder().build());
}
- public BaseSchematicHttpResponse searchBillingPrices(
- SearchBillingPricesRequest request) {
- return searchBillingPrices(request, null);
+ public BaseSchematicHttpResponse listBillingPrices(ListBillingPricesRequest request) {
+ return listBillingPrices(request, null);
}
- public BaseSchematicHttpResponse searchBillingPrices(
- SearchBillingPricesRequest request, RequestOptions requestOptions) {
+ public BaseSchematicHttpResponse listBillingPrices(
+ ListBillingPricesRequest request, RequestOptions requestOptions) {
HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
.newBuilder()
.addPathSegments("billing/price");
@@ -901,27 +900,28 @@ public BaseSchematicHttpResponse searchBillingPrice
request.getForTrialExpiryPlan().get(),
false);
}
- if (request.getProductId().isPresent()) {
- QueryStringMapper.addQueryParameter(
- httpUrl, "product_id", request.getProductId().get(), false);
- }
if (request.getInterval().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "interval", request.getInterval().get(), false);
}
+ if (request.getIsActive().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "is_active", request.getIsActive().get(), false);
+ }
if (request.getPrice().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "price", request.getPrice().get(), false);
}
- if (request.getQ().isPresent()) {
- QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().get(), false);
+ if (request.getProductId().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "product_id", request.getProductId().get(), false);
}
- if (request.getRequiresPaymentMethod().isPresent()) {
+ if (request.getProviderType().isPresent()) {
QueryStringMapper.addQueryParameter(
- httpUrl,
- "requires_payment_method",
- request.getRequiresPaymentMethod().get(),
- false);
+ httpUrl, "provider_type", request.getProviderType().get(), false);
+ }
+ if (request.getQ().isPresent()) {
+ QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().get(), false);
}
if (request.getTiersMode().isPresent()) {
QueryStringMapper.addQueryParameter(
@@ -931,6 +931,10 @@ public BaseSchematicHttpResponse searchBillingPrice
QueryStringMapper.addQueryParameter(
httpUrl, "usage_type", request.getUsageType().get(), false);
}
+ if (request.getWithMeter().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "with_meter", request.getWithMeter().get(), false);
+ }
if (request.getLimit().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "limit", request.getLimit().get(), false);
@@ -942,6 +946,10 @@ public BaseSchematicHttpResponse searchBillingPrice
if (request.getIds().isPresent()) {
QueryStringMapper.addQueryParameter(httpUrl, "ids", request.getIds().get(), true);
}
+ if (request.getProductIds().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "product_ids", request.getProductIds().get(), true);
+ }
Request.Builder _requestBuilder = new Request.Builder()
.url(httpUrl.build())
.method("GET", null)
@@ -956,7 +964,7 @@ public BaseSchematicHttpResponse searchBillingPrice
ResponseBody responseBody = response.body();
if (response.isSuccessful()) {
return new BaseSchematicHttpResponse<>(
- ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), SearchBillingPricesResponse.class),
+ ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), ListBillingPricesResponse.class),
response);
}
String responseBodyString = responseBody != null ? responseBody.string() : "{}";
@@ -1119,55 +1127,66 @@ public BaseSchematicHttpResponse deleteBillingProd
}
}
- public BaseSchematicHttpResponse listProductPrices() {
- return listProductPrices(ListProductPricesRequest.builder().build());
+ public BaseSchematicHttpResponse listBillingProductPrices() {
+ return listBillingProductPrices(
+ ListBillingProductPricesRequest.builder().build());
}
- public BaseSchematicHttpResponse listProductPrices(ListProductPricesRequest request) {
- return listProductPrices(request, null);
+ public BaseSchematicHttpResponse listBillingProductPrices(
+ ListBillingProductPricesRequest request) {
+ return listBillingProductPrices(request, null);
}
- public BaseSchematicHttpResponse listProductPrices(
- ListProductPricesRequest request, RequestOptions requestOptions) {
+ public BaseSchematicHttpResponse listBillingProductPrices(
+ ListBillingProductPricesRequest request, RequestOptions requestOptions) {
HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
.newBuilder()
.addPathSegments("billing/product/prices");
- if (request.getName().isPresent()) {
+ if (request.getForInitialPlan().isPresent()) {
QueryStringMapper.addQueryParameter(
- httpUrl, "name", request.getName().get(), false);
+ httpUrl, "for_initial_plan", request.getForInitialPlan().get(), false);
}
- if (request.getQ().isPresent()) {
- QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().get(), false);
+ if (request.getForTrialExpiryPlan().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl,
+ "for_trial_expiry_plan",
+ request.getForTrialExpiryPlan().get(),
+ false);
}
- if (request.getPriceUsageType().isPresent()) {
+ if (request.getInterval().isPresent()) {
QueryStringMapper.addQueryParameter(
- httpUrl, "price_usage_type", request.getPriceUsageType().get(), false);
+ httpUrl, "interval", request.getInterval().get(), false);
}
- if (request.getWithoutLinkedToPlan().isPresent()) {
+ if (request.getIsActive().isPresent()) {
QueryStringMapper.addQueryParameter(
- httpUrl,
- "without_linked_to_plan",
- request.getWithoutLinkedToPlan().get(),
- false);
+ httpUrl, "is_active", request.getIsActive().get(), false);
}
- if (request.getWithOneTimeCharges().isPresent()) {
+ if (request.getPrice().isPresent()) {
QueryStringMapper.addQueryParameter(
- httpUrl,
- "with_one_time_charges",
- request.getWithOneTimeCharges().get(),
- false);
+ httpUrl, "price", request.getPrice().get(), false);
}
- if (request.getWithZeroPrice().isPresent()) {
+ if (request.getProductId().isPresent()) {
QueryStringMapper.addQueryParameter(
- httpUrl, "with_zero_price", request.getWithZeroPrice().get(), false);
+ httpUrl, "product_id", request.getProductId().get(), false);
}
- if (request.getWithPricesOnly().isPresent()) {
+ if (request.getProviderType().isPresent()) {
QueryStringMapper.addQueryParameter(
- httpUrl, "with_prices_only", request.getWithPricesOnly().get(), false);
+ httpUrl, "provider_type", request.getProviderType().get(), false);
}
- if (request.getIsActive().isPresent()) {
+ if (request.getQ().isPresent()) {
+ QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().get(), false);
+ }
+ if (request.getTiersMode().isPresent()) {
QueryStringMapper.addQueryParameter(
- httpUrl, "is_active", request.getIsActive().get(), false);
+ httpUrl, "tiers_mode", request.getTiersMode().get(), false);
+ }
+ if (request.getUsageType().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "usage_type", request.getUsageType().get(), false);
+ }
+ if (request.getWithMeter().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "with_meter", request.getWithMeter().get(), false);
}
if (request.getLimit().isPresent()) {
QueryStringMapper.addQueryParameter(
@@ -1180,6 +1199,10 @@ public BaseSchematicHttpResponse listProductPrices(
if (request.getIds().isPresent()) {
QueryStringMapper.addQueryParameter(httpUrl, "ids", request.getIds().get(), true);
}
+ if (request.getProductIds().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "product_ids", request.getProductIds().get(), true);
+ }
Request.Builder _requestBuilder = new Request.Builder()
.url(httpUrl.build())
.method("GET", null)
@@ -1194,7 +1217,8 @@ public BaseSchematicHttpResponse listProductPrices(
ResponseBody responseBody = response.body();
if (response.isSuccessful()) {
return new BaseSchematicHttpResponse<>(
- ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), ListProductPricesResponse.class),
+ ObjectMappers.JSON_MAPPER.readValue(
+ responseBody.string(), ListBillingProductPricesResponse.class),
response);
}
String responseBodyString = responseBody != null ? responseBody.string() : "{}";
@@ -1371,23 +1395,24 @@ public BaseSchematicHttpResponse listBillingProduct
HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
.newBuilder()
.addPathSegments("billing/products");
+ if (request.getIsActive().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "is_active", request.getIsActive().get(), false);
+ }
if (request.getName().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "name", request.getName().get(), false);
}
- if (request.getQ().isPresent()) {
- QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().get(), false);
- }
if (request.getPriceUsageType().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "price_usage_type", request.getPriceUsageType().get(), false);
}
- if (request.getWithoutLinkedToPlan().isPresent()) {
+ if (request.getProviderType().isPresent()) {
QueryStringMapper.addQueryParameter(
- httpUrl,
- "without_linked_to_plan",
- request.getWithoutLinkedToPlan().get(),
- false);
+ httpUrl, "provider_type", request.getProviderType().get(), false);
+ }
+ if (request.getQ().isPresent()) {
+ QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().get(), false);
}
if (request.getWithOneTimeCharges().isPresent()) {
QueryStringMapper.addQueryParameter(
@@ -1396,17 +1421,20 @@ public BaseSchematicHttpResponse listBillingProduct
request.getWithOneTimeCharges().get(),
false);
}
- if (request.getWithZeroPrice().isPresent()) {
- QueryStringMapper.addQueryParameter(
- httpUrl, "with_zero_price", request.getWithZeroPrice().get(), false);
- }
if (request.getWithPricesOnly().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "with_prices_only", request.getWithPricesOnly().get(), false);
}
- if (request.getIsActive().isPresent()) {
+ if (request.getWithZeroPrice().isPresent()) {
QueryStringMapper.addQueryParameter(
- httpUrl, "is_active", request.getIsActive().get(), false);
+ httpUrl, "with_zero_price", request.getWithZeroPrice().get(), false);
+ }
+ if (request.getWithoutLinkedToPlan().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl,
+ "without_linked_to_plan",
+ request.getWithoutLinkedToPlan().get(),
+ false);
}
if (request.getLimit().isPresent()) {
QueryStringMapper.addQueryParameter(
@@ -1482,23 +1510,24 @@ public BaseSchematicHttpResponse countBillingProdu
HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
.newBuilder()
.addPathSegments("billing/products/count");
+ if (request.getIsActive().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "is_active", request.getIsActive().get(), false);
+ }
if (request.getName().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "name", request.getName().get(), false);
}
- if (request.getQ().isPresent()) {
- QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().get(), false);
- }
if (request.getPriceUsageType().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "price_usage_type", request.getPriceUsageType().get(), false);
}
- if (request.getWithoutLinkedToPlan().isPresent()) {
+ if (request.getProviderType().isPresent()) {
QueryStringMapper.addQueryParameter(
- httpUrl,
- "without_linked_to_plan",
- request.getWithoutLinkedToPlan().get(),
- false);
+ httpUrl, "provider_type", request.getProviderType().get(), false);
+ }
+ if (request.getQ().isPresent()) {
+ QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().get(), false);
}
if (request.getWithOneTimeCharges().isPresent()) {
QueryStringMapper.addQueryParameter(
@@ -1507,17 +1536,20 @@ public BaseSchematicHttpResponse countBillingProdu
request.getWithOneTimeCharges().get(),
false);
}
- if (request.getWithZeroPrice().isPresent()) {
- QueryStringMapper.addQueryParameter(
- httpUrl, "with_zero_price", request.getWithZeroPrice().get(), false);
- }
if (request.getWithPricesOnly().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "with_prices_only", request.getWithPricesOnly().get(), false);
}
- if (request.getIsActive().isPresent()) {
+ if (request.getWithZeroPrice().isPresent()) {
QueryStringMapper.addQueryParameter(
- httpUrl, "is_active", request.getIsActive().get(), false);
+ httpUrl, "with_zero_price", request.getWithZeroPrice().get(), false);
+ }
+ if (request.getWithoutLinkedToPlan().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl,
+ "without_linked_to_plan",
+ request.getWithoutLinkedToPlan().get(),
+ false);
}
if (request.getLimit().isPresent()) {
QueryStringMapper.addQueryParameter(
diff --git a/src/main/java/com/schematic/api/resources/billing/requests/CountBillingProductsRequest.java b/src/main/java/com/schematic/api/resources/billing/requests/CountBillingProductsRequest.java
index 69ff4f0..cbd5b7b 100644
--- a/src/main/java/com/schematic/api/resources/billing/requests/CountBillingProductsRequest.java
+++ b/src/main/java/com/schematic/api/resources/billing/requests/CountBillingProductsRequest.java
@@ -12,7 +12,8 @@
import com.fasterxml.jackson.annotation.Nulls;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.schematic.api.core.ObjectMappers;
-import com.schematic.api.resources.billing.types.CountBillingProductsRequestPriceUsageType;
+import com.schematic.api.types.BillingPriceUsageType;
+import com.schematic.api.types.BillingProviderType;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
@@ -25,21 +26,23 @@
public final class CountBillingProductsRequest {
private final Optional> ids;
+ private final Optional isActive;
+
private final Optional name;
- private final Optional q;
+ private final Optional priceUsageType;
- private final Optional priceUsageType;
+ private final Optional providerType;
- private final Optional withoutLinkedToPlan;
+ private final Optional q;
private final Optional withOneTimeCharges;
- private final Optional withZeroPrice;
-
private final Optional withPricesOnly;
- private final Optional isActive;
+ private final Optional withZeroPrice;
+
+ private final Optional withoutLinkedToPlan;
private final Optional limit;
@@ -49,26 +52,28 @@ public final class CountBillingProductsRequest {
private CountBillingProductsRequest(
Optional> ids,
+ Optional isActive,
Optional name,
+ Optional priceUsageType,
+ Optional providerType,
Optional q,
- Optional priceUsageType,
- Optional withoutLinkedToPlan,
Optional withOneTimeCharges,
- Optional withZeroPrice,
Optional withPricesOnly,
- Optional isActive,
+ Optional withZeroPrice,
+ Optional withoutLinkedToPlan,
Optional limit,
Optional offset,
Map additionalProperties) {
this.ids = ids;
+ this.isActive = isActive;
this.name = name;
- this.q = q;
this.priceUsageType = priceUsageType;
- this.withoutLinkedToPlan = withoutLinkedToPlan;
+ this.providerType = providerType;
+ this.q = q;
this.withOneTimeCharges = withOneTimeCharges;
- this.withZeroPrice = withZeroPrice;
this.withPricesOnly = withPricesOnly;
- this.isActive = isActive;
+ this.withZeroPrice = withZeroPrice;
+ this.withoutLinkedToPlan = withoutLinkedToPlan;
this.limit = limit;
this.offset = offset;
this.additionalProperties = additionalProperties;
@@ -79,27 +84,32 @@ public Optional> getIds() {
return ids;
}
+ /**
+ * @return Filter products that are active. Defaults to true if not specified
+ */
+ @JsonProperty("is_active")
+ public Optional getIsActive() {
+ return isActive;
+ }
+
@JsonProperty("name")
public Optional getName() {
return name;
}
- @JsonProperty("q")
- public Optional getQ() {
- return q;
- }
-
@JsonProperty("price_usage_type")
- public Optional getPriceUsageType() {
+ public Optional getPriceUsageType() {
return priceUsageType;
}
- /**
- * @return Filter products that are not linked to any plan
- */
- @JsonProperty("without_linked_to_plan")
- public Optional getWithoutLinkedToPlan() {
- return withoutLinkedToPlan;
+ @JsonProperty("provider_type")
+ public Optional getProviderType() {
+ return providerType;
+ }
+
+ @JsonProperty("q")
+ public Optional getQ() {
+ return q;
}
/**
@@ -110,14 +120,6 @@ public Optional getWithOneTimeCharges() {
return withOneTimeCharges;
}
- /**
- * @return Filter products that have zero price for free subscription type
- */
- @JsonProperty("with_zero_price")
- public Optional getWithZeroPrice() {
- return withZeroPrice;
- }
-
/**
* @return Filter products that have prices
*/
@@ -127,11 +129,19 @@ public Optional getWithPricesOnly() {
}
/**
- * @return Filter products that are active
+ * @return Filter products that have zero price for free subscription type
*/
- @JsonProperty("is_active")
- public Optional getIsActive() {
- return isActive;
+ @JsonProperty("with_zero_price")
+ public Optional getWithZeroPrice() {
+ return withZeroPrice;
+ }
+
+ /**
+ * @return Filter products that are not linked to any plan
+ */
+ @JsonProperty("without_linked_to_plan")
+ public Optional getWithoutLinkedToPlan() {
+ return withoutLinkedToPlan;
}
/**
@@ -163,14 +173,15 @@ public Map getAdditionalProperties() {
private boolean equalTo(CountBillingProductsRequest other) {
return ids.equals(other.ids)
+ && isActive.equals(other.isActive)
&& name.equals(other.name)
- && q.equals(other.q)
&& priceUsageType.equals(other.priceUsageType)
- && withoutLinkedToPlan.equals(other.withoutLinkedToPlan)
+ && providerType.equals(other.providerType)
+ && q.equals(other.q)
&& withOneTimeCharges.equals(other.withOneTimeCharges)
- && withZeroPrice.equals(other.withZeroPrice)
&& withPricesOnly.equals(other.withPricesOnly)
- && isActive.equals(other.isActive)
+ && withZeroPrice.equals(other.withZeroPrice)
+ && withoutLinkedToPlan.equals(other.withoutLinkedToPlan)
&& limit.equals(other.limit)
&& offset.equals(other.offset);
}
@@ -179,14 +190,15 @@ private boolean equalTo(CountBillingProductsRequest other) {
public int hashCode() {
return Objects.hash(
this.ids,
+ this.isActive,
this.name,
- this.q,
this.priceUsageType,
- this.withoutLinkedToPlan,
+ this.providerType,
+ this.q,
this.withOneTimeCharges,
- this.withZeroPrice,
this.withPricesOnly,
- this.isActive,
+ this.withZeroPrice,
+ this.withoutLinkedToPlan,
this.limit,
this.offset);
}
@@ -204,21 +216,23 @@ public static Builder builder() {
public static final class Builder {
private Optional> ids = Optional.empty();
+ private Optional isActive = Optional.empty();
+
private Optional name = Optional.empty();
- private Optional q = Optional.empty();
+ private Optional priceUsageType = Optional.empty();
- private Optional priceUsageType = Optional.empty();
+ private Optional providerType = Optional.empty();
- private Optional withoutLinkedToPlan = Optional.empty();
+ private Optional q = Optional.empty();
private Optional withOneTimeCharges = Optional.empty();
- private Optional withZeroPrice = Optional.empty();
-
private Optional withPricesOnly = Optional.empty();
- private Optional isActive = Optional.empty();
+ private Optional withZeroPrice = Optional.empty();
+
+ private Optional withoutLinkedToPlan = Optional.empty();
private Optional limit = Optional.empty();
@@ -231,14 +245,15 @@ private Builder() {}
public Builder from(CountBillingProductsRequest other) {
ids(other.getIds());
+ isActive(other.getIsActive());
name(other.getName());
- q(other.getQ());
priceUsageType(other.getPriceUsageType());
- withoutLinkedToPlan(other.getWithoutLinkedToPlan());
+ providerType(other.getProviderType());
+ q(other.getQ());
withOneTimeCharges(other.getWithOneTimeCharges());
- withZeroPrice(other.getWithZeroPrice());
withPricesOnly(other.getWithPricesOnly());
- isActive(other.getIsActive());
+ withZeroPrice(other.getWithZeroPrice());
+ withoutLinkedToPlan(other.getWithoutLinkedToPlan());
limit(other.getLimit());
offset(other.getOffset());
return this;
@@ -260,6 +275,20 @@ public Builder ids(String ids) {
return this;
}
+ /**
+ * Filter products that are active. Defaults to true if not specified
+ */
+ @JsonSetter(value = "is_active", nulls = Nulls.SKIP)
+ public Builder isActive(Optional isActive) {
+ this.isActive = isActive;
+ return this;
+ }
+
+ public Builder isActive(Boolean isActive) {
+ this.isActive = Optional.ofNullable(isActive);
+ return this;
+ }
+
@JsonSetter(value = "name", nulls = Nulls.SKIP)
public Builder name(Optional name) {
this.name = name;
@@ -271,39 +300,36 @@ public Builder name(String name) {
return this;
}
- @JsonSetter(value = "q", nulls = Nulls.SKIP)
- public Builder q(Optional q) {
- this.q = q;
+ @JsonSetter(value = "price_usage_type", nulls = Nulls.SKIP)
+ public Builder priceUsageType(Optional priceUsageType) {
+ this.priceUsageType = priceUsageType;
return this;
}
- public Builder q(String q) {
- this.q = Optional.ofNullable(q);
+ public Builder priceUsageType(BillingPriceUsageType priceUsageType) {
+ this.priceUsageType = Optional.ofNullable(priceUsageType);
return this;
}
- @JsonSetter(value = "price_usage_type", nulls = Nulls.SKIP)
- public Builder priceUsageType(Optional priceUsageType) {
- this.priceUsageType = priceUsageType;
+ @JsonSetter(value = "provider_type", nulls = Nulls.SKIP)
+ public Builder providerType(Optional providerType) {
+ this.providerType = providerType;
return this;
}
- public Builder priceUsageType(CountBillingProductsRequestPriceUsageType priceUsageType) {
- this.priceUsageType = Optional.ofNullable(priceUsageType);
+ public Builder providerType(BillingProviderType providerType) {
+ this.providerType = Optional.ofNullable(providerType);
return this;
}
- /**
- * Filter products that are not linked to any plan
- */
- @JsonSetter(value = "without_linked_to_plan", nulls = Nulls.SKIP)
- public Builder withoutLinkedToPlan(Optional withoutLinkedToPlan) {
- this.withoutLinkedToPlan = withoutLinkedToPlan;
+ @JsonSetter(value = "q", nulls = Nulls.SKIP)
+ public Builder q(Optional q) {
+ this.q = q;
return this;
}
- public Builder withoutLinkedToPlan(Boolean withoutLinkedToPlan) {
- this.withoutLinkedToPlan = Optional.ofNullable(withoutLinkedToPlan);
+ public Builder q(String q) {
+ this.q = Optional.ofNullable(q);
return this;
}
@@ -322,44 +348,44 @@ public Builder withOneTimeCharges(Boolean withOneTimeCharges) {
}
/**
- * Filter products that have zero price for free subscription type
+ * Filter products that have prices
*/
- @JsonSetter(value = "with_zero_price", nulls = Nulls.SKIP)
- public Builder withZeroPrice(Optional withZeroPrice) {
- this.withZeroPrice = withZeroPrice;
+ @JsonSetter(value = "with_prices_only", nulls = Nulls.SKIP)
+ public Builder withPricesOnly(Optional withPricesOnly) {
+ this.withPricesOnly = withPricesOnly;
return this;
}
- public Builder withZeroPrice(Boolean withZeroPrice) {
- this.withZeroPrice = Optional.ofNullable(withZeroPrice);
+ public Builder withPricesOnly(Boolean withPricesOnly) {
+ this.withPricesOnly = Optional.ofNullable(withPricesOnly);
return this;
}
/**
- * Filter products that have prices
+ * Filter products that have zero price for free subscription type
*/
- @JsonSetter(value = "with_prices_only", nulls = Nulls.SKIP)
- public Builder withPricesOnly(Optional withPricesOnly) {
- this.withPricesOnly = withPricesOnly;
+ @JsonSetter(value = "with_zero_price", nulls = Nulls.SKIP)
+ public Builder withZeroPrice(Optional withZeroPrice) {
+ this.withZeroPrice = withZeroPrice;
return this;
}
- public Builder withPricesOnly(Boolean withPricesOnly) {
- this.withPricesOnly = Optional.ofNullable(withPricesOnly);
+ public Builder withZeroPrice(Boolean withZeroPrice) {
+ this.withZeroPrice = Optional.ofNullable(withZeroPrice);
return this;
}
/**
- * Filter products that are active
+ * Filter products that are not linked to any plan
*/
- @JsonSetter(value = "is_active", nulls = Nulls.SKIP)
- public Builder isActive(Optional isActive) {
- this.isActive = isActive;
+ @JsonSetter(value = "without_linked_to_plan", nulls = Nulls.SKIP)
+ public Builder withoutLinkedToPlan(Optional withoutLinkedToPlan) {
+ this.withoutLinkedToPlan = withoutLinkedToPlan;
return this;
}
- public Builder isActive(Boolean isActive) {
- this.isActive = Optional.ofNullable(isActive);
+ public Builder withoutLinkedToPlan(Boolean withoutLinkedToPlan) {
+ this.withoutLinkedToPlan = Optional.ofNullable(withoutLinkedToPlan);
return this;
}
@@ -394,14 +420,15 @@ public Builder offset(Integer offset) {
public CountBillingProductsRequest build() {
return new CountBillingProductsRequest(
ids,
+ isActive,
name,
- q,
priceUsageType,
- withoutLinkedToPlan,
+ providerType,
+ q,
withOneTimeCharges,
- withZeroPrice,
withPricesOnly,
- isActive,
+ withZeroPrice,
+ withoutLinkedToPlan,
limit,
offset,
additionalProperties);
diff --git a/src/main/java/com/schematic/api/resources/billing/requests/CountCustomersRequest.java b/src/main/java/com/schematic/api/resources/billing/requests/CountCustomersRequest.java
index f786a79..6eb10dc 100644
--- a/src/main/java/com/schematic/api/resources/billing/requests/CountCustomersRequest.java
+++ b/src/main/java/com/schematic/api/resources/billing/requests/CountCustomersRequest.java
@@ -12,6 +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.BillingProviderType;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
@@ -26,7 +27,7 @@ public final class CountCustomersRequest {
private final Optional name;
- private final Optional failedToImport;
+ private final Optional providerType;
private final Optional q;
@@ -39,14 +40,14 @@ public final class CountCustomersRequest {
private CountCustomersRequest(
Optional> companyIds,
Optional name,
- Optional failedToImport,
+ Optional providerType,
Optional q,
Optional limit,
Optional offset,
Map additionalProperties) {
this.companyIds = companyIds;
this.name = name;
- this.failedToImport = failedToImport;
+ this.providerType = providerType;
this.q = q;
this.limit = limit;
this.offset = offset;
@@ -63,9 +64,9 @@ public Optional getName() {
return name;
}
- @JsonProperty("failed_to_import")
- public Optional getFailedToImport() {
- return failedToImport;
+ @JsonProperty("provider_type")
+ public Optional getProviderType() {
+ return providerType;
}
@JsonProperty("q")
@@ -103,7 +104,7 @@ public Map getAdditionalProperties() {
private boolean equalTo(CountCustomersRequest other) {
return companyIds.equals(other.companyIds)
&& name.equals(other.name)
- && failedToImport.equals(other.failedToImport)
+ && providerType.equals(other.providerType)
&& q.equals(other.q)
&& limit.equals(other.limit)
&& offset.equals(other.offset);
@@ -111,7 +112,7 @@ private boolean equalTo(CountCustomersRequest other) {
@java.lang.Override
public int hashCode() {
- return Objects.hash(this.companyIds, this.name, this.failedToImport, this.q, this.limit, this.offset);
+ return Objects.hash(this.companyIds, this.name, this.providerType, this.q, this.limit, this.offset);
}
@java.lang.Override
@@ -129,7 +130,7 @@ public static final class Builder {
private Optional name = Optional.empty();
- private Optional failedToImport = Optional.empty();
+ private Optional providerType = Optional.empty();
private Optional q = Optional.empty();
@@ -145,7 +146,7 @@ private Builder() {}
public Builder from(CountCustomersRequest other) {
companyIds(other.getCompanyIds());
name(other.getName());
- failedToImport(other.getFailedToImport());
+ providerType(other.getProviderType());
q(other.getQ());
limit(other.getLimit());
offset(other.getOffset());
@@ -179,14 +180,14 @@ public Builder name(String name) {
return this;
}
- @JsonSetter(value = "failed_to_import", nulls = Nulls.SKIP)
- public Builder failedToImport(Optional failedToImport) {
- this.failedToImport = failedToImport;
+ @JsonSetter(value = "provider_type", nulls = Nulls.SKIP)
+ public Builder providerType(Optional providerType) {
+ this.providerType = providerType;
return this;
}
- public Builder failedToImport(Boolean failedToImport) {
- this.failedToImport = Optional.ofNullable(failedToImport);
+ public Builder providerType(BillingProviderType providerType) {
+ this.providerType = Optional.ofNullable(providerType);
return this;
}
@@ -230,7 +231,7 @@ public Builder offset(Integer offset) {
}
public CountCustomersRequest build() {
- return new CountCustomersRequest(companyIds, name, failedToImport, q, limit, offset, additionalProperties);
+ return new CountCustomersRequest(companyIds, name, providerType, q, limit, offset, additionalProperties);
}
}
}
diff --git a/src/main/java/com/schematic/api/resources/billing/requests/CreateBillingCustomerRequestBody.java b/src/main/java/com/schematic/api/resources/billing/requests/CreateBillingCustomerRequestBody.java
index 8c34ad6..415b17f 100644
--- a/src/main/java/com/schematic/api/resources/billing/requests/CreateBillingCustomerRequestBody.java
+++ b/src/main/java/com/schematic/api/resources/billing/requests/CreateBillingCustomerRequestBody.java
@@ -12,6 +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.BillingProviderType;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
@@ -30,12 +31,12 @@ public final class CreateBillingCustomerRequestBody {
private final String externalId;
- private final boolean failedToImport;
-
private final Map meta;
private final String name;
+ private final Optional providerType;
+
private final Map additionalProperties;
private CreateBillingCustomerRequestBody(
@@ -43,17 +44,17 @@ private CreateBillingCustomerRequestBody(
Optional defaultPaymentMethodId,
String email,
String externalId,
- boolean failedToImport,
Map meta,
String name,
+ Optional providerType,
Map additionalProperties) {
this.companyId = companyId;
this.defaultPaymentMethodId = defaultPaymentMethodId;
this.email = email;
this.externalId = externalId;
- this.failedToImport = failedToImport;
this.meta = meta;
this.name = name;
+ this.providerType = providerType;
this.additionalProperties = additionalProperties;
}
@@ -77,11 +78,6 @@ public String getExternalId() {
return externalId;
}
- @JsonProperty("failed_to_import")
- public boolean getFailedToImport() {
- return failedToImport;
- }
-
@JsonProperty("meta")
public Map getMeta() {
return meta;
@@ -92,6 +88,11 @@ public String getName() {
return name;
}
+ @JsonProperty("provider_type")
+ public Optional getProviderType() {
+ return providerType;
+ }
+
@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
@@ -108,9 +109,9 @@ private boolean equalTo(CreateBillingCustomerRequestBody other) {
&& defaultPaymentMethodId.equals(other.defaultPaymentMethodId)
&& email.equals(other.email)
&& externalId.equals(other.externalId)
- && failedToImport == other.failedToImport
&& meta.equals(other.meta)
- && name.equals(other.name);
+ && name.equals(other.name)
+ && providerType.equals(other.providerType);
}
@java.lang.Override
@@ -120,9 +121,9 @@ public int hashCode() {
this.defaultPaymentMethodId,
this.email,
this.externalId,
- this.failedToImport,
this.meta,
- this.name);
+ this.name,
+ this.providerType);
}
@java.lang.Override
@@ -141,11 +142,7 @@ public interface EmailStage {
}
public interface ExternalIdStage {
- FailedToImportStage externalId(@NotNull String externalId);
- }
-
- public interface FailedToImportStage {
- NameStage failedToImport(boolean failedToImport);
+ NameStage externalId(@NotNull String externalId);
}
public interface NameStage {
@@ -168,19 +165,22 @@ public interface _FinalStage {
_FinalStage putAllMeta(Map meta);
_FinalStage meta(String key, String value);
+
+ _FinalStage providerType(Optional providerType);
+
+ _FinalStage providerType(BillingProviderType providerType);
}
@JsonIgnoreProperties(ignoreUnknown = true)
- public static final class Builder
- implements EmailStage, ExternalIdStage, FailedToImportStage, NameStage, _FinalStage {
+ public static final class Builder implements EmailStage, ExternalIdStage, NameStage, _FinalStage {
private String email;
private String externalId;
- private boolean failedToImport;
-
private String name;
+ private Optional providerType = Optional.empty();
+
private Map meta = new LinkedHashMap<>();
private Optional defaultPaymentMethodId = Optional.empty();
@@ -198,9 +198,9 @@ public Builder from(CreateBillingCustomerRequestBody other) {
defaultPaymentMethodId(other.getDefaultPaymentMethodId());
email(other.getEmail());
externalId(other.getExternalId());
- failedToImport(other.getFailedToImport());
meta(other.getMeta());
name(other.getName());
+ providerType(other.getProviderType());
return this;
}
@@ -213,22 +213,28 @@ public ExternalIdStage email(@NotNull String email) {
@java.lang.Override
@JsonSetter("external_id")
- public FailedToImportStage externalId(@NotNull String externalId) {
+ public NameStage externalId(@NotNull String externalId) {
this.externalId = Objects.requireNonNull(externalId, "externalId must not be null");
return this;
}
@java.lang.Override
- @JsonSetter("failed_to_import")
- public NameStage failedToImport(boolean failedToImport) {
- this.failedToImport = failedToImport;
+ @JsonSetter("name")
+ public _FinalStage name(@NotNull String name) {
+ this.name = Objects.requireNonNull(name, "name must not be null");
return this;
}
@java.lang.Override
- @JsonSetter("name")
- public _FinalStage name(@NotNull String name) {
- this.name = Objects.requireNonNull(name, "name must not be null");
+ public _FinalStage providerType(BillingProviderType providerType) {
+ this.providerType = Optional.ofNullable(providerType);
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter(value = "provider_type", nulls = Nulls.SKIP)
+ public _FinalStage providerType(Optional providerType) {
+ this.providerType = providerType;
return this;
}
@@ -289,9 +295,9 @@ public CreateBillingCustomerRequestBody build() {
defaultPaymentMethodId,
email,
externalId,
- failedToImport,
meta,
name,
+ providerType,
additionalProperties);
}
}
diff --git a/src/main/java/com/schematic/api/resources/billing/requests/CreateBillingPriceRequestBody.java b/src/main/java/com/schematic/api/resources/billing/requests/CreateBillingPriceRequestBody.java
index a9212ba..a9b977a 100644
--- a/src/main/java/com/schematic/api/resources/billing/requests/CreateBillingPriceRequestBody.java
+++ b/src/main/java/com/schematic/api/resources/billing/requests/CreateBillingPriceRequestBody.java
@@ -12,9 +12,10 @@
import com.fasterxml.jackson.annotation.Nulls;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.schematic.api.core.ObjectMappers;
-import com.schematic.api.resources.billing.types.CreateBillingPriceRequestBodyBillingScheme;
-import com.schematic.api.resources.billing.types.CreateBillingPriceRequestBodyTiersMode;
-import com.schematic.api.resources.billing.types.CreateBillingPriceRequestBodyUsageType;
+import com.schematic.api.types.BillingPriceScheme;
+import com.schematic.api.types.BillingPriceUsageType;
+import com.schematic.api.types.BillingProviderType;
+import com.schematic.api.types.BillingTiersMode;
import com.schematic.api.types.CreateBillingPriceTierRequestBody;
import java.util.ArrayList;
import java.util.HashMap;
@@ -27,7 +28,7 @@
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = CreateBillingPriceRequestBody.Builder.class)
public final class CreateBillingPriceRequestBody {
- private final CreateBillingPriceRequestBodyBillingScheme billingScheme;
+ private final BillingPriceScheme billingScheme;
private final String currency;
@@ -51,14 +52,16 @@ public final class CreateBillingPriceRequestBody {
private final String productExternalId;
- private final Optional tiersMode;
+ private final Optional providerType;
- private final CreateBillingPriceRequestBodyUsageType usageType;
+ private final Optional tiersMode;
+
+ private final BillingPriceUsageType usageType;
private final Map additionalProperties;
private CreateBillingPriceRequestBody(
- CreateBillingPriceRequestBodyBillingScheme billingScheme,
+ BillingPriceScheme billingScheme,
String currency,
String externalAccountId,
String interval,
@@ -70,8 +73,9 @@ private CreateBillingPriceRequestBody(
String priceExternalId,
List priceTiers,
String productExternalId,
- Optional tiersMode,
- CreateBillingPriceRequestBodyUsageType usageType,
+ Optional providerType,
+ Optional tiersMode,
+ BillingPriceUsageType usageType,
Map additionalProperties) {
this.billingScheme = billingScheme;
this.currency = currency;
@@ -85,13 +89,14 @@ private CreateBillingPriceRequestBody(
this.priceExternalId = priceExternalId;
this.priceTiers = priceTiers;
this.productExternalId = productExternalId;
+ this.providerType = providerType;
this.tiersMode = tiersMode;
this.usageType = usageType;
this.additionalProperties = additionalProperties;
}
@JsonProperty("billing_scheme")
- public CreateBillingPriceRequestBodyBillingScheme getBillingScheme() {
+ public BillingPriceScheme getBillingScheme() {
return billingScheme;
}
@@ -150,13 +155,18 @@ public String getProductExternalId() {
return productExternalId;
}
+ @JsonProperty("provider_type")
+ public Optional getProviderType() {
+ return providerType;
+ }
+
@JsonProperty("tiers_mode")
- public Optional getTiersMode() {
+ public Optional getTiersMode() {
return tiersMode;
}
@JsonProperty("usage_type")
- public CreateBillingPriceRequestBodyUsageType getUsageType() {
+ public BillingPriceUsageType getUsageType() {
return usageType;
}
@@ -184,6 +194,7 @@ private boolean equalTo(CreateBillingPriceRequestBody other) {
&& priceExternalId.equals(other.priceExternalId)
&& priceTiers.equals(other.priceTiers)
&& productExternalId.equals(other.productExternalId)
+ && providerType.equals(other.providerType)
&& tiersMode.equals(other.tiersMode)
&& usageType.equals(other.usageType);
}
@@ -203,6 +214,7 @@ public int hashCode() {
this.priceExternalId,
this.priceTiers,
this.productExternalId,
+ this.providerType,
this.tiersMode,
this.usageType);
}
@@ -217,7 +229,7 @@ public static BillingSchemeStage builder() {
}
public interface BillingSchemeStage {
- CurrencyStage billingScheme(@NotNull CreateBillingPriceRequestBodyBillingScheme billingScheme);
+ CurrencyStage billingScheme(@NotNull BillingPriceScheme billingScheme);
Builder from(CreateBillingPriceRequestBody other);
}
@@ -251,7 +263,7 @@ public interface ProductExternalIdStage {
}
public interface UsageTypeStage {
- _FinalStage usageType(@NotNull CreateBillingPriceRequestBodyUsageType usageType);
+ _FinalStage usageType(@NotNull BillingPriceUsageType usageType);
}
public interface _FinalStage {
@@ -275,9 +287,13 @@ public interface _FinalStage {
_FinalStage addAllPriceTiers(List priceTiers);
- _FinalStage tiersMode(Optional tiersMode);
+ _FinalStage providerType(Optional providerType);
+
+ _FinalStage providerType(BillingProviderType providerType);
- _FinalStage tiersMode(CreateBillingPriceRequestBodyTiersMode tiersMode);
+ _FinalStage tiersMode(Optional tiersMode);
+
+ _FinalStage tiersMode(BillingTiersMode tiersMode);
}
@JsonIgnoreProperties(ignoreUnknown = true)
@@ -292,7 +308,7 @@ public static final class Builder
ProductExternalIdStage,
UsageTypeStage,
_FinalStage {
- private CreateBillingPriceRequestBodyBillingScheme billingScheme;
+ private BillingPriceScheme billingScheme;
private String currency;
@@ -308,9 +324,11 @@ public static final class Builder
private String productExternalId;
- private CreateBillingPriceRequestBodyUsageType usageType;
+ private BillingPriceUsageType usageType;
+
+ private Optional tiersMode = Optional.empty();
- private Optional tiersMode = Optional.empty();
+ private Optional