diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 1eb441221..000901257 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.505.0"
+ ".": "0.506.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 8e99a7e66..cc2badb61 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 236
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-07202bc3c027c441ab8829ab0e32c1547952d4cae1691fe00497ee3b056127d0.yml
-openapi_spec_hash: 3c21b26cf5803678876c00c40e88c781
-config_hash: 4945e03affdf289484733306e4797f81
+configured_endpoints: 241
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8bbf0093efa65975131da3735f2adc0ec05432cde8c05e9c9796bc7d553103ae.yml
+openapi_spec_hash: 5080ba849a5b100ace3bec9da24d4dc7
+config_hash: d48e9f65bcf642f92610034d6c43f07a
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cd0f1999d..5f8a78a4b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## 0.506.0 (2026-04-09)
+
+Full Changelog: [v0.505.0...v0.506.0](https://github.com/Increase/increase-java/compare/v0.505.0...v0.506.0)
+
+### Features
+
+* **api:** api update ([2c87ea8](https://github.com/Increase/increase-java/commit/2c87ea8437e7121a883cf59fa87da7fc2ebeed7d))
+
## 0.505.0 (2026-04-07)
Full Changelog: [v0.504.0...v0.505.0](https://github.com/Increase/increase-java/compare/v0.504.0...v0.505.0)
diff --git a/README.md b/README.md
index 20c037e96..bbbc72259 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.505.0)
-[](https://javadoc.io/doc/com.increase.api/increase-java/0.505.0)
+[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.506.0)
+[](https://javadoc.io/doc/com.increase.api/increase-java/0.506.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.505.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.506.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.505.0")
+implementation("com.increase.api:increase-java:0.506.0")
```
### Maven
@@ -33,7 +33,7 @@ implementation("com.increase.api:increase-java:0.505.0")
com.increase.api
increase-java
- 0.505.0
+ 0.506.0
```
diff --git a/build.gradle.kts b/build.gradle.kts
index da7837d72..fca776d63 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "com.increase.api"
- version = "0.505.0" // x-release-please-version
+ version = "0.506.0" // x-release-please-version
}
subprojects {
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClient.kt b/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClient.kt
index c9f7ae440..afd764ab5 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClient.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClient.kt
@@ -25,6 +25,7 @@ import com.increase.api.services.blocking.CheckTransferService
import com.increase.api.services.blocking.DeclinedTransactionService
import com.increase.api.services.blocking.DigitalCardProfileService
import com.increase.api.services.blocking.DigitalWalletTokenService
+import com.increase.api.services.blocking.EntityOnboardingSessionService
import com.increase.api.services.blocking.EntityService
import com.increase.api.services.blocking.EventService
import com.increase.api.services.blocking.EventSubscriptionService
@@ -171,6 +172,8 @@ interface IncreaseClient {
fun supplementalDocuments(): SupplementalDocumentService
+ fun entityOnboardingSessions(): EntityOnboardingSessionService
+
fun programs(): ProgramService
fun accountStatements(): AccountStatementService
@@ -311,6 +314,8 @@ interface IncreaseClient {
fun supplementalDocuments(): SupplementalDocumentService.WithRawResponse
+ fun entityOnboardingSessions(): EntityOnboardingSessionService.WithRawResponse
+
fun programs(): ProgramService.WithRawResponse
fun accountStatements(): AccountStatementService.WithRawResponse
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientAsync.kt
index d414e0d64..0f74f0f91 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientAsync.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientAsync.kt
@@ -25,6 +25,7 @@ import com.increase.api.services.async.CheckTransferServiceAsync
import com.increase.api.services.async.DeclinedTransactionServiceAsync
import com.increase.api.services.async.DigitalCardProfileServiceAsync
import com.increase.api.services.async.DigitalWalletTokenServiceAsync
+import com.increase.api.services.async.EntityOnboardingSessionServiceAsync
import com.increase.api.services.async.EntityServiceAsync
import com.increase.api.services.async.EventServiceAsync
import com.increase.api.services.async.EventSubscriptionServiceAsync
@@ -171,6 +172,8 @@ interface IncreaseClientAsync {
fun supplementalDocuments(): SupplementalDocumentServiceAsync
+ fun entityOnboardingSessions(): EntityOnboardingSessionServiceAsync
+
fun programs(): ProgramServiceAsync
fun accountStatements(): AccountStatementServiceAsync
@@ -315,6 +318,8 @@ interface IncreaseClientAsync {
fun supplementalDocuments(): SupplementalDocumentServiceAsync.WithRawResponse
+ fun entityOnboardingSessions(): EntityOnboardingSessionServiceAsync.WithRawResponse
+
fun programs(): ProgramServiceAsync.WithRawResponse
fun accountStatements(): AccountStatementServiceAsync.WithRawResponse
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientAsyncImpl.kt
index e7352caae..19629f4e2 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientAsyncImpl.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientAsyncImpl.kt
@@ -48,6 +48,8 @@ import com.increase.api.services.async.DigitalCardProfileServiceAsync
import com.increase.api.services.async.DigitalCardProfileServiceAsyncImpl
import com.increase.api.services.async.DigitalWalletTokenServiceAsync
import com.increase.api.services.async.DigitalWalletTokenServiceAsyncImpl
+import com.increase.api.services.async.EntityOnboardingSessionServiceAsync
+import com.increase.api.services.async.EntityOnboardingSessionServiceAsyncImpl
import com.increase.api.services.async.EntityServiceAsync
import com.increase.api.services.async.EntityServiceAsyncImpl
import com.increase.api.services.async.EventServiceAsync
@@ -282,6 +284,10 @@ class IncreaseClientAsyncImpl(private val clientOptions: ClientOptions) : Increa
SupplementalDocumentServiceAsyncImpl(clientOptionsWithUserAgent)
}
+ private val entityOnboardingSessions: EntityOnboardingSessionServiceAsync by lazy {
+ EntityOnboardingSessionServiceAsyncImpl(clientOptionsWithUserAgent)
+ }
+
private val programs: ProgramServiceAsync by lazy {
ProgramServiceAsyncImpl(clientOptionsWithUserAgent)
}
@@ -452,6 +458,9 @@ class IncreaseClientAsyncImpl(private val clientOptions: ClientOptions) : Increa
override fun supplementalDocuments(): SupplementalDocumentServiceAsync = supplementalDocuments
+ override fun entityOnboardingSessions(): EntityOnboardingSessionServiceAsync =
+ entityOnboardingSessions
+
override fun programs(): ProgramServiceAsync = programs
override fun accountStatements(): AccountStatementServiceAsync = accountStatements
@@ -652,6 +661,11 @@ class IncreaseClientAsyncImpl(private val clientOptions: ClientOptions) : Increa
SupplementalDocumentServiceAsyncImpl.WithRawResponseImpl(clientOptions)
}
+ private val entityOnboardingSessions:
+ EntityOnboardingSessionServiceAsync.WithRawResponse by lazy {
+ EntityOnboardingSessionServiceAsyncImpl.WithRawResponseImpl(clientOptions)
+ }
+
private val programs: ProgramServiceAsync.WithRawResponse by lazy {
ProgramServiceAsyncImpl.WithRawResponseImpl(clientOptions)
}
@@ -841,6 +855,9 @@ class IncreaseClientAsyncImpl(private val clientOptions: ClientOptions) : Increa
override fun supplementalDocuments(): SupplementalDocumentServiceAsync.WithRawResponse =
supplementalDocuments
+ override fun entityOnboardingSessions():
+ EntityOnboardingSessionServiceAsync.WithRawResponse = entityOnboardingSessions
+
override fun programs(): ProgramServiceAsync.WithRawResponse = programs
override fun accountStatements(): AccountStatementServiceAsync.WithRawResponse =
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientImpl.kt
index a2aca3a2e..306af6c3b 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientImpl.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientImpl.kt
@@ -48,6 +48,8 @@ import com.increase.api.services.blocking.DigitalCardProfileService
import com.increase.api.services.blocking.DigitalCardProfileServiceImpl
import com.increase.api.services.blocking.DigitalWalletTokenService
import com.increase.api.services.blocking.DigitalWalletTokenServiceImpl
+import com.increase.api.services.blocking.EntityOnboardingSessionService
+import com.increase.api.services.blocking.EntityOnboardingSessionServiceImpl
import com.increase.api.services.blocking.EntityService
import com.increase.api.services.blocking.EntityServiceImpl
import com.increase.api.services.blocking.EventService
@@ -275,6 +277,10 @@ class IncreaseClientImpl(private val clientOptions: ClientOptions) : IncreaseCli
SupplementalDocumentServiceImpl(clientOptionsWithUserAgent)
}
+ private val entityOnboardingSessions: EntityOnboardingSessionService by lazy {
+ EntityOnboardingSessionServiceImpl(clientOptionsWithUserAgent)
+ }
+
private val programs: ProgramService by lazy { ProgramServiceImpl(clientOptionsWithUserAgent) }
private val accountStatements: AccountStatementService by lazy {
@@ -435,6 +441,9 @@ class IncreaseClientImpl(private val clientOptions: ClientOptions) : IncreaseCli
override fun supplementalDocuments(): SupplementalDocumentService = supplementalDocuments
+ override fun entityOnboardingSessions(): EntityOnboardingSessionService =
+ entityOnboardingSessions
+
override fun programs(): ProgramService = programs
override fun accountStatements(): AccountStatementService = accountStatements
@@ -632,6 +641,11 @@ class IncreaseClientImpl(private val clientOptions: ClientOptions) : IncreaseCli
SupplementalDocumentServiceImpl.WithRawResponseImpl(clientOptions)
}
+ private val entityOnboardingSessions:
+ EntityOnboardingSessionService.WithRawResponse by lazy {
+ EntityOnboardingSessionServiceImpl.WithRawResponseImpl(clientOptions)
+ }
+
private val programs: ProgramService.WithRawResponse by lazy {
ProgramServiceImpl.WithRawResponseImpl(clientOptions)
}
@@ -817,6 +831,9 @@ class IncreaseClientImpl(private val clientOptions: ClientOptions) : IncreaseCli
override fun supplementalDocuments(): SupplementalDocumentService.WithRawResponse =
supplementalDocuments
+ override fun entityOnboardingSessions(): EntityOnboardingSessionService.WithRawResponse =
+ entityOnboardingSessions
+
override fun programs(): ProgramService.WithRawResponse = programs
override fun accountStatements(): AccountStatementService.WithRawResponse =
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/entityonboardingsessions/EntityOnboardingSession.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/entityonboardingsessions/EntityOnboardingSession.kt
new file mode 100644
index 000000000..5051e42b3
--- /dev/null
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/entityonboardingsessions/EntityOnboardingSession.kt
@@ -0,0 +1,861 @@
+// File generated from our OpenAPI spec by Stainless.
+
+package com.increase.api.models.entityonboardingsessions
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter
+import com.fasterxml.jackson.annotation.JsonAnySetter
+import com.fasterxml.jackson.annotation.JsonCreator
+import com.fasterxml.jackson.annotation.JsonProperty
+import com.increase.api.core.Enum
+import com.increase.api.core.ExcludeMissing
+import com.increase.api.core.JsonField
+import com.increase.api.core.JsonMissing
+import com.increase.api.core.JsonValue
+import com.increase.api.core.checkRequired
+import com.increase.api.errors.IncreaseInvalidDataException
+import java.time.OffsetDateTime
+import java.util.Collections
+import java.util.Objects
+import java.util.Optional
+import kotlin.jvm.optionals.getOrNull
+
+/**
+ * Entity Onboarding Sessions let your customers onboard themselves by completing Increase-hosted
+ * forms. Create a session and redirect your customer to the returned URL. When they're done,
+ * they'll be redirected back to your site. This API is used for
+ * [hosted onboarding](/documentation/hosted-onboarding).
+ */
+class EntityOnboardingSession
+@JsonCreator(mode = JsonCreator.Mode.DISABLED)
+private constructor(
+ private val id: JsonField,
+ private val createdAt: JsonField,
+ private val entityId: JsonField,
+ private val expiresAt: JsonField,
+ private val idempotencyKey: JsonField,
+ private val programId: JsonField,
+ private val redirectUrl: JsonField,
+ private val sessionUrl: JsonField,
+ private val status: JsonField,
+ private val type: JsonField,
+ private val additionalProperties: MutableMap,
+) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("id") @ExcludeMissing id: JsonField = JsonMissing.of(),
+ @JsonProperty("created_at")
+ @ExcludeMissing
+ createdAt: JsonField = JsonMissing.of(),
+ @JsonProperty("entity_id") @ExcludeMissing entityId: JsonField = JsonMissing.of(),
+ @JsonProperty("expires_at")
+ @ExcludeMissing
+ expiresAt: JsonField = JsonMissing.of(),
+ @JsonProperty("idempotency_key")
+ @ExcludeMissing
+ idempotencyKey: JsonField = JsonMissing.of(),
+ @JsonProperty("program_id") @ExcludeMissing programId: JsonField = JsonMissing.of(),
+ @JsonProperty("redirect_url")
+ @ExcludeMissing
+ redirectUrl: JsonField = JsonMissing.of(),
+ @JsonProperty("session_url")
+ @ExcludeMissing
+ sessionUrl: JsonField = JsonMissing.of(),
+ @JsonProperty("status") @ExcludeMissing status: JsonField = JsonMissing.of(),
+ @JsonProperty("type") @ExcludeMissing type: JsonField = JsonMissing.of(),
+ ) : this(
+ id,
+ createdAt,
+ entityId,
+ expiresAt,
+ idempotencyKey,
+ programId,
+ redirectUrl,
+ sessionUrl,
+ status,
+ type,
+ mutableMapOf(),
+ )
+
+ /**
+ * The Entity Onboarding Session's identifier.
+ *
+ * @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 id(): String = id.getRequired("id")
+
+ /**
+ * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the Entity
+ * Onboarding Session was created.
+ *
+ * @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 createdAt(): OffsetDateTime = createdAt.getRequired("created_at")
+
+ /**
+ * The identifier of the Entity associated with this session, if one has been created or was
+ * provided when creating the session.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun entityId(): Optional = entityId.getOptional("entity_id")
+
+ /**
+ * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the Entity
+ * Onboarding Session will expire.
+ *
+ * @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 expiresAt(): OffsetDateTime = expiresAt.getRequired("expires_at")
+
+ /**
+ * The idempotency key you chose for this object. This value is unique across Increase and is
+ * used to ensure that a request is only processed once. Learn more about
+ * [idempotency](https://increase.com/documentation/idempotency-keys).
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun idempotencyKey(): Optional = idempotencyKey.getOptional("idempotency_key")
+
+ /**
+ * The identifier of the Program the Entity will be onboarded to.
+ *
+ * @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 programId(): String = programId.getRequired("program_id")
+
+ /**
+ * The URL to redirect to after the onboarding session is complete. Increase will include the
+ * query parameters `entity_onboarding_session_id` and `entity_id` when redirecting.
+ *
+ * @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 redirectUrl(): String = redirectUrl.getRequired("redirect_url")
+
+ /**
+ * The URL containing the onboarding form. You should share this link with your customer. Only
+ * present when the session is active.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun sessionUrl(): Optional = sessionUrl.getOptional("session_url")
+
+ /**
+ * The status of the onboarding session.
+ *
+ * @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 status(): Status = status.getRequired("status")
+
+ /**
+ * A constant representing the object's type. For this resource it will always be
+ * `entity_onboarding_session`.
+ *
+ * @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 type(): Type = type.getRequired("type")
+
+ /**
+ * Returns the raw JSON value of [id].
+ *
+ * Unlike [id], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("id") @ExcludeMissing fun _id(): JsonField = id
+
+ /**
+ * Returns the raw JSON value of [createdAt].
+ *
+ * Unlike [createdAt], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("created_at")
+ @ExcludeMissing
+ fun _createdAt(): JsonField = createdAt
+
+ /**
+ * Returns the raw JSON value of [entityId].
+ *
+ * Unlike [entityId], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("entity_id") @ExcludeMissing fun _entityId(): JsonField = entityId
+
+ /**
+ * Returns the raw JSON value of [expiresAt].
+ *
+ * Unlike [expiresAt], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("expires_at")
+ @ExcludeMissing
+ fun _expiresAt(): JsonField = expiresAt
+
+ /**
+ * Returns the raw JSON value of [idempotencyKey].
+ *
+ * Unlike [idempotencyKey], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("idempotency_key")
+ @ExcludeMissing
+ fun _idempotencyKey(): JsonField = idempotencyKey
+
+ /**
+ * Returns the raw JSON value of [programId].
+ *
+ * Unlike [programId], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("program_id") @ExcludeMissing fun _programId(): JsonField = programId
+
+ /**
+ * Returns the raw JSON value of [redirectUrl].
+ *
+ * Unlike [redirectUrl], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("redirect_url")
+ @ExcludeMissing
+ fun _redirectUrl(): JsonField = redirectUrl
+
+ /**
+ * Returns the raw JSON value of [sessionUrl].
+ *
+ * Unlike [sessionUrl], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("session_url") @ExcludeMissing fun _sessionUrl(): JsonField = sessionUrl
+
+ /**
+ * 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
+
+ /**
+ * Returns the raw JSON value of [type].
+ *
+ * Unlike [type], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("type") @ExcludeMissing fun _type(): JsonField = type
+
+ @JsonAnySetter
+ private fun putAdditionalProperty(key: String, value: JsonValue) {
+ additionalProperties.put(key, value)
+ }
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map =
+ Collections.unmodifiableMap(additionalProperties)
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /**
+ * Returns a mutable builder for constructing an instance of [EntityOnboardingSession].
+ *
+ * The following fields are required:
+ * ```java
+ * .id()
+ * .createdAt()
+ * .entityId()
+ * .expiresAt()
+ * .idempotencyKey()
+ * .programId()
+ * .redirectUrl()
+ * .sessionUrl()
+ * .status()
+ * .type()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [EntityOnboardingSession]. */
+ class Builder internal constructor() {
+
+ private var id: JsonField? = null
+ private var createdAt: JsonField? = null
+ private var entityId: JsonField? = null
+ private var expiresAt: JsonField? = null
+ private var idempotencyKey: JsonField? = null
+ private var programId: JsonField? = null
+ private var redirectUrl: JsonField? = null
+ private var sessionUrl: JsonField? = null
+ private var status: JsonField? = null
+ private var type: JsonField? = null
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(entityOnboardingSession: EntityOnboardingSession) = apply {
+ id = entityOnboardingSession.id
+ createdAt = entityOnboardingSession.createdAt
+ entityId = entityOnboardingSession.entityId
+ expiresAt = entityOnboardingSession.expiresAt
+ idempotencyKey = entityOnboardingSession.idempotencyKey
+ programId = entityOnboardingSession.programId
+ redirectUrl = entityOnboardingSession.redirectUrl
+ sessionUrl = entityOnboardingSession.sessionUrl
+ status = entityOnboardingSession.status
+ type = entityOnboardingSession.type
+ additionalProperties = entityOnboardingSession.additionalProperties.toMutableMap()
+ }
+
+ /** The Entity Onboarding Session's identifier. */
+ fun id(id: String) = id(JsonField.of(id))
+
+ /**
+ * Sets [Builder.id] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.id] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun id(id: JsonField) = apply { this.id = id }
+
+ /**
+ * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the Entity
+ * Onboarding Session was created.
+ */
+ fun createdAt(createdAt: OffsetDateTime) = createdAt(JsonField.of(createdAt))
+
+ /**
+ * Sets [Builder.createdAt] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.createdAt] with a well-typed [OffsetDateTime] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun createdAt(createdAt: JsonField) = apply { this.createdAt = createdAt }
+
+ /**
+ * The identifier of the Entity associated with this session, if one has been created or was
+ * provided when creating the session.
+ */
+ fun entityId(entityId: String?) = entityId(JsonField.ofNullable(entityId))
+
+ /** Alias for calling [Builder.entityId] with `entityId.orElse(null)`. */
+ fun entityId(entityId: Optional) = entityId(entityId.getOrNull())
+
+ /**
+ * Sets [Builder.entityId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.entityId] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun entityId(entityId: JsonField) = apply { this.entityId = entityId }
+
+ /**
+ * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the Entity
+ * Onboarding Session will expire.
+ */
+ fun expiresAt(expiresAt: OffsetDateTime) = expiresAt(JsonField.of(expiresAt))
+
+ /**
+ * Sets [Builder.expiresAt] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.expiresAt] with a well-typed [OffsetDateTime] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun expiresAt(expiresAt: JsonField) = apply { this.expiresAt = expiresAt }
+
+ /**
+ * The idempotency key you chose for this object. This value is unique across Increase and
+ * is used to ensure that a request is only processed once. Learn more about
+ * [idempotency](https://increase.com/documentation/idempotency-keys).
+ */
+ fun idempotencyKey(idempotencyKey: String?) =
+ idempotencyKey(JsonField.ofNullable(idempotencyKey))
+
+ /** Alias for calling [Builder.idempotencyKey] with `idempotencyKey.orElse(null)`. */
+ fun idempotencyKey(idempotencyKey: Optional) =
+ idempotencyKey(idempotencyKey.getOrNull())
+
+ /**
+ * Sets [Builder.idempotencyKey] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.idempotencyKey] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun idempotencyKey(idempotencyKey: JsonField) = apply {
+ this.idempotencyKey = idempotencyKey
+ }
+
+ /** The identifier of the Program the Entity will be onboarded to. */
+ fun programId(programId: String) = programId(JsonField.of(programId))
+
+ /**
+ * Sets [Builder.programId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.programId] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun programId(programId: JsonField) = apply { this.programId = programId }
+
+ /**
+ * The URL to redirect to after the onboarding session is complete. Increase will include
+ * the query parameters `entity_onboarding_session_id` and `entity_id` when redirecting.
+ */
+ fun redirectUrl(redirectUrl: String) = redirectUrl(JsonField.of(redirectUrl))
+
+ /**
+ * Sets [Builder.redirectUrl] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.redirectUrl] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun redirectUrl(redirectUrl: JsonField) = apply { this.redirectUrl = redirectUrl }
+
+ /**
+ * The URL containing the onboarding form. You should share this link with your customer.
+ * Only present when the session is active.
+ */
+ fun sessionUrl(sessionUrl: String?) = sessionUrl(JsonField.ofNullable(sessionUrl))
+
+ /** Alias for calling [Builder.sessionUrl] with `sessionUrl.orElse(null)`. */
+ fun sessionUrl(sessionUrl: Optional) = sessionUrl(sessionUrl.getOrNull())
+
+ /**
+ * Sets [Builder.sessionUrl] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.sessionUrl] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun sessionUrl(sessionUrl: JsonField) = apply { this.sessionUrl = sessionUrl }
+
+ /** The status of the onboarding session. */
+ 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 }
+
+ /**
+ * A constant representing the object's type. For this resource it will always be
+ * `entity_onboarding_session`.
+ */
+ fun type(type: Type) = type(JsonField.of(type))
+
+ /**
+ * Sets [Builder.type] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.type] with a well-typed [Type] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun type(type: JsonField) = apply { this.type = type }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ putAllAdditionalProperties(additionalProperties)
+ }
+
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) }
+
+ fun removeAllAdditionalProperties(keys: Set) = apply {
+ keys.forEach(::removeAdditionalProperty)
+ }
+
+ /**
+ * Returns an immutable instance of [EntityOnboardingSession].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .id()
+ * .createdAt()
+ * .entityId()
+ * .expiresAt()
+ * .idempotencyKey()
+ * .programId()
+ * .redirectUrl()
+ * .sessionUrl()
+ * .status()
+ * .type()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): EntityOnboardingSession =
+ EntityOnboardingSession(
+ checkRequired("id", id),
+ checkRequired("createdAt", createdAt),
+ checkRequired("entityId", entityId),
+ checkRequired("expiresAt", expiresAt),
+ checkRequired("idempotencyKey", idempotencyKey),
+ checkRequired("programId", programId),
+ checkRequired("redirectUrl", redirectUrl),
+ checkRequired("sessionUrl", sessionUrl),
+ checkRequired("status", status),
+ checkRequired("type", type),
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): EntityOnboardingSession = apply {
+ if (validated) {
+ return@apply
+ }
+
+ id()
+ createdAt()
+ entityId()
+ expiresAt()
+ idempotencyKey()
+ programId()
+ redirectUrl()
+ sessionUrl()
+ status().validate()
+ type().validate()
+ 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 (id.asKnown().isPresent) 1 else 0) +
+ (if (createdAt.asKnown().isPresent) 1 else 0) +
+ (if (entityId.asKnown().isPresent) 1 else 0) +
+ (if (expiresAt.asKnown().isPresent) 1 else 0) +
+ (if (idempotencyKey.asKnown().isPresent) 1 else 0) +
+ (if (programId.asKnown().isPresent) 1 else 0) +
+ (if (redirectUrl.asKnown().isPresent) 1 else 0) +
+ (if (sessionUrl.asKnown().isPresent) 1 else 0) +
+ (status.asKnown().getOrNull()?.validity() ?: 0) +
+ (type.asKnown().getOrNull()?.validity() ?: 0)
+
+ /** The status of the onboarding session. */
+ 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 Entity Onboarding Session is active. */
+ @JvmField val ACTIVE = of("active")
+
+ /** The Entity Onboarding Session has expired. */
+ @JvmField val EXPIRED = of("expired")
+
+ @JvmStatic fun of(value: String) = Status(JsonField.of(value))
+ }
+
+ /** An enum containing [Status]'s known values. */
+ enum class Known {
+ /** The Entity Onboarding Session is active. */
+ ACTIVE,
+ /** The Entity Onboarding Session has expired. */
+ EXPIRED,
+ }
+
+ /**
+ * 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 Entity Onboarding Session is active. */
+ ACTIVE,
+ /** The Entity Onboarding Session has expired. */
+ EXPIRED,
+ /** 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
+ EXPIRED -> Value.EXPIRED
+ 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
+ EXPIRED -> Known.EXPIRED
+ 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()
+ }
+
+ /**
+ * A constant representing the object's type. For this resource it will always be
+ * `entity_onboarding_session`.
+ */
+ class Type @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 {
+
+ @JvmField val ENTITY_ONBOARDING_SESSION = of("entity_onboarding_session")
+
+ @JvmStatic fun of(value: String) = Type(JsonField.of(value))
+ }
+
+ /** An enum containing [Type]'s known values. */
+ enum class Known {
+ ENTITY_ONBOARDING_SESSION
+ }
+
+ /**
+ * An enum containing [Type]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [Type] 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 {
+ ENTITY_ONBOARDING_SESSION,
+ /** An enum member indicating that [Type] 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) {
+ ENTITY_ONBOARDING_SESSION -> Value.ENTITY_ONBOARDING_SESSION
+ 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) {
+ ENTITY_ONBOARDING_SESSION -> Known.ENTITY_ONBOARDING_SESSION
+ else -> throw IncreaseInvalidDataException("Unknown Type: $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(): Type = 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 Type && value == other.value
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is EntityOnboardingSession &&
+ id == other.id &&
+ createdAt == other.createdAt &&
+ entityId == other.entityId &&
+ expiresAt == other.expiresAt &&
+ idempotencyKey == other.idempotencyKey &&
+ programId == other.programId &&
+ redirectUrl == other.redirectUrl &&
+ sessionUrl == other.sessionUrl &&
+ status == other.status &&
+ type == other.type &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(
+ id,
+ createdAt,
+ entityId,
+ expiresAt,
+ idempotencyKey,
+ programId,
+ redirectUrl,
+ sessionUrl,
+ status,
+ type,
+ additionalProperties,
+ )
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "EntityOnboardingSession{id=$id, createdAt=$createdAt, entityId=$entityId, expiresAt=$expiresAt, idempotencyKey=$idempotencyKey, programId=$programId, redirectUrl=$redirectUrl, sessionUrl=$sessionUrl, status=$status, type=$type, additionalProperties=$additionalProperties}"
+}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/entityonboardingsessions/EntityOnboardingSessionCreateParams.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/entityonboardingsessions/EntityOnboardingSessionCreateParams.kt
new file mode 100644
index 000000000..4c752ee2c
--- /dev/null
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/entityonboardingsessions/EntityOnboardingSessionCreateParams.kt
@@ -0,0 +1,588 @@
+// File generated from our OpenAPI spec by Stainless.
+
+package com.increase.api.models.entityonboardingsessions
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter
+import com.fasterxml.jackson.annotation.JsonAnySetter
+import com.fasterxml.jackson.annotation.JsonCreator
+import com.fasterxml.jackson.annotation.JsonProperty
+import com.increase.api.core.ExcludeMissing
+import com.increase.api.core.JsonField
+import com.increase.api.core.JsonMissing
+import com.increase.api.core.JsonValue
+import com.increase.api.core.Params
+import com.increase.api.core.checkRequired
+import com.increase.api.core.http.Headers
+import com.increase.api.core.http.QueryParams
+import com.increase.api.errors.IncreaseInvalidDataException
+import java.util.Collections
+import java.util.Objects
+import java.util.Optional
+
+/** Create an Entity Onboarding Session */
+class EntityOnboardingSessionCreateParams
+private constructor(
+ private val body: Body,
+ private val additionalHeaders: Headers,
+ private val additionalQueryParams: QueryParams,
+) : Params {
+
+ /**
+ * The identifier of the Program the Entity will be onboarded to.
+ *
+ * @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 programId(): String = body.programId()
+
+ /**
+ * The URL to redirect the customer to after they complete the onboarding form. The redirect
+ * will include `entity_onboarding_session_id` and `entity_id` query parameters.
+ *
+ * @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 redirectUrl(): String = body.redirectUrl()
+
+ /**
+ * The identifier of an existing Entity to associate with the onboarding session. If provided,
+ * the onboarding form will display any outstanding tasks required to complete the Entity's
+ * onboarding.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun entityId(): Optional = body.entityId()
+
+ /**
+ * Returns the raw JSON value of [programId].
+ *
+ * Unlike [programId], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _programId(): JsonField = body._programId()
+
+ /**
+ * Returns the raw JSON value of [redirectUrl].
+ *
+ * Unlike [redirectUrl], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _redirectUrl(): JsonField = body._redirectUrl()
+
+ /**
+ * Returns the raw JSON value of [entityId].
+ *
+ * Unlike [entityId], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _entityId(): JsonField = body._entityId()
+
+ fun _additionalBodyProperties(): Map = body._additionalProperties()
+
+ /** Additional headers to send with the request. */
+ fun _additionalHeaders(): Headers = additionalHeaders
+
+ /** Additional query param to send with the request. */
+ fun _additionalQueryParams(): QueryParams = additionalQueryParams
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /**
+ * Returns a mutable builder for constructing an instance of
+ * [EntityOnboardingSessionCreateParams].
+ *
+ * The following fields are required:
+ * ```java
+ * .programId()
+ * .redirectUrl()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [EntityOnboardingSessionCreateParams]. */
+ class Builder internal constructor() {
+
+ private var body: Body.Builder = Body.builder()
+ private var additionalHeaders: Headers.Builder = Headers.builder()
+ private var additionalQueryParams: QueryParams.Builder = QueryParams.builder()
+
+ @JvmSynthetic
+ internal fun from(
+ entityOnboardingSessionCreateParams: EntityOnboardingSessionCreateParams
+ ) = apply {
+ body = entityOnboardingSessionCreateParams.body.toBuilder()
+ additionalHeaders = entityOnboardingSessionCreateParams.additionalHeaders.toBuilder()
+ additionalQueryParams =
+ entityOnboardingSessionCreateParams.additionalQueryParams.toBuilder()
+ }
+
+ /**
+ * Sets the entire request body.
+ *
+ * This is generally only useful if you are already constructing the body separately.
+ * Otherwise, it's more convenient to use the top-level setters instead:
+ * - [programId]
+ * - [redirectUrl]
+ * - [entityId]
+ */
+ fun body(body: Body) = apply { this.body = body.toBuilder() }
+
+ /** The identifier of the Program the Entity will be onboarded to. */
+ fun programId(programId: String) = apply { body.programId(programId) }
+
+ /**
+ * Sets [Builder.programId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.programId] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun programId(programId: JsonField) = apply { body.programId(programId) }
+
+ /**
+ * The URL to redirect the customer to after they complete the onboarding form. The redirect
+ * will include `entity_onboarding_session_id` and `entity_id` query parameters.
+ */
+ fun redirectUrl(redirectUrl: String) = apply { body.redirectUrl(redirectUrl) }
+
+ /**
+ * Sets [Builder.redirectUrl] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.redirectUrl] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun redirectUrl(redirectUrl: JsonField) = apply { body.redirectUrl(redirectUrl) }
+
+ /**
+ * The identifier of an existing Entity to associate with the onboarding session. If
+ * provided, the onboarding form will display any outstanding tasks required to complete the
+ * Entity's onboarding.
+ */
+ fun entityId(entityId: String) = apply { body.entityId(entityId) }
+
+ /**
+ * Sets [Builder.entityId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.entityId] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun entityId(entityId: JsonField) = apply { body.entityId(entityId) }
+
+ fun additionalBodyProperties(additionalBodyProperties: Map) = apply {
+ body.additionalProperties(additionalBodyProperties)
+ }
+
+ fun putAdditionalBodyProperty(key: String, value: JsonValue) = apply {
+ body.putAdditionalProperty(key, value)
+ }
+
+ fun putAllAdditionalBodyProperties(additionalBodyProperties: Map) =
+ apply {
+ body.putAllAdditionalProperties(additionalBodyProperties)
+ }
+
+ fun removeAdditionalBodyProperty(key: String) = apply { body.removeAdditionalProperty(key) }
+
+ fun removeAllAdditionalBodyProperties(keys: Set) = apply {
+ body.removeAllAdditionalProperties(keys)
+ }
+
+ fun additionalHeaders(additionalHeaders: Headers) = apply {
+ this.additionalHeaders.clear()
+ putAllAdditionalHeaders(additionalHeaders)
+ }
+
+ fun additionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.clear()
+ putAllAdditionalHeaders(additionalHeaders)
+ }
+
+ fun putAdditionalHeader(name: String, value: String) = apply {
+ additionalHeaders.put(name, value)
+ }
+
+ fun putAdditionalHeaders(name: String, values: Iterable) = apply {
+ additionalHeaders.put(name, values)
+ }
+
+ fun putAllAdditionalHeaders(additionalHeaders: Headers) = apply {
+ this.additionalHeaders.putAll(additionalHeaders)
+ }
+
+ fun putAllAdditionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.putAll(additionalHeaders)
+ }
+
+ fun replaceAdditionalHeaders(name: String, value: String) = apply {
+ additionalHeaders.replace(name, value)
+ }
+
+ fun replaceAdditionalHeaders(name: String, values: Iterable) = apply {
+ additionalHeaders.replace(name, values)
+ }
+
+ fun replaceAllAdditionalHeaders(additionalHeaders: Headers) = apply {
+ this.additionalHeaders.replaceAll(additionalHeaders)
+ }
+
+ fun replaceAllAdditionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.replaceAll(additionalHeaders)
+ }
+
+ fun removeAdditionalHeaders(name: String) = apply { additionalHeaders.remove(name) }
+
+ fun removeAllAdditionalHeaders(names: Set) = apply {
+ additionalHeaders.removeAll(names)
+ }
+
+ fun additionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.clear()
+ putAllAdditionalQueryParams(additionalQueryParams)
+ }
+
+ fun additionalQueryParams(additionalQueryParams: Map>) = apply {
+ this.additionalQueryParams.clear()
+ putAllAdditionalQueryParams(additionalQueryParams)
+ }
+
+ fun putAdditionalQueryParam(key: String, value: String) = apply {
+ additionalQueryParams.put(key, value)
+ }
+
+ fun putAdditionalQueryParams(key: String, values: Iterable) = apply {
+ additionalQueryParams.put(key, values)
+ }
+
+ fun putAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.putAll(additionalQueryParams)
+ }
+
+ fun putAllAdditionalQueryParams(additionalQueryParams: Map>) =
+ apply {
+ this.additionalQueryParams.putAll(additionalQueryParams)
+ }
+
+ fun replaceAdditionalQueryParams(key: String, value: String) = apply {
+ additionalQueryParams.replace(key, value)
+ }
+
+ fun replaceAdditionalQueryParams(key: String, values: Iterable) = apply {
+ additionalQueryParams.replace(key, values)
+ }
+
+ fun replaceAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.replaceAll(additionalQueryParams)
+ }
+
+ fun replaceAllAdditionalQueryParams(additionalQueryParams: Map>) =
+ apply {
+ this.additionalQueryParams.replaceAll(additionalQueryParams)
+ }
+
+ fun removeAdditionalQueryParams(key: String) = apply { additionalQueryParams.remove(key) }
+
+ fun removeAllAdditionalQueryParams(keys: Set) = apply {
+ additionalQueryParams.removeAll(keys)
+ }
+
+ /**
+ * Returns an immutable instance of [EntityOnboardingSessionCreateParams].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .programId()
+ * .redirectUrl()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): EntityOnboardingSessionCreateParams =
+ EntityOnboardingSessionCreateParams(
+ body.build(),
+ additionalHeaders.build(),
+ additionalQueryParams.build(),
+ )
+ }
+
+ fun _body(): Body = body
+
+ override fun _headers(): Headers = additionalHeaders
+
+ override fun _queryParams(): QueryParams = additionalQueryParams
+
+ class Body
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val programId: JsonField,
+ private val redirectUrl: JsonField,
+ private val entityId: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("program_id")
+ @ExcludeMissing
+ programId: JsonField = JsonMissing.of(),
+ @JsonProperty("redirect_url")
+ @ExcludeMissing
+ redirectUrl: JsonField = JsonMissing.of(),
+ @JsonProperty("entity_id")
+ @ExcludeMissing
+ entityId: JsonField = JsonMissing.of(),
+ ) : this(programId, redirectUrl, entityId, mutableMapOf())
+
+ /**
+ * The identifier of the Program the Entity will be onboarded to.
+ *
+ * @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 programId(): String = programId.getRequired("program_id")
+
+ /**
+ * The URL to redirect the customer to after they complete the onboarding form. The redirect
+ * will include `entity_onboarding_session_id` and `entity_id` query parameters.
+ *
+ * @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 redirectUrl(): String = redirectUrl.getRequired("redirect_url")
+
+ /**
+ * The identifier of an existing Entity to associate with the onboarding session. If
+ * provided, the onboarding form will display any outstanding tasks required to complete the
+ * Entity's onboarding.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun entityId(): Optional = entityId.getOptional("entity_id")
+
+ /**
+ * Returns the raw JSON value of [programId].
+ *
+ * Unlike [programId], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("program_id") @ExcludeMissing fun _programId(): JsonField = programId
+
+ /**
+ * Returns the raw JSON value of [redirectUrl].
+ *
+ * Unlike [redirectUrl], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("redirect_url")
+ @ExcludeMissing
+ fun _redirectUrl(): JsonField = redirectUrl
+
+ /**
+ * Returns the raw JSON value of [entityId].
+ *
+ * Unlike [entityId], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("entity_id") @ExcludeMissing fun _entityId(): JsonField = entityId
+
+ @JsonAnySetter
+ private fun putAdditionalProperty(key: String, value: JsonValue) {
+ additionalProperties.put(key, value)
+ }
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map =
+ Collections.unmodifiableMap(additionalProperties)
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /**
+ * Returns a mutable builder for constructing an instance of [Body].
+ *
+ * The following fields are required:
+ * ```java
+ * .programId()
+ * .redirectUrl()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [Body]. */
+ class Builder internal constructor() {
+
+ private var programId: JsonField? = null
+ private var redirectUrl: JsonField? = null
+ private var entityId: JsonField = JsonMissing.of()
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(body: Body) = apply {
+ programId = body.programId
+ redirectUrl = body.redirectUrl
+ entityId = body.entityId
+ additionalProperties = body.additionalProperties.toMutableMap()
+ }
+
+ /** The identifier of the Program the Entity will be onboarded to. */
+ fun programId(programId: String) = programId(JsonField.of(programId))
+
+ /**
+ * Sets [Builder.programId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.programId] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun programId(programId: JsonField) = apply { this.programId = programId }
+
+ /**
+ * The URL to redirect the customer to after they complete the onboarding form. The
+ * redirect will include `entity_onboarding_session_id` and `entity_id` query
+ * parameters.
+ */
+ fun redirectUrl(redirectUrl: String) = redirectUrl(JsonField.of(redirectUrl))
+
+ /**
+ * Sets [Builder.redirectUrl] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.redirectUrl] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun redirectUrl(redirectUrl: JsonField) = apply {
+ this.redirectUrl = redirectUrl
+ }
+
+ /**
+ * The identifier of an existing Entity to associate with the onboarding session. If
+ * provided, the onboarding form will display any outstanding tasks required to complete
+ * the Entity's onboarding.
+ */
+ fun entityId(entityId: String) = entityId(JsonField.of(entityId))
+
+ /**
+ * Sets [Builder.entityId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.entityId] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun entityId(entityId: JsonField) = apply { this.entityId = entityId }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ putAllAdditionalProperties(additionalProperties)
+ }
+
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) }
+
+ fun removeAllAdditionalProperties(keys: Set) = apply {
+ keys.forEach(::removeAdditionalProperty)
+ }
+
+ /**
+ * Returns an immutable instance of [Body].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .programId()
+ * .redirectUrl()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): Body =
+ Body(
+ checkRequired("programId", programId),
+ checkRequired("redirectUrl", redirectUrl),
+ entityId,
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): Body = apply {
+ if (validated) {
+ return@apply
+ }
+
+ programId()
+ redirectUrl()
+ entityId()
+ 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 (programId.asKnown().isPresent) 1 else 0) +
+ (if (redirectUrl.asKnown().isPresent) 1 else 0) +
+ (if (entityId.asKnown().isPresent) 1 else 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is Body &&
+ programId == other.programId &&
+ redirectUrl == other.redirectUrl &&
+ entityId == other.entityId &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(programId, redirectUrl, entityId, additionalProperties)
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "Body{programId=$programId, redirectUrl=$redirectUrl, entityId=$entityId, additionalProperties=$additionalProperties}"
+ }
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is EntityOnboardingSessionCreateParams &&
+ body == other.body &&
+ additionalHeaders == other.additionalHeaders &&
+ additionalQueryParams == other.additionalQueryParams
+ }
+
+ override fun hashCode(): Int = Objects.hash(body, additionalHeaders, additionalQueryParams)
+
+ override fun toString() =
+ "EntityOnboardingSessionCreateParams{body=$body, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
+}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/entityonboardingsessions/EntityOnboardingSessionExpireParams.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/entityonboardingsessions/EntityOnboardingSessionExpireParams.kt
new file mode 100644
index 000000000..aa8cd3909
--- /dev/null
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/entityonboardingsessions/EntityOnboardingSessionExpireParams.kt
@@ -0,0 +1,251 @@
+// File generated from our OpenAPI spec by Stainless.
+
+package com.increase.api.models.entityonboardingsessions
+
+import com.increase.api.core.JsonValue
+import com.increase.api.core.Params
+import com.increase.api.core.http.Headers
+import com.increase.api.core.http.QueryParams
+import com.increase.api.core.toImmutable
+import java.util.Objects
+import java.util.Optional
+import kotlin.jvm.optionals.getOrNull
+
+/** Expire an Entity Onboarding Session */
+class EntityOnboardingSessionExpireParams
+private constructor(
+ private val entityOnboardingSessionId: String?,
+ private val additionalHeaders: Headers,
+ private val additionalQueryParams: QueryParams,
+ private val additionalBodyProperties: Map,
+) : Params {
+
+ /** The identifier of the Entity Onboarding Session to expire. */
+ fun entityOnboardingSessionId(): Optional =
+ Optional.ofNullable(entityOnboardingSessionId)
+
+ /** Additional body properties to send with the request. */
+ fun _additionalBodyProperties(): Map = additionalBodyProperties
+
+ /** Additional headers to send with the request. */
+ fun _additionalHeaders(): Headers = additionalHeaders
+
+ /** Additional query param to send with the request. */
+ fun _additionalQueryParams(): QueryParams = additionalQueryParams
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ @JvmStatic fun none(): EntityOnboardingSessionExpireParams = builder().build()
+
+ /**
+ * Returns a mutable builder for constructing an instance of
+ * [EntityOnboardingSessionExpireParams].
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [EntityOnboardingSessionExpireParams]. */
+ class Builder internal constructor() {
+
+ private var entityOnboardingSessionId: String? = null
+ private var additionalHeaders: Headers.Builder = Headers.builder()
+ private var additionalQueryParams: QueryParams.Builder = QueryParams.builder()
+ private var additionalBodyProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(
+ entityOnboardingSessionExpireParams: EntityOnboardingSessionExpireParams
+ ) = apply {
+ entityOnboardingSessionId =
+ entityOnboardingSessionExpireParams.entityOnboardingSessionId
+ additionalHeaders = entityOnboardingSessionExpireParams.additionalHeaders.toBuilder()
+ additionalQueryParams =
+ entityOnboardingSessionExpireParams.additionalQueryParams.toBuilder()
+ additionalBodyProperties =
+ entityOnboardingSessionExpireParams.additionalBodyProperties.toMutableMap()
+ }
+
+ /** The identifier of the Entity Onboarding Session to expire. */
+ fun entityOnboardingSessionId(entityOnboardingSessionId: String?) = apply {
+ this.entityOnboardingSessionId = entityOnboardingSessionId
+ }
+
+ /**
+ * Alias for calling [Builder.entityOnboardingSessionId] with
+ * `entityOnboardingSessionId.orElse(null)`.
+ */
+ fun entityOnboardingSessionId(entityOnboardingSessionId: Optional) =
+ entityOnboardingSessionId(entityOnboardingSessionId.getOrNull())
+
+ fun additionalHeaders(additionalHeaders: Headers) = apply {
+ this.additionalHeaders.clear()
+ putAllAdditionalHeaders(additionalHeaders)
+ }
+
+ fun additionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.clear()
+ putAllAdditionalHeaders(additionalHeaders)
+ }
+
+ fun putAdditionalHeader(name: String, value: String) = apply {
+ additionalHeaders.put(name, value)
+ }
+
+ fun putAdditionalHeaders(name: String, values: Iterable) = apply {
+ additionalHeaders.put(name, values)
+ }
+
+ fun putAllAdditionalHeaders(additionalHeaders: Headers) = apply {
+ this.additionalHeaders.putAll(additionalHeaders)
+ }
+
+ fun putAllAdditionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.putAll(additionalHeaders)
+ }
+
+ fun replaceAdditionalHeaders(name: String, value: String) = apply {
+ additionalHeaders.replace(name, value)
+ }
+
+ fun replaceAdditionalHeaders(name: String, values: Iterable) = apply {
+ additionalHeaders.replace(name, values)
+ }
+
+ fun replaceAllAdditionalHeaders(additionalHeaders: Headers) = apply {
+ this.additionalHeaders.replaceAll(additionalHeaders)
+ }
+
+ fun replaceAllAdditionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.replaceAll(additionalHeaders)
+ }
+
+ fun removeAdditionalHeaders(name: String) = apply { additionalHeaders.remove(name) }
+
+ fun removeAllAdditionalHeaders(names: Set) = apply {
+ additionalHeaders.removeAll(names)
+ }
+
+ fun additionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.clear()
+ putAllAdditionalQueryParams(additionalQueryParams)
+ }
+
+ fun additionalQueryParams(additionalQueryParams: Map>) = apply {
+ this.additionalQueryParams.clear()
+ putAllAdditionalQueryParams(additionalQueryParams)
+ }
+
+ fun putAdditionalQueryParam(key: String, value: String) = apply {
+ additionalQueryParams.put(key, value)
+ }
+
+ fun putAdditionalQueryParams(key: String, values: Iterable) = apply {
+ additionalQueryParams.put(key, values)
+ }
+
+ fun putAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.putAll(additionalQueryParams)
+ }
+
+ fun putAllAdditionalQueryParams(additionalQueryParams: Map>) =
+ apply {
+ this.additionalQueryParams.putAll(additionalQueryParams)
+ }
+
+ fun replaceAdditionalQueryParams(key: String, value: String) = apply {
+ additionalQueryParams.replace(key, value)
+ }
+
+ fun replaceAdditionalQueryParams(key: String, values: Iterable) = apply {
+ additionalQueryParams.replace(key, values)
+ }
+
+ fun replaceAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.replaceAll(additionalQueryParams)
+ }
+
+ fun replaceAllAdditionalQueryParams(additionalQueryParams: Map>) =
+ apply {
+ this.additionalQueryParams.replaceAll(additionalQueryParams)
+ }
+
+ fun removeAdditionalQueryParams(key: String) = apply { additionalQueryParams.remove(key) }
+
+ fun removeAllAdditionalQueryParams(keys: Set) = apply {
+ additionalQueryParams.removeAll(keys)
+ }
+
+ fun additionalBodyProperties(additionalBodyProperties: Map) = apply {
+ this.additionalBodyProperties.clear()
+ putAllAdditionalBodyProperties(additionalBodyProperties)
+ }
+
+ fun putAdditionalBodyProperty(key: String, value: JsonValue) = apply {
+ additionalBodyProperties.put(key, value)
+ }
+
+ fun putAllAdditionalBodyProperties(additionalBodyProperties: Map) =
+ apply {
+ this.additionalBodyProperties.putAll(additionalBodyProperties)
+ }
+
+ fun removeAdditionalBodyProperty(key: String) = apply {
+ additionalBodyProperties.remove(key)
+ }
+
+ fun removeAllAdditionalBodyProperties(keys: Set) = apply {
+ keys.forEach(::removeAdditionalBodyProperty)
+ }
+
+ /**
+ * Returns an immutable instance of [EntityOnboardingSessionExpireParams].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ */
+ fun build(): EntityOnboardingSessionExpireParams =
+ EntityOnboardingSessionExpireParams(
+ entityOnboardingSessionId,
+ additionalHeaders.build(),
+ additionalQueryParams.build(),
+ additionalBodyProperties.toImmutable(),
+ )
+ }
+
+ fun _body(): Optional