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
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ java {

group = 'com.schematichq'

version = '1.1.4'
version = '1.2.0'

jar {
dependsOn(":generatePomFileForMavenPublication")
Expand Down Expand Up @@ -80,7 +80,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.schematichq'
artifactId = 'schematic-java'
version = '1.1.4'
version = '1.2.0'
from components.java
pom {
name = 'schematic'
Expand Down
135 changes: 134 additions & 1 deletion reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -4731,6 +4731,14 @@ client.credits().createBillingPlanCreditGrant(
<dl>
<dd>

**applyToExisting:** `Optional<Boolean>`

</dd>
</dl>

<dl>
<dd>

**creditAmount:** `Integer`

</dd>
Expand Down Expand Up @@ -4803,6 +4811,117 @@ client.credits().createBillingPlanCreditGrant(
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.credits.updateBillingPlanCreditGrant(planGrantId, request) -> UpdateBillingPlanCreditGrantResponse</code></summary>
<dl>
<dd>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```java
client.credits().updateBillingPlanCreditGrant(
"plan_grant_id",
UpdateBillingPlanCreditGrantRequestBody
.builder()
.resetCadence(UpdateBillingPlanCreditGrantRequestBodyResetCadence.MONTHLY)
.resetStart(UpdateBillingPlanCreditGrantRequestBodyResetStart.BILLING_PERIOD)
.build()
);
```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**planGrantId:** `String` — plan_grant_id

</dd>
</dl>

<dl>
<dd>

**applyToExisting:** `Optional<Boolean>`

</dd>
</dl>

<dl>
<dd>

**creditAmount:** `Optional<Integer>`

</dd>
</dl>

<dl>
<dd>

**expiryType:** `Optional<UpdateBillingPlanCreditGrantRequestBodyExpiryType>`

</dd>
</dl>

<dl>
<dd>

**expiryUnit:** `Optional<UpdateBillingPlanCreditGrantRequestBodyExpiryUnit>`

</dd>
</dl>

<dl>
<dd>

**expiryUnitCount:** `Optional<Integer>`

</dd>
</dl>

<dl>
<dd>

**resetCadence:** `UpdateBillingPlanCreditGrantRequestBodyResetCadence`

</dd>
</dl>

<dl>
<dd>

**resetStart:** `UpdateBillingPlanCreditGrantRequestBodyResetStart`

</dd>
</dl>

<dl>
<dd>

**resetType:** `Optional<UpdateBillingPlanCreditGrantRequestBodyResetType>`

</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>
Expand All @@ -4820,7 +4939,13 @@ client.credits().createBillingPlanCreditGrant(
<dd>

```java
client.credits().deleteBillingPlanCreditGrant("plan_grant_id");
client.credits().deleteBillingPlanCreditGrant(
"plan_grant_id",
DeleteBillingPlanCreditGrantRequest
.builder()
.applyToExisting(true)
.build()
);
```
</dd>
</dl>
Expand All @@ -4837,6 +4962,14 @@ client.credits().deleteBillingPlanCreditGrant("plan_grant_id");

**planGrantId:** `String` — plan_grant_id

</dd>
</dl>

<dl>
<dd>

**applyToExisting:** `Optional<Boolean>`

</dd>
</dl>
</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 @@ -32,10 +32,10 @@ private ClientOptions(
this.headers.putAll(headers);
this.headers.putAll(new HashMap<String, String>() {
{
put("User-Agent", "com.schematichq:schematic-java/1.1.4");
put("User-Agent", "com.schematichq:schematic-java/1.2.0");
put("X-Fern-Language", "JAVA");
put("X-Fern-SDK-Name", "com.schematic.fern:api-sdk");
put("X-Fern-SDK-Version", "1.1.4");
put("X-Fern-SDK-Version", "1.2.0");
}
});
this.headerSuppliers = headerSuppliers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@
import com.schematic.api.resources.credits.requests.CreateBillingPlanCreditGrantRequestBody;
import com.schematic.api.resources.credits.requests.CreateCompanyCreditGrant;
import com.schematic.api.resources.credits.requests.CreateCreditBundleRequestBody;
import com.schematic.api.resources.credits.requests.DeleteBillingPlanCreditGrantRequest;
import com.schematic.api.resources.credits.requests.GetEnrichedCreditLedgerRequest;
import com.schematic.api.resources.credits.requests.ListBillingCreditsRequest;
import com.schematic.api.resources.credits.requests.ListBillingPlanCreditGrantsRequest;
import com.schematic.api.resources.credits.requests.ListCompanyGrantsRequest;
import com.schematic.api.resources.credits.requests.ListCreditBundlesRequest;
import com.schematic.api.resources.credits.requests.ListGrantsForCreditRequest;
import com.schematic.api.resources.credits.requests.UpdateBillingCreditRequestBody;
import com.schematic.api.resources.credits.requests.UpdateBillingPlanCreditGrantRequestBody;
import com.schematic.api.resources.credits.requests.UpdateCreditBundleDetailsRequestBody;
import com.schematic.api.resources.credits.requests.ZeroOutGrantRequestBody;
import com.schematic.api.resources.credits.types.CountBillingCreditsGrantsResponse;
Expand All @@ -44,6 +46,7 @@
import com.schematic.api.resources.credits.types.ListGrantsForCreditResponse;
import com.schematic.api.resources.credits.types.SoftDeleteBillingCreditResponse;
import com.schematic.api.resources.credits.types.UpdateBillingCreditResponse;
import com.schematic.api.resources.credits.types.UpdateBillingPlanCreditGrantResponse;
import com.schematic.api.resources.credits.types.UpdateCreditBundleDetailsResponse;
import com.schematic.api.resources.credits.types.ZeroOutGrantResponse;
import java.util.concurrent.CompletableFuture;
Expand Down Expand Up @@ -306,14 +309,31 @@ public CompletableFuture<CreateBillingPlanCreditGrantResponse> createBillingPlan
.thenApply(response -> response.body());
}

public CompletableFuture<UpdateBillingPlanCreditGrantResponse> updateBillingPlanCreditGrant(
String planGrantId, UpdateBillingPlanCreditGrantRequestBody request) {
return this.rawClient.updateBillingPlanCreditGrant(planGrantId, request).thenApply(response -> response.body());
}

public CompletableFuture<UpdateBillingPlanCreditGrantResponse> updateBillingPlanCreditGrant(
String planGrantId, UpdateBillingPlanCreditGrantRequestBody request, RequestOptions requestOptions) {
return this.rawClient
.updateBillingPlanCreditGrant(planGrantId, request, requestOptions)
.thenApply(response -> response.body());
}

public CompletableFuture<DeleteBillingPlanCreditGrantResponse> deleteBillingPlanCreditGrant(String planGrantId) {
return this.rawClient.deleteBillingPlanCreditGrant(planGrantId).thenApply(response -> response.body());
}

public CompletableFuture<DeleteBillingPlanCreditGrantResponse> deleteBillingPlanCreditGrant(
String planGrantId, RequestOptions requestOptions) {
String planGrantId, DeleteBillingPlanCreditGrantRequest request) {
return this.rawClient.deleteBillingPlanCreditGrant(planGrantId, request).thenApply(response -> response.body());
}

public CompletableFuture<DeleteBillingPlanCreditGrantResponse> deleteBillingPlanCreditGrant(
String planGrantId, DeleteBillingPlanCreditGrantRequest request, RequestOptions requestOptions) {
return this.rawClient
.deleteBillingPlanCreditGrant(planGrantId, requestOptions)
.deleteBillingPlanCreditGrant(planGrantId, request, requestOptions)
.thenApply(response -> response.body());
}

Expand Down
Loading
Loading