Skip to content
Open
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
6 changes: 3 additions & 3 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"implementation redis.clients:jedis:5.2.0"
]
},
"originGitCommit": "221a7c7d042bcb7d7609c93552e3c148814df3f5",
"originGitCommit": "deb8532a1f84f6daa08b5c611a66a5ec92f53f0e",
"originGitCommitIsDirty": false,
"invokedBy": "ci",
"requestedVersion": "1.4.4",
"requestedVersion": "1.4.5",
"ciProvider": "github",
"sdkVersion": "1.4.4"
"sdkVersion": "1.4.5"
}
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.4'
version = '1.4.5'

jar {
dependsOn(":generatePomFileForMavenPublication")
Expand Down Expand Up @@ -83,7 +83,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.schematichq'
artifactId = 'schematic-java'
version = '1.4.4'
version = '1.4.5'
from components.java
pom {
name = 'Schematic'
Expand Down
190 changes: 190 additions & 0 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1300,6 +1300,86 @@ client.billing().upsertBillingCoupon(
</dl>


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

<details><summary><code>client.billing.deleteBillingCoupon(billingId) -> DeleteBillingCouponResponse</code></summary>
<dl>
<dd>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```java
client.billing().deleteBillingCoupon("billing_id");
```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**billingId:** `String` — billing_id

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


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

<details><summary><code>client.billing.deleteBillingCustomer(billingId) -> DeleteBillingCustomerResponse</code></summary>
<dl>
<dd>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```java
client.billing().deleteBillingCustomer("billing_id");
```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**billingId:** `String` — billing_id

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


</dd>
</dl>
</details>
Expand Down Expand Up @@ -1812,6 +1892,46 @@ client.billing().upsertInvoice(
</dl>


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

<details><summary><code>client.billing.deleteBillingInvoice(billingId) -> DeleteBillingInvoiceResponse</code></summary>
<dl>
<dd>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```java
client.billing().deleteBillingInvoice("billing_id");
```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**billingId:** `String` — billing_id

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


</dd>
</dl>
</details>
Expand Down Expand Up @@ -6016,6 +6136,14 @@ client.checkout().getCheckoutData(
<dl>
<dd>

**currency:** `Optional<String>`

</dd>
</dl>

<dl>
<dd>

**selectedPlanId:** `Optional<String>`

</dd>
Expand Down Expand Up @@ -12994,6 +13122,14 @@ client.plans().publishPlanVersion(
<dl>
<dd>

**couponExternalId:** `Optional<String>`

</dd>
</dl>

<dl>
<dd>

**customerEmail:** `Optional<String>`

</dd>
Expand Down Expand Up @@ -18428,6 +18564,60 @@ client.webhooks().deleteWebhook("webhook_id");
</dl>


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

<details><summary><code>client.webhooks.sendTestWebhookAction(webhookId, request) -> SendTestWebhookActionResponse</code></summary>
<dl>
<dd>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```java
client.webhooks().sendTestWebhookAction(
"webhook_id",
TestWebhookRequestBody
.builder()
.requestType(WebhookRequestType.SUBSCRIPTION_TRIAL_ENDED)
.build()
);
```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**webhookId:** `String` — webhook_id

</dd>
</dl>

<dl>
<dd>

**requestType:** `WebhookRequestType`

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


</dd>
</dl>
</details>
Expand Down
2 changes: 1 addition & 1 deletion sample-app/src/main/java/sample/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ private static void handleTrack(HttpExchange exchange) throws IOException {
String event = (String) body.get("event");
Map<String, String> company = toStringMap(body.get("company"));
Map<String, String> user = toStringMap(body.get("user"));
Integer quantity = body.containsKey("quantity") ? ((Number) body.get("quantity")).intValue() : null;
Long quantity = body.containsKey("quantity") ? ((Number) body.get("quantity")).longValue() : null;

if (quantity != null) {
client.track(event, company, user, null, quantity);
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/schematic/api/Schematic.java
Original file line number Diff line number Diff line change
Expand Up @@ -597,15 +597,15 @@ public void identify(

public void track(
String eventName, Map<String, String> company, Map<String, String> user, Map<String, Object> traits) {
track(eventName, company, user, traits, 1, null);
track(eventName, company, user, traits, 1L, null);
}

public void track(
String eventName,
Map<String, String> company,
Map<String, String> user,
Map<String, Object> traits,
Integer quantity) {
Long quantity) {
track(eventName, company, user, traits, quantity, null);
}

Expand All @@ -615,15 +615,15 @@ public void track(
Map<String, String> user,
Map<String, Object> traits,
TrackOptions options) {
track(eventName, company, user, traits, 1, options);
track(eventName, company, user, traits, 1L, options);
}

public void track(
String eventName,
Map<String, String> company,
Map<String, String> user,
Map<String, Object> traits,
Integer quantity,
Long quantity,
TrackOptions options) {
if (offline) return;

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.4");
put("User-Agent", "com.schematichq:schematic-java/1.4.5");
put("X-Fern-Language", "JAVA");
put("X-Fern-SDK-Name", "com.schematic.fern:api-sdk");
put("X-Fern-SDK-Version", "1.4.4");
put("X-Fern-SDK-Version", "1.4.5");
}
});
this.headerSuppliers = headerSuppliers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ public void updateCompanyMetrics(EventBodyTrack event) {
}

String eventName = event.getEvent();
int quantity = event.getQuantity().orElse(1);
long quantity = event.getQuantity().orElse(1L);

List<RulesengineCompanyMetric> updatedMetrics = new ArrayList<>();
for (RulesengineCompanyMetric metric : company.getMetrics()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
import com.schematic.api.resources.billing.requests.ListPaymentMethodsRequest;
import com.schematic.api.resources.billing.types.CountBillingProductsResponse;
import com.schematic.api.resources.billing.types.CountCustomersResponse;
import com.schematic.api.resources.billing.types.DeleteBillingCouponResponse;
import com.schematic.api.resources.billing.types.DeleteBillingCustomerResponse;
import com.schematic.api.resources.billing.types.DeleteBillingInvoiceResponse;
import com.schematic.api.resources.billing.types.DeleteBillingProductResponse;
import com.schematic.api.resources.billing.types.DeletePaymentMethodByExternalIdResponse;
import com.schematic.api.resources.billing.types.DeleteProductPriceResponse;
Expand Down Expand Up @@ -89,6 +92,24 @@ public CompletableFuture<UpsertBillingCouponResponse> upsertBillingCoupon(
return this.rawClient.upsertBillingCoupon(request, requestOptions).thenApply(response -> response.body());
}

public CompletableFuture<DeleteBillingCouponResponse> deleteBillingCoupon(String billingId) {
return this.rawClient.deleteBillingCoupon(billingId).thenApply(response -> response.body());
}

public CompletableFuture<DeleteBillingCouponResponse> deleteBillingCoupon(
String billingId, RequestOptions requestOptions) {
return this.rawClient.deleteBillingCoupon(billingId, requestOptions).thenApply(response -> response.body());
}

public CompletableFuture<DeleteBillingCustomerResponse> deleteBillingCustomer(String billingId) {
return this.rawClient.deleteBillingCustomer(billingId).thenApply(response -> response.body());
}

public CompletableFuture<DeleteBillingCustomerResponse> deleteBillingCustomer(
String billingId, RequestOptions requestOptions) {
return this.rawClient.deleteBillingCustomer(billingId, requestOptions).thenApply(response -> response.body());
}

public CompletableFuture<UpsertBillingCustomerResponse> upsertBillingCustomer(
CreateBillingCustomerRequestBody request) {
return this.rawClient.upsertBillingCustomer(request).thenApply(response -> response.body());
Expand Down Expand Up @@ -155,6 +176,15 @@ public CompletableFuture<UpsertInvoiceResponse> upsertInvoice(
return this.rawClient.upsertInvoice(request, requestOptions).thenApply(response -> response.body());
}

public CompletableFuture<DeleteBillingInvoiceResponse> deleteBillingInvoice(String billingId) {
return this.rawClient.deleteBillingInvoice(billingId).thenApply(response -> response.body());
}

public CompletableFuture<DeleteBillingInvoiceResponse> deleteBillingInvoice(
String billingId, RequestOptions requestOptions) {
return this.rawClient.deleteBillingInvoice(billingId, requestOptions).thenApply(response -> response.body());
}

public CompletableFuture<ListMetersResponse> listMeters() {
return this.rawClient.listMeters().thenApply(response -> response.body());
}
Expand Down
Loading
Loading