Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"cliVersion": "5.6.0",
"generatorName": "fernapi/fern-java-sdk",
"generatorVersion": "4.9.1",
"generatorVersion": "4.10.7",
"generatorConfig": {
"client-class-name": "BaseSchematic",
"generate-unknown-as-json-node": true,
Expand All @@ -14,10 +14,10 @@
"implementation redis.clients:jedis:5.2.0"
]
},
"originGitCommit": "786b643cc0bf17aff1114597108246b5cf8af395",
"originGitCommit": "221a7c7d042bcb7d7609c93552e3c148814df3f5",
"originGitCommitIsDirty": false,
"invokedBy": "ci",
"requestedVersion": "1.4.3",
"requestedVersion": "1.4.4",
"ciProvider": "github",
"sdkVersion": "1.4.3"
"sdkVersion": "1.4.4"
}
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ java {

group = 'com.schematichq'

version = '1.4.3'
version = '1.4.4'

jar {
dependsOn(":generatePomFileForMavenPublication")
Expand Down Expand Up @@ -83,7 +83,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.schematichq'
artifactId = 'schematic-java'
version = '1.4.3'
version = '1.4.4'
from components.java
pom {
name = 'Schematic'
Expand Down
18 changes: 18 additions & 0 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -2233,6 +2233,7 @@ client.billing().listBillingPrices(
.forTrialExpiryPlan(true)
.interval("interval")
.isActive(true)
.planVersionId("plan_version_id")
.price(1000000L)
.productId("product_id")
.providerType(BillingProviderType.METRONOME)
Expand Down Expand Up @@ -2306,6 +2307,14 @@ client.billing().listBillingPrices(
<dl>
<dd>

**planVersionId:** `Optional<String>` — Filter for prices belonging to a specific plan version (e.g. the latest published version)

</dd>
</dl>

<dl>
<dd>

**price:** `Optional<Long>`

</dd>
Expand Down Expand Up @@ -2646,6 +2655,7 @@ client.billing().listBillingProductPrices(
.forTrialExpiryPlan(true)
.interval("interval")
.isActive(true)
.planVersionId("plan_version_id")
.price(1000000L)
.productId("product_id")
.providerType(BillingProviderType.METRONOME)
Expand Down Expand Up @@ -2719,6 +2729,14 @@ client.billing().listBillingProductPrices(
<dl>
<dd>

**planVersionId:** `Optional<String>` — Filter for prices belonging to a specific plan version (e.g. the latest published version)

</dd>
</dl>

<dl>
<dd>

**price:** `Optional<Long>`

</dd>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/schematic/api/core/ClientOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ private ClientOptions(
this.headers.putAll(headers);
this.headers.putAll(new HashMap<String, String>() {
{
put("User-Agent", "com.schematichq:schematic-java/1.4.3");
put("User-Agent", "com.schematichq:schematic-java/1.4.4");
put("X-Fern-Language", "JAVA");
put("X-Fern-SDK-Name", "com.schematic.fern:api-sdk");
put("X-Fern-SDK-Version", "1.4.3");
put("X-Fern-SDK-Version", "1.4.4");
}
});
this.headerSuppliers = headerSuppliers;
Expand Down
12 changes: 10 additions & 2 deletions src/main/java/com/schematic/api/core/DateTimeDeserializer.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import java.time.OffsetDateTime;
import java.time.ZoneOffset;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeParseException;
import java.time.temporal.TemporalAccessor;
import java.time.temporal.TemporalQueries;

Expand Down Expand Up @@ -42,8 +43,15 @@ public OffsetDateTime deserialize(JsonParser parser, DeserializationContext cont
if (token == JsonToken.VALUE_NUMBER_INT) {
return OffsetDateTime.ofInstant(Instant.ofEpochSecond(parser.getValueAsLong()), ZoneOffset.UTC);
} else {
TemporalAccessor temporal = DateTimeFormatter.ISO_DATE_TIME.parseBest(
parser.getValueAsString(), OffsetDateTime::from, LocalDateTime::from);
String value = parser.getValueAsString();
TemporalAccessor temporal;
try {
temporal = DateTimeFormatter.ISO_DATE_TIME.parseBest(value, OffsetDateTime::from, LocalDateTime::from);
} catch (DateTimeParseException e) {
// Fall back to space-separated format (e.g. "2025-02-15 10:30:00+00:00").
temporal = DateTimeFormatter.ISO_DATE_TIME.parseBest(
value.replace(' ', 'T'), OffsetDateTime::from, LocalDateTime::from);
}

if (temporal.query(TemporalQueries.offset()) == null) {
return LocalDateTime.from(temporal).atOffset(ZoneOffset.UTC);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1327,6 +1327,10 @@ public CompletableFuture<BaseSchematicHttpResponse<ListBillingPricesResponse>> l
QueryStringMapper.addQueryParameter(
httpUrl, "is_active", request.getIsActive().get(), false);
}
if (request.getPlanVersionId().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "plan_version_id", request.getPlanVersionId().get(), false);
}
if (request.getPrice().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "price", request.getPrice().get(), false);
Expand Down Expand Up @@ -1670,6 +1674,10 @@ public CompletableFuture<BaseSchematicHttpResponse<ListBillingProductPricesRespo
QueryStringMapper.addQueryParameter(
httpUrl, "is_active", request.getIsActive().get(), false);
}
if (request.getPlanVersionId().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "plan_version_id", request.getPlanVersionId().get(), false);
}
if (request.getPrice().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "price", request.getPrice().get(), false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1024,6 +1024,10 @@ public BaseSchematicHttpResponse<ListBillingPricesResponse> listBillingPrices(
QueryStringMapper.addQueryParameter(
httpUrl, "is_active", request.getIsActive().get(), false);
}
if (request.getPlanVersionId().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "plan_version_id", request.getPlanVersionId().get(), false);
}
if (request.getPrice().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "price", request.getPrice().get(), false);
Expand Down Expand Up @@ -1294,6 +1298,10 @@ public BaseSchematicHttpResponse<ListBillingProductPricesResponse> listBillingPr
QueryStringMapper.addQueryParameter(
httpUrl, "is_active", request.getIsActive().get(), false);
}
if (request.getPlanVersionId().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "plan_version_id", request.getPlanVersionId().get(), false);
}
if (request.getPrice().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "price", request.getPrice().get(), false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ public final class ListBillingPricesRequest {

private final Optional<Boolean> isActive;

private final Optional<String> planVersionId;

private final Optional<Long> price;

private final Optional<String> productId;
Expand Down Expand Up @@ -67,6 +69,7 @@ private ListBillingPricesRequest(
Optional<Boolean> forTrialExpiryPlan,
Optional<String> interval,
Optional<Boolean> isActive,
Optional<String> planVersionId,
Optional<Long> price,
Optional<String> productId,
Optional<BillingProviderType> providerType,
Expand All @@ -84,6 +87,7 @@ private ListBillingPricesRequest(
this.forTrialExpiryPlan = forTrialExpiryPlan;
this.interval = interval;
this.isActive = isActive;
this.planVersionId = planVersionId;
this.price = price;
this.productId = productId;
this.providerType = providerType;
Expand Down Expand Up @@ -143,6 +147,14 @@ public Optional<Boolean> getIsActive() {
return isActive;
}

/**
* @return Filter for prices belonging to a specific plan version (e.g. the latest published version)
*/
@JsonProperty("plan_version_id")
public Optional<String> getPlanVersionId() {
return planVersionId;
}

@JsonProperty("price")
public Optional<Long> getPrice() {
return price;
Expand Down Expand Up @@ -216,6 +228,7 @@ private boolean equalTo(ListBillingPricesRequest other) {
&& forTrialExpiryPlan.equals(other.forTrialExpiryPlan)
&& interval.equals(other.interval)
&& isActive.equals(other.isActive)
&& planVersionId.equals(other.planVersionId)
&& price.equals(other.price)
&& productId.equals(other.productId)
&& providerType.equals(other.providerType)
Expand All @@ -237,6 +250,7 @@ public int hashCode() {
this.forTrialExpiryPlan,
this.interval,
this.isActive,
this.planVersionId,
this.price,
this.productId,
this.providerType,
Expand Down Expand Up @@ -273,6 +287,8 @@ public static final class Builder {

private Optional<Boolean> isActive = Optional.empty();

private Optional<String> planVersionId = Optional.empty();

private Optional<Long> price = Optional.empty();

private Optional<String> productId = Optional.empty();
Expand Down Expand Up @@ -304,6 +320,7 @@ public Builder from(ListBillingPricesRequest other) {
forTrialExpiryPlan(other.getForTrialExpiryPlan());
interval(other.getInterval());
isActive(other.getIsActive());
planVersionId(other.getPlanVersionId());
price(other.getPrice());
productId(other.getProductId());
providerType(other.getProviderType());
Expand Down Expand Up @@ -415,6 +432,20 @@ public Builder isActive(Boolean isActive) {
return this;
}

/**
* <p>Filter for prices belonging to a specific plan version (e.g. the latest published version)</p>
*/
@JsonSetter(value = "plan_version_id", nulls = Nulls.SKIP)
public Builder planVersionId(Optional<String> planVersionId) {
this.planVersionId = planVersionId;
return this;
}

public Builder planVersionId(String planVersionId) {
this.planVersionId = Optional.ofNullable(planVersionId);
return this;
}

@JsonSetter(value = "price", nulls = Nulls.SKIP)
public Builder price(Optional<Long> price) {
this.price = price;
Expand Down Expand Up @@ -532,6 +563,7 @@ public ListBillingPricesRequest build() {
forTrialExpiryPlan,
interval,
isActive,
planVersionId,
price,
productId,
providerType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ public final class ListBillingProductPricesRequest {

private final Optional<Boolean> isActive;

private final Optional<String> planVersionId;

private final Optional<Long> price;

private final Optional<String> productId;
Expand Down Expand Up @@ -67,6 +69,7 @@ private ListBillingProductPricesRequest(
Optional<Boolean> forTrialExpiryPlan,
Optional<String> interval,
Optional<Boolean> isActive,
Optional<String> planVersionId,
Optional<Long> price,
Optional<String> productId,
Optional<BillingProviderType> providerType,
Expand All @@ -84,6 +87,7 @@ private ListBillingProductPricesRequest(
this.forTrialExpiryPlan = forTrialExpiryPlan;
this.interval = interval;
this.isActive = isActive;
this.planVersionId = planVersionId;
this.price = price;
this.productId = productId;
this.providerType = providerType;
Expand Down Expand Up @@ -143,6 +147,14 @@ public Optional<Boolean> getIsActive() {
return isActive;
}

/**
* @return Filter for prices belonging to a specific plan version (e.g. the latest published version)
*/
@JsonProperty("plan_version_id")
public Optional<String> getPlanVersionId() {
return planVersionId;
}

@JsonProperty("price")
public Optional<Long> getPrice() {
return price;
Expand Down Expand Up @@ -216,6 +228,7 @@ private boolean equalTo(ListBillingProductPricesRequest other) {
&& forTrialExpiryPlan.equals(other.forTrialExpiryPlan)
&& interval.equals(other.interval)
&& isActive.equals(other.isActive)
&& planVersionId.equals(other.planVersionId)
&& price.equals(other.price)
&& productId.equals(other.productId)
&& providerType.equals(other.providerType)
Expand All @@ -237,6 +250,7 @@ public int hashCode() {
this.forTrialExpiryPlan,
this.interval,
this.isActive,
this.planVersionId,
this.price,
this.productId,
this.providerType,
Expand Down Expand Up @@ -273,6 +287,8 @@ public static final class Builder {

private Optional<Boolean> isActive = Optional.empty();

private Optional<String> planVersionId = Optional.empty();

private Optional<Long> price = Optional.empty();

private Optional<String> productId = Optional.empty();
Expand Down Expand Up @@ -304,6 +320,7 @@ public Builder from(ListBillingProductPricesRequest other) {
forTrialExpiryPlan(other.getForTrialExpiryPlan());
interval(other.getInterval());
isActive(other.getIsActive());
planVersionId(other.getPlanVersionId());
price(other.getPrice());
productId(other.getProductId());
providerType(other.getProviderType());
Expand Down Expand Up @@ -415,6 +432,20 @@ public Builder isActive(Boolean isActive) {
return this;
}

/**
* <p>Filter for prices belonging to a specific plan version (e.g. the latest published version)</p>
*/
@JsonSetter(value = "plan_version_id", nulls = Nulls.SKIP)
public Builder planVersionId(Optional<String> planVersionId) {
this.planVersionId = planVersionId;
return this;
}

public Builder planVersionId(String planVersionId) {
this.planVersionId = Optional.ofNullable(planVersionId);
return this;
}

@JsonSetter(value = "price", nulls = Nulls.SKIP)
public Builder price(Optional<Long> price) {
this.price = price;
Expand Down Expand Up @@ -532,6 +563,7 @@ public ListBillingProductPricesRequest build() {
forTrialExpiryPlan,
interval,
isActive,
planVersionId,
price,
productId,
providerType,
Expand Down
Loading
Loading