Skip to content

Commit 6bcd3ff

Browse files
🌿 Fern Regeneration -- February 3, 2025 (#15)
* SDK regeneration * fixes --------- Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Co-authored-by: Ben Papillon <[email protected]>
1 parent 68c64f1 commit 6bcd3ff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1900
-370
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ java {
4848

4949
group = 'com.schematichq'
5050

51-
version = '1.1.0'
51+
version = '1.1.1'
5252

5353
jar {
5454
dependsOn(":generatePomFileForMavenPublication")
@@ -79,7 +79,7 @@ publishing {
7979
maven(MavenPublication) {
8080
groupId = 'com.schematichq'
8181
artifactId = 'schematic-java'
82-
version = '1.1.0'
82+
version = '1.1.1'
8383
from components.java
8484
pom {
8585
name = 'schematic'

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

src/main/java/com/schematic/api/Schematic.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ private static ClientOptions buildClientOptions(String apiKey, Builder builder)
137137
String basePath = builder.basePath != null ? builder.basePath : "https://api.schematichq.com";
138138
return ClientOptions.builder()
139139
.environment(Environment.custom(basePath))
140-
.addHeader("Authorization", "Bearer " + apiKey)
140+
.addHeader("X-Schematic-Api-Key", apiKey)
141141
.addHeader("Content-Type", "application/json")
142142
.build();
143143
}

src/main/java/com/schematic/api/core/ClientOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ private ClientOptions(
3333
{
3434
put("X-Fern-Language", "JAVA");
3535
put("X-Fern-SDK-Name", "com.schematic.fern:api-sdk");
36-
put("X-Fern-SDK-Version", "1.1.0");
36+
put("X-Fern-SDK-Version", "1.1.1");
3737
}
3838
});
3939
this.headerSuppliers = headerSuppliers;

src/main/java/com/schematic/api/core/Stream.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import java.util.Scanner;
1010

1111
/**
12-
* The {@code Stream} class implmenets {@link Iterable} to provide a simple mechanism for reading and parsing
12+
* The {@code Stream} class implements {@link Iterable} to provide a simple mechanism for reading and parsing
1313
* objects of a given type from data streamed via a {@link Reader} using a specified delimiter.
1414
* <p>
1515
* {@code Stream} assumes that data is being pushed to the provided {@link Reader} asynchronously and utilizes a
@@ -23,7 +23,7 @@ public final class Stream<T> implements Iterable<T> {
2323
*/
2424
private final Class<T> valueType;
2525
/**
26-
* The {@link Scanner} used for reading from the input stream and blocking when neede during iteration.
26+
* The {@link Scanner} used for reading from the input stream and blocking when needed during iteration.
2727
*/
2828
private final Scanner scanner;
2929

src/main/java/com/schematic/api/resources/accesstokens/AccesstokensClient.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public IssueTemporaryAccessTokenResponse issueTemporaryAccessToken(
5555
.method("POST", body)
5656
.headers(Headers.of(clientOptions.headers(requestOptions)))
5757
.addHeader("Content-Type", "application/json")
58+
.addHeader("Accept", "application/json")
5859
.build();
5960
OkHttpClient client = clientOptions.httpClient();
6061
if (requestOptions != null && requestOptions.getTimeout().isPresent()) {

src/main/java/com/schematic/api/resources/billing/BillingClient.java

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ public UpsertBillingCouponResponse upsertBillingCoupon(
8888
.method("POST", body)
8989
.headers(Headers.of(clientOptions.headers(requestOptions)))
9090
.addHeader("Content-Type", "application/json")
91+
.addHeader("Accept", "application/json")
9192
.build();
9293
OkHttpClient client = clientOptions.httpClient();
9394
if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
@@ -148,6 +149,7 @@ public UpsertBillingCustomerResponse upsertBillingCustomer(
148149
.method("POST", body)
149150
.headers(Headers.of(clientOptions.headers(requestOptions)))
150151
.addHeader("Content-Type", "application/json")
152+
.addHeader("Accept", "application/json")
151153
.build();
152154
OkHttpClient client = clientOptions.httpClient();
153155
if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
@@ -218,7 +220,8 @@ public ListCustomersResponse listCustomers(ListCustomersRequest request, Request
218220
.url(httpUrl.build())
219221
.method("GET", null)
220222
.headers(Headers.of(clientOptions.headers(requestOptions)))
221-
.addHeader("Content-Type", "application/json");
223+
.addHeader("Content-Type", "application/json")
224+
.addHeader("Accept", "application/json");
222225
Request okhttpRequest = _requestBuilder.build();
223226
OkHttpClient client = clientOptions.httpClient();
224227
if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
@@ -289,7 +292,8 @@ public CountCustomersResponse countCustomers(CountCustomersRequest request, Requ
289292
.url(httpUrl.build())
290293
.method("GET", null)
291294
.headers(Headers.of(clientOptions.headers(requestOptions)))
292-
.addHeader("Content-Type", "application/json");
295+
.addHeader("Content-Type", "application/json")
296+
.addHeader("Accept", "application/json");
293297
Request okhttpRequest = _requestBuilder.build();
294298
OkHttpClient client = clientOptions.httpClient();
295299
if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
@@ -355,7 +359,8 @@ public ListInvoicesResponse listInvoices(ListInvoicesRequest request, RequestOpt
355359
.url(httpUrl.build())
356360
.method("GET", null)
357361
.headers(Headers.of(clientOptions.headers(requestOptions)))
358-
.addHeader("Content-Type", "application/json");
362+
.addHeader("Content-Type", "application/json")
363+
.addHeader("Accept", "application/json");
359364
Request okhttpRequest = _requestBuilder.build();
360365
OkHttpClient client = clientOptions.httpClient();
361366
if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
@@ -415,6 +420,7 @@ public UpsertInvoiceResponse upsertInvoice(CreateInvoiceRequestBody request, Req
415420
.method("POST", body)
416421
.headers(Headers.of(clientOptions.headers(requestOptions)))
417422
.addHeader("Content-Type", "application/json")
423+
.addHeader("Accept", "application/json")
418424
.build();
419425
OkHttpClient client = clientOptions.httpClient();
420426
if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
@@ -478,7 +484,8 @@ public ListMetersResponse listMeters(ListMetersRequest request, RequestOptions r
478484
.url(httpUrl.build())
479485
.method("GET", null)
480486
.headers(Headers.of(clientOptions.headers(requestOptions)))
481-
.addHeader("Content-Type", "application/json");
487+
.addHeader("Content-Type", "application/json")
488+
.addHeader("Accept", "application/json");
482489
Request okhttpRequest = _requestBuilder.build();
483490
OkHttpClient client = clientOptions.httpClient();
484491
if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
@@ -539,6 +546,7 @@ public UpsertBillingMeterResponse upsertBillingMeter(
539546
.method("POST", body)
540547
.headers(Headers.of(clientOptions.headers(requestOptions)))
541548
.addHeader("Content-Type", "application/json")
549+
.addHeader("Accept", "application/json")
542550
.build();
543551
OkHttpClient client = clientOptions.httpClient();
544552
if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
@@ -605,7 +613,8 @@ public ListPaymentMethodsResponse listPaymentMethods(
605613
.url(httpUrl.build())
606614
.method("GET", null)
607615
.headers(Headers.of(clientOptions.headers(requestOptions)))
608-
.addHeader("Content-Type", "application/json");
616+
.addHeader("Content-Type", "application/json")
617+
.addHeader("Accept", "application/json");
609618
Request okhttpRequest = _requestBuilder.build();
610619
OkHttpClient client = clientOptions.httpClient();
611620
if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
@@ -666,6 +675,7 @@ public UpsertPaymentMethodResponse upsertPaymentMethod(
666675
.method("POST", body)
667676
.headers(Headers.of(clientOptions.headers(requestOptions)))
668677
.addHeader("Content-Type", "application/json")
678+
.addHeader("Accept", "application/json")
669679
.build();
670680
OkHttpClient client = clientOptions.httpClient();
671681
if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
@@ -739,7 +749,8 @@ public SearchBillingPricesResponse searchBillingPrices(
739749
.url(httpUrl.build())
740750
.method("GET", null)
741751
.headers(Headers.of(clientOptions.headers(requestOptions)))
742-
.addHeader("Content-Type", "application/json");
752+
.addHeader("Content-Type", "application/json")
753+
.addHeader("Accept", "application/json");
743754
Request okhttpRequest = _requestBuilder.build();
744755
OkHttpClient client = clientOptions.httpClient();
745756
if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
@@ -800,6 +811,7 @@ public UpsertBillingPriceResponse upsertBillingPrice(
800811
.method("POST", body)
801812
.headers(Headers.of(clientOptions.headers(requestOptions)))
802813
.addHeader("Content-Type", "application/json")
814+
.addHeader("Accept", "application/json")
803815
.build();
804816
OkHttpClient client = clientOptions.httpClient();
805817
if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
@@ -887,7 +899,8 @@ public ListProductPricesResponse listProductPrices(
887899
.url(httpUrl.build())
888900
.method("GET", null)
889901
.headers(Headers.of(clientOptions.headers(requestOptions)))
890-
.addHeader("Content-Type", "application/json");
902+
.addHeader("Content-Type", "application/json")
903+
.addHeader("Accept", "application/json");
891904
Request okhttpRequest = _requestBuilder.build();
892905
OkHttpClient client = clientOptions.httpClient();
893906
if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
@@ -941,6 +954,7 @@ public DeleteProductPriceResponse deleteProductPrice(String billingId, RequestOp
941954
.method("DELETE", null)
942955
.headers(Headers.of(clientOptions.headers(requestOptions)))
943956
.addHeader("Content-Type", "application/json")
957+
.addHeader("Accept", "application/json")
944958
.build();
945959
OkHttpClient client = clientOptions.httpClient();
946960
if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
@@ -1001,6 +1015,7 @@ public UpsertBillingProductResponse upsertBillingProduct(
10011015
.method("POST", body)
10021016
.headers(Headers.of(clientOptions.headers(requestOptions)))
10031017
.addHeader("Content-Type", "application/json")
1018+
.addHeader("Accept", "application/json")
10041019
.build();
10051020
OkHttpClient client = clientOptions.httpClient();
10061021
if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
@@ -1088,7 +1103,8 @@ public ListBillingProductsResponse listBillingProducts(
10881103
.url(httpUrl.build())
10891104
.method("GET", null)
10901105
.headers(Headers.of(clientOptions.headers(requestOptions)))
1091-
.addHeader("Content-Type", "application/json");
1106+
.addHeader("Content-Type", "application/json")
1107+
.addHeader("Accept", "application/json");
10921108
Request okhttpRequest = _requestBuilder.build();
10931109
OkHttpClient client = clientOptions.httpClient();
10941110
if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
@@ -1176,7 +1192,8 @@ public CountBillingProductsResponse countBillingProducts(
11761192
.url(httpUrl.build())
11771193
.method("GET", null)
11781194
.headers(Headers.of(clientOptions.headers(requestOptions)))
1179-
.addHeader("Content-Type", "application/json");
1195+
.addHeader("Content-Type", "application/json")
1196+
.addHeader("Accept", "application/json");
11801197
Request okhttpRequest = _requestBuilder.build();
11811198
OkHttpClient client = clientOptions.httpClient();
11821199
if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
@@ -1237,6 +1254,7 @@ public UpsertBillingSubscriptionResponse upsertBillingSubscription(
12371254
.method("POST", body)
12381255
.headers(Headers.of(clientOptions.headers(requestOptions)))
12391256
.addHeader("Content-Type", "application/json")
1257+
.addHeader("Accept", "application/json")
12401258
.build();
12411259
OkHttpClient client = clientOptions.httpClient();
12421260
if (requestOptions != null && requestOptions.getTimeout().isPresent()) {

src/main/java/com/schematic/api/resources/billing/requests/CreateBillingPriceRequestBody.java

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ public final class CreateBillingPriceRequestBody {
2525

2626
private final String interval;
2727

28+
private final boolean isActive;
29+
2830
private final Optional<String> meterId;
2931

3032
private final int price;
@@ -40,6 +42,7 @@ public final class CreateBillingPriceRequestBody {
4042
private CreateBillingPriceRequestBody(
4143
String currency,
4244
String interval,
45+
boolean isActive,
4346
Optional<String> meterId,
4447
int price,
4548
String priceExternalId,
@@ -48,6 +51,7 @@ private CreateBillingPriceRequestBody(
4851
Map<String, Object> additionalProperties) {
4952
this.currency = currency;
5053
this.interval = interval;
54+
this.isActive = isActive;
5155
this.meterId = meterId;
5256
this.price = price;
5357
this.priceExternalId = priceExternalId;
@@ -66,6 +70,11 @@ public String getInterval() {
6670
return interval;
6771
}
6872

73+
@JsonProperty("is_active")
74+
public boolean getIsActive() {
75+
return isActive;
76+
}
77+
6978
@JsonProperty("meter_id")
7079
public Optional<String> getMeterId() {
7180
return meterId;
@@ -105,6 +114,7 @@ public Map<String, Object> getAdditionalProperties() {
105114
private boolean equalTo(CreateBillingPriceRequestBody other) {
106115
return currency.equals(other.currency)
107116
&& interval.equals(other.interval)
117+
&& isActive == other.isActive
108118
&& meterId.equals(other.meterId)
109119
&& price == other.price
110120
&& priceExternalId.equals(other.priceExternalId)
@@ -117,6 +127,7 @@ public int hashCode() {
117127
return Objects.hash(
118128
this.currency,
119129
this.interval,
130+
this.isActive,
120131
this.meterId,
121132
this.price,
122133
this.priceExternalId,
@@ -140,7 +151,11 @@ public interface CurrencyStage {
140151
}
141152

142153
public interface IntervalStage {
143-
PriceStage interval(@NotNull String interval);
154+
IsActiveStage interval(@NotNull String interval);
155+
}
156+
157+
public interface IsActiveStage {
158+
PriceStage isActive(boolean isActive);
144159
}
145160

146161
public interface PriceStage {
@@ -171,6 +186,7 @@ public interface _FinalStage {
171186
public static final class Builder
172187
implements CurrencyStage,
173188
IntervalStage,
189+
IsActiveStage,
174190
PriceStage,
175191
PriceExternalIdStage,
176192
ProductExternalIdStage,
@@ -180,6 +196,8 @@ public static final class Builder
180196

181197
private String interval;
182198

199+
private boolean isActive;
200+
183201
private int price;
184202

185203
private String priceExternalId;
@@ -199,6 +217,7 @@ private Builder() {}
199217
public Builder from(CreateBillingPriceRequestBody other) {
200218
currency(other.getCurrency());
201219
interval(other.getInterval());
220+
isActive(other.getIsActive());
202221
meterId(other.getMeterId());
203222
price(other.getPrice());
204223
priceExternalId(other.getPriceExternalId());
@@ -216,11 +235,18 @@ public IntervalStage currency(@NotNull String currency) {
216235

217236
@java.lang.Override
218237
@JsonSetter("interval")
219-
public PriceStage interval(@NotNull String interval) {
238+
public IsActiveStage interval(@NotNull String interval) {
220239
this.interval = Objects.requireNonNull(interval, "interval must not be null");
221240
return this;
222241
}
223242

243+
@java.lang.Override
244+
@JsonSetter("is_active")
245+
public PriceStage isActive(boolean isActive) {
246+
this.isActive = isActive;
247+
return this;
248+
}
249+
224250
@java.lang.Override
225251
@JsonSetter("price")
226252
public PriceExternalIdStage price(int price) {
@@ -267,6 +293,7 @@ public CreateBillingPriceRequestBody build() {
267293
return new CreateBillingPriceRequestBody(
268294
currency,
269295
interval,
296+
isActive,
270297
meterId,
271298
price,
272299
priceExternalId,

0 commit comments

Comments
 (0)