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
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.7.0"
".": "0.8.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 97
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-0f43f737c6520ed2a2407628511350362959997f89a868c50aa38d47d5791171.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-40a4e23dd482299a046fb62fd2b5a1e03d455156cb8cd4573e92e4132d74b243.yml
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 0.8.0 (2024-11-25)

Full Changelog: [v0.7.0...v0.8.0](https://github.com/orbcorp/orb-java/compare/v0.7.0...v0.8.0)

### Features

* **api:** api update ([#129](https://github.com/orbcorp/orb-java/issues/129)) ([4f1e414](https://github.com/orbcorp/orb-java/commit/4f1e4143bedf579fc5dcd17d0872ab64d23962e2))


### Chores

* **internal:** update example values ([#127](https://github.com/orbcorp/orb-java/issues/127)) ([6323bfd](https://github.com/orbcorp/orb-java/commit/6323bfda070264b781803fb7fcc29b9711cda006))

## 0.7.0 (2024-11-25)

Full Changelog: [v0.6.1...v0.7.0](https://github.com/orbcorp/orb-java/compare/v0.6.1...v0.7.0)
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!-- x-release-please-start-version -->

[![Maven Central](https://img.shields.io/maven-central/v/com.withorb.api/orb-java)](https://central.sonatype.com/artifact/com.withorb.api/orb-java/0.7.0)
[![Maven Central](https://img.shields.io/maven-central/v/com.withorb.api/orb-java)](https://central.sonatype.com/artifact/com.withorb.api/orb-java/0.8.0)

<!-- x-release-please-end -->

Expand All @@ -25,7 +25,7 @@ The REST API documentation can be found on [docs.withorb.com](https://docs.with
<!-- x-release-please-start-version -->

```kotlin
implementation("com.withorb.api:orb-java:0.7.0")
implementation("com.withorb.api:orb-java:0.8.0")
```

#### Maven
Expand All @@ -34,7 +34,7 @@ implementation("com.withorb.api:orb-java:0.7.0")
<dependency>
<groupId>com.withorb.api</groupId>
<artifactId>orb-java</artifactId>
<version>0.7.0</version>
<version>0.8.0</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {

allprojects {
group = "com.withorb.api"
version = "0.7.0" // x-release-please-version
version = "0.8.0" // x-release-please-version
}


Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ class AlertCreateForCustomerParamsTest {
.customerId("customer_id")
.currency("currency")
.type(AlertCreateForCustomerParams.Type.USAGE_EXCEEDED)
.thresholds(
listOf(AlertCreateForCustomerParams.Threshold.builder().value(42.23).build())
)
.thresholds(listOf(AlertCreateForCustomerParams.Threshold.builder().value(0.0).build()))
.build()
}

Expand All @@ -28,17 +26,15 @@ class AlertCreateForCustomerParamsTest {
.currency("currency")
.type(AlertCreateForCustomerParams.Type.USAGE_EXCEEDED)
.thresholds(
listOf(AlertCreateForCustomerParams.Threshold.builder().value(42.23).build())
listOf(AlertCreateForCustomerParams.Threshold.builder().value(0.0).build())
)
.build()
val body = params.getBody()
assertThat(body).isNotNull
assertThat(body.currency()).isEqualTo("currency")
assertThat(body.type()).isEqualTo(AlertCreateForCustomerParams.Type.USAGE_EXCEEDED)
assertThat(body.thresholds())
.isEqualTo(
listOf(AlertCreateForCustomerParams.Threshold.builder().value(42.23).build())
)
.isEqualTo(listOf(AlertCreateForCustomerParams.Threshold.builder().value(0.0).build()))
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ class AlertCreateForExternalCustomerParamsTest {
.currency("currency")
.type(AlertCreateForExternalCustomerParams.Type.USAGE_EXCEEDED)
.thresholds(
listOf(
AlertCreateForExternalCustomerParams.Threshold.builder().value(42.23).build()
)
listOf(AlertCreateForExternalCustomerParams.Threshold.builder().value(0.0).build())
)
.build()
}
Expand All @@ -31,9 +29,7 @@ class AlertCreateForExternalCustomerParamsTest {
.type(AlertCreateForExternalCustomerParams.Type.USAGE_EXCEEDED)
.thresholds(
listOf(
AlertCreateForExternalCustomerParams.Threshold.builder()
.value(42.23)
.build()
AlertCreateForExternalCustomerParams.Threshold.builder().value(0.0).build()
)
)
.build()
Expand All @@ -43,9 +39,7 @@ class AlertCreateForExternalCustomerParamsTest {
assertThat(body.type()).isEqualTo(AlertCreateForExternalCustomerParams.Type.USAGE_EXCEEDED)
assertThat(body.thresholds())
.isEqualTo(
listOf(
AlertCreateForExternalCustomerParams.Threshold.builder().value(42.23).build()
)
listOf(AlertCreateForExternalCustomerParams.Threshold.builder().value(0.0).build())
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class AlertCreateForSubscriptionParamsTest {
AlertCreateForSubscriptionParams.builder()
.subscriptionId("subscription_id")
.thresholds(
listOf(AlertCreateForSubscriptionParams.Threshold.builder().value(42.23).build())
listOf(AlertCreateForSubscriptionParams.Threshold.builder().value(0.0).build())
)
.type(AlertCreateForSubscriptionParams.Type.USAGE_EXCEEDED)
.metricId("metric_id")
Expand All @@ -26,9 +26,7 @@ class AlertCreateForSubscriptionParamsTest {
AlertCreateForSubscriptionParams.builder()
.subscriptionId("subscription_id")
.thresholds(
listOf(
AlertCreateForSubscriptionParams.Threshold.builder().value(42.23).build()
)
listOf(AlertCreateForSubscriptionParams.Threshold.builder().value(0.0).build())
)
.type(AlertCreateForSubscriptionParams.Type.USAGE_EXCEEDED)
.metricId("metric_id")
Expand All @@ -37,7 +35,7 @@ class AlertCreateForSubscriptionParamsTest {
assertThat(body).isNotNull
assertThat(body.thresholds())
.isEqualTo(
listOf(AlertCreateForSubscriptionParams.Threshold.builder().value(42.23).build())
listOf(AlertCreateForSubscriptionParams.Threshold.builder().value(0.0).build())
)
assertThat(body.type()).isEqualTo(AlertCreateForSubscriptionParams.Type.USAGE_EXCEEDED)
assertThat(body.metricId()).isEqualTo("metric_id")
Expand All @@ -49,17 +47,15 @@ class AlertCreateForSubscriptionParamsTest {
AlertCreateForSubscriptionParams.builder()
.subscriptionId("subscription_id")
.thresholds(
listOf(
AlertCreateForSubscriptionParams.Threshold.builder().value(42.23).build()
)
listOf(AlertCreateForSubscriptionParams.Threshold.builder().value(0.0).build())
)
.type(AlertCreateForSubscriptionParams.Type.USAGE_EXCEEDED)
.build()
val body = params.getBody()
assertThat(body).isNotNull
assertThat(body.thresholds())
.isEqualTo(
listOf(AlertCreateForSubscriptionParams.Threshold.builder().value(42.23).build())
listOf(AlertCreateForSubscriptionParams.Threshold.builder().value(0.0).build())
)
assertThat(body.type()).isEqualTo(AlertCreateForSubscriptionParams.Type.USAGE_EXCEEDED)
}
Expand All @@ -70,9 +66,7 @@ class AlertCreateForSubscriptionParamsTest {
AlertCreateForSubscriptionParams.builder()
.subscriptionId("subscription_id")
.thresholds(
listOf(
AlertCreateForSubscriptionParams.Threshold.builder().value(42.23).build()
)
listOf(AlertCreateForSubscriptionParams.Threshold.builder().value(0.0).build())
)
.type(AlertCreateForSubscriptionParams.Type.USAGE_EXCEEDED)
.build()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class AlertListParamsTest {
.cursor("cursor")
.customerId("customer_id")
.externalCustomerId("external_customer_id")
.limit(123L)
.limit(1L)
.subscriptionId("subscription_id")
.build()
}
Expand All @@ -36,7 +36,7 @@ class AlertListParamsTest {
.cursor("cursor")
.customerId("customer_id")
.externalCustomerId("external_customer_id")
.limit(123L)
.limit(1L)
.subscriptionId("subscription_id")
.build()
val expected = QueryParams.builder()
Expand All @@ -47,7 +47,7 @@ class AlertListParamsTest {
expected.put("cursor", "cursor")
expected.put("customer_id", "customer_id")
expected.put("external_customer_id", "external_customer_id")
expected.put("limit", "123")
expected.put("limit", "1")
expected.put("subscription_id", "subscription_id")
assertThat(params.getQueryParams()).isEqualTo(expected.build())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class AlertTest {
.metric(Alert.Metric.builder().build())
.plan(Alert.Plan.builder().build())
.subscription(Alert.Subscription.builder().build())
.thresholds(listOf(Alert.Threshold.builder().value(42.23).build()))
.thresholds(listOf(Alert.Threshold.builder().value(0.0).build()))
.type(Alert.Type.USAGE_EXCEEDED)
.build()
assertThat(alert).isNotNull
Expand All @@ -33,7 +33,7 @@ class AlertTest {
assertThat(alert.plan()).contains(Alert.Plan.builder().build())
assertThat(alert.subscription()).contains(Alert.Subscription.builder().build())
assertThat(alert.thresholds().get())
.containsExactly(Alert.Threshold.builder().value(42.23).build())
.containsExactly(Alert.Threshold.builder().value(0.0).build())
assertThat(alert.type()).isEqualTo(Alert.Type.USAGE_EXCEEDED)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class AlertUpdateParamsTest {
fun createAlertUpdateParams() {
AlertUpdateParams.builder()
.alertConfigurationId("alert_configuration_id")
.thresholds(listOf(AlertUpdateParams.Threshold.builder().value(42.23).build()))
.thresholds(listOf(AlertUpdateParams.Threshold.builder().value(0.0).build()))
.build()
}

Expand All @@ -21,33 +21,33 @@ class AlertUpdateParamsTest {
val params =
AlertUpdateParams.builder()
.alertConfigurationId("alert_configuration_id")
.thresholds(listOf(AlertUpdateParams.Threshold.builder().value(42.23).build()))
.thresholds(listOf(AlertUpdateParams.Threshold.builder().value(0.0).build()))
.build()
val body = params.getBody()
assertThat(body).isNotNull
assertThat(body.thresholds())
.isEqualTo(listOf(AlertUpdateParams.Threshold.builder().value(42.23).build()))
.isEqualTo(listOf(AlertUpdateParams.Threshold.builder().value(0.0).build()))
}

@Test
fun getBodyWithoutOptionalFields() {
val params =
AlertUpdateParams.builder()
.alertConfigurationId("alert_configuration_id")
.thresholds(listOf(AlertUpdateParams.Threshold.builder().value(42.23).build()))
.thresholds(listOf(AlertUpdateParams.Threshold.builder().value(0.0).build()))
.build()
val body = params.getBody()
assertThat(body).isNotNull
assertThat(body.thresholds())
.isEqualTo(listOf(AlertUpdateParams.Threshold.builder().value(42.23).build()))
.isEqualTo(listOf(AlertUpdateParams.Threshold.builder().value(0.0).build()))
}

@Test
fun getPathParam() {
val params =
AlertUpdateParams.builder()
.alertConfigurationId("alert_configuration_id")
.thresholds(listOf(AlertUpdateParams.Threshold.builder().value(42.23).build()))
.thresholds(listOf(AlertUpdateParams.Threshold.builder().value(0.0).build()))
.build()
assertThat(params).isNotNull
// path param "alertConfigurationId"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ class CouponCreateParamsTest {
CouponCreateParams.Discount.NewCouponPercentageDiscount.DiscountType
.PERCENTAGE
)
.percentageDiscount(42.23)
.percentageDiscount(0.0)
.build()
)
)
.redemptionCode("HALFOFF")
.durationInMonths(120L)
.maxRedemptions(123L)
.durationInMonths(12L)
.maxRedemptions(1L)
.build()
}

Expand All @@ -39,13 +39,13 @@ class CouponCreateParamsTest {
CouponCreateParams.Discount.NewCouponPercentageDiscount.DiscountType
.PERCENTAGE
)
.percentageDiscount(42.23)
.percentageDiscount(0.0)
.build()
)
)
.redemptionCode("HALFOFF")
.durationInMonths(120L)
.maxRedemptions(123L)
.durationInMonths(12L)
.maxRedemptions(1L)
.build()
val body = params.getBody()
assertThat(body).isNotNull
Expand All @@ -57,13 +57,13 @@ class CouponCreateParamsTest {
CouponCreateParams.Discount.NewCouponPercentageDiscount.DiscountType
.PERCENTAGE
)
.percentageDiscount(42.23)
.percentageDiscount(0.0)
.build()
)
)
assertThat(body.redemptionCode()).isEqualTo("HALFOFF")
assertThat(body.durationInMonths()).isEqualTo(120L)
assertThat(body.maxRedemptions()).isEqualTo(123L)
assertThat(body.durationInMonths()).isEqualTo(12L)
assertThat(body.maxRedemptions()).isEqualTo(1L)
}

@Test
Expand All @@ -77,7 +77,7 @@ class CouponCreateParamsTest {
CouponCreateParams.Discount.NewCouponPercentageDiscount.DiscountType
.PERCENTAGE
)
.percentageDiscount(42.23)
.percentageDiscount(0.0)
.build()
)
)
Expand All @@ -93,7 +93,7 @@ class CouponCreateParamsTest {
CouponCreateParams.Discount.NewCouponPercentageDiscount.DiscountType
.PERCENTAGE
)
.percentageDiscount(42.23)
.percentageDiscount(0.0)
.build()
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class CouponListParamsTest {
fun createCouponListParams() {
CouponListParams.builder()
.cursor("cursor")
.limit(123L)
.limit(1L)
.redemptionCode("redemption_code")
.showArchived(true)
.build()
Expand All @@ -24,13 +24,13 @@ class CouponListParamsTest {
val params =
CouponListParams.builder()
.cursor("cursor")
.limit(123L)
.limit(1L)
.redemptionCode("redemption_code")
.showArchived(true)
.build()
val expected = QueryParams.builder()
expected.put("cursor", "cursor")
expected.put("limit", "123")
expected.put("limit", "1")
expected.put("redemption_code", "redemption_code")
expected.put("show_archived", "true")
assertThat(params.getQueryParams()).isEqualTo(expected.build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class CouponSubscriptionListParamsTest {
CouponSubscriptionListParams.builder()
.couponId("coupon_id")
.cursor("cursor")
.limit(123L)
.limit(1L)
.build()
}

Expand All @@ -24,11 +24,11 @@ class CouponSubscriptionListParamsTest {
CouponSubscriptionListParams.builder()
.couponId("coupon_id")
.cursor("cursor")
.limit(123L)
.limit(1L)
.build()
val expected = QueryParams.builder()
expected.put("cursor", "cursor")
expected.put("limit", "123")
expected.put("limit", "1")
assertThat(params.getQueryParams()).isEqualTo(expected.build())
}

Expand Down
Loading
Loading