From d83efc457327b2747602f8e028afbe0d24eb1d7d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Feb 2026 19:46:12 +0000 Subject: [PATCH 1/2] fix(types): remove brand field from ElementalContent model --- .stats.yml | 4 +- .../com/courier/models/ElementalContent.kt | 45 ++----------------- .../courier/models/ElementalContentTest.kt | 3 -- .../tenants/PutTenantTemplateRequestTest.kt | 3 -- .../models/tenants/TenantTemplateInputTest.kt | 3 -- .../templates/TemplateReplaceParamsTest.kt | 3 -- .../async/tenants/TemplateServiceAsyncTest.kt | 1 - .../blocking/tenants/TemplateServiceTest.kt | 1 - 8 files changed, 6 insertions(+), 57 deletions(-) diff --git a/.stats.yml b/.stats.yml index 17749e26..290f28d8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 81 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-3fc1c86b4a83a16393aaf17d1fb3ac6098d30dd057ba872973b57285a7a3f0d0.yml -openapi_spec_hash: 02a545d217b13399f311e99561f9de1d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-b3852cdd1020811766572923d26a6c95f4a538bf4c7268462b6ba39f34480b3e.yml +openapi_spec_hash: b2e2f2357342e9a6b16a591d0b946e38 config_hash: 0789c3cddc625bb9712b3bded274ab6c diff --git a/courier-java-core/src/main/kotlin/com/courier/models/ElementalContent.kt b/courier-java-core/src/main/kotlin/com/courier/models/ElementalContent.kt index ec80329c..e3659f80 100644 --- a/courier-java-core/src/main/kotlin/com/courier/models/ElementalContent.kt +++ b/courier-java-core/src/main/kotlin/com/courier/models/ElementalContent.kt @@ -16,7 +16,6 @@ import com.fasterxml.jackson.annotation.JsonCreator import com.fasterxml.jackson.annotation.JsonProperty import java.util.Collections import java.util.Objects -import java.util.Optional import kotlin.jvm.optionals.getOrNull class ElementalContent @@ -24,7 +23,6 @@ class ElementalContent private constructor( private val elements: JsonField>, private val version: JsonField, - private val brand: JsonField, private val additionalProperties: MutableMap, ) { @@ -34,8 +32,7 @@ private constructor( @ExcludeMissing elements: JsonField> = JsonMissing.of(), @JsonProperty("version") @ExcludeMissing version: JsonField = JsonMissing.of(), - @JsonProperty("brand") @ExcludeMissing brand: JsonField = JsonMissing.of(), - ) : this(elements, version, brand, mutableMapOf()) + ) : this(elements, version, mutableMapOf()) /** * @throws CourierInvalidDataException if the JSON field has an unexpected type or is @@ -51,12 +48,6 @@ private constructor( */ fun version(): String = version.getRequired("version") - /** - * @throws CourierInvalidDataException if the JSON field has an unexpected type (e.g. if the - * server responded with an unexpected value). - */ - fun brand(): Optional = brand.getOptional("brand") - /** * Returns the raw JSON value of [elements]. * @@ -73,13 +64,6 @@ private constructor( */ @JsonProperty("version") @ExcludeMissing fun _version(): JsonField = version - /** - * Returns the raw JSON value of [brand]. - * - * Unlike [brand], this method doesn't throw if the JSON field has an unexpected type. - */ - @JsonProperty("brand") @ExcludeMissing fun _brand(): JsonField = brand - @JsonAnySetter private fun putAdditionalProperty(key: String, value: JsonValue) { additionalProperties.put(key, value) @@ -111,14 +95,12 @@ private constructor( private var elements: JsonField>? = null private var version: JsonField? = null - private var brand: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(elementalContent: ElementalContent) = apply { elements = elementalContent.elements.map { it.toMutableList() } version = elementalContent.version - brand = elementalContent.brand additionalProperties = elementalContent.additionalProperties.toMutableMap() } @@ -205,19 +187,6 @@ private constructor( */ fun version(version: JsonField) = apply { this.version = version } - fun brand(brand: String?) = brand(JsonField.ofNullable(brand)) - - /** Alias for calling [Builder.brand] with `brand.orElse(null)`. */ - fun brand(brand: Optional) = brand(brand.getOrNull()) - - /** - * Sets [Builder.brand] to an arbitrary JSON value. - * - * You should usually call [Builder.brand] with a well-typed [String] value instead. This - * method is primarily for setting the field to an undocumented or not yet supported value. - */ - fun brand(brand: JsonField) = apply { this.brand = brand } - fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() putAllAdditionalProperties(additionalProperties) @@ -254,7 +223,6 @@ private constructor( ElementalContent( checkRequired("elements", elements).map { it.toImmutable() }, checkRequired("version", version), - brand, additionalProperties.toMutableMap(), ) } @@ -268,7 +236,6 @@ private constructor( elements().forEach { it.validate() } version() - brand() validated = true } @@ -288,8 +255,7 @@ private constructor( @JvmSynthetic internal fun validity(): Int = (elements.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) + - (if (version.asKnown().isPresent) 1 else 0) + - (if (brand.asKnown().isPresent) 1 else 0) + (if (version.asKnown().isPresent) 1 else 0) override fun equals(other: Any?): Boolean { if (this === other) { @@ -299,16 +265,13 @@ private constructor( return other is ElementalContent && elements == other.elements && version == other.version && - brand == other.brand && additionalProperties == other.additionalProperties } - private val hashCode: Int by lazy { - Objects.hash(elements, version, brand, additionalProperties) - } + private val hashCode: Int by lazy { Objects.hash(elements, version, additionalProperties) } override fun hashCode(): Int = hashCode override fun toString() = - "ElementalContent{elements=$elements, version=$version, brand=$brand, additionalProperties=$additionalProperties}" + "ElementalContent{elements=$elements, version=$version, additionalProperties=$additionalProperties}" } diff --git a/courier-java-core/src/test/kotlin/com/courier/models/ElementalContentTest.kt b/courier-java-core/src/test/kotlin/com/courier/models/ElementalContentTest.kt index a765f80b..23b91a30 100644 --- a/courier-java-core/src/test/kotlin/com/courier/models/ElementalContentTest.kt +++ b/courier-java-core/src/test/kotlin/com/courier/models/ElementalContentTest.kt @@ -23,7 +23,6 @@ internal class ElementalContentTest { .build() ) .version("version") - .brand("brand") .build() assertThat(elementalContent.elements()) @@ -39,7 +38,6 @@ internal class ElementalContentTest { ) ) assertThat(elementalContent.version()).isEqualTo("version") - assertThat(elementalContent.brand()).contains("brand") } @Test @@ -57,7 +55,6 @@ internal class ElementalContentTest { .build() ) .version("version") - .brand("brand") .build() val roundtrippedElementalContent = diff --git a/courier-java-core/src/test/kotlin/com/courier/models/tenants/PutTenantTemplateRequestTest.kt b/courier-java-core/src/test/kotlin/com/courier/models/tenants/PutTenantTemplateRequestTest.kt index 622c096b..e3120505 100644 --- a/courier-java-core/src/test/kotlin/com/courier/models/tenants/PutTenantTemplateRequestTest.kt +++ b/courier-java-core/src/test/kotlin/com/courier/models/tenants/PutTenantTemplateRequestTest.kt @@ -31,7 +31,6 @@ internal class PutTenantTemplateRequestTest { .build() ) .version("version") - .brand("brand") .build() ) .channels( @@ -113,7 +112,6 @@ internal class PutTenantTemplateRequestTest { .build() ) .version("version") - .brand("brand") .build() ) .channels( @@ -199,7 +197,6 @@ internal class PutTenantTemplateRequestTest { .build() ) .version("version") - .brand("brand") .build() ) .channels( diff --git a/courier-java-core/src/test/kotlin/com/courier/models/tenants/TenantTemplateInputTest.kt b/courier-java-core/src/test/kotlin/com/courier/models/tenants/TenantTemplateInputTest.kt index 2d4ec449..d649872b 100644 --- a/courier-java-core/src/test/kotlin/com/courier/models/tenants/TenantTemplateInputTest.kt +++ b/courier-java-core/src/test/kotlin/com/courier/models/tenants/TenantTemplateInputTest.kt @@ -29,7 +29,6 @@ internal class TenantTemplateInputTest { .build() ) .version("version") - .brand("brand") .build() ) .channels( @@ -106,7 +105,6 @@ internal class TenantTemplateInputTest { .build() ) .version("version") - .brand("brand") .build() ) assertThat(tenantTemplateInput.channels()) @@ -190,7 +188,6 @@ internal class TenantTemplateInputTest { .build() ) .version("version") - .brand("brand") .build() ) .channels( diff --git a/courier-java-core/src/test/kotlin/com/courier/models/tenants/templates/TemplateReplaceParamsTest.kt b/courier-java-core/src/test/kotlin/com/courier/models/tenants/templates/TemplateReplaceParamsTest.kt index 63c580af..67cf9e87 100644 --- a/courier-java-core/src/test/kotlin/com/courier/models/tenants/templates/TemplateReplaceParamsTest.kt +++ b/courier-java-core/src/test/kotlin/com/courier/models/tenants/templates/TemplateReplaceParamsTest.kt @@ -34,7 +34,6 @@ internal class TemplateReplaceParamsTest { .build() ) .version("version") - .brand("brand") .build() ) .channels( @@ -154,7 +153,6 @@ internal class TemplateReplaceParamsTest { .build() ) .version("version") - .brand("brand") .build() ) .channels( @@ -243,7 +241,6 @@ internal class TemplateReplaceParamsTest { .build() ) .version("version") - .brand("brand") .build() ) .channels( diff --git a/courier-java-core/src/test/kotlin/com/courier/services/async/tenants/TemplateServiceAsyncTest.kt b/courier-java-core/src/test/kotlin/com/courier/services/async/tenants/TemplateServiceAsyncTest.kt index 624ac794..2055b8c0 100644 --- a/courier-java-core/src/test/kotlin/com/courier/services/async/tenants/TemplateServiceAsyncTest.kt +++ b/courier-java-core/src/test/kotlin/com/courier/services/async/tenants/TemplateServiceAsyncTest.kt @@ -123,7 +123,6 @@ internal class TemplateServiceAsyncTest { .build() ) .version("version") - .brand("brand") .build() ) .channels( diff --git a/courier-java-core/src/test/kotlin/com/courier/services/blocking/tenants/TemplateServiceTest.kt b/courier-java-core/src/test/kotlin/com/courier/services/blocking/tenants/TemplateServiceTest.kt index 1c9f6df7..03c6e6a5 100644 --- a/courier-java-core/src/test/kotlin/com/courier/services/blocking/tenants/TemplateServiceTest.kt +++ b/courier-java-core/src/test/kotlin/com/courier/services/blocking/tenants/TemplateServiceTest.kt @@ -120,7 +120,6 @@ internal class TemplateServiceTest { .build() ) .version("version") - .brand("brand") .build() ) .channels( From cd5c2f4fe47a6c496ca73d00319f3e54a7ebdf5f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Feb 2026 19:46:31 +0000 Subject: [PATCH 2/2] release: 4.9.2 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ README.md | 10 +++++----- build.gradle.kts | 2 +- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 0056f0ab..ffa3627e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.9.1" + ".": "4.9.2" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index d183d7d5..b2c57ce4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 4.9.2 (2026-02-12) + +Full Changelog: [v4.9.1...v4.9.2](https://github.com/trycourier/courier-java/compare/v4.9.1...v4.9.2) + +### Bug Fixes + +* **types:** remove brand field from ElementalContent model ([d83efc4](https://github.com/trycourier/courier-java/commit/d83efc457327b2747602f8e028afbe0d24eb1d7d)) + ## 4.9.1 (2026-02-07) Full Changelog: [v4.9.0...v4.9.1](https://github.com/trycourier/courier-java/compare/v4.9.0...v4.9.1) diff --git a/README.md b/README.md index cfa93e12..8eaa7a7f 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ -[![Maven Central](https://img.shields.io/maven-central/v/com.courier/courier-java)](https://central.sonatype.com/artifact/com.courier/courier-java/4.9.1) -[![javadoc](https://javadoc.io/badge2/com.courier/courier-java/4.9.1/javadoc.svg)](https://javadoc.io/doc/com.courier/courier-java/4.9.1) +[![Maven Central](https://img.shields.io/maven-central/v/com.courier/courier-java)](https://central.sonatype.com/artifact/com.courier/courier-java/4.9.2) +[![javadoc](https://javadoc.io/badge2/com.courier/courier-java/4.9.2/javadoc.svg)](https://javadoc.io/doc/com.courier/courier-java/4.9.2) @@ -13,7 +13,7 @@ It is generated with [Stainless](https://www.stainless.com/). -The REST API documentation can be found on [www.courier.com](https://www.courier.com/docs). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.courier/courier-java/4.9.1). +The REST API documentation can be found on [www.courier.com](https://www.courier.com/docs). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.courier/courier-java/4.9.2). @@ -24,7 +24,7 @@ The REST API documentation can be found on [www.courier.com](https://www.courier ### Gradle ```kotlin -implementation("com.courier:courier-java:4.9.1") +implementation("com.courier:courier-java:4.9.2") ``` ### Maven @@ -33,7 +33,7 @@ implementation("com.courier:courier-java:4.9.1") com.courier courier-java - 4.9.1 + 4.9.2 ``` diff --git a/build.gradle.kts b/build.gradle.kts index aae0be02..411f5286 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ repositories { allprojects { group = "com.courier" - version = "4.9.1" // x-release-please-version + version = "4.9.2" // x-release-please-version } subprojects {