diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index b054780a6..cf2147414 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.336.0"
+ ".": "0.337.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 5a7b82c92..2923d8298 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 214
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e0a19c46b65842ff370613aac24ba8777d7b961bd46a20e936e878386e048852.yml
-openapi_spec_hash: 0f635610cedd9a0aacc6d5b347c3cccf
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-3e092c1a52f33e962b8415bfa24a244fdb66783aa093e027501124cb8658881b.yml
+openapi_spec_hash: 677f23c2d65201b72074b3effb7d9ad4
config_hash: a143293c5450ae8f52acad08f3102575
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3bc63f2be..2ca6e27fe 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## 0.337.0 (2025-09-24)
+
+Full Changelog: [v0.336.0...v0.337.0](https://github.com/Increase/increase-java/compare/v0.336.0...v0.337.0)
+
+### Features
+
+* **api:** api update ([bc473aa](https://github.com/Increase/increase-java/commit/bc473aa1f3d2bf9db49e688740a359492d4572eb))
+
## 0.336.0 (2025-09-24)
Full Changelog: [v0.335.0...v0.336.0](https://github.com/Increase/increase-java/compare/v0.335.0...v0.336.0)
diff --git a/README.md b/README.md
index 252319c51..6a76cad63 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.336.0)
-[](https://javadoc.io/doc/com.increase.api/increase-java/0.336.0)
+[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.337.0)
+[](https://javadoc.io/doc/com.increase.api/increase-java/0.337.0)
@@ -13,7 +13,7 @@ The Increase Java SDK is similar to the Increase Kotlin SDK but with minor diffe
-The REST API documentation can be found on [increase.com](https://increase.com/documentation). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.increase.api/increase-java/0.336.0).
+The REST API documentation can be found on [increase.com](https://increase.com/documentation). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.increase.api/increase-java/0.337.0).
@@ -24,7 +24,7 @@ The REST API documentation can be found on [increase.com](https://increase.com/d
### Gradle
```kotlin
-implementation("com.increase.api:increase-java:0.336.0")
+implementation("com.increase.api:increase-java:0.337.0")
```
### Maven
@@ -33,7 +33,7 @@ implementation("com.increase.api:increase-java:0.336.0")
com.increase.api
increase-java
- 0.336.0
+ 0.337.0
```
diff --git a/build.gradle.kts b/build.gradle.kts
index d7f918071..7faa62677 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "com.increase.api"
- version = "0.336.0" // x-release-please-version
+ version = "0.337.0" // x-release-please-version
}
subprojects {
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/eventsubscriptions/EventSubscriptionCreateParams.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/eventsubscriptions/EventSubscriptionCreateParams.kt
index 82a60cfe9..c6590a884 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/eventsubscriptions/EventSubscriptionCreateParams.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/eventsubscriptions/EventSubscriptionCreateParams.kt
@@ -64,6 +64,14 @@ private constructor(
*/
fun sharedSecret(): Optional = body.sharedSecret()
+ /**
+ * The status of the event subscription. Defaults to `active` if not specified.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun status(): Optional = body.status()
+
/**
* Returns the raw JSON value of [url].
*
@@ -94,6 +102,13 @@ private constructor(
*/
fun _sharedSecret(): JsonField = body._sharedSecret()
+ /**
+ * Returns the raw JSON value of [status].
+ *
+ * Unlike [status], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _status(): JsonField = body._status()
+
fun _additionalBodyProperties(): Map = body._additionalProperties()
/** Additional headers to send with the request. */
@@ -141,6 +156,8 @@ private constructor(
* - [oauthConnectionId]
* - [selectedEventCategory]
* - [sharedSecret]
+ * - [status]
+ * - etc.
*/
fun body(body: Body) = apply { this.body = body.toBuilder() }
@@ -210,6 +227,17 @@ private constructor(
body.sharedSecret(sharedSecret)
}
+ /** The status of the event subscription. Defaults to `active` if not specified. */
+ fun status(status: Status) = apply { body.status(status) }
+
+ /**
+ * Sets [Builder.status] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.status] with a well-typed [Status] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun status(status: JsonField) = apply { body.status(status) }
+
fun additionalBodyProperties(additionalBodyProperties: Map) = apply {
body.additionalProperties(additionalBodyProperties)
}
@@ -359,6 +387,7 @@ private constructor(
private val oauthConnectionId: JsonField,
private val selectedEventCategory: JsonField,
private val sharedSecret: JsonField,
+ private val status: JsonField,
private val additionalProperties: MutableMap,
) {
@@ -374,7 +403,15 @@ private constructor(
@JsonProperty("shared_secret")
@ExcludeMissing
sharedSecret: JsonField = JsonMissing.of(),
- ) : this(url, oauthConnectionId, selectedEventCategory, sharedSecret, mutableMapOf())
+ @JsonProperty("status") @ExcludeMissing status: JsonField = JsonMissing.of(),
+ ) : this(
+ url,
+ oauthConnectionId,
+ selectedEventCategory,
+ sharedSecret,
+ status,
+ mutableMapOf(),
+ )
/**
* The URL you'd like us to send webhooks to.
@@ -413,6 +450,14 @@ private constructor(
*/
fun sharedSecret(): Optional = sharedSecret.getOptional("shared_secret")
+ /**
+ * The status of the event subscription. Defaults to `active` if not specified.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun status(): Optional = status.getOptional("status")
+
/**
* Returns the raw JSON value of [url].
*
@@ -450,6 +495,13 @@ private constructor(
@ExcludeMissing
fun _sharedSecret(): JsonField = sharedSecret
+ /**
+ * Returns the raw JSON value of [status].
+ *
+ * Unlike [status], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("status") @ExcludeMissing fun _status(): JsonField = status
+
@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
additionalProperties.put(key, value)
@@ -482,6 +534,7 @@ private constructor(
private var oauthConnectionId: JsonField = JsonMissing.of()
private var selectedEventCategory: JsonField = JsonMissing.of()
private var sharedSecret: JsonField = JsonMissing.of()
+ private var status: JsonField = JsonMissing.of()
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
@@ -490,6 +543,7 @@ private constructor(
oauthConnectionId = body.oauthConnectionId
selectedEventCategory = body.selectedEventCategory
sharedSecret = body.sharedSecret
+ status = body.status
additionalProperties = body.additionalProperties.toMutableMap()
}
@@ -559,6 +613,18 @@ private constructor(
this.sharedSecret = sharedSecret
}
+ /** The status of the event subscription. Defaults to `active` if not specified. */
+ fun status(status: Status) = status(JsonField.of(status))
+
+ /**
+ * Sets [Builder.status] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.status] with a well-typed [Status] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun status(status: JsonField) = apply { this.status = status }
+
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
@@ -596,6 +662,7 @@ private constructor(
oauthConnectionId,
selectedEventCategory,
sharedSecret,
+ status,
additionalProperties.toMutableMap(),
)
}
@@ -611,6 +678,7 @@ private constructor(
oauthConnectionId()
selectedEventCategory().ifPresent { it.validate() }
sharedSecret()
+ status().ifPresent { it.validate() }
validated = true
}
@@ -633,7 +701,8 @@ private constructor(
(if (url.asKnown().isPresent) 1 else 0) +
(if (oauthConnectionId.asKnown().isPresent) 1 else 0) +
(selectedEventCategory.asKnown().getOrNull()?.validity() ?: 0) +
- (if (sharedSecret.asKnown().isPresent) 1 else 0)
+ (if (sharedSecret.asKnown().isPresent) 1 else 0) +
+ (status.asKnown().getOrNull()?.validity() ?: 0)
override fun equals(other: Any?): Boolean {
if (this === other) {
@@ -645,6 +714,7 @@ private constructor(
oauthConnectionId == other.oauthConnectionId &&
selectedEventCategory == other.selectedEventCategory &&
sharedSecret == other.sharedSecret &&
+ status == other.status &&
additionalProperties == other.additionalProperties
}
@@ -654,6 +724,7 @@ private constructor(
oauthConnectionId,
selectedEventCategory,
sharedSecret,
+ status,
additionalProperties,
)
}
@@ -661,7 +732,7 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "Body{url=$url, oauthConnectionId=$oauthConnectionId, selectedEventCategory=$selectedEventCategory, sharedSecret=$sharedSecret, additionalProperties=$additionalProperties}"
+ "Body{url=$url, oauthConnectionId=$oauthConnectionId, selectedEventCategory=$selectedEventCategory, sharedSecret=$sharedSecret, status=$status, additionalProperties=$additionalProperties}"
}
/**
@@ -1826,6 +1897,140 @@ private constructor(
override fun toString() = value.toString()
}
+ /** The status of the event subscription. Defaults to `active` if not specified. */
+ class Status @JsonCreator private constructor(private val value: JsonField) : Enum {
+
+ /**
+ * Returns this class instance's raw value.
+ *
+ * This is usually only useful if this instance was deserialized from data that doesn't
+ * match any known member, and you want to know that value. For example, if the SDK is on an
+ * older version than the API, then the API may respond with new members that the SDK is
+ * unaware of.
+ */
+ @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
+
+ companion object {
+
+ /** The subscription is active and Events will be delivered normally. */
+ @JvmField val ACTIVE = of("active")
+
+ /** The subscription is temporarily disabled and Events will not be delivered. */
+ @JvmField val DISABLED = of("disabled")
+
+ @JvmStatic fun of(value: String) = Status(JsonField.of(value))
+ }
+
+ /** An enum containing [Status]'s known values. */
+ enum class Known {
+ /** The subscription is active and Events will be delivered normally. */
+ ACTIVE,
+ /** The subscription is temporarily disabled and Events will not be delivered. */
+ DISABLED,
+ }
+
+ /**
+ * An enum containing [Status]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [Status] can contain an unknown value in a couple of cases:
+ * - It was deserialized from data that doesn't match any known member. For example, if the
+ * SDK is on an older version than the API, then the API may respond with new members that
+ * the SDK is unaware of.
+ * - It was constructed with an arbitrary value using the [of] method.
+ */
+ enum class Value {
+ /** The subscription is active and Events will be delivered normally. */
+ ACTIVE,
+ /** The subscription is temporarily disabled and Events will not be delivered. */
+ DISABLED,
+ /** An enum member indicating that [Status] was instantiated with an unknown value. */
+ _UNKNOWN,
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN]
+ * if the class was instantiated with an unknown value.
+ *
+ * Use the [known] method instead if you're certain the value is always known or if you want
+ * to throw for the unknown case.
+ */
+ fun value(): Value =
+ when (this) {
+ ACTIVE -> Value.ACTIVE
+ DISABLED -> Value.DISABLED
+ else -> Value._UNKNOWN
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value.
+ *
+ * Use the [value] method instead if you're uncertain the value is always known and don't
+ * want to throw for the unknown case.
+ *
+ * @throws IncreaseInvalidDataException if this class instance's value is a not a known
+ * member.
+ */
+ fun known(): Known =
+ when (this) {
+ ACTIVE -> Known.ACTIVE
+ DISABLED -> Known.DISABLED
+ else -> throw IncreaseInvalidDataException("Unknown Status: $value")
+ }
+
+ /**
+ * Returns this class instance's primitive wire representation.
+ *
+ * This differs from the [toString] method because that method is primarily for debugging
+ * and generally doesn't throw.
+ *
+ * @throws IncreaseInvalidDataException if this class instance's value does not have the
+ * expected primitive type.
+ */
+ fun asString(): String =
+ _value().asString().orElseThrow {
+ IncreaseInvalidDataException("Value is not a String")
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): Status = apply {
+ if (validated) {
+ return@apply
+ }
+
+ known()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: IncreaseInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is Status && value == other.value
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/eventsubscriptions/EventSubscriptionCreateParamsTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/eventsubscriptions/EventSubscriptionCreateParamsTest.kt
index 1fc6c55fb..afdf02450 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/models/eventsubscriptions/EventSubscriptionCreateParamsTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/models/eventsubscriptions/EventSubscriptionCreateParamsTest.kt
@@ -16,6 +16,7 @@ internal class EventSubscriptionCreateParamsTest {
EventSubscriptionCreateParams.SelectedEventCategory.ACCOUNT_CREATED
)
.sharedSecret("x")
+ .status(EventSubscriptionCreateParams.Status.ACTIVE)
.build()
}
@@ -29,6 +30,7 @@ internal class EventSubscriptionCreateParamsTest {
EventSubscriptionCreateParams.SelectedEventCategory.ACCOUNT_CREATED
)
.sharedSecret("x")
+ .status(EventSubscriptionCreateParams.Status.ACTIVE)
.build()
val body = params._body()
@@ -38,6 +40,7 @@ internal class EventSubscriptionCreateParamsTest {
assertThat(body.selectedEventCategory())
.contains(EventSubscriptionCreateParams.SelectedEventCategory.ACCOUNT_CREATED)
assertThat(body.sharedSecret()).contains("x")
+ assertThat(body.status()).contains(EventSubscriptionCreateParams.Status.ACTIVE)
}
@Test
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/EventSubscriptionServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/EventSubscriptionServiceAsyncTest.kt
index ff530572e..93b9bd618 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/EventSubscriptionServiceAsyncTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/EventSubscriptionServiceAsyncTest.kt
@@ -30,6 +30,7 @@ internal class EventSubscriptionServiceAsyncTest {
EventSubscriptionCreateParams.SelectedEventCategory.ACCOUNT_CREATED
)
.sharedSecret("x")
+ .status(EventSubscriptionCreateParams.Status.ACTIVE)
.build()
)
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/EventSubscriptionServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/EventSubscriptionServiceTest.kt
index 97ff10808..6f1e4eb22 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/EventSubscriptionServiceTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/EventSubscriptionServiceTest.kt
@@ -30,6 +30,7 @@ internal class EventSubscriptionServiceTest {
EventSubscriptionCreateParams.SelectedEventCategory.ACCOUNT_CREATED
)
.sharedSecret("x")
+ .status(EventSubscriptionCreateParams.Status.ACTIVE)
.build()
)