diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 79c939347..179ae823c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.410.0" + ".": "0.411.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 258e4a3f9..0cc36c41d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-46a90f99726aa861d06ec56fb73592b4dcb4499d5a765d1a10dfc9619446306f.yml -openapi_spec_hash: 8406b96c39c72de064a810c393c00554 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-cfc57f9c5bccf2918dfb5fc56fb6b6fd1eadd851f037b6873ba4e2442d5c8126.yml +openapi_spec_hash: 7e54b69798d6a1487474ed229a83c6fc config_hash: 27e44ed36b9c5617b580ead7231a594a diff --git a/CHANGELOG.md b/CHANGELOG.md index 44c3710d7..77c7b20f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.411.0 (2026-01-30) + +Full Changelog: [v0.410.0...v0.411.0](https://github.com/Increase/increase-java/compare/v0.410.0...v0.411.0) + +### Features + +* **api:** api update ([d9bd1b1](https://github.com/Increase/increase-java/commit/d9bd1b1c38d3fc70a5625a4642a62c9ea02e822b)) + ## 0.410.0 (2026-01-30) Full Changelog: [v0.409.0...v0.410.0](https://github.com/Increase/increase-java/compare/v0.409.0...v0.410.0) diff --git a/README.md b/README.md index cdbb5668a..1fd8fb4b6 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ -[![Maven Central](https://img.shields.io/maven-central/v/com.increase.api/increase-java)](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.410.0) -[![javadoc](https://javadoc.io/badge2/com.increase.api/increase-java/0.410.0/javadoc.svg)](https://javadoc.io/doc/com.increase.api/increase-java/0.410.0) +[![Maven Central](https://img.shields.io/maven-central/v/com.increase.api/increase-java)](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.411.0) +[![javadoc](https://javadoc.io/badge2/com.increase.api/increase-java/0.411.0/javadoc.svg)](https://javadoc.io/doc/com.increase.api/increase-java/0.411.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.410.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.411.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.410.0") +implementation("com.increase.api:increase-java:0.411.0") ``` ### Maven @@ -33,7 +33,7 @@ implementation("com.increase.api:increase-java:0.410.0") com.increase.api increase-java - 0.410.0 + 0.411.0 ``` diff --git a/build.gradle.kts b/build.gradle.kts index 7d9208068..e6d87ef66 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ repositories { allprojects { group = "com.increase.api" - version = "0.410.0" // x-release-please-version + version = "0.411.0" // x-release-please-version } subprojects { diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/accounts/Account.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/accounts/Account.kt index 9b2de97fe..17e1323dc 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/accounts/Account.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/accounts/Account.kt @@ -168,10 +168,10 @@ private constructor( /** * Whether the Account is funded by a loan or by deposits. * - * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the - * server responded with an unexpected value). + * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected value). */ - fun funding(): Optional = funding.getOptional("funding") + fun funding(): Funding = funding.getRequired("funding") /** * The idempotency key you chose for this object. This value is unique across Increase and is @@ -597,10 +597,7 @@ private constructor( fun entityId(entityId: JsonField) = apply { this.entityId = entityId } /** Whether the Account is funded by a loan or by deposits. */ - fun funding(funding: Funding?) = funding(JsonField.ofNullable(funding)) - - /** Alias for calling [Builder.funding] with `funding.orElse(null)`. */ - fun funding(funding: Optional) = funding(funding.getOrNull()) + fun funding(funding: Funding) = funding(JsonField.of(funding)) /** * Sets [Builder.funding] to an arbitrary JSON value. @@ -865,7 +862,7 @@ private constructor( createdAt() currency().validate() entityId() - funding().ifPresent { it.validate() } + funding().validate() idempotencyKey() informationalEntityId() interestAccrued() diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/accounts/AccountListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/accounts/AccountListPageResponseTest.kt index 34b128abb..1e777abdb 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/accounts/AccountListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/accounts/AccountListPageResponseTest.kt @@ -24,7 +24,7 @@ internal class AccountListPageResponseTest { .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .currency(Account.Currency.USD) .entityId("entity_n8y8tnk2p9339ti393yi") - .funding(null) + .funding(Account.Funding.DEPOSITS) .idempotencyKey(null) .informationalEntityId(null) .interestAccrued("0.01") @@ -58,7 +58,7 @@ internal class AccountListPageResponseTest { .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .currency(Account.Currency.USD) .entityId("entity_n8y8tnk2p9339ti393yi") - .funding(null) + .funding(Account.Funding.DEPOSITS) .idempotencyKey(null) .informationalEntityId(null) .interestAccrued("0.01") @@ -96,7 +96,7 @@ internal class AccountListPageResponseTest { .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .currency(Account.Currency.USD) .entityId("entity_n8y8tnk2p9339ti393yi") - .funding(null) + .funding(Account.Funding.DEPOSITS) .idempotencyKey(null) .informationalEntityId(null) .interestAccrued("0.01") diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/accounts/AccountTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/accounts/AccountTest.kt index e463c7198..eab8abc39 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/accounts/AccountTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/accounts/AccountTest.kt @@ -22,7 +22,7 @@ internal class AccountTest { .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .currency(Account.Currency.USD) .entityId("entity_n8y8tnk2p9339ti393yi") - .funding(null) + .funding(Account.Funding.DEPOSITS) .idempotencyKey(null) .informationalEntityId(null) .interestAccrued("0.01") @@ -50,7 +50,7 @@ internal class AccountTest { assertThat(account.createdAt()).isEqualTo(OffsetDateTime.parse("2020-01-31T23:59:59Z")) assertThat(account.currency()).isEqualTo(Account.Currency.USD) assertThat(account.entityId()).isEqualTo("entity_n8y8tnk2p9339ti393yi") - assertThat(account.funding()).isEmpty + assertThat(account.funding()).isEqualTo(Account.Funding.DEPOSITS) assertThat(account.idempotencyKey()).isEmpty assertThat(account.informationalEntityId()).isEmpty assertThat(account.interestAccrued()).isEqualTo("0.01") @@ -84,7 +84,7 @@ internal class AccountTest { .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .currency(Account.Currency.USD) .entityId("entity_n8y8tnk2p9339ti393yi") - .funding(null) + .funding(Account.Funding.DEPOSITS) .idempotencyKey(null) .informationalEntityId(null) .interestAccrued("0.01") diff --git a/increase-java-proguard-test/src/test/kotlin/com/increase/api/proguard/ProGuardCompatibilityTest.kt b/increase-java-proguard-test/src/test/kotlin/com/increase/api/proguard/ProGuardCompatibilityTest.kt index b63ca5d7c..fd5fa79c7 100644 --- a/increase-java-proguard-test/src/test/kotlin/com/increase/api/proguard/ProGuardCompatibilityTest.kt +++ b/increase-java-proguard-test/src/test/kotlin/com/increase/api/proguard/ProGuardCompatibilityTest.kt @@ -120,7 +120,7 @@ internal class ProGuardCompatibilityTest { .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .currency(Account.Currency.USD) .entityId("entity_n8y8tnk2p9339ti393yi") - .funding(null) + .funding(Account.Funding.DEPOSITS) .idempotencyKey(null) .informationalEntityId(null) .interestAccrued("0.01")