diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 741f062e3..ec847edc6 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.368.0"
+ ".": "0.369.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index b52e8c7d7..fa77aa9b3 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 229
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-bd464d151612058d8029150b376949b22d5515af23621465c0ce1c1069b91644.yml
openapi_spec_hash: e60e1548c523a0ee7c9daa1bd988cbc5
-config_hash: ca1425272e17fa23d4466d33492334fa
+config_hash: eecc5886c26d07c167f37f30ae505a2c
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fa3e3c079..f876af3aa 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## 0.369.0 (2025-11-26)
+
+Full Changelog: [v0.368.0...v0.369.0](https://github.com/Increase/increase-java/compare/v0.368.0...v0.369.0)
+
+### Features
+
+* **api:** api update ([49f8354](https://github.com/Increase/increase-java/commit/49f8354e6d4f314efbe012732e12254ae18a3127))
+
## 0.368.0 (2025-11-24)
Full Changelog: [v0.367.0...v0.368.0](https://github.com/Increase/increase-java/compare/v0.367.0...v0.368.0)
diff --git a/README.md b/README.md
index 996b7ec11..bbb7a419c 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.368.0)
-[](https://javadoc.io/doc/com.increase.api/increase-java/0.368.0)
+[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.369.0)
+[](https://javadoc.io/doc/com.increase.api/increase-java/0.369.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.368.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.369.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.368.0")
+implementation("com.increase.api:increase-java:0.369.0")
```
### Maven
@@ -33,7 +33,7 @@ implementation("com.increase.api:increase-java:0.368.0")
com.increase.api
increase-java
- 0.368.0
+ 0.369.0
```
@@ -57,8 +57,6 @@ IncreaseClient client = IncreaseOkHttpClient.fromEnv();
AccountCreateParams params = AccountCreateParams.builder()
.name("New Account!")
- .entityId("entity_n8y8tnk2p9339ti393yi")
- .programId("program_i2v2os4mwza1oetokh9i")
.build();
Account account = client.accounts().create(params);
```
@@ -161,8 +159,6 @@ IncreaseClient client = IncreaseOkHttpClient.fromEnv();
AccountCreateParams params = AccountCreateParams.builder()
.name("New Account!")
- .entityId("entity_n8y8tnk2p9339ti393yi")
- .programId("program_i2v2os4mwza1oetokh9i")
.build();
CompletableFuture account = client.async().accounts().create(params);
```
@@ -182,8 +178,6 @@ IncreaseClientAsync client = IncreaseOkHttpClientAsync.fromEnv();
AccountCreateParams params = AccountCreateParams.builder()
.name("New Account!")
- .entityId("entity_n8y8tnk2p9339ti393yi")
- .programId("program_i2v2os4mwza1oetokh9i")
.build();
CompletableFuture account = client.accounts().create(params);
```
@@ -268,8 +262,6 @@ import com.increase.api.models.accounts.AccountCreateParams;
AccountCreateParams params = AccountCreateParams.builder()
.name("New Account!")
- .entityId("entity_n8y8tnk2p9339ti393yi")
- .programId("program_i2v2os4mwza1oetokh9i")
.build();
HttpResponseFor account = client.accounts().withRawResponse().create(params);
@@ -310,106 +302,6 @@ The SDK throws custom unchecked exception types:
- [`IncreaseException`](increase-java-core/src/main/kotlin/com/increase/api/errors/IncreaseException.kt): Base class for all exceptions. Most errors will result in one of the previously mentioned ones, but completely generic errors may be thrown using the base class.
-## Pagination
-
-The SDK defines methods that return a paginated lists of results. It provides convenient ways to access the results either one page at a time or item-by-item across all pages.
-
-### Auto-pagination
-
-To iterate through all results across all pages, use the `autoPager()` method, which automatically fetches more pages as needed.
-
-When using the synchronous client, the method returns an [`Iterable`](https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html)
-
-```java
-import com.increase.api.models.accounts.Account;
-import com.increase.api.models.accounts.AccountListPage;
-
-AccountListPage page = client.accounts().list();
-
-// Process as an Iterable
-for (Account account : page.autoPager()) {
- System.out.println(account);
-}
-
-// Process as a Stream
-page.autoPager()
- .stream()
- .limit(50)
- .forEach(account -> System.out.println(account));
-```
-
-When using the asynchronous client, the method returns an [`AsyncStreamResponse`](increase-java-core/src/main/kotlin/com/increase/api/core/http/AsyncStreamResponse.kt):
-
-```java
-import com.increase.api.core.http.AsyncStreamResponse;
-import com.increase.api.models.accounts.Account;
-import com.increase.api.models.accounts.AccountListPageAsync;
-import java.util.Optional;
-import java.util.concurrent.CompletableFuture;
-
-CompletableFuture pageFuture = client.async().accounts().list();
-
-pageFuture.thenRun(page -> page.autoPager().subscribe(account -> {
- System.out.println(account);
-}));
-
-// If you need to handle errors or completion of the stream
-pageFuture.thenRun(page -> page.autoPager().subscribe(new AsyncStreamResponse.Handler<>() {
- @Override
- public void onNext(Account account) {
- System.out.println(account);
- }
-
- @Override
- public void onComplete(Optional error) {
- if (error.isPresent()) {
- System.out.println("Something went wrong!");
- throw new RuntimeException(error.get());
- } else {
- System.out.println("No more!");
- }
- }
-}));
-
-// Or use futures
-pageFuture.thenRun(page -> page.autoPager()
- .subscribe(account -> {
- System.out.println(account);
- })
- .onCompleteFuture()
- .whenComplete((unused, error) -> {
- if (error != null) {
- System.out.println("Something went wrong!");
- throw new RuntimeException(error);
- } else {
- System.out.println("No more!");
- }
- }));
-```
-
-### Manual pagination
-
-To access individual page items and manually request the next page, use the `items()`,
-`hasNextPage()`, and `nextPage()` methods:
-
-```java
-import com.increase.api.models.accounts.Account;
-import com.increase.api.models.accounts.AccountListPage;
-
-AccountListPage page = client.accounts().list();
-while (true) {
- for (Account account : page.items()) {
- System.out.println(account);
- }
-
- if (!page.hasNextPage()) {
- break;
- }
-
- page = page.nextPage();
-}
-```
-
## Logging
The SDK uses the standard [OkHttp logging interceptor](https://github.com/square/okhttp/tree/master/okhttp-logging-interceptor).
@@ -628,8 +520,6 @@ import com.increase.api.models.accounts.AccountCreateParams;
AccountCreateParams params = AccountCreateParams.builder()
.name(JsonValue.from(42))
- .entityId("entity_n8y8tnk2p9339ti393yi")
- .programId("program_i2v2os4mwza1oetokh9i")
.build();
```
diff --git a/build.gradle.kts b/build.gradle.kts
index 8958ef28f..db1776f38 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "com.increase.api"
- version = "0.368.0" // x-release-please-version
+ version = "0.369.0" // x-release-please-version
}
subprojects {
diff --git a/increase-java-client-okhttp/src/main/kotlin/com/increase/api/client/okhttp/IncreaseOkHttpClient.kt b/increase-java-client-okhttp/src/main/kotlin/com/increase/api/client/okhttp/IncreaseOkHttpClient.kt
index 8d8f55ae4..4f68fa3bd 100644
--- a/increase-java-client-okhttp/src/main/kotlin/com/increase/api/client/okhttp/IncreaseOkHttpClient.kt
+++ b/increase-java-client-okhttp/src/main/kotlin/com/increase/api/client/okhttp/IncreaseOkHttpClient.kt
@@ -8,7 +8,6 @@ import com.increase.api.client.IncreaseClientImpl
import com.increase.api.core.ClientOptions
import com.increase.api.core.Sleeper
import com.increase.api.core.Timeout
-import com.increase.api.core.http.AsyncStreamResponse
import com.increase.api.core.http.Headers
import com.increase.api.core.http.HttpClient
import com.increase.api.core.http.QueryParams
@@ -17,7 +16,6 @@ import java.net.Proxy
import java.time.Clock
import java.time.Duration
import java.util.Optional
-import java.util.concurrent.Executor
import javax.net.ssl.HostnameVerifier
import javax.net.ssl.SSLSocketFactory
import javax.net.ssl.X509TrustManager
@@ -123,17 +121,6 @@ class IncreaseOkHttpClient private constructor() {
*/
fun jsonMapper(jsonMapper: JsonMapper) = apply { clientOptions.jsonMapper(jsonMapper) }
- /**
- * The executor to use for running [AsyncStreamResponse.Handler] callbacks.
- *
- * Defaults to a dedicated cached thread pool.
- *
- * This class takes ownership of the executor and shuts it down, if possible, when closed.
- */
- fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply {
- clientOptions.streamHandlerExecutor(streamHandlerExecutor)
- }
-
/**
* The interface to use for delaying execution, like during retries.
*
diff --git a/increase-java-client-okhttp/src/main/kotlin/com/increase/api/client/okhttp/IncreaseOkHttpClientAsync.kt b/increase-java-client-okhttp/src/main/kotlin/com/increase/api/client/okhttp/IncreaseOkHttpClientAsync.kt
index d80607c7e..963317a79 100644
--- a/increase-java-client-okhttp/src/main/kotlin/com/increase/api/client/okhttp/IncreaseOkHttpClientAsync.kt
+++ b/increase-java-client-okhttp/src/main/kotlin/com/increase/api/client/okhttp/IncreaseOkHttpClientAsync.kt
@@ -8,7 +8,6 @@ import com.increase.api.client.IncreaseClientAsyncImpl
import com.increase.api.core.ClientOptions
import com.increase.api.core.Sleeper
import com.increase.api.core.Timeout
-import com.increase.api.core.http.AsyncStreamResponse
import com.increase.api.core.http.Headers
import com.increase.api.core.http.HttpClient
import com.increase.api.core.http.QueryParams
@@ -17,7 +16,6 @@ import java.net.Proxy
import java.time.Clock
import java.time.Duration
import java.util.Optional
-import java.util.concurrent.Executor
import javax.net.ssl.HostnameVerifier
import javax.net.ssl.SSLSocketFactory
import javax.net.ssl.X509TrustManager
@@ -123,17 +121,6 @@ class IncreaseOkHttpClientAsync private constructor() {
*/
fun jsonMapper(jsonMapper: JsonMapper) = apply { clientOptions.jsonMapper(jsonMapper) }
- /**
- * The executor to use for running [AsyncStreamResponse.Handler] callbacks.
- *
- * Defaults to a dedicated cached thread pool.
- *
- * This class takes ownership of the executor and shuts it down, if possible, when closed.
- */
- fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply {
- clientOptions.streamHandlerExecutor(streamHandlerExecutor)
- }
-
/**
* The interface to use for delaying execution, like during retries.
*
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/core/AutoPager.kt b/increase-java-core/src/main/kotlin/com/increase/api/core/AutoPager.kt
deleted file mode 100644
index fc383e837..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/core/AutoPager.kt
+++ /dev/null
@@ -1,21 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.core
-
-import java.util.stream.Stream
-import java.util.stream.StreamSupport
-
-class AutoPager private constructor(private val firstPage: Page) : Iterable {
-
- companion object {
-
- fun from(firstPage: Page): AutoPager = AutoPager(firstPage)
- }
-
- override fun iterator(): Iterator =
- generateSequence(firstPage) { if (it.hasNextPage()) it.nextPage() else null }
- .flatMap { it.items() }
- .iterator()
-
- fun stream(): Stream = StreamSupport.stream(spliterator(), false)
-}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/core/AutoPagerAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/core/AutoPagerAsync.kt
deleted file mode 100644
index 15b811a06..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/core/AutoPagerAsync.kt
+++ /dev/null
@@ -1,88 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.core
-
-import com.increase.api.core.http.AsyncStreamResponse
-import java.util.Optional
-import java.util.concurrent.CompletableFuture
-import java.util.concurrent.CompletionException
-import java.util.concurrent.Executor
-import java.util.concurrent.atomic.AtomicReference
-
-class AutoPagerAsync
-private constructor(private val firstPage: PageAsync, private val defaultExecutor: Executor) :
- AsyncStreamResponse {
-
- companion object {
-
- fun from(firstPage: PageAsync, defaultExecutor: Executor): AutoPagerAsync =
- AutoPagerAsync(firstPage, defaultExecutor)
- }
-
- private val onCompleteFuture = CompletableFuture()
- private val state = AtomicReference(State.NEW)
-
- override fun subscribe(handler: AsyncStreamResponse.Handler): AsyncStreamResponse =
- subscribe(handler, defaultExecutor)
-
- override fun subscribe(
- handler: AsyncStreamResponse.Handler,
- executor: Executor,
- ): AsyncStreamResponse = apply {
- // TODO(JDK): Use `compareAndExchange` once targeting JDK 9.
- check(state.compareAndSet(State.NEW, State.SUBSCRIBED)) {
- if (state.get() == State.SUBSCRIBED) "Cannot subscribe more than once"
- else "Cannot subscribe after the response is closed"
- }
-
- fun PageAsync.handle(): CompletableFuture {
- if (state.get() == State.CLOSED) {
- return CompletableFuture.completedFuture(null)
- }
-
- items().forEach { handler.onNext(it) }
- return if (hasNextPage()) nextPage().thenCompose { it.handle() }
- else CompletableFuture.completedFuture(null)
- }
-
- executor.execute {
- firstPage.handle().whenComplete { _, error ->
- val actualError =
- if (error is CompletionException && error.cause != null) error.cause else error
- try {
- handler.onComplete(Optional.ofNullable(actualError))
- } finally {
- try {
- if (actualError == null) {
- onCompleteFuture.complete(null)
- } else {
- onCompleteFuture.completeExceptionally(actualError)
- }
- } finally {
- close()
- }
- }
- }
- }
- }
-
- override fun onCompleteFuture(): CompletableFuture = onCompleteFuture
-
- override fun close() {
- val previousState = state.getAndSet(State.CLOSED)
- if (previousState == State.CLOSED) {
- return
- }
-
- // When the stream is closed, we should always consider it closed. If it closed due
- // to an error, then we will have already completed the future earlier, and this
- // will be a no-op.
- onCompleteFuture.complete(null)
- }
-}
-
-private enum class State {
- NEW,
- SUBSCRIBED,
- CLOSED,
-}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/core/ClientOptions.kt b/increase-java-core/src/main/kotlin/com/increase/api/core/ClientOptions.kt
index 0dff03ae7..29167b2c3 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/core/ClientOptions.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/core/ClientOptions.kt
@@ -3,7 +3,6 @@
package com.increase.api.core
import com.fasterxml.jackson.databind.json.JsonMapper
-import com.increase.api.core.http.AsyncStreamResponse
import com.increase.api.core.http.Headers
import com.increase.api.core.http.HttpClient
import com.increase.api.core.http.PhantomReachableClosingHttpClient
@@ -12,11 +11,6 @@ import com.increase.api.core.http.RetryingHttpClient
import java.time.Clock
import java.time.Duration
import java.util.Optional
-import java.util.concurrent.Executor
-import java.util.concurrent.ExecutorService
-import java.util.concurrent.Executors
-import java.util.concurrent.ThreadFactory
-import java.util.concurrent.atomic.AtomicLong
import kotlin.jvm.optionals.getOrNull
/** A class representing the SDK client configuration. */
@@ -46,14 +40,6 @@ private constructor(
* needs to be overridden.
*/
@get:JvmName("jsonMapper") val jsonMapper: JsonMapper,
- /**
- * The executor to use for running [AsyncStreamResponse.Handler] callbacks.
- *
- * Defaults to a dedicated cached thread pool.
- *
- * This class takes ownership of the executor and shuts it down, if possible, when closed.
- */
- @get:JvmName("streamHandlerExecutor") val streamHandlerExecutor: Executor,
/**
* The interface to use for delaying execution, like during retries.
*
@@ -162,7 +148,6 @@ private constructor(
private var httpClient: HttpClient? = null
private var checkJacksonVersionCompatibility: Boolean = true
private var jsonMapper: JsonMapper = jsonMapper()
- private var streamHandlerExecutor: Executor? = null
private var sleeper: Sleeper? = null
private var clock: Clock = Clock.systemUTC()
private var baseUrl: String? = null
@@ -179,7 +164,6 @@ private constructor(
httpClient = clientOptions.originalHttpClient
checkJacksonVersionCompatibility = clientOptions.checkJacksonVersionCompatibility
jsonMapper = clientOptions.jsonMapper
- streamHandlerExecutor = clientOptions.streamHandlerExecutor
sleeper = clientOptions.sleeper
clock = clientOptions.clock
baseUrl = clientOptions.baseUrl
@@ -222,20 +206,6 @@ private constructor(
*/
fun jsonMapper(jsonMapper: JsonMapper) = apply { this.jsonMapper = jsonMapper }
- /**
- * The executor to use for running [AsyncStreamResponse.Handler] callbacks.
- *
- * Defaults to a dedicated cached thread pool.
- *
- * This class takes ownership of the executor and shuts it down, if possible, when closed.
- */
- fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply {
- this.streamHandlerExecutor =
- if (streamHandlerExecutor is ExecutorService)
- PhantomReachableExecutorService(streamHandlerExecutor)
- else streamHandlerExecutor
- }
-
/**
* The interface to use for delaying execution, like during retries.
*
@@ -446,24 +416,6 @@ private constructor(
*/
fun build(): ClientOptions {
val httpClient = checkRequired("httpClient", httpClient)
- val streamHandlerExecutor =
- streamHandlerExecutor
- ?: PhantomReachableExecutorService(
- Executors.newCachedThreadPool(
- object : ThreadFactory {
-
- private val threadFactory: ThreadFactory =
- Executors.defaultThreadFactory()
- private val count = AtomicLong(0)
-
- override fun newThread(runnable: Runnable): Thread =
- threadFactory.newThread(runnable).also {
- it.name =
- "increase-stream-handler-thread-${count.getAndIncrement()}"
- }
- }
- )
- )
val sleeper = sleeper ?: PhantomReachableSleeper(DefaultSleeper())
val apiKey = checkRequired("apiKey", apiKey)
@@ -495,7 +447,6 @@ private constructor(
.build(),
checkJacksonVersionCompatibility,
jsonMapper,
- streamHandlerExecutor,
sleeper,
clock,
baseUrl,
@@ -522,7 +473,6 @@ private constructor(
*/
fun close() {
httpClient.close()
- (streamHandlerExecutor as? ExecutorService)?.shutdown()
sleeper.close()
}
}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/core/Page.kt b/increase-java-core/src/main/kotlin/com/increase/api/core/Page.kt
deleted file mode 100644
index 6a28f88ef..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/core/Page.kt
+++ /dev/null
@@ -1,33 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.core
-
-/**
- * An interface representing a single page, with items of type [T], from a paginated endpoint
- * response.
- *
- * Implementations of this interface are expected to request additional pages synchronously. For
- * asynchronous pagination, see the [PageAsync] interface.
- */
-interface Page {
-
- /**
- * Returns whether there's another page after this one.
- *
- * The method generally doesn't make requests so the result depends entirely on the data in this
- * page. If a significant amount of time has passed between requesting this page and calling
- * this method, then the result could be stale.
- */
- fun hasNextPage(): Boolean
-
- /**
- * Returns the page after this one by making another request.
- *
- * @throws IllegalStateException if it's impossible to get the next page. This exception is
- * avoidable by calling [hasNextPage] first.
- */
- fun nextPage(): Page
-
- /** Returns the items in this page. */
- fun items(): List
-}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/core/PageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/core/PageAsync.kt
deleted file mode 100644
index 8d5da0c9e..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/core/PageAsync.kt
+++ /dev/null
@@ -1,35 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.core
-
-import java.util.concurrent.CompletableFuture
-
-/**
- * An interface representing a single page, with items of type [T], from a paginated endpoint
- * response.
- *
- * Implementations of this interface are expected to request additional pages asynchronously. For
- * synchronous pagination, see the [Page] interface.
- */
-interface PageAsync {
-
- /**
- * Returns whether there's another page after this one.
- *
- * The method generally doesn't make requests so the result depends entirely on the data in this
- * page. If a significant amount of time has passed between requesting this page and calling
- * this method, then the result could be stale.
- */
- fun hasNextPage(): Boolean
-
- /**
- * Returns the page after this one by making another request.
- *
- * @throws IllegalStateException if it's impossible to get the next page. This exception is
- * avoidable by calling [hasNextPage] first.
- */
- fun nextPage(): CompletableFuture>
-
- /** Returns the items in this page. */
- fun items(): List
-}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/accountnumbers/AccountNumberListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/accountnumbers/AccountNumberListPage.kt
deleted file mode 100644
index 06d541cd2..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/accountnumbers/AccountNumberListPage.kt
+++ /dev/null
@@ -1,133 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.models.accountnumbers
-
-import com.increase.api.core.AutoPager
-import com.increase.api.core.Page
-import com.increase.api.core.checkRequired
-import com.increase.api.services.blocking.AccountNumberService
-import java.util.Objects
-import java.util.Optional
-import kotlin.jvm.optionals.getOrNull
-
-/** @see AccountNumberService.list */
-class AccountNumberListPage
-private constructor(
- private val service: AccountNumberService,
- private val params: AccountNumberListParams,
- private val response: AccountNumberListPageResponse,
-) : Page {
-
- /**
- * Delegates to [AccountNumberListPageResponse], but gracefully handles missing data.
- *
- * @see AccountNumberListPageResponse.data
- */
- fun data(): List =
- response._data().getOptional("data").getOrNull() ?: emptyList()
-
- /**
- * Delegates to [AccountNumberListPageResponse], but gracefully handles missing data.
- *
- * @see AccountNumberListPageResponse.nextCursor
- */
- fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor")
-
- override fun items(): List = data()
-
- override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent
-
- fun nextPageParams(): AccountNumberListParams {
- val nextCursor =
- nextCursor().getOrNull()
- ?: throw IllegalStateException("Cannot construct next page params")
- return params.toBuilder().cursor(nextCursor).build()
- }
-
- override fun nextPage(): AccountNumberListPage = service.list(nextPageParams())
-
- fun autoPager(): AutoPager = AutoPager.from(this)
-
- /** The parameters that were used to request this page. */
- fun params(): AccountNumberListParams = params
-
- /** The response that this page was parsed from. */
- fun response(): AccountNumberListPageResponse = response
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /**
- * Returns a mutable builder for constructing an instance of [AccountNumberListPage].
- *
- * The following fields are required:
- * ```java
- * .service()
- * .params()
- * .response()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [AccountNumberListPage]. */
- class Builder internal constructor() {
-
- private var service: AccountNumberService? = null
- private var params: AccountNumberListParams? = null
- private var response: AccountNumberListPageResponse? = null
-
- @JvmSynthetic
- internal fun from(accountNumberListPage: AccountNumberListPage) = apply {
- service = accountNumberListPage.service
- params = accountNumberListPage.params
- response = accountNumberListPage.response
- }
-
- fun service(service: AccountNumberService) = apply { this.service = service }
-
- /** The parameters that were used to request this page. */
- fun params(params: AccountNumberListParams) = apply { this.params = params }
-
- /** The response that this page was parsed from. */
- fun response(response: AccountNumberListPageResponse) = apply { this.response = response }
-
- /**
- * Returns an immutable instance of [AccountNumberListPage].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .service()
- * .params()
- * .response()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): AccountNumberListPage =
- AccountNumberListPage(
- checkRequired("service", service),
- checkRequired("params", params),
- checkRequired("response", response),
- )
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is AccountNumberListPage &&
- service == other.service &&
- params == other.params &&
- response == other.response
- }
-
- override fun hashCode(): Int = Objects.hash(service, params, response)
-
- override fun toString() =
- "AccountNumberListPage{service=$service, params=$params, response=$response}"
-}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/accountnumbers/AccountNumberListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/accountnumbers/AccountNumberListPageAsync.kt
deleted file mode 100644
index a6af769cc..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/accountnumbers/AccountNumberListPageAsync.kt
+++ /dev/null
@@ -1,148 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.models.accountnumbers
-
-import com.increase.api.core.AutoPagerAsync
-import com.increase.api.core.PageAsync
-import com.increase.api.core.checkRequired
-import com.increase.api.services.async.AccountNumberServiceAsync
-import java.util.Objects
-import java.util.Optional
-import java.util.concurrent.CompletableFuture
-import java.util.concurrent.Executor
-import kotlin.jvm.optionals.getOrNull
-
-/** @see AccountNumberServiceAsync.list */
-class AccountNumberListPageAsync
-private constructor(
- private val service: AccountNumberServiceAsync,
- private val streamHandlerExecutor: Executor,
- private val params: AccountNumberListParams,
- private val response: AccountNumberListPageResponse,
-) : PageAsync {
-
- /**
- * Delegates to [AccountNumberListPageResponse], but gracefully handles missing data.
- *
- * @see AccountNumberListPageResponse.data
- */
- fun data(): List =
- response._data().getOptional("data").getOrNull() ?: emptyList()
-
- /**
- * Delegates to [AccountNumberListPageResponse], but gracefully handles missing data.
- *
- * @see AccountNumberListPageResponse.nextCursor
- */
- fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor")
-
- override fun items(): List = data()
-
- override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent
-
- fun nextPageParams(): AccountNumberListParams {
- val nextCursor =
- nextCursor().getOrNull()
- ?: throw IllegalStateException("Cannot construct next page params")
- return params.toBuilder().cursor(nextCursor).build()
- }
-
- override fun nextPage(): CompletableFuture =
- service.list(nextPageParams())
-
- fun autoPager(): AutoPagerAsync =
- AutoPagerAsync.from(this, streamHandlerExecutor)
-
- /** The parameters that were used to request this page. */
- fun params(): AccountNumberListParams = params
-
- /** The response that this page was parsed from. */
- fun response(): AccountNumberListPageResponse = response
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /**
- * Returns a mutable builder for constructing an instance of [AccountNumberListPageAsync].
- *
- * The following fields are required:
- * ```java
- * .service()
- * .streamHandlerExecutor()
- * .params()
- * .response()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [AccountNumberListPageAsync]. */
- class Builder internal constructor() {
-
- private var service: AccountNumberServiceAsync? = null
- private var streamHandlerExecutor: Executor? = null
- private var params: AccountNumberListParams? = null
- private var response: AccountNumberListPageResponse? = null
-
- @JvmSynthetic
- internal fun from(accountNumberListPageAsync: AccountNumberListPageAsync) = apply {
- service = accountNumberListPageAsync.service
- streamHandlerExecutor = accountNumberListPageAsync.streamHandlerExecutor
- params = accountNumberListPageAsync.params
- response = accountNumberListPageAsync.response
- }
-
- fun service(service: AccountNumberServiceAsync) = apply { this.service = service }
-
- fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply {
- this.streamHandlerExecutor = streamHandlerExecutor
- }
-
- /** The parameters that were used to request this page. */
- fun params(params: AccountNumberListParams) = apply { this.params = params }
-
- /** The response that this page was parsed from. */
- fun response(response: AccountNumberListPageResponse) = apply { this.response = response }
-
- /**
- * Returns an immutable instance of [AccountNumberListPageAsync].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .service()
- * .streamHandlerExecutor()
- * .params()
- * .response()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): AccountNumberListPageAsync =
- AccountNumberListPageAsync(
- checkRequired("service", service),
- checkRequired("streamHandlerExecutor", streamHandlerExecutor),
- checkRequired("params", params),
- checkRequired("response", response),
- )
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is AccountNumberListPageAsync &&
- service == other.service &&
- streamHandlerExecutor == other.streamHandlerExecutor &&
- params == other.params &&
- response == other.response
- }
-
- override fun hashCode(): Int = Objects.hash(service, streamHandlerExecutor, params, response)
-
- override fun toString() =
- "AccountNumberListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}"
-}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/accountnumbers/AccountNumberListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/accountnumbers/AccountNumberListResponse.kt
similarity index 89%
rename from increase-java-core/src/main/kotlin/com/increase/api/models/accountnumbers/AccountNumberListPageResponse.kt
rename to increase-java-core/src/main/kotlin/com/increase/api/models/accountnumbers/AccountNumberListResponse.kt
index b7d9e2717..9b48cc012 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/accountnumbers/AccountNumberListPageResponse.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/accountnumbers/AccountNumberListResponse.kt
@@ -20,7 +20,7 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/** A list of Account Number objects. */
-class AccountNumberListPageResponse
+class AccountNumberListResponse
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val data: JsonField>,
@@ -83,8 +83,7 @@ private constructor(
companion object {
/**
- * Returns a mutable builder for constructing an instance of
- * [AccountNumberListPageResponse].
+ * Returns a mutable builder for constructing an instance of [AccountNumberListResponse].
*
* The following fields are required:
* ```java
@@ -95,7 +94,7 @@ private constructor(
@JvmStatic fun builder() = Builder()
}
- /** A builder for [AccountNumberListPageResponse]. */
+ /** A builder for [AccountNumberListResponse]. */
class Builder internal constructor() {
private var data: JsonField>? = null
@@ -103,10 +102,10 @@ private constructor(
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
- internal fun from(accountNumberListPageResponse: AccountNumberListPageResponse) = apply {
- data = accountNumberListPageResponse.data.map { it.toMutableList() }
- nextCursor = accountNumberListPageResponse.nextCursor
- additionalProperties = accountNumberListPageResponse.additionalProperties.toMutableMap()
+ internal fun from(accountNumberListResponse: AccountNumberListResponse) = apply {
+ data = accountNumberListResponse.data.map { it.toMutableList() }
+ nextCursor = accountNumberListResponse.nextCursor
+ additionalProperties = accountNumberListResponse.additionalProperties.toMutableMap()
}
/** The contents of the list. */
@@ -170,7 +169,7 @@ private constructor(
}
/**
- * Returns an immutable instance of [AccountNumberListPageResponse].
+ * Returns an immutable instance of [AccountNumberListResponse].
*
* Further updates to this [Builder] will not mutate the returned instance.
*
@@ -182,8 +181,8 @@ private constructor(
*
* @throws IllegalStateException if any required field is unset.
*/
- fun build(): AccountNumberListPageResponse =
- AccountNumberListPageResponse(
+ fun build(): AccountNumberListResponse =
+ AccountNumberListResponse(
checkRequired("data", data).map { it.toImmutable() },
checkRequired("nextCursor", nextCursor),
additionalProperties.toMutableMap(),
@@ -192,7 +191,7 @@ private constructor(
private var validated: Boolean = false
- fun validate(): AccountNumberListPageResponse = apply {
+ fun validate(): AccountNumberListResponse = apply {
if (validated) {
return@apply
}
@@ -225,7 +224,7 @@ private constructor(
return true
}
- return other is AccountNumberListPageResponse &&
+ return other is AccountNumberListResponse &&
data == other.data &&
nextCursor == other.nextCursor &&
additionalProperties == other.additionalProperties
@@ -236,5 +235,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "AccountNumberListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}"
+ "AccountNumberListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}"
}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/accounts/AccountListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/accounts/AccountListPage.kt
deleted file mode 100644
index 83d277337..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/accounts/AccountListPage.kt
+++ /dev/null
@@ -1,132 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.models.accounts
-
-import com.increase.api.core.AutoPager
-import com.increase.api.core.Page
-import com.increase.api.core.checkRequired
-import com.increase.api.services.blocking.AccountService
-import java.util.Objects
-import java.util.Optional
-import kotlin.jvm.optionals.getOrNull
-
-/** @see AccountService.list */
-class AccountListPage
-private constructor(
- private val service: AccountService,
- private val params: AccountListParams,
- private val response: AccountListPageResponse,
-) : Page {
-
- /**
- * Delegates to [AccountListPageResponse], but gracefully handles missing data.
- *
- * @see AccountListPageResponse.data
- */
- fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList()
-
- /**
- * Delegates to [AccountListPageResponse], but gracefully handles missing data.
- *
- * @see AccountListPageResponse.nextCursor
- */
- fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor")
-
- override fun items(): List = data()
-
- override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent
-
- fun nextPageParams(): AccountListParams {
- val nextCursor =
- nextCursor().getOrNull()
- ?: throw IllegalStateException("Cannot construct next page params")
- return params.toBuilder().cursor(nextCursor).build()
- }
-
- override fun nextPage(): AccountListPage = service.list(nextPageParams())
-
- fun autoPager(): AutoPager = AutoPager.from(this)
-
- /** The parameters that were used to request this page. */
- fun params(): AccountListParams = params
-
- /** The response that this page was parsed from. */
- fun response(): AccountListPageResponse = response
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /**
- * Returns a mutable builder for constructing an instance of [AccountListPage].
- *
- * The following fields are required:
- * ```java
- * .service()
- * .params()
- * .response()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [AccountListPage]. */
- class Builder internal constructor() {
-
- private var service: AccountService? = null
- private var params: AccountListParams? = null
- private var response: AccountListPageResponse? = null
-
- @JvmSynthetic
- internal fun from(accountListPage: AccountListPage) = apply {
- service = accountListPage.service
- params = accountListPage.params
- response = accountListPage.response
- }
-
- fun service(service: AccountService) = apply { this.service = service }
-
- /** The parameters that were used to request this page. */
- fun params(params: AccountListParams) = apply { this.params = params }
-
- /** The response that this page was parsed from. */
- fun response(response: AccountListPageResponse) = apply { this.response = response }
-
- /**
- * Returns an immutable instance of [AccountListPage].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .service()
- * .params()
- * .response()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): AccountListPage =
- AccountListPage(
- checkRequired("service", service),
- checkRequired("params", params),
- checkRequired("response", response),
- )
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is AccountListPage &&
- service == other.service &&
- params == other.params &&
- response == other.response
- }
-
- override fun hashCode(): Int = Objects.hash(service, params, response)
-
- override fun toString() =
- "AccountListPage{service=$service, params=$params, response=$response}"
-}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/accounts/AccountListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/accounts/AccountListPageAsync.kt
deleted file mode 100644
index d82c2d263..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/accounts/AccountListPageAsync.kt
+++ /dev/null
@@ -1,146 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.models.accounts
-
-import com.increase.api.core.AutoPagerAsync
-import com.increase.api.core.PageAsync
-import com.increase.api.core.checkRequired
-import com.increase.api.services.async.AccountServiceAsync
-import java.util.Objects
-import java.util.Optional
-import java.util.concurrent.CompletableFuture
-import java.util.concurrent.Executor
-import kotlin.jvm.optionals.getOrNull
-
-/** @see AccountServiceAsync.list */
-class AccountListPageAsync
-private constructor(
- private val service: AccountServiceAsync,
- private val streamHandlerExecutor: Executor,
- private val params: AccountListParams,
- private val response: AccountListPageResponse,
-) : PageAsync {
-
- /**
- * Delegates to [AccountListPageResponse], but gracefully handles missing data.
- *
- * @see AccountListPageResponse.data
- */
- fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList()
-
- /**
- * Delegates to [AccountListPageResponse], but gracefully handles missing data.
- *
- * @see AccountListPageResponse.nextCursor
- */
- fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor")
-
- override fun items(): List = data()
-
- override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent
-
- fun nextPageParams(): AccountListParams {
- val nextCursor =
- nextCursor().getOrNull()
- ?: throw IllegalStateException("Cannot construct next page params")
- return params.toBuilder().cursor(nextCursor).build()
- }
-
- override fun nextPage(): CompletableFuture =
- service.list(nextPageParams())
-
- fun autoPager(): AutoPagerAsync = AutoPagerAsync.from(this, streamHandlerExecutor)
-
- /** The parameters that were used to request this page. */
- fun params(): AccountListParams = params
-
- /** The response that this page was parsed from. */
- fun response(): AccountListPageResponse = response
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /**
- * Returns a mutable builder for constructing an instance of [AccountListPageAsync].
- *
- * The following fields are required:
- * ```java
- * .service()
- * .streamHandlerExecutor()
- * .params()
- * .response()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [AccountListPageAsync]. */
- class Builder internal constructor() {
-
- private var service: AccountServiceAsync? = null
- private var streamHandlerExecutor: Executor? = null
- private var params: AccountListParams? = null
- private var response: AccountListPageResponse? = null
-
- @JvmSynthetic
- internal fun from(accountListPageAsync: AccountListPageAsync) = apply {
- service = accountListPageAsync.service
- streamHandlerExecutor = accountListPageAsync.streamHandlerExecutor
- params = accountListPageAsync.params
- response = accountListPageAsync.response
- }
-
- fun service(service: AccountServiceAsync) = apply { this.service = service }
-
- fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply {
- this.streamHandlerExecutor = streamHandlerExecutor
- }
-
- /** The parameters that were used to request this page. */
- fun params(params: AccountListParams) = apply { this.params = params }
-
- /** The response that this page was parsed from. */
- fun response(response: AccountListPageResponse) = apply { this.response = response }
-
- /**
- * Returns an immutable instance of [AccountListPageAsync].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .service()
- * .streamHandlerExecutor()
- * .params()
- * .response()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): AccountListPageAsync =
- AccountListPageAsync(
- checkRequired("service", service),
- checkRequired("streamHandlerExecutor", streamHandlerExecutor),
- checkRequired("params", params),
- checkRequired("response", response),
- )
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is AccountListPageAsync &&
- service == other.service &&
- streamHandlerExecutor == other.streamHandlerExecutor &&
- params == other.params &&
- response == other.response
- }
-
- override fun hashCode(): Int = Objects.hash(service, streamHandlerExecutor, params, response)
-
- override fun toString() =
- "AccountListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}"
-}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/accounts/AccountListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/accounts/AccountListResponse.kt
similarity index 90%
rename from increase-java-core/src/main/kotlin/com/increase/api/models/accounts/AccountListPageResponse.kt
rename to increase-java-core/src/main/kotlin/com/increase/api/models/accounts/AccountListResponse.kt
index 8867834b1..4bb2ba9af 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/accounts/AccountListPageResponse.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/accounts/AccountListResponse.kt
@@ -20,7 +20,7 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/** A list of Account objects. */
-class AccountListPageResponse
+class AccountListResponse
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val data: JsonField>,
@@ -81,7 +81,7 @@ private constructor(
companion object {
/**
- * Returns a mutable builder for constructing an instance of [AccountListPageResponse].
+ * Returns a mutable builder for constructing an instance of [AccountListResponse].
*
* The following fields are required:
* ```java
@@ -92,7 +92,7 @@ private constructor(
@JvmStatic fun builder() = Builder()
}
- /** A builder for [AccountListPageResponse]. */
+ /** A builder for [AccountListResponse]. */
class Builder internal constructor() {
private var data: JsonField>? = null
@@ -100,10 +100,10 @@ private constructor(
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
- internal fun from(accountListPageResponse: AccountListPageResponse) = apply {
- data = accountListPageResponse.data.map { it.toMutableList() }
- nextCursor = accountListPageResponse.nextCursor
- additionalProperties = accountListPageResponse.additionalProperties.toMutableMap()
+ internal fun from(accountListResponse: AccountListResponse) = apply {
+ data = accountListResponse.data.map { it.toMutableList() }
+ nextCursor = accountListResponse.nextCursor
+ additionalProperties = accountListResponse.additionalProperties.toMutableMap()
}
/** The contents of the list. */
@@ -167,7 +167,7 @@ private constructor(
}
/**
- * Returns an immutable instance of [AccountListPageResponse].
+ * Returns an immutable instance of [AccountListResponse].
*
* Further updates to this [Builder] will not mutate the returned instance.
*
@@ -179,8 +179,8 @@ private constructor(
*
* @throws IllegalStateException if any required field is unset.
*/
- fun build(): AccountListPageResponse =
- AccountListPageResponse(
+ fun build(): AccountListResponse =
+ AccountListResponse(
checkRequired("data", data).map { it.toImmutable() },
checkRequired("nextCursor", nextCursor),
additionalProperties.toMutableMap(),
@@ -189,7 +189,7 @@ private constructor(
private var validated: Boolean = false
- fun validate(): AccountListPageResponse = apply {
+ fun validate(): AccountListResponse = apply {
if (validated) {
return@apply
}
@@ -222,7 +222,7 @@ private constructor(
return true
}
- return other is AccountListPageResponse &&
+ return other is AccountListResponse &&
data == other.data &&
nextCursor == other.nextCursor &&
additionalProperties == other.additionalProperties
@@ -233,5 +233,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "AccountListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}"
+ "AccountListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}"
}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/accountstatements/AccountStatementListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/accountstatements/AccountStatementListPage.kt
deleted file mode 100644
index aea9fbf46..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/accountstatements/AccountStatementListPage.kt
+++ /dev/null
@@ -1,135 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.models.accountstatements
-
-import com.increase.api.core.AutoPager
-import com.increase.api.core.Page
-import com.increase.api.core.checkRequired
-import com.increase.api.services.blocking.AccountStatementService
-import java.util.Objects
-import java.util.Optional
-import kotlin.jvm.optionals.getOrNull
-
-/** @see AccountStatementService.list */
-class AccountStatementListPage
-private constructor(
- private val service: AccountStatementService,
- private val params: AccountStatementListParams,
- private val response: AccountStatementListPageResponse,
-) : Page {
-
- /**
- * Delegates to [AccountStatementListPageResponse], but gracefully handles missing data.
- *
- * @see AccountStatementListPageResponse.data
- */
- fun data(): List =
- response._data().getOptional("data").getOrNull() ?: emptyList()
-
- /**
- * Delegates to [AccountStatementListPageResponse], but gracefully handles missing data.
- *
- * @see AccountStatementListPageResponse.nextCursor
- */
- fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor")
-
- override fun items(): List = data()
-
- override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent
-
- fun nextPageParams(): AccountStatementListParams {
- val nextCursor =
- nextCursor().getOrNull()
- ?: throw IllegalStateException("Cannot construct next page params")
- return params.toBuilder().cursor(nextCursor).build()
- }
-
- override fun nextPage(): AccountStatementListPage = service.list(nextPageParams())
-
- fun autoPager(): AutoPager = AutoPager.from(this)
-
- /** The parameters that were used to request this page. */
- fun params(): AccountStatementListParams = params
-
- /** The response that this page was parsed from. */
- fun response(): AccountStatementListPageResponse = response
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /**
- * Returns a mutable builder for constructing an instance of [AccountStatementListPage].
- *
- * The following fields are required:
- * ```java
- * .service()
- * .params()
- * .response()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [AccountStatementListPage]. */
- class Builder internal constructor() {
-
- private var service: AccountStatementService? = null
- private var params: AccountStatementListParams? = null
- private var response: AccountStatementListPageResponse? = null
-
- @JvmSynthetic
- internal fun from(accountStatementListPage: AccountStatementListPage) = apply {
- service = accountStatementListPage.service
- params = accountStatementListPage.params
- response = accountStatementListPage.response
- }
-
- fun service(service: AccountStatementService) = apply { this.service = service }
-
- /** The parameters that were used to request this page. */
- fun params(params: AccountStatementListParams) = apply { this.params = params }
-
- /** The response that this page was parsed from. */
- fun response(response: AccountStatementListPageResponse) = apply {
- this.response = response
- }
-
- /**
- * Returns an immutable instance of [AccountStatementListPage].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .service()
- * .params()
- * .response()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): AccountStatementListPage =
- AccountStatementListPage(
- checkRequired("service", service),
- checkRequired("params", params),
- checkRequired("response", response),
- )
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is AccountStatementListPage &&
- service == other.service &&
- params == other.params &&
- response == other.response
- }
-
- override fun hashCode(): Int = Objects.hash(service, params, response)
-
- override fun toString() =
- "AccountStatementListPage{service=$service, params=$params, response=$response}"
-}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/accountstatements/AccountStatementListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/accountstatements/AccountStatementListPageAsync.kt
deleted file mode 100644
index 4f880a6e3..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/accountstatements/AccountStatementListPageAsync.kt
+++ /dev/null
@@ -1,151 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.models.accountstatements
-
-import com.increase.api.core.AutoPagerAsync
-import com.increase.api.core.PageAsync
-import com.increase.api.core.checkRequired
-import com.increase.api.services.async.AccountStatementServiceAsync
-import java.util.Objects
-import java.util.Optional
-import java.util.concurrent.CompletableFuture
-import java.util.concurrent.Executor
-import kotlin.jvm.optionals.getOrNull
-
-/** @see AccountStatementServiceAsync.list */
-class AccountStatementListPageAsync
-private constructor(
- private val service: AccountStatementServiceAsync,
- private val streamHandlerExecutor: Executor,
- private val params: AccountStatementListParams,
- private val response: AccountStatementListPageResponse,
-) : PageAsync {
-
- /**
- * Delegates to [AccountStatementListPageResponse], but gracefully handles missing data.
- *
- * @see AccountStatementListPageResponse.data
- */
- fun data(): List =
- response._data().getOptional("data").getOrNull() ?: emptyList()
-
- /**
- * Delegates to [AccountStatementListPageResponse], but gracefully handles missing data.
- *
- * @see AccountStatementListPageResponse.nextCursor
- */
- fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor")
-
- override fun items(): List = data()
-
- override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent
-
- fun nextPageParams(): AccountStatementListParams {
- val nextCursor =
- nextCursor().getOrNull()
- ?: throw IllegalStateException("Cannot construct next page params")
- return params.toBuilder().cursor(nextCursor).build()
- }
-
- override fun nextPage(): CompletableFuture =
- service.list(nextPageParams())
-
- fun autoPager(): AutoPagerAsync =
- AutoPagerAsync.from(this, streamHandlerExecutor)
-
- /** The parameters that were used to request this page. */
- fun params(): AccountStatementListParams = params
-
- /** The response that this page was parsed from. */
- fun response(): AccountStatementListPageResponse = response
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /**
- * Returns a mutable builder for constructing an instance of
- * [AccountStatementListPageAsync].
- *
- * The following fields are required:
- * ```java
- * .service()
- * .streamHandlerExecutor()
- * .params()
- * .response()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [AccountStatementListPageAsync]. */
- class Builder internal constructor() {
-
- private var service: AccountStatementServiceAsync? = null
- private var streamHandlerExecutor: Executor? = null
- private var params: AccountStatementListParams? = null
- private var response: AccountStatementListPageResponse? = null
-
- @JvmSynthetic
- internal fun from(accountStatementListPageAsync: AccountStatementListPageAsync) = apply {
- service = accountStatementListPageAsync.service
- streamHandlerExecutor = accountStatementListPageAsync.streamHandlerExecutor
- params = accountStatementListPageAsync.params
- response = accountStatementListPageAsync.response
- }
-
- fun service(service: AccountStatementServiceAsync) = apply { this.service = service }
-
- fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply {
- this.streamHandlerExecutor = streamHandlerExecutor
- }
-
- /** The parameters that were used to request this page. */
- fun params(params: AccountStatementListParams) = apply { this.params = params }
-
- /** The response that this page was parsed from. */
- fun response(response: AccountStatementListPageResponse) = apply {
- this.response = response
- }
-
- /**
- * Returns an immutable instance of [AccountStatementListPageAsync].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .service()
- * .streamHandlerExecutor()
- * .params()
- * .response()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): AccountStatementListPageAsync =
- AccountStatementListPageAsync(
- checkRequired("service", service),
- checkRequired("streamHandlerExecutor", streamHandlerExecutor),
- checkRequired("params", params),
- checkRequired("response", response),
- )
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is AccountStatementListPageAsync &&
- service == other.service &&
- streamHandlerExecutor == other.streamHandlerExecutor &&
- params == other.params &&
- response == other.response
- }
-
- override fun hashCode(): Int = Objects.hash(service, streamHandlerExecutor, params, response)
-
- override fun toString() =
- "AccountStatementListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}"
-}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/accountstatements/AccountStatementListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/accountstatements/AccountStatementListResponse.kt
similarity index 89%
rename from increase-java-core/src/main/kotlin/com/increase/api/models/accountstatements/AccountStatementListPageResponse.kt
rename to increase-java-core/src/main/kotlin/com/increase/api/models/accountstatements/AccountStatementListResponse.kt
index 1f40891bb..b17a4f7c6 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/accountstatements/AccountStatementListPageResponse.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/accountstatements/AccountStatementListResponse.kt
@@ -20,7 +20,7 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/** A list of Account Statement objects. */
-class AccountStatementListPageResponse
+class AccountStatementListResponse
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val data: JsonField>,
@@ -83,8 +83,7 @@ private constructor(
companion object {
/**
- * Returns a mutable builder for constructing an instance of
- * [AccountStatementListPageResponse].
+ * Returns a mutable builder for constructing an instance of [AccountStatementListResponse].
*
* The following fields are required:
* ```java
@@ -95,7 +94,7 @@ private constructor(
@JvmStatic fun builder() = Builder()
}
- /** A builder for [AccountStatementListPageResponse]. */
+ /** A builder for [AccountStatementListResponse]. */
class Builder internal constructor() {
private var data: JsonField>? = null
@@ -103,13 +102,11 @@ private constructor(
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
- internal fun from(accountStatementListPageResponse: AccountStatementListPageResponse) =
- apply {
- data = accountStatementListPageResponse.data.map { it.toMutableList() }
- nextCursor = accountStatementListPageResponse.nextCursor
- additionalProperties =
- accountStatementListPageResponse.additionalProperties.toMutableMap()
- }
+ internal fun from(accountStatementListResponse: AccountStatementListResponse) = apply {
+ data = accountStatementListResponse.data.map { it.toMutableList() }
+ nextCursor = accountStatementListResponse.nextCursor
+ additionalProperties = accountStatementListResponse.additionalProperties.toMutableMap()
+ }
/** The contents of the list. */
fun data(data: List) = data(JsonField.of(data))
@@ -172,7 +169,7 @@ private constructor(
}
/**
- * Returns an immutable instance of [AccountStatementListPageResponse].
+ * Returns an immutable instance of [AccountStatementListResponse].
*
* Further updates to this [Builder] will not mutate the returned instance.
*
@@ -184,8 +181,8 @@ private constructor(
*
* @throws IllegalStateException if any required field is unset.
*/
- fun build(): AccountStatementListPageResponse =
- AccountStatementListPageResponse(
+ fun build(): AccountStatementListResponse =
+ AccountStatementListResponse(
checkRequired("data", data).map { it.toImmutable() },
checkRequired("nextCursor", nextCursor),
additionalProperties.toMutableMap(),
@@ -194,7 +191,7 @@ private constructor(
private var validated: Boolean = false
- fun validate(): AccountStatementListPageResponse = apply {
+ fun validate(): AccountStatementListResponse = apply {
if (validated) {
return@apply
}
@@ -227,7 +224,7 @@ private constructor(
return true
}
- return other is AccountStatementListPageResponse &&
+ return other is AccountStatementListResponse &&
data == other.data &&
nextCursor == other.nextCursor &&
additionalProperties == other.additionalProperties
@@ -238,5 +235,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "AccountStatementListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}"
+ "AccountStatementListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}"
}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/accounttransfers/AccountTransferListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/accounttransfers/AccountTransferListPage.kt
deleted file mode 100644
index ee6c7e345..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/accounttransfers/AccountTransferListPage.kt
+++ /dev/null
@@ -1,133 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.models.accounttransfers
-
-import com.increase.api.core.AutoPager
-import com.increase.api.core.Page
-import com.increase.api.core.checkRequired
-import com.increase.api.services.blocking.AccountTransferService
-import java.util.Objects
-import java.util.Optional
-import kotlin.jvm.optionals.getOrNull
-
-/** @see AccountTransferService.list */
-class AccountTransferListPage
-private constructor(
- private val service: AccountTransferService,
- private val params: AccountTransferListParams,
- private val response: AccountTransferListPageResponse,
-) : Page {
-
- /**
- * Delegates to [AccountTransferListPageResponse], but gracefully handles missing data.
- *
- * @see AccountTransferListPageResponse.data
- */
- fun data(): List =
- response._data().getOptional("data").getOrNull() ?: emptyList()
-
- /**
- * Delegates to [AccountTransferListPageResponse], but gracefully handles missing data.
- *
- * @see AccountTransferListPageResponse.nextCursor
- */
- fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor")
-
- override fun items(): List = data()
-
- override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent
-
- fun nextPageParams(): AccountTransferListParams {
- val nextCursor =
- nextCursor().getOrNull()
- ?: throw IllegalStateException("Cannot construct next page params")
- return params.toBuilder().cursor(nextCursor).build()
- }
-
- override fun nextPage(): AccountTransferListPage = service.list(nextPageParams())
-
- fun autoPager(): AutoPager = AutoPager.from(this)
-
- /** The parameters that were used to request this page. */
- fun params(): AccountTransferListParams = params
-
- /** The response that this page was parsed from. */
- fun response(): AccountTransferListPageResponse = response
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /**
- * Returns a mutable builder for constructing an instance of [AccountTransferListPage].
- *
- * The following fields are required:
- * ```java
- * .service()
- * .params()
- * .response()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [AccountTransferListPage]. */
- class Builder internal constructor() {
-
- private var service: AccountTransferService? = null
- private var params: AccountTransferListParams? = null
- private var response: AccountTransferListPageResponse? = null
-
- @JvmSynthetic
- internal fun from(accountTransferListPage: AccountTransferListPage) = apply {
- service = accountTransferListPage.service
- params = accountTransferListPage.params
- response = accountTransferListPage.response
- }
-
- fun service(service: AccountTransferService) = apply { this.service = service }
-
- /** The parameters that were used to request this page. */
- fun params(params: AccountTransferListParams) = apply { this.params = params }
-
- /** The response that this page was parsed from. */
- fun response(response: AccountTransferListPageResponse) = apply { this.response = response }
-
- /**
- * Returns an immutable instance of [AccountTransferListPage].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .service()
- * .params()
- * .response()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): AccountTransferListPage =
- AccountTransferListPage(
- checkRequired("service", service),
- checkRequired("params", params),
- checkRequired("response", response),
- )
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is AccountTransferListPage &&
- service == other.service &&
- params == other.params &&
- response == other.response
- }
-
- override fun hashCode(): Int = Objects.hash(service, params, response)
-
- override fun toString() =
- "AccountTransferListPage{service=$service, params=$params, response=$response}"
-}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/accounttransfers/AccountTransferListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/accounttransfers/AccountTransferListPageAsync.kt
deleted file mode 100644
index dd88fd425..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/accounttransfers/AccountTransferListPageAsync.kt
+++ /dev/null
@@ -1,148 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.models.accounttransfers
-
-import com.increase.api.core.AutoPagerAsync
-import com.increase.api.core.PageAsync
-import com.increase.api.core.checkRequired
-import com.increase.api.services.async.AccountTransferServiceAsync
-import java.util.Objects
-import java.util.Optional
-import java.util.concurrent.CompletableFuture
-import java.util.concurrent.Executor
-import kotlin.jvm.optionals.getOrNull
-
-/** @see AccountTransferServiceAsync.list */
-class AccountTransferListPageAsync
-private constructor(
- private val service: AccountTransferServiceAsync,
- private val streamHandlerExecutor: Executor,
- private val params: AccountTransferListParams,
- private val response: AccountTransferListPageResponse,
-) : PageAsync {
-
- /**
- * Delegates to [AccountTransferListPageResponse], but gracefully handles missing data.
- *
- * @see AccountTransferListPageResponse.data
- */
- fun data(): List =
- response._data().getOptional("data").getOrNull() ?: emptyList()
-
- /**
- * Delegates to [AccountTransferListPageResponse], but gracefully handles missing data.
- *
- * @see AccountTransferListPageResponse.nextCursor
- */
- fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor")
-
- override fun items(): List = data()
-
- override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent
-
- fun nextPageParams(): AccountTransferListParams {
- val nextCursor =
- nextCursor().getOrNull()
- ?: throw IllegalStateException("Cannot construct next page params")
- return params.toBuilder().cursor(nextCursor).build()
- }
-
- override fun nextPage(): CompletableFuture =
- service.list(nextPageParams())
-
- fun autoPager(): AutoPagerAsync =
- AutoPagerAsync.from(this, streamHandlerExecutor)
-
- /** The parameters that were used to request this page. */
- fun params(): AccountTransferListParams = params
-
- /** The response that this page was parsed from. */
- fun response(): AccountTransferListPageResponse = response
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /**
- * Returns a mutable builder for constructing an instance of [AccountTransferListPageAsync].
- *
- * The following fields are required:
- * ```java
- * .service()
- * .streamHandlerExecutor()
- * .params()
- * .response()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [AccountTransferListPageAsync]. */
- class Builder internal constructor() {
-
- private var service: AccountTransferServiceAsync? = null
- private var streamHandlerExecutor: Executor? = null
- private var params: AccountTransferListParams? = null
- private var response: AccountTransferListPageResponse? = null
-
- @JvmSynthetic
- internal fun from(accountTransferListPageAsync: AccountTransferListPageAsync) = apply {
- service = accountTransferListPageAsync.service
- streamHandlerExecutor = accountTransferListPageAsync.streamHandlerExecutor
- params = accountTransferListPageAsync.params
- response = accountTransferListPageAsync.response
- }
-
- fun service(service: AccountTransferServiceAsync) = apply { this.service = service }
-
- fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply {
- this.streamHandlerExecutor = streamHandlerExecutor
- }
-
- /** The parameters that were used to request this page. */
- fun params(params: AccountTransferListParams) = apply { this.params = params }
-
- /** The response that this page was parsed from. */
- fun response(response: AccountTransferListPageResponse) = apply { this.response = response }
-
- /**
- * Returns an immutable instance of [AccountTransferListPageAsync].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .service()
- * .streamHandlerExecutor()
- * .params()
- * .response()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): AccountTransferListPageAsync =
- AccountTransferListPageAsync(
- checkRequired("service", service),
- checkRequired("streamHandlerExecutor", streamHandlerExecutor),
- checkRequired("params", params),
- checkRequired("response", response),
- )
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is AccountTransferListPageAsync &&
- service == other.service &&
- streamHandlerExecutor == other.streamHandlerExecutor &&
- params == other.params &&
- response == other.response
- }
-
- override fun hashCode(): Int = Objects.hash(service, streamHandlerExecutor, params, response)
-
- override fun toString() =
- "AccountTransferListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}"
-}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/accounttransfers/AccountTransferListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/accounttransfers/AccountTransferListResponse.kt
similarity index 89%
rename from increase-java-core/src/main/kotlin/com/increase/api/models/accounttransfers/AccountTransferListPageResponse.kt
rename to increase-java-core/src/main/kotlin/com/increase/api/models/accounttransfers/AccountTransferListResponse.kt
index ee7169d0e..25ddcde97 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/accounttransfers/AccountTransferListPageResponse.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/accounttransfers/AccountTransferListResponse.kt
@@ -20,7 +20,7 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/** A list of Account Transfer objects. */
-class AccountTransferListPageResponse
+class AccountTransferListResponse
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val data: JsonField>,
@@ -83,8 +83,7 @@ private constructor(
companion object {
/**
- * Returns a mutable builder for constructing an instance of
- * [AccountTransferListPageResponse].
+ * Returns a mutable builder for constructing an instance of [AccountTransferListResponse].
*
* The following fields are required:
* ```java
@@ -95,7 +94,7 @@ private constructor(
@JvmStatic fun builder() = Builder()
}
- /** A builder for [AccountTransferListPageResponse]. */
+ /** A builder for [AccountTransferListResponse]. */
class Builder internal constructor() {
private var data: JsonField>? = null
@@ -103,13 +102,11 @@ private constructor(
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
- internal fun from(accountTransferListPageResponse: AccountTransferListPageResponse) =
- apply {
- data = accountTransferListPageResponse.data.map { it.toMutableList() }
- nextCursor = accountTransferListPageResponse.nextCursor
- additionalProperties =
- accountTransferListPageResponse.additionalProperties.toMutableMap()
- }
+ internal fun from(accountTransferListResponse: AccountTransferListResponse) = apply {
+ data = accountTransferListResponse.data.map { it.toMutableList() }
+ nextCursor = accountTransferListResponse.nextCursor
+ additionalProperties = accountTransferListResponse.additionalProperties.toMutableMap()
+ }
/** The contents of the list. */
fun data(data: List) = data(JsonField.of(data))
@@ -172,7 +169,7 @@ private constructor(
}
/**
- * Returns an immutable instance of [AccountTransferListPageResponse].
+ * Returns an immutable instance of [AccountTransferListResponse].
*
* Further updates to this [Builder] will not mutate the returned instance.
*
@@ -184,8 +181,8 @@ private constructor(
*
* @throws IllegalStateException if any required field is unset.
*/
- fun build(): AccountTransferListPageResponse =
- AccountTransferListPageResponse(
+ fun build(): AccountTransferListResponse =
+ AccountTransferListResponse(
checkRequired("data", data).map { it.toImmutable() },
checkRequired("nextCursor", nextCursor),
additionalProperties.toMutableMap(),
@@ -194,7 +191,7 @@ private constructor(
private var validated: Boolean = false
- fun validate(): AccountTransferListPageResponse = apply {
+ fun validate(): AccountTransferListResponse = apply {
if (validated) {
return@apply
}
@@ -227,7 +224,7 @@ private constructor(
return true
}
- return other is AccountTransferListPageResponse &&
+ return other is AccountTransferListResponse &&
data == other.data &&
nextCursor == other.nextCursor &&
additionalProperties == other.additionalProperties
@@ -238,5 +235,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "AccountTransferListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}"
+ "AccountTransferListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}"
}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationListPage.kt
deleted file mode 100644
index 525935209..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationListPage.kt
+++ /dev/null
@@ -1,135 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.models.achprenotifications
-
-import com.increase.api.core.AutoPager
-import com.increase.api.core.Page
-import com.increase.api.core.checkRequired
-import com.increase.api.services.blocking.AchPrenotificationService
-import java.util.Objects
-import java.util.Optional
-import kotlin.jvm.optionals.getOrNull
-
-/** @see AchPrenotificationService.list */
-class AchPrenotificationListPage
-private constructor(
- private val service: AchPrenotificationService,
- private val params: AchPrenotificationListParams,
- private val response: AchPrenotificationListPageResponse,
-) : Page {
-
- /**
- * Delegates to [AchPrenotificationListPageResponse], but gracefully handles missing data.
- *
- * @see AchPrenotificationListPageResponse.data
- */
- fun data(): List =
- response._data().getOptional("data").getOrNull() ?: emptyList()
-
- /**
- * Delegates to [AchPrenotificationListPageResponse], but gracefully handles missing data.
- *
- * @see AchPrenotificationListPageResponse.nextCursor
- */
- fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor")
-
- override fun items(): List = data()
-
- override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent
-
- fun nextPageParams(): AchPrenotificationListParams {
- val nextCursor =
- nextCursor().getOrNull()
- ?: throw IllegalStateException("Cannot construct next page params")
- return params.toBuilder().cursor(nextCursor).build()
- }
-
- override fun nextPage(): AchPrenotificationListPage = service.list(nextPageParams())
-
- fun autoPager(): AutoPager = AutoPager.from(this)
-
- /** The parameters that were used to request this page. */
- fun params(): AchPrenotificationListParams = params
-
- /** The response that this page was parsed from. */
- fun response(): AchPrenotificationListPageResponse = response
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /**
- * Returns a mutable builder for constructing an instance of [AchPrenotificationListPage].
- *
- * The following fields are required:
- * ```java
- * .service()
- * .params()
- * .response()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [AchPrenotificationListPage]. */
- class Builder internal constructor() {
-
- private var service: AchPrenotificationService? = null
- private var params: AchPrenotificationListParams? = null
- private var response: AchPrenotificationListPageResponse? = null
-
- @JvmSynthetic
- internal fun from(achPrenotificationListPage: AchPrenotificationListPage) = apply {
- service = achPrenotificationListPage.service
- params = achPrenotificationListPage.params
- response = achPrenotificationListPage.response
- }
-
- fun service(service: AchPrenotificationService) = apply { this.service = service }
-
- /** The parameters that were used to request this page. */
- fun params(params: AchPrenotificationListParams) = apply { this.params = params }
-
- /** The response that this page was parsed from. */
- fun response(response: AchPrenotificationListPageResponse) = apply {
- this.response = response
- }
-
- /**
- * Returns an immutable instance of [AchPrenotificationListPage].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .service()
- * .params()
- * .response()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): AchPrenotificationListPage =
- AchPrenotificationListPage(
- checkRequired("service", service),
- checkRequired("params", params),
- checkRequired("response", response),
- )
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is AchPrenotificationListPage &&
- service == other.service &&
- params == other.params &&
- response == other.response
- }
-
- override fun hashCode(): Int = Objects.hash(service, params, response)
-
- override fun toString() =
- "AchPrenotificationListPage{service=$service, params=$params, response=$response}"
-}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationListPageAsync.kt
deleted file mode 100644
index 54ede4a4c..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationListPageAsync.kt
+++ /dev/null
@@ -1,152 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.models.achprenotifications
-
-import com.increase.api.core.AutoPagerAsync
-import com.increase.api.core.PageAsync
-import com.increase.api.core.checkRequired
-import com.increase.api.services.async.AchPrenotificationServiceAsync
-import java.util.Objects
-import java.util.Optional
-import java.util.concurrent.CompletableFuture
-import java.util.concurrent.Executor
-import kotlin.jvm.optionals.getOrNull
-
-/** @see AchPrenotificationServiceAsync.list */
-class AchPrenotificationListPageAsync
-private constructor(
- private val service: AchPrenotificationServiceAsync,
- private val streamHandlerExecutor: Executor,
- private val params: AchPrenotificationListParams,
- private val response: AchPrenotificationListPageResponse,
-) : PageAsync {
-
- /**
- * Delegates to [AchPrenotificationListPageResponse], but gracefully handles missing data.
- *
- * @see AchPrenotificationListPageResponse.data
- */
- fun data(): List =
- response._data().getOptional("data").getOrNull() ?: emptyList()
-
- /**
- * Delegates to [AchPrenotificationListPageResponse], but gracefully handles missing data.
- *
- * @see AchPrenotificationListPageResponse.nextCursor
- */
- fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor")
-
- override fun items(): List = data()
-
- override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent
-
- fun nextPageParams(): AchPrenotificationListParams {
- val nextCursor =
- nextCursor().getOrNull()
- ?: throw IllegalStateException("Cannot construct next page params")
- return params.toBuilder().cursor(nextCursor).build()
- }
-
- override fun nextPage(): CompletableFuture =
- service.list(nextPageParams())
-
- fun autoPager(): AutoPagerAsync =
- AutoPagerAsync.from(this, streamHandlerExecutor)
-
- /** The parameters that were used to request this page. */
- fun params(): AchPrenotificationListParams = params
-
- /** The response that this page was parsed from. */
- fun response(): AchPrenotificationListPageResponse = response
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /**
- * Returns a mutable builder for constructing an instance of
- * [AchPrenotificationListPageAsync].
- *
- * The following fields are required:
- * ```java
- * .service()
- * .streamHandlerExecutor()
- * .params()
- * .response()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [AchPrenotificationListPageAsync]. */
- class Builder internal constructor() {
-
- private var service: AchPrenotificationServiceAsync? = null
- private var streamHandlerExecutor: Executor? = null
- private var params: AchPrenotificationListParams? = null
- private var response: AchPrenotificationListPageResponse? = null
-
- @JvmSynthetic
- internal fun from(achPrenotificationListPageAsync: AchPrenotificationListPageAsync) =
- apply {
- service = achPrenotificationListPageAsync.service
- streamHandlerExecutor = achPrenotificationListPageAsync.streamHandlerExecutor
- params = achPrenotificationListPageAsync.params
- response = achPrenotificationListPageAsync.response
- }
-
- fun service(service: AchPrenotificationServiceAsync) = apply { this.service = service }
-
- fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply {
- this.streamHandlerExecutor = streamHandlerExecutor
- }
-
- /** The parameters that were used to request this page. */
- fun params(params: AchPrenotificationListParams) = apply { this.params = params }
-
- /** The response that this page was parsed from. */
- fun response(response: AchPrenotificationListPageResponse) = apply {
- this.response = response
- }
-
- /**
- * Returns an immutable instance of [AchPrenotificationListPageAsync].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .service()
- * .streamHandlerExecutor()
- * .params()
- * .response()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): AchPrenotificationListPageAsync =
- AchPrenotificationListPageAsync(
- checkRequired("service", service),
- checkRequired("streamHandlerExecutor", streamHandlerExecutor),
- checkRequired("params", params),
- checkRequired("response", response),
- )
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is AchPrenotificationListPageAsync &&
- service == other.service &&
- streamHandlerExecutor == other.streamHandlerExecutor &&
- params == other.params &&
- response == other.response
- }
-
- override fun hashCode(): Int = Objects.hash(service, streamHandlerExecutor, params, response)
-
- override fun toString() =
- "AchPrenotificationListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}"
-}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationListResponse.kt
similarity index 88%
rename from increase-java-core/src/main/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationListPageResponse.kt
rename to increase-java-core/src/main/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationListResponse.kt
index 683d38ca0..1824d27ea 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationListPageResponse.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationListResponse.kt
@@ -20,7 +20,7 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/** A list of ACH Prenotification objects. */
-class AchPrenotificationListPageResponse
+class AchPrenotificationListResponse
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val data: JsonField>,
@@ -84,7 +84,7 @@ private constructor(
/**
* Returns a mutable builder for constructing an instance of
- * [AchPrenotificationListPageResponse].
+ * [AchPrenotificationListResponse].
*
* The following fields are required:
* ```java
@@ -95,7 +95,7 @@ private constructor(
@JvmStatic fun builder() = Builder()
}
- /** A builder for [AchPrenotificationListPageResponse]. */
+ /** A builder for [AchPrenotificationListResponse]. */
class Builder internal constructor() {
private var data: JsonField>? = null
@@ -103,13 +103,12 @@ private constructor(
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
- internal fun from(achPrenotificationListPageResponse: AchPrenotificationListPageResponse) =
- apply {
- data = achPrenotificationListPageResponse.data.map { it.toMutableList() }
- nextCursor = achPrenotificationListPageResponse.nextCursor
- additionalProperties =
- achPrenotificationListPageResponse.additionalProperties.toMutableMap()
- }
+ internal fun from(achPrenotificationListResponse: AchPrenotificationListResponse) = apply {
+ data = achPrenotificationListResponse.data.map { it.toMutableList() }
+ nextCursor = achPrenotificationListResponse.nextCursor
+ additionalProperties =
+ achPrenotificationListResponse.additionalProperties.toMutableMap()
+ }
/** The contents of the list. */
fun data(data: List) = data(JsonField.of(data))
@@ -172,7 +171,7 @@ private constructor(
}
/**
- * Returns an immutable instance of [AchPrenotificationListPageResponse].
+ * Returns an immutable instance of [AchPrenotificationListResponse].
*
* Further updates to this [Builder] will not mutate the returned instance.
*
@@ -184,8 +183,8 @@ private constructor(
*
* @throws IllegalStateException if any required field is unset.
*/
- fun build(): AchPrenotificationListPageResponse =
- AchPrenotificationListPageResponse(
+ fun build(): AchPrenotificationListResponse =
+ AchPrenotificationListResponse(
checkRequired("data", data).map { it.toImmutable() },
checkRequired("nextCursor", nextCursor),
additionalProperties.toMutableMap(),
@@ -194,7 +193,7 @@ private constructor(
private var validated: Boolean = false
- fun validate(): AchPrenotificationListPageResponse = apply {
+ fun validate(): AchPrenotificationListResponse = apply {
if (validated) {
return@apply
}
@@ -227,7 +226,7 @@ private constructor(
return true
}
- return other is AchPrenotificationListPageResponse &&
+ return other is AchPrenotificationListResponse &&
data == other.data &&
nextCursor == other.nextCursor &&
additionalProperties == other.additionalProperties
@@ -238,5 +237,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "AchPrenotificationListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}"
+ "AchPrenotificationListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}"
}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/achtransfers/AchTransferListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/achtransfers/AchTransferListPage.kt
deleted file mode 100644
index 53ba0c336..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/achtransfers/AchTransferListPage.kt
+++ /dev/null
@@ -1,132 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.models.achtransfers
-
-import com.increase.api.core.AutoPager
-import com.increase.api.core.Page
-import com.increase.api.core.checkRequired
-import com.increase.api.services.blocking.AchTransferService
-import java.util.Objects
-import java.util.Optional
-import kotlin.jvm.optionals.getOrNull
-
-/** @see AchTransferService.list */
-class AchTransferListPage
-private constructor(
- private val service: AchTransferService,
- private val params: AchTransferListParams,
- private val response: AchTransferListPageResponse,
-) : Page {
-
- /**
- * Delegates to [AchTransferListPageResponse], but gracefully handles missing data.
- *
- * @see AchTransferListPageResponse.data
- */
- fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList()
-
- /**
- * Delegates to [AchTransferListPageResponse], but gracefully handles missing data.
- *
- * @see AchTransferListPageResponse.nextCursor
- */
- fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor")
-
- override fun items(): List = data()
-
- override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent
-
- fun nextPageParams(): AchTransferListParams {
- val nextCursor =
- nextCursor().getOrNull()
- ?: throw IllegalStateException("Cannot construct next page params")
- return params.toBuilder().cursor(nextCursor).build()
- }
-
- override fun nextPage(): AchTransferListPage = service.list(nextPageParams())
-
- fun autoPager(): AutoPager = AutoPager.from(this)
-
- /** The parameters that were used to request this page. */
- fun params(): AchTransferListParams = params
-
- /** The response that this page was parsed from. */
- fun response(): AchTransferListPageResponse = response
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /**
- * Returns a mutable builder for constructing an instance of [AchTransferListPage].
- *
- * The following fields are required:
- * ```java
- * .service()
- * .params()
- * .response()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [AchTransferListPage]. */
- class Builder internal constructor() {
-
- private var service: AchTransferService? = null
- private var params: AchTransferListParams? = null
- private var response: AchTransferListPageResponse? = null
-
- @JvmSynthetic
- internal fun from(achTransferListPage: AchTransferListPage) = apply {
- service = achTransferListPage.service
- params = achTransferListPage.params
- response = achTransferListPage.response
- }
-
- fun service(service: AchTransferService) = apply { this.service = service }
-
- /** The parameters that were used to request this page. */
- fun params(params: AchTransferListParams) = apply { this.params = params }
-
- /** The response that this page was parsed from. */
- fun response(response: AchTransferListPageResponse) = apply { this.response = response }
-
- /**
- * Returns an immutable instance of [AchTransferListPage].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .service()
- * .params()
- * .response()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): AchTransferListPage =
- AchTransferListPage(
- checkRequired("service", service),
- checkRequired("params", params),
- checkRequired("response", response),
- )
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is AchTransferListPage &&
- service == other.service &&
- params == other.params &&
- response == other.response
- }
-
- override fun hashCode(): Int = Objects.hash(service, params, response)
-
- override fun toString() =
- "AchTransferListPage{service=$service, params=$params, response=$response}"
-}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/achtransfers/AchTransferListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/achtransfers/AchTransferListPageAsync.kt
deleted file mode 100644
index ed0c92d58..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/achtransfers/AchTransferListPageAsync.kt
+++ /dev/null
@@ -1,146 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.models.achtransfers
-
-import com.increase.api.core.AutoPagerAsync
-import com.increase.api.core.PageAsync
-import com.increase.api.core.checkRequired
-import com.increase.api.services.async.AchTransferServiceAsync
-import java.util.Objects
-import java.util.Optional
-import java.util.concurrent.CompletableFuture
-import java.util.concurrent.Executor
-import kotlin.jvm.optionals.getOrNull
-
-/** @see AchTransferServiceAsync.list */
-class AchTransferListPageAsync
-private constructor(
- private val service: AchTransferServiceAsync,
- private val streamHandlerExecutor: Executor,
- private val params: AchTransferListParams,
- private val response: AchTransferListPageResponse,
-) : PageAsync {
-
- /**
- * Delegates to [AchTransferListPageResponse], but gracefully handles missing data.
- *
- * @see AchTransferListPageResponse.data
- */
- fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList()
-
- /**
- * Delegates to [AchTransferListPageResponse], but gracefully handles missing data.
- *
- * @see AchTransferListPageResponse.nextCursor
- */
- fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor")
-
- override fun items(): List = data()
-
- override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent
-
- fun nextPageParams(): AchTransferListParams {
- val nextCursor =
- nextCursor().getOrNull()
- ?: throw IllegalStateException("Cannot construct next page params")
- return params.toBuilder().cursor(nextCursor).build()
- }
-
- override fun nextPage(): CompletableFuture =
- service.list(nextPageParams())
-
- fun autoPager(): AutoPagerAsync = AutoPagerAsync.from(this, streamHandlerExecutor)
-
- /** The parameters that were used to request this page. */
- fun params(): AchTransferListParams = params
-
- /** The response that this page was parsed from. */
- fun response(): AchTransferListPageResponse = response
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /**
- * Returns a mutable builder for constructing an instance of [AchTransferListPageAsync].
- *
- * The following fields are required:
- * ```java
- * .service()
- * .streamHandlerExecutor()
- * .params()
- * .response()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [AchTransferListPageAsync]. */
- class Builder internal constructor() {
-
- private var service: AchTransferServiceAsync? = null
- private var streamHandlerExecutor: Executor? = null
- private var params: AchTransferListParams? = null
- private var response: AchTransferListPageResponse? = null
-
- @JvmSynthetic
- internal fun from(achTransferListPageAsync: AchTransferListPageAsync) = apply {
- service = achTransferListPageAsync.service
- streamHandlerExecutor = achTransferListPageAsync.streamHandlerExecutor
- params = achTransferListPageAsync.params
- response = achTransferListPageAsync.response
- }
-
- fun service(service: AchTransferServiceAsync) = apply { this.service = service }
-
- fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply {
- this.streamHandlerExecutor = streamHandlerExecutor
- }
-
- /** The parameters that were used to request this page. */
- fun params(params: AchTransferListParams) = apply { this.params = params }
-
- /** The response that this page was parsed from. */
- fun response(response: AchTransferListPageResponse) = apply { this.response = response }
-
- /**
- * Returns an immutable instance of [AchTransferListPageAsync].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .service()
- * .streamHandlerExecutor()
- * .params()
- * .response()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): AchTransferListPageAsync =
- AchTransferListPageAsync(
- checkRequired("service", service),
- checkRequired("streamHandlerExecutor", streamHandlerExecutor),
- checkRequired("params", params),
- checkRequired("response", response),
- )
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is AchTransferListPageAsync &&
- service == other.service &&
- streamHandlerExecutor == other.streamHandlerExecutor &&
- params == other.params &&
- response == other.response
- }
-
- override fun hashCode(): Int = Objects.hash(service, streamHandlerExecutor, params, response)
-
- override fun toString() =
- "AchTransferListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}"
-}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/achtransfers/AchTransferListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/achtransfers/AchTransferListResponse.kt
similarity index 89%
rename from increase-java-core/src/main/kotlin/com/increase/api/models/achtransfers/AchTransferListPageResponse.kt
rename to increase-java-core/src/main/kotlin/com/increase/api/models/achtransfers/AchTransferListResponse.kt
index ba224a5ea..de23515d3 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/achtransfers/AchTransferListPageResponse.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/achtransfers/AchTransferListResponse.kt
@@ -20,7 +20,7 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/** A list of ACH Transfer objects. */
-class AchTransferListPageResponse
+class AchTransferListResponse
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val data: JsonField>,
@@ -81,7 +81,7 @@ private constructor(
companion object {
/**
- * Returns a mutable builder for constructing an instance of [AchTransferListPageResponse].
+ * Returns a mutable builder for constructing an instance of [AchTransferListResponse].
*
* The following fields are required:
* ```java
@@ -92,7 +92,7 @@ private constructor(
@JvmStatic fun builder() = Builder()
}
- /** A builder for [AchTransferListPageResponse]. */
+ /** A builder for [AchTransferListResponse]. */
class Builder internal constructor() {
private var data: JsonField>? = null
@@ -100,10 +100,10 @@ private constructor(
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
- internal fun from(achTransferListPageResponse: AchTransferListPageResponse) = apply {
- data = achTransferListPageResponse.data.map { it.toMutableList() }
- nextCursor = achTransferListPageResponse.nextCursor
- additionalProperties = achTransferListPageResponse.additionalProperties.toMutableMap()
+ internal fun from(achTransferListResponse: AchTransferListResponse) = apply {
+ data = achTransferListResponse.data.map { it.toMutableList() }
+ nextCursor = achTransferListResponse.nextCursor
+ additionalProperties = achTransferListResponse.additionalProperties.toMutableMap()
}
/** The contents of the list. */
@@ -167,7 +167,7 @@ private constructor(
}
/**
- * Returns an immutable instance of [AchTransferListPageResponse].
+ * Returns an immutable instance of [AchTransferListResponse].
*
* Further updates to this [Builder] will not mutate the returned instance.
*
@@ -179,8 +179,8 @@ private constructor(
*
* @throws IllegalStateException if any required field is unset.
*/
- fun build(): AchTransferListPageResponse =
- AchTransferListPageResponse(
+ fun build(): AchTransferListResponse =
+ AchTransferListResponse(
checkRequired("data", data).map { it.toImmutable() },
checkRequired("nextCursor", nextCursor),
additionalProperties.toMutableMap(),
@@ -189,7 +189,7 @@ private constructor(
private var validated: Boolean = false
- fun validate(): AchTransferListPageResponse = apply {
+ fun validate(): AchTransferListResponse = apply {
if (validated) {
return@apply
}
@@ -222,7 +222,7 @@ private constructor(
return true
}
- return other is AchTransferListPageResponse &&
+ return other is AchTransferListResponse &&
data == other.data &&
nextCursor == other.nextCursor &&
additionalProperties == other.additionalProperties
@@ -233,5 +233,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "AchTransferListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}"
+ "AchTransferListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}"
}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingaccounts/BookkeepingAccountListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingaccounts/BookkeepingAccountListPage.kt
deleted file mode 100644
index cd7b6b4e7..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingaccounts/BookkeepingAccountListPage.kt
+++ /dev/null
@@ -1,135 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.models.bookkeepingaccounts
-
-import com.increase.api.core.AutoPager
-import com.increase.api.core.Page
-import com.increase.api.core.checkRequired
-import com.increase.api.services.blocking.BookkeepingAccountService
-import java.util.Objects
-import java.util.Optional
-import kotlin.jvm.optionals.getOrNull
-
-/** @see BookkeepingAccountService.list */
-class BookkeepingAccountListPage
-private constructor(
- private val service: BookkeepingAccountService,
- private val params: BookkeepingAccountListParams,
- private val response: BookkeepingAccountListPageResponse,
-) : Page {
-
- /**
- * Delegates to [BookkeepingAccountListPageResponse], but gracefully handles missing data.
- *
- * @see BookkeepingAccountListPageResponse.data
- */
- fun data(): List =
- response._data().getOptional("data").getOrNull() ?: emptyList()
-
- /**
- * Delegates to [BookkeepingAccountListPageResponse], but gracefully handles missing data.
- *
- * @see BookkeepingAccountListPageResponse.nextCursor
- */
- fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor")
-
- override fun items(): List = data()
-
- override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent
-
- fun nextPageParams(): BookkeepingAccountListParams {
- val nextCursor =
- nextCursor().getOrNull()
- ?: throw IllegalStateException("Cannot construct next page params")
- return params.toBuilder().cursor(nextCursor).build()
- }
-
- override fun nextPage(): BookkeepingAccountListPage = service.list(nextPageParams())
-
- fun autoPager(): AutoPager = AutoPager.from(this)
-
- /** The parameters that were used to request this page. */
- fun params(): BookkeepingAccountListParams = params
-
- /** The response that this page was parsed from. */
- fun response(): BookkeepingAccountListPageResponse = response
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /**
- * Returns a mutable builder for constructing an instance of [BookkeepingAccountListPage].
- *
- * The following fields are required:
- * ```java
- * .service()
- * .params()
- * .response()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [BookkeepingAccountListPage]. */
- class Builder internal constructor() {
-
- private var service: BookkeepingAccountService? = null
- private var params: BookkeepingAccountListParams? = null
- private var response: BookkeepingAccountListPageResponse? = null
-
- @JvmSynthetic
- internal fun from(bookkeepingAccountListPage: BookkeepingAccountListPage) = apply {
- service = bookkeepingAccountListPage.service
- params = bookkeepingAccountListPage.params
- response = bookkeepingAccountListPage.response
- }
-
- fun service(service: BookkeepingAccountService) = apply { this.service = service }
-
- /** The parameters that were used to request this page. */
- fun params(params: BookkeepingAccountListParams) = apply { this.params = params }
-
- /** The response that this page was parsed from. */
- fun response(response: BookkeepingAccountListPageResponse) = apply {
- this.response = response
- }
-
- /**
- * Returns an immutable instance of [BookkeepingAccountListPage].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .service()
- * .params()
- * .response()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): BookkeepingAccountListPage =
- BookkeepingAccountListPage(
- checkRequired("service", service),
- checkRequired("params", params),
- checkRequired("response", response),
- )
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is BookkeepingAccountListPage &&
- service == other.service &&
- params == other.params &&
- response == other.response
- }
-
- override fun hashCode(): Int = Objects.hash(service, params, response)
-
- override fun toString() =
- "BookkeepingAccountListPage{service=$service, params=$params, response=$response}"
-}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingaccounts/BookkeepingAccountListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingaccounts/BookkeepingAccountListPageAsync.kt
deleted file mode 100644
index 80eecd7c9..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingaccounts/BookkeepingAccountListPageAsync.kt
+++ /dev/null
@@ -1,152 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.models.bookkeepingaccounts
-
-import com.increase.api.core.AutoPagerAsync
-import com.increase.api.core.PageAsync
-import com.increase.api.core.checkRequired
-import com.increase.api.services.async.BookkeepingAccountServiceAsync
-import java.util.Objects
-import java.util.Optional
-import java.util.concurrent.CompletableFuture
-import java.util.concurrent.Executor
-import kotlin.jvm.optionals.getOrNull
-
-/** @see BookkeepingAccountServiceAsync.list */
-class BookkeepingAccountListPageAsync
-private constructor(
- private val service: BookkeepingAccountServiceAsync,
- private val streamHandlerExecutor: Executor,
- private val params: BookkeepingAccountListParams,
- private val response: BookkeepingAccountListPageResponse,
-) : PageAsync {
-
- /**
- * Delegates to [BookkeepingAccountListPageResponse], but gracefully handles missing data.
- *
- * @see BookkeepingAccountListPageResponse.data
- */
- fun data(): List =
- response._data().getOptional("data").getOrNull() ?: emptyList()
-
- /**
- * Delegates to [BookkeepingAccountListPageResponse], but gracefully handles missing data.
- *
- * @see BookkeepingAccountListPageResponse.nextCursor
- */
- fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor")
-
- override fun items(): List = data()
-
- override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent
-
- fun nextPageParams(): BookkeepingAccountListParams {
- val nextCursor =
- nextCursor().getOrNull()
- ?: throw IllegalStateException("Cannot construct next page params")
- return params.toBuilder().cursor(nextCursor).build()
- }
-
- override fun nextPage(): CompletableFuture =
- service.list(nextPageParams())
-
- fun autoPager(): AutoPagerAsync =
- AutoPagerAsync.from(this, streamHandlerExecutor)
-
- /** The parameters that were used to request this page. */
- fun params(): BookkeepingAccountListParams = params
-
- /** The response that this page was parsed from. */
- fun response(): BookkeepingAccountListPageResponse = response
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /**
- * Returns a mutable builder for constructing an instance of
- * [BookkeepingAccountListPageAsync].
- *
- * The following fields are required:
- * ```java
- * .service()
- * .streamHandlerExecutor()
- * .params()
- * .response()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [BookkeepingAccountListPageAsync]. */
- class Builder internal constructor() {
-
- private var service: BookkeepingAccountServiceAsync? = null
- private var streamHandlerExecutor: Executor? = null
- private var params: BookkeepingAccountListParams? = null
- private var response: BookkeepingAccountListPageResponse? = null
-
- @JvmSynthetic
- internal fun from(bookkeepingAccountListPageAsync: BookkeepingAccountListPageAsync) =
- apply {
- service = bookkeepingAccountListPageAsync.service
- streamHandlerExecutor = bookkeepingAccountListPageAsync.streamHandlerExecutor
- params = bookkeepingAccountListPageAsync.params
- response = bookkeepingAccountListPageAsync.response
- }
-
- fun service(service: BookkeepingAccountServiceAsync) = apply { this.service = service }
-
- fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply {
- this.streamHandlerExecutor = streamHandlerExecutor
- }
-
- /** The parameters that were used to request this page. */
- fun params(params: BookkeepingAccountListParams) = apply { this.params = params }
-
- /** The response that this page was parsed from. */
- fun response(response: BookkeepingAccountListPageResponse) = apply {
- this.response = response
- }
-
- /**
- * Returns an immutable instance of [BookkeepingAccountListPageAsync].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .service()
- * .streamHandlerExecutor()
- * .params()
- * .response()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): BookkeepingAccountListPageAsync =
- BookkeepingAccountListPageAsync(
- checkRequired("service", service),
- checkRequired("streamHandlerExecutor", streamHandlerExecutor),
- checkRequired("params", params),
- checkRequired("response", response),
- )
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is BookkeepingAccountListPageAsync &&
- service == other.service &&
- streamHandlerExecutor == other.streamHandlerExecutor &&
- params == other.params &&
- response == other.response
- }
-
- override fun hashCode(): Int = Objects.hash(service, streamHandlerExecutor, params, response)
-
- override fun toString() =
- "BookkeepingAccountListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}"
-}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingaccounts/BookkeepingAccountListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingaccounts/BookkeepingAccountListResponse.kt
similarity index 88%
rename from increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingaccounts/BookkeepingAccountListPageResponse.kt
rename to increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingaccounts/BookkeepingAccountListResponse.kt
index ab8d56227..e7b3edb98 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingaccounts/BookkeepingAccountListPageResponse.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingaccounts/BookkeepingAccountListResponse.kt
@@ -20,7 +20,7 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/** A list of Bookkeeping Account objects. */
-class BookkeepingAccountListPageResponse
+class BookkeepingAccountListResponse
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val data: JsonField>,
@@ -84,7 +84,7 @@ private constructor(
/**
* Returns a mutable builder for constructing an instance of
- * [BookkeepingAccountListPageResponse].
+ * [BookkeepingAccountListResponse].
*
* The following fields are required:
* ```java
@@ -95,7 +95,7 @@ private constructor(
@JvmStatic fun builder() = Builder()
}
- /** A builder for [BookkeepingAccountListPageResponse]. */
+ /** A builder for [BookkeepingAccountListResponse]. */
class Builder internal constructor() {
private var data: JsonField>? = null
@@ -103,13 +103,12 @@ private constructor(
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
- internal fun from(bookkeepingAccountListPageResponse: BookkeepingAccountListPageResponse) =
- apply {
- data = bookkeepingAccountListPageResponse.data.map { it.toMutableList() }
- nextCursor = bookkeepingAccountListPageResponse.nextCursor
- additionalProperties =
- bookkeepingAccountListPageResponse.additionalProperties.toMutableMap()
- }
+ internal fun from(bookkeepingAccountListResponse: BookkeepingAccountListResponse) = apply {
+ data = bookkeepingAccountListResponse.data.map { it.toMutableList() }
+ nextCursor = bookkeepingAccountListResponse.nextCursor
+ additionalProperties =
+ bookkeepingAccountListResponse.additionalProperties.toMutableMap()
+ }
/** The contents of the list. */
fun data(data: List) = data(JsonField.of(data))
@@ -172,7 +171,7 @@ private constructor(
}
/**
- * Returns an immutable instance of [BookkeepingAccountListPageResponse].
+ * Returns an immutable instance of [BookkeepingAccountListResponse].
*
* Further updates to this [Builder] will not mutate the returned instance.
*
@@ -184,8 +183,8 @@ private constructor(
*
* @throws IllegalStateException if any required field is unset.
*/
- fun build(): BookkeepingAccountListPageResponse =
- BookkeepingAccountListPageResponse(
+ fun build(): BookkeepingAccountListResponse =
+ BookkeepingAccountListResponse(
checkRequired("data", data).map { it.toImmutable() },
checkRequired("nextCursor", nextCursor),
additionalProperties.toMutableMap(),
@@ -194,7 +193,7 @@ private constructor(
private var validated: Boolean = false
- fun validate(): BookkeepingAccountListPageResponse = apply {
+ fun validate(): BookkeepingAccountListResponse = apply {
if (validated) {
return@apply
}
@@ -227,7 +226,7 @@ private constructor(
return true
}
- return other is BookkeepingAccountListPageResponse &&
+ return other is BookkeepingAccountListResponse &&
data == other.data &&
nextCursor == other.nextCursor &&
additionalProperties == other.additionalProperties
@@ -238,5 +237,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "BookkeepingAccountListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}"
+ "BookkeepingAccountListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}"
}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingentries/BookkeepingEntryListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingentries/BookkeepingEntryListPage.kt
deleted file mode 100644
index 7a7224782..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingentries/BookkeepingEntryListPage.kt
+++ /dev/null
@@ -1,135 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.models.bookkeepingentries
-
-import com.increase.api.core.AutoPager
-import com.increase.api.core.Page
-import com.increase.api.core.checkRequired
-import com.increase.api.services.blocking.BookkeepingEntryService
-import java.util.Objects
-import java.util.Optional
-import kotlin.jvm.optionals.getOrNull
-
-/** @see BookkeepingEntryService.list */
-class BookkeepingEntryListPage
-private constructor(
- private val service: BookkeepingEntryService,
- private val params: BookkeepingEntryListParams,
- private val response: BookkeepingEntryListPageResponse,
-) : Page {
-
- /**
- * Delegates to [BookkeepingEntryListPageResponse], but gracefully handles missing data.
- *
- * @see BookkeepingEntryListPageResponse.data
- */
- fun data(): List =
- response._data().getOptional("data").getOrNull() ?: emptyList()
-
- /**
- * Delegates to [BookkeepingEntryListPageResponse], but gracefully handles missing data.
- *
- * @see BookkeepingEntryListPageResponse.nextCursor
- */
- fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor")
-
- override fun items(): List = data()
-
- override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent
-
- fun nextPageParams(): BookkeepingEntryListParams {
- val nextCursor =
- nextCursor().getOrNull()
- ?: throw IllegalStateException("Cannot construct next page params")
- return params.toBuilder().cursor(nextCursor).build()
- }
-
- override fun nextPage(): BookkeepingEntryListPage = service.list(nextPageParams())
-
- fun autoPager(): AutoPager = AutoPager.from(this)
-
- /** The parameters that were used to request this page. */
- fun params(): BookkeepingEntryListParams = params
-
- /** The response that this page was parsed from. */
- fun response(): BookkeepingEntryListPageResponse = response
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /**
- * Returns a mutable builder for constructing an instance of [BookkeepingEntryListPage].
- *
- * The following fields are required:
- * ```java
- * .service()
- * .params()
- * .response()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [BookkeepingEntryListPage]. */
- class Builder internal constructor() {
-
- private var service: BookkeepingEntryService? = null
- private var params: BookkeepingEntryListParams? = null
- private var response: BookkeepingEntryListPageResponse? = null
-
- @JvmSynthetic
- internal fun from(bookkeepingEntryListPage: BookkeepingEntryListPage) = apply {
- service = bookkeepingEntryListPage.service
- params = bookkeepingEntryListPage.params
- response = bookkeepingEntryListPage.response
- }
-
- fun service(service: BookkeepingEntryService) = apply { this.service = service }
-
- /** The parameters that were used to request this page. */
- fun params(params: BookkeepingEntryListParams) = apply { this.params = params }
-
- /** The response that this page was parsed from. */
- fun response(response: BookkeepingEntryListPageResponse) = apply {
- this.response = response
- }
-
- /**
- * Returns an immutable instance of [BookkeepingEntryListPage].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .service()
- * .params()
- * .response()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): BookkeepingEntryListPage =
- BookkeepingEntryListPage(
- checkRequired("service", service),
- checkRequired("params", params),
- checkRequired("response", response),
- )
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is BookkeepingEntryListPage &&
- service == other.service &&
- params == other.params &&
- response == other.response
- }
-
- override fun hashCode(): Int = Objects.hash(service, params, response)
-
- override fun toString() =
- "BookkeepingEntryListPage{service=$service, params=$params, response=$response}"
-}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingentries/BookkeepingEntryListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingentries/BookkeepingEntryListPageAsync.kt
deleted file mode 100644
index 0b5495cb4..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingentries/BookkeepingEntryListPageAsync.kt
+++ /dev/null
@@ -1,151 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.models.bookkeepingentries
-
-import com.increase.api.core.AutoPagerAsync
-import com.increase.api.core.PageAsync
-import com.increase.api.core.checkRequired
-import com.increase.api.services.async.BookkeepingEntryServiceAsync
-import java.util.Objects
-import java.util.Optional
-import java.util.concurrent.CompletableFuture
-import java.util.concurrent.Executor
-import kotlin.jvm.optionals.getOrNull
-
-/** @see BookkeepingEntryServiceAsync.list */
-class BookkeepingEntryListPageAsync
-private constructor(
- private val service: BookkeepingEntryServiceAsync,
- private val streamHandlerExecutor: Executor,
- private val params: BookkeepingEntryListParams,
- private val response: BookkeepingEntryListPageResponse,
-) : PageAsync {
-
- /**
- * Delegates to [BookkeepingEntryListPageResponse], but gracefully handles missing data.
- *
- * @see BookkeepingEntryListPageResponse.data
- */
- fun data(): List =
- response._data().getOptional("data").getOrNull() ?: emptyList()
-
- /**
- * Delegates to [BookkeepingEntryListPageResponse], but gracefully handles missing data.
- *
- * @see BookkeepingEntryListPageResponse.nextCursor
- */
- fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor")
-
- override fun items(): List = data()
-
- override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent
-
- fun nextPageParams(): BookkeepingEntryListParams {
- val nextCursor =
- nextCursor().getOrNull()
- ?: throw IllegalStateException("Cannot construct next page params")
- return params.toBuilder().cursor(nextCursor).build()
- }
-
- override fun nextPage(): CompletableFuture =
- service.list(nextPageParams())
-
- fun autoPager(): AutoPagerAsync =
- AutoPagerAsync.from(this, streamHandlerExecutor)
-
- /** The parameters that were used to request this page. */
- fun params(): BookkeepingEntryListParams = params
-
- /** The response that this page was parsed from. */
- fun response(): BookkeepingEntryListPageResponse = response
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /**
- * Returns a mutable builder for constructing an instance of
- * [BookkeepingEntryListPageAsync].
- *
- * The following fields are required:
- * ```java
- * .service()
- * .streamHandlerExecutor()
- * .params()
- * .response()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [BookkeepingEntryListPageAsync]. */
- class Builder internal constructor() {
-
- private var service: BookkeepingEntryServiceAsync? = null
- private var streamHandlerExecutor: Executor? = null
- private var params: BookkeepingEntryListParams? = null
- private var response: BookkeepingEntryListPageResponse? = null
-
- @JvmSynthetic
- internal fun from(bookkeepingEntryListPageAsync: BookkeepingEntryListPageAsync) = apply {
- service = bookkeepingEntryListPageAsync.service
- streamHandlerExecutor = bookkeepingEntryListPageAsync.streamHandlerExecutor
- params = bookkeepingEntryListPageAsync.params
- response = bookkeepingEntryListPageAsync.response
- }
-
- fun service(service: BookkeepingEntryServiceAsync) = apply { this.service = service }
-
- fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply {
- this.streamHandlerExecutor = streamHandlerExecutor
- }
-
- /** The parameters that were used to request this page. */
- fun params(params: BookkeepingEntryListParams) = apply { this.params = params }
-
- /** The response that this page was parsed from. */
- fun response(response: BookkeepingEntryListPageResponse) = apply {
- this.response = response
- }
-
- /**
- * Returns an immutable instance of [BookkeepingEntryListPageAsync].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .service()
- * .streamHandlerExecutor()
- * .params()
- * .response()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): BookkeepingEntryListPageAsync =
- BookkeepingEntryListPageAsync(
- checkRequired("service", service),
- checkRequired("streamHandlerExecutor", streamHandlerExecutor),
- checkRequired("params", params),
- checkRequired("response", response),
- )
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is BookkeepingEntryListPageAsync &&
- service == other.service &&
- streamHandlerExecutor == other.streamHandlerExecutor &&
- params == other.params &&
- response == other.response
- }
-
- override fun hashCode(): Int = Objects.hash(service, streamHandlerExecutor, params, response)
-
- override fun toString() =
- "BookkeepingEntryListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}"
-}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingentries/BookkeepingEntryListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingentries/BookkeepingEntryListResponse.kt
similarity index 89%
rename from increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingentries/BookkeepingEntryListPageResponse.kt
rename to increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingentries/BookkeepingEntryListResponse.kt
index 6364ab287..9c83e2ac6 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingentries/BookkeepingEntryListPageResponse.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingentries/BookkeepingEntryListResponse.kt
@@ -20,7 +20,7 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/** A list of Bookkeeping Entry objects. */
-class BookkeepingEntryListPageResponse
+class BookkeepingEntryListResponse
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val data: JsonField>,
@@ -83,8 +83,7 @@ private constructor(
companion object {
/**
- * Returns a mutable builder for constructing an instance of
- * [BookkeepingEntryListPageResponse].
+ * Returns a mutable builder for constructing an instance of [BookkeepingEntryListResponse].
*
* The following fields are required:
* ```java
@@ -95,7 +94,7 @@ private constructor(
@JvmStatic fun builder() = Builder()
}
- /** A builder for [BookkeepingEntryListPageResponse]. */
+ /** A builder for [BookkeepingEntryListResponse]. */
class Builder internal constructor() {
private var data: JsonField>? = null
@@ -103,13 +102,11 @@ private constructor(
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
- internal fun from(bookkeepingEntryListPageResponse: BookkeepingEntryListPageResponse) =
- apply {
- data = bookkeepingEntryListPageResponse.data.map { it.toMutableList() }
- nextCursor = bookkeepingEntryListPageResponse.nextCursor
- additionalProperties =
- bookkeepingEntryListPageResponse.additionalProperties.toMutableMap()
- }
+ internal fun from(bookkeepingEntryListResponse: BookkeepingEntryListResponse) = apply {
+ data = bookkeepingEntryListResponse.data.map { it.toMutableList() }
+ nextCursor = bookkeepingEntryListResponse.nextCursor
+ additionalProperties = bookkeepingEntryListResponse.additionalProperties.toMutableMap()
+ }
/** The contents of the list. */
fun data(data: List) = data(JsonField.of(data))
@@ -172,7 +169,7 @@ private constructor(
}
/**
- * Returns an immutable instance of [BookkeepingEntryListPageResponse].
+ * Returns an immutable instance of [BookkeepingEntryListResponse].
*
* Further updates to this [Builder] will not mutate the returned instance.
*
@@ -184,8 +181,8 @@ private constructor(
*
* @throws IllegalStateException if any required field is unset.
*/
- fun build(): BookkeepingEntryListPageResponse =
- BookkeepingEntryListPageResponse(
+ fun build(): BookkeepingEntryListResponse =
+ BookkeepingEntryListResponse(
checkRequired("data", data).map { it.toImmutable() },
checkRequired("nextCursor", nextCursor),
additionalProperties.toMutableMap(),
@@ -194,7 +191,7 @@ private constructor(
private var validated: Boolean = false
- fun validate(): BookkeepingEntryListPageResponse = apply {
+ fun validate(): BookkeepingEntryListResponse = apply {
if (validated) {
return@apply
}
@@ -227,7 +224,7 @@ private constructor(
return true
}
- return other is BookkeepingEntryListPageResponse &&
+ return other is BookkeepingEntryListResponse &&
data == other.data &&
nextCursor == other.nextCursor &&
additionalProperties == other.additionalProperties
@@ -238,5 +235,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "BookkeepingEntryListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}"
+ "BookkeepingEntryListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}"
}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingentrysets/BookkeepingEntrySetListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingentrysets/BookkeepingEntrySetListPage.kt
deleted file mode 100644
index daaa7cd7d..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingentrysets/BookkeepingEntrySetListPage.kt
+++ /dev/null
@@ -1,135 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.models.bookkeepingentrysets
-
-import com.increase.api.core.AutoPager
-import com.increase.api.core.Page
-import com.increase.api.core.checkRequired
-import com.increase.api.services.blocking.BookkeepingEntrySetService
-import java.util.Objects
-import java.util.Optional
-import kotlin.jvm.optionals.getOrNull
-
-/** @see BookkeepingEntrySetService.list */
-class BookkeepingEntrySetListPage
-private constructor(
- private val service: BookkeepingEntrySetService,
- private val params: BookkeepingEntrySetListParams,
- private val response: BookkeepingEntrySetListPageResponse,
-) : Page {
-
- /**
- * Delegates to [BookkeepingEntrySetListPageResponse], but gracefully handles missing data.
- *
- * @see BookkeepingEntrySetListPageResponse.data
- */
- fun data(): List =
- response._data().getOptional("data").getOrNull() ?: emptyList()
-
- /**
- * Delegates to [BookkeepingEntrySetListPageResponse], but gracefully handles missing data.
- *
- * @see BookkeepingEntrySetListPageResponse.nextCursor
- */
- fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor")
-
- override fun items(): List = data()
-
- override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent
-
- fun nextPageParams(): BookkeepingEntrySetListParams {
- val nextCursor =
- nextCursor().getOrNull()
- ?: throw IllegalStateException("Cannot construct next page params")
- return params.toBuilder().cursor(nextCursor).build()
- }
-
- override fun nextPage(): BookkeepingEntrySetListPage = service.list(nextPageParams())
-
- fun autoPager(): AutoPager = AutoPager.from(this)
-
- /** The parameters that were used to request this page. */
- fun params(): BookkeepingEntrySetListParams = params
-
- /** The response that this page was parsed from. */
- fun response(): BookkeepingEntrySetListPageResponse = response
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /**
- * Returns a mutable builder for constructing an instance of [BookkeepingEntrySetListPage].
- *
- * The following fields are required:
- * ```java
- * .service()
- * .params()
- * .response()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [BookkeepingEntrySetListPage]. */
- class Builder internal constructor() {
-
- private var service: BookkeepingEntrySetService? = null
- private var params: BookkeepingEntrySetListParams? = null
- private var response: BookkeepingEntrySetListPageResponse? = null
-
- @JvmSynthetic
- internal fun from(bookkeepingEntrySetListPage: BookkeepingEntrySetListPage) = apply {
- service = bookkeepingEntrySetListPage.service
- params = bookkeepingEntrySetListPage.params
- response = bookkeepingEntrySetListPage.response
- }
-
- fun service(service: BookkeepingEntrySetService) = apply { this.service = service }
-
- /** The parameters that were used to request this page. */
- fun params(params: BookkeepingEntrySetListParams) = apply { this.params = params }
-
- /** The response that this page was parsed from. */
- fun response(response: BookkeepingEntrySetListPageResponse) = apply {
- this.response = response
- }
-
- /**
- * Returns an immutable instance of [BookkeepingEntrySetListPage].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .service()
- * .params()
- * .response()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): BookkeepingEntrySetListPage =
- BookkeepingEntrySetListPage(
- checkRequired("service", service),
- checkRequired("params", params),
- checkRequired("response", response),
- )
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is BookkeepingEntrySetListPage &&
- service == other.service &&
- params == other.params &&
- response == other.response
- }
-
- override fun hashCode(): Int = Objects.hash(service, params, response)
-
- override fun toString() =
- "BookkeepingEntrySetListPage{service=$service, params=$params, response=$response}"
-}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingentrysets/BookkeepingEntrySetListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingentrysets/BookkeepingEntrySetListPageAsync.kt
deleted file mode 100644
index b7b003f0a..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingentrysets/BookkeepingEntrySetListPageAsync.kt
+++ /dev/null
@@ -1,152 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.models.bookkeepingentrysets
-
-import com.increase.api.core.AutoPagerAsync
-import com.increase.api.core.PageAsync
-import com.increase.api.core.checkRequired
-import com.increase.api.services.async.BookkeepingEntrySetServiceAsync
-import java.util.Objects
-import java.util.Optional
-import java.util.concurrent.CompletableFuture
-import java.util.concurrent.Executor
-import kotlin.jvm.optionals.getOrNull
-
-/** @see BookkeepingEntrySetServiceAsync.list */
-class BookkeepingEntrySetListPageAsync
-private constructor(
- private val service: BookkeepingEntrySetServiceAsync,
- private val streamHandlerExecutor: Executor,
- private val params: BookkeepingEntrySetListParams,
- private val response: BookkeepingEntrySetListPageResponse,
-) : PageAsync {
-
- /**
- * Delegates to [BookkeepingEntrySetListPageResponse], but gracefully handles missing data.
- *
- * @see BookkeepingEntrySetListPageResponse.data
- */
- fun data(): List =
- response._data().getOptional("data").getOrNull() ?: emptyList()
-
- /**
- * Delegates to [BookkeepingEntrySetListPageResponse], but gracefully handles missing data.
- *
- * @see BookkeepingEntrySetListPageResponse.nextCursor
- */
- fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor")
-
- override fun items(): List = data()
-
- override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent
-
- fun nextPageParams(): BookkeepingEntrySetListParams {
- val nextCursor =
- nextCursor().getOrNull()
- ?: throw IllegalStateException("Cannot construct next page params")
- return params.toBuilder().cursor(nextCursor).build()
- }
-
- override fun nextPage(): CompletableFuture =
- service.list(nextPageParams())
-
- fun autoPager(): AutoPagerAsync =
- AutoPagerAsync.from(this, streamHandlerExecutor)
-
- /** The parameters that were used to request this page. */
- fun params(): BookkeepingEntrySetListParams = params
-
- /** The response that this page was parsed from. */
- fun response(): BookkeepingEntrySetListPageResponse = response
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /**
- * Returns a mutable builder for constructing an instance of
- * [BookkeepingEntrySetListPageAsync].
- *
- * The following fields are required:
- * ```java
- * .service()
- * .streamHandlerExecutor()
- * .params()
- * .response()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [BookkeepingEntrySetListPageAsync]. */
- class Builder internal constructor() {
-
- private var service: BookkeepingEntrySetServiceAsync? = null
- private var streamHandlerExecutor: Executor? = null
- private var params: BookkeepingEntrySetListParams? = null
- private var response: BookkeepingEntrySetListPageResponse? = null
-
- @JvmSynthetic
- internal fun from(bookkeepingEntrySetListPageAsync: BookkeepingEntrySetListPageAsync) =
- apply {
- service = bookkeepingEntrySetListPageAsync.service
- streamHandlerExecutor = bookkeepingEntrySetListPageAsync.streamHandlerExecutor
- params = bookkeepingEntrySetListPageAsync.params
- response = bookkeepingEntrySetListPageAsync.response
- }
-
- fun service(service: BookkeepingEntrySetServiceAsync) = apply { this.service = service }
-
- fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply {
- this.streamHandlerExecutor = streamHandlerExecutor
- }
-
- /** The parameters that were used to request this page. */
- fun params(params: BookkeepingEntrySetListParams) = apply { this.params = params }
-
- /** The response that this page was parsed from. */
- fun response(response: BookkeepingEntrySetListPageResponse) = apply {
- this.response = response
- }
-
- /**
- * Returns an immutable instance of [BookkeepingEntrySetListPageAsync].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .service()
- * .streamHandlerExecutor()
- * .params()
- * .response()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): BookkeepingEntrySetListPageAsync =
- BookkeepingEntrySetListPageAsync(
- checkRequired("service", service),
- checkRequired("streamHandlerExecutor", streamHandlerExecutor),
- checkRequired("params", params),
- checkRequired("response", response),
- )
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is BookkeepingEntrySetListPageAsync &&
- service == other.service &&
- streamHandlerExecutor == other.streamHandlerExecutor &&
- params == other.params &&
- response == other.response
- }
-
- override fun hashCode(): Int = Objects.hash(service, streamHandlerExecutor, params, response)
-
- override fun toString() =
- "BookkeepingEntrySetListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}"
-}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingentrysets/BookkeepingEntrySetListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingentrysets/BookkeepingEntrySetListResponse.kt
similarity index 89%
rename from increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingentrysets/BookkeepingEntrySetListPageResponse.kt
rename to increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingentrysets/BookkeepingEntrySetListResponse.kt
index 62ea0aef2..5889a7f04 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingentrysets/BookkeepingEntrySetListPageResponse.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/bookkeepingentrysets/BookkeepingEntrySetListResponse.kt
@@ -20,7 +20,7 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/** A list of Bookkeeping Entry Set objects. */
-class BookkeepingEntrySetListPageResponse
+class BookkeepingEntrySetListResponse
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val data: JsonField>,
@@ -84,7 +84,7 @@ private constructor(
/**
* Returns a mutable builder for constructing an instance of
- * [BookkeepingEntrySetListPageResponse].
+ * [BookkeepingEntrySetListResponse].
*
* The following fields are required:
* ```java
@@ -95,7 +95,7 @@ private constructor(
@JvmStatic fun builder() = Builder()
}
- /** A builder for [BookkeepingEntrySetListPageResponse]. */
+ /** A builder for [BookkeepingEntrySetListResponse]. */
class Builder internal constructor() {
private var data: JsonField>? = null
@@ -103,14 +103,13 @@ private constructor(
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
- internal fun from(
- bookkeepingEntrySetListPageResponse: BookkeepingEntrySetListPageResponse
- ) = apply {
- data = bookkeepingEntrySetListPageResponse.data.map { it.toMutableList() }
- nextCursor = bookkeepingEntrySetListPageResponse.nextCursor
- additionalProperties =
- bookkeepingEntrySetListPageResponse.additionalProperties.toMutableMap()
- }
+ internal fun from(bookkeepingEntrySetListResponse: BookkeepingEntrySetListResponse) =
+ apply {
+ data = bookkeepingEntrySetListResponse.data.map { it.toMutableList() }
+ nextCursor = bookkeepingEntrySetListResponse.nextCursor
+ additionalProperties =
+ bookkeepingEntrySetListResponse.additionalProperties.toMutableMap()
+ }
/** The contents of the list. */
fun data(data: List) = data(JsonField.of(data))
@@ -173,7 +172,7 @@ private constructor(
}
/**
- * Returns an immutable instance of [BookkeepingEntrySetListPageResponse].
+ * Returns an immutable instance of [BookkeepingEntrySetListResponse].
*
* Further updates to this [Builder] will not mutate the returned instance.
*
@@ -185,8 +184,8 @@ private constructor(
*
* @throws IllegalStateException if any required field is unset.
*/
- fun build(): BookkeepingEntrySetListPageResponse =
- BookkeepingEntrySetListPageResponse(
+ fun build(): BookkeepingEntrySetListResponse =
+ BookkeepingEntrySetListResponse(
checkRequired("data", data).map { it.toImmutable() },
checkRequired("nextCursor", nextCursor),
additionalProperties.toMutableMap(),
@@ -195,7 +194,7 @@ private constructor(
private var validated: Boolean = false
- fun validate(): BookkeepingEntrySetListPageResponse = apply {
+ fun validate(): BookkeepingEntrySetListResponse = apply {
if (validated) {
return@apply
}
@@ -228,7 +227,7 @@ private constructor(
return true
}
- return other is BookkeepingEntrySetListPageResponse &&
+ return other is BookkeepingEntrySetListResponse &&
data == other.data &&
nextCursor == other.nextCursor &&
additionalProperties == other.additionalProperties
@@ -239,5 +238,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "BookkeepingEntrySetListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}"
+ "BookkeepingEntrySetListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}"
}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/carddisputes/CardDisputeListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/carddisputes/CardDisputeListPage.kt
deleted file mode 100644
index abea17ee5..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/carddisputes/CardDisputeListPage.kt
+++ /dev/null
@@ -1,132 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.models.carddisputes
-
-import com.increase.api.core.AutoPager
-import com.increase.api.core.Page
-import com.increase.api.core.checkRequired
-import com.increase.api.services.blocking.CardDisputeService
-import java.util.Objects
-import java.util.Optional
-import kotlin.jvm.optionals.getOrNull
-
-/** @see CardDisputeService.list */
-class CardDisputeListPage
-private constructor(
- private val service: CardDisputeService,
- private val params: CardDisputeListParams,
- private val response: CardDisputeListPageResponse,
-) : Page {
-
- /**
- * Delegates to [CardDisputeListPageResponse], but gracefully handles missing data.
- *
- * @see CardDisputeListPageResponse.data
- */
- fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList()
-
- /**
- * Delegates to [CardDisputeListPageResponse], but gracefully handles missing data.
- *
- * @see CardDisputeListPageResponse.nextCursor
- */
- fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor")
-
- override fun items(): List = data()
-
- override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent
-
- fun nextPageParams(): CardDisputeListParams {
- val nextCursor =
- nextCursor().getOrNull()
- ?: throw IllegalStateException("Cannot construct next page params")
- return params.toBuilder().cursor(nextCursor).build()
- }
-
- override fun nextPage(): CardDisputeListPage = service.list(nextPageParams())
-
- fun autoPager(): AutoPager = AutoPager.from(this)
-
- /** The parameters that were used to request this page. */
- fun params(): CardDisputeListParams = params
-
- /** The response that this page was parsed from. */
- fun response(): CardDisputeListPageResponse = response
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /**
- * Returns a mutable builder for constructing an instance of [CardDisputeListPage].
- *
- * The following fields are required:
- * ```java
- * .service()
- * .params()
- * .response()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [CardDisputeListPage]. */
- class Builder internal constructor() {
-
- private var service: CardDisputeService? = null
- private var params: CardDisputeListParams? = null
- private var response: CardDisputeListPageResponse? = null
-
- @JvmSynthetic
- internal fun from(cardDisputeListPage: CardDisputeListPage) = apply {
- service = cardDisputeListPage.service
- params = cardDisputeListPage.params
- response = cardDisputeListPage.response
- }
-
- fun service(service: CardDisputeService) = apply { this.service = service }
-
- /** The parameters that were used to request this page. */
- fun params(params: CardDisputeListParams) = apply { this.params = params }
-
- /** The response that this page was parsed from. */
- fun response(response: CardDisputeListPageResponse) = apply { this.response = response }
-
- /**
- * Returns an immutable instance of [CardDisputeListPage].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .service()
- * .params()
- * .response()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): CardDisputeListPage =
- CardDisputeListPage(
- checkRequired("service", service),
- checkRequired("params", params),
- checkRequired("response", response),
- )
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is CardDisputeListPage &&
- service == other.service &&
- params == other.params &&
- response == other.response
- }
-
- override fun hashCode(): Int = Objects.hash(service, params, response)
-
- override fun toString() =
- "CardDisputeListPage{service=$service, params=$params, response=$response}"
-}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/carddisputes/CardDisputeListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/carddisputes/CardDisputeListPageAsync.kt
deleted file mode 100644
index a7c681639..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/carddisputes/CardDisputeListPageAsync.kt
+++ /dev/null
@@ -1,146 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.models.carddisputes
-
-import com.increase.api.core.AutoPagerAsync
-import com.increase.api.core.PageAsync
-import com.increase.api.core.checkRequired
-import com.increase.api.services.async.CardDisputeServiceAsync
-import java.util.Objects
-import java.util.Optional
-import java.util.concurrent.CompletableFuture
-import java.util.concurrent.Executor
-import kotlin.jvm.optionals.getOrNull
-
-/** @see CardDisputeServiceAsync.list */
-class CardDisputeListPageAsync
-private constructor(
- private val service: CardDisputeServiceAsync,
- private val streamHandlerExecutor: Executor,
- private val params: CardDisputeListParams,
- private val response: CardDisputeListPageResponse,
-) : PageAsync {
-
- /**
- * Delegates to [CardDisputeListPageResponse], but gracefully handles missing data.
- *
- * @see CardDisputeListPageResponse.data
- */
- fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList()
-
- /**
- * Delegates to [CardDisputeListPageResponse], but gracefully handles missing data.
- *
- * @see CardDisputeListPageResponse.nextCursor
- */
- fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor")
-
- override fun items(): List = data()
-
- override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent
-
- fun nextPageParams(): CardDisputeListParams {
- val nextCursor =
- nextCursor().getOrNull()
- ?: throw IllegalStateException("Cannot construct next page params")
- return params.toBuilder().cursor(nextCursor).build()
- }
-
- override fun nextPage(): CompletableFuture =
- service.list(nextPageParams())
-
- fun autoPager(): AutoPagerAsync = AutoPagerAsync.from(this, streamHandlerExecutor)
-
- /** The parameters that were used to request this page. */
- fun params(): CardDisputeListParams = params
-
- /** The response that this page was parsed from. */
- fun response(): CardDisputeListPageResponse = response
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /**
- * Returns a mutable builder for constructing an instance of [CardDisputeListPageAsync].
- *
- * The following fields are required:
- * ```java
- * .service()
- * .streamHandlerExecutor()
- * .params()
- * .response()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [CardDisputeListPageAsync]. */
- class Builder internal constructor() {
-
- private var service: CardDisputeServiceAsync? = null
- private var streamHandlerExecutor: Executor? = null
- private var params: CardDisputeListParams? = null
- private var response: CardDisputeListPageResponse? = null
-
- @JvmSynthetic
- internal fun from(cardDisputeListPageAsync: CardDisputeListPageAsync) = apply {
- service = cardDisputeListPageAsync.service
- streamHandlerExecutor = cardDisputeListPageAsync.streamHandlerExecutor
- params = cardDisputeListPageAsync.params
- response = cardDisputeListPageAsync.response
- }
-
- fun service(service: CardDisputeServiceAsync) = apply { this.service = service }
-
- fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply {
- this.streamHandlerExecutor = streamHandlerExecutor
- }
-
- /** The parameters that were used to request this page. */
- fun params(params: CardDisputeListParams) = apply { this.params = params }
-
- /** The response that this page was parsed from. */
- fun response(response: CardDisputeListPageResponse) = apply { this.response = response }
-
- /**
- * Returns an immutable instance of [CardDisputeListPageAsync].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .service()
- * .streamHandlerExecutor()
- * .params()
- * .response()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): CardDisputeListPageAsync =
- CardDisputeListPageAsync(
- checkRequired("service", service),
- checkRequired("streamHandlerExecutor", streamHandlerExecutor),
- checkRequired("params", params),
- checkRequired("response", response),
- )
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is CardDisputeListPageAsync &&
- service == other.service &&
- streamHandlerExecutor == other.streamHandlerExecutor &&
- params == other.params &&
- response == other.response
- }
-
- override fun hashCode(): Int = Objects.hash(service, streamHandlerExecutor, params, response)
-
- override fun toString() =
- "CardDisputeListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}"
-}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/carddisputes/CardDisputeListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/carddisputes/CardDisputeListResponse.kt
similarity index 89%
rename from increase-java-core/src/main/kotlin/com/increase/api/models/carddisputes/CardDisputeListPageResponse.kt
rename to increase-java-core/src/main/kotlin/com/increase/api/models/carddisputes/CardDisputeListResponse.kt
index 8ca9d9a35..979ebe1e6 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/carddisputes/CardDisputeListPageResponse.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/carddisputes/CardDisputeListResponse.kt
@@ -20,7 +20,7 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/** A list of Card Dispute objects. */
-class CardDisputeListPageResponse
+class CardDisputeListResponse
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val data: JsonField>,
@@ -81,7 +81,7 @@ private constructor(
companion object {
/**
- * Returns a mutable builder for constructing an instance of [CardDisputeListPageResponse].
+ * Returns a mutable builder for constructing an instance of [CardDisputeListResponse].
*
* The following fields are required:
* ```java
@@ -92,7 +92,7 @@ private constructor(
@JvmStatic fun builder() = Builder()
}
- /** A builder for [CardDisputeListPageResponse]. */
+ /** A builder for [CardDisputeListResponse]. */
class Builder internal constructor() {
private var data: JsonField>? = null
@@ -100,10 +100,10 @@ private constructor(
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
- internal fun from(cardDisputeListPageResponse: CardDisputeListPageResponse) = apply {
- data = cardDisputeListPageResponse.data.map { it.toMutableList() }
- nextCursor = cardDisputeListPageResponse.nextCursor
- additionalProperties = cardDisputeListPageResponse.additionalProperties.toMutableMap()
+ internal fun from(cardDisputeListResponse: CardDisputeListResponse) = apply {
+ data = cardDisputeListResponse.data.map { it.toMutableList() }
+ nextCursor = cardDisputeListResponse.nextCursor
+ additionalProperties = cardDisputeListResponse.additionalProperties.toMutableMap()
}
/** The contents of the list. */
@@ -167,7 +167,7 @@ private constructor(
}
/**
- * Returns an immutable instance of [CardDisputeListPageResponse].
+ * Returns an immutable instance of [CardDisputeListResponse].
*
* Further updates to this [Builder] will not mutate the returned instance.
*
@@ -179,8 +179,8 @@ private constructor(
*
* @throws IllegalStateException if any required field is unset.
*/
- fun build(): CardDisputeListPageResponse =
- CardDisputeListPageResponse(
+ fun build(): CardDisputeListResponse =
+ CardDisputeListResponse(
checkRequired("data", data).map { it.toImmutable() },
checkRequired("nextCursor", nextCursor),
additionalProperties.toMutableMap(),
@@ -189,7 +189,7 @@ private constructor(
private var validated: Boolean = false
- fun validate(): CardDisputeListPageResponse = apply {
+ fun validate(): CardDisputeListResponse = apply {
if (validated) {
return@apply
}
@@ -222,7 +222,7 @@ private constructor(
return true
}
- return other is CardDisputeListPageResponse &&
+ return other is CardDisputeListResponse &&
data == other.data &&
nextCursor == other.nextCursor &&
additionalProperties == other.additionalProperties
@@ -233,5 +233,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "CardDisputeListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}"
+ "CardDisputeListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}"
}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/cardpayments/CardPaymentListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/cardpayments/CardPaymentListPage.kt
deleted file mode 100644
index ea3282ec6..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/cardpayments/CardPaymentListPage.kt
+++ /dev/null
@@ -1,132 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.models.cardpayments
-
-import com.increase.api.core.AutoPager
-import com.increase.api.core.Page
-import com.increase.api.core.checkRequired
-import com.increase.api.services.blocking.CardPaymentService
-import java.util.Objects
-import java.util.Optional
-import kotlin.jvm.optionals.getOrNull
-
-/** @see CardPaymentService.list */
-class CardPaymentListPage
-private constructor(
- private val service: CardPaymentService,
- private val params: CardPaymentListParams,
- private val response: CardPaymentListPageResponse,
-) : Page {
-
- /**
- * Delegates to [CardPaymentListPageResponse], but gracefully handles missing data.
- *
- * @see CardPaymentListPageResponse.data
- */
- fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList()
-
- /**
- * Delegates to [CardPaymentListPageResponse], but gracefully handles missing data.
- *
- * @see CardPaymentListPageResponse.nextCursor
- */
- fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor")
-
- override fun items(): List = data()
-
- override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent
-
- fun nextPageParams(): CardPaymentListParams {
- val nextCursor =
- nextCursor().getOrNull()
- ?: throw IllegalStateException("Cannot construct next page params")
- return params.toBuilder().cursor(nextCursor).build()
- }
-
- override fun nextPage(): CardPaymentListPage = service.list(nextPageParams())
-
- fun autoPager(): AutoPager = AutoPager.from(this)
-
- /** The parameters that were used to request this page. */
- fun params(): CardPaymentListParams = params
-
- /** The response that this page was parsed from. */
- fun response(): CardPaymentListPageResponse = response
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /**
- * Returns a mutable builder for constructing an instance of [CardPaymentListPage].
- *
- * The following fields are required:
- * ```java
- * .service()
- * .params()
- * .response()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [CardPaymentListPage]. */
- class Builder internal constructor() {
-
- private var service: CardPaymentService? = null
- private var params: CardPaymentListParams? = null
- private var response: CardPaymentListPageResponse? = null
-
- @JvmSynthetic
- internal fun from(cardPaymentListPage: CardPaymentListPage) = apply {
- service = cardPaymentListPage.service
- params = cardPaymentListPage.params
- response = cardPaymentListPage.response
- }
-
- fun service(service: CardPaymentService) = apply { this.service = service }
-
- /** The parameters that were used to request this page. */
- fun params(params: CardPaymentListParams) = apply { this.params = params }
-
- /** The response that this page was parsed from. */
- fun response(response: CardPaymentListPageResponse) = apply { this.response = response }
-
- /**
- * Returns an immutable instance of [CardPaymentListPage].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .service()
- * .params()
- * .response()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): CardPaymentListPage =
- CardPaymentListPage(
- checkRequired("service", service),
- checkRequired("params", params),
- checkRequired("response", response),
- )
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is CardPaymentListPage &&
- service == other.service &&
- params == other.params &&
- response == other.response
- }
-
- override fun hashCode(): Int = Objects.hash(service, params, response)
-
- override fun toString() =
- "CardPaymentListPage{service=$service, params=$params, response=$response}"
-}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/cardpayments/CardPaymentListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/cardpayments/CardPaymentListPageAsync.kt
deleted file mode 100644
index 3660c86a5..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/cardpayments/CardPaymentListPageAsync.kt
+++ /dev/null
@@ -1,146 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.models.cardpayments
-
-import com.increase.api.core.AutoPagerAsync
-import com.increase.api.core.PageAsync
-import com.increase.api.core.checkRequired
-import com.increase.api.services.async.CardPaymentServiceAsync
-import java.util.Objects
-import java.util.Optional
-import java.util.concurrent.CompletableFuture
-import java.util.concurrent.Executor
-import kotlin.jvm.optionals.getOrNull
-
-/** @see CardPaymentServiceAsync.list */
-class CardPaymentListPageAsync
-private constructor(
- private val service: CardPaymentServiceAsync,
- private val streamHandlerExecutor: Executor,
- private val params: CardPaymentListParams,
- private val response: CardPaymentListPageResponse,
-) : PageAsync {
-
- /**
- * Delegates to [CardPaymentListPageResponse], but gracefully handles missing data.
- *
- * @see CardPaymentListPageResponse.data
- */
- fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList()
-
- /**
- * Delegates to [CardPaymentListPageResponse], but gracefully handles missing data.
- *
- * @see CardPaymentListPageResponse.nextCursor
- */
- fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor")
-
- override fun items(): List = data()
-
- override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent
-
- fun nextPageParams(): CardPaymentListParams {
- val nextCursor =
- nextCursor().getOrNull()
- ?: throw IllegalStateException("Cannot construct next page params")
- return params.toBuilder().cursor(nextCursor).build()
- }
-
- override fun nextPage(): CompletableFuture =
- service.list(nextPageParams())
-
- fun autoPager(): AutoPagerAsync = AutoPagerAsync.from(this, streamHandlerExecutor)
-
- /** The parameters that were used to request this page. */
- fun params(): CardPaymentListParams = params
-
- /** The response that this page was parsed from. */
- fun response(): CardPaymentListPageResponse = response
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /**
- * Returns a mutable builder for constructing an instance of [CardPaymentListPageAsync].
- *
- * The following fields are required:
- * ```java
- * .service()
- * .streamHandlerExecutor()
- * .params()
- * .response()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [CardPaymentListPageAsync]. */
- class Builder internal constructor() {
-
- private var service: CardPaymentServiceAsync? = null
- private var streamHandlerExecutor: Executor? = null
- private var params: CardPaymentListParams? = null
- private var response: CardPaymentListPageResponse? = null
-
- @JvmSynthetic
- internal fun from(cardPaymentListPageAsync: CardPaymentListPageAsync) = apply {
- service = cardPaymentListPageAsync.service
- streamHandlerExecutor = cardPaymentListPageAsync.streamHandlerExecutor
- params = cardPaymentListPageAsync.params
- response = cardPaymentListPageAsync.response
- }
-
- fun service(service: CardPaymentServiceAsync) = apply { this.service = service }
-
- fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply {
- this.streamHandlerExecutor = streamHandlerExecutor
- }
-
- /** The parameters that were used to request this page. */
- fun params(params: CardPaymentListParams) = apply { this.params = params }
-
- /** The response that this page was parsed from. */
- fun response(response: CardPaymentListPageResponse) = apply { this.response = response }
-
- /**
- * Returns an immutable instance of [CardPaymentListPageAsync].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .service()
- * .streamHandlerExecutor()
- * .params()
- * .response()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): CardPaymentListPageAsync =
- CardPaymentListPageAsync(
- checkRequired("service", service),
- checkRequired("streamHandlerExecutor", streamHandlerExecutor),
- checkRequired("params", params),
- checkRequired("response", response),
- )
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is CardPaymentListPageAsync &&
- service == other.service &&
- streamHandlerExecutor == other.streamHandlerExecutor &&
- params == other.params &&
- response == other.response
- }
-
- override fun hashCode(): Int = Objects.hash(service, streamHandlerExecutor, params, response)
-
- override fun toString() =
- "CardPaymentListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}"
-}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/cardpayments/CardPaymentListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/cardpayments/CardPaymentListResponse.kt
similarity index 89%
rename from increase-java-core/src/main/kotlin/com/increase/api/models/cardpayments/CardPaymentListPageResponse.kt
rename to increase-java-core/src/main/kotlin/com/increase/api/models/cardpayments/CardPaymentListResponse.kt
index ee43e398b..73f1bfdbc 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/cardpayments/CardPaymentListPageResponse.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/cardpayments/CardPaymentListResponse.kt
@@ -20,7 +20,7 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/** A list of Card Payment objects. */
-class CardPaymentListPageResponse
+class CardPaymentListResponse
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val data: JsonField>,
@@ -81,7 +81,7 @@ private constructor(
companion object {
/**
- * Returns a mutable builder for constructing an instance of [CardPaymentListPageResponse].
+ * Returns a mutable builder for constructing an instance of [CardPaymentListResponse].
*
* The following fields are required:
* ```java
@@ -92,7 +92,7 @@ private constructor(
@JvmStatic fun builder() = Builder()
}
- /** A builder for [CardPaymentListPageResponse]. */
+ /** A builder for [CardPaymentListResponse]. */
class Builder internal constructor() {
private var data: JsonField>? = null
@@ -100,10 +100,10 @@ private constructor(
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
- internal fun from(cardPaymentListPageResponse: CardPaymentListPageResponse) = apply {
- data = cardPaymentListPageResponse.data.map { it.toMutableList() }
- nextCursor = cardPaymentListPageResponse.nextCursor
- additionalProperties = cardPaymentListPageResponse.additionalProperties.toMutableMap()
+ internal fun from(cardPaymentListResponse: CardPaymentListResponse) = apply {
+ data = cardPaymentListResponse.data.map { it.toMutableList() }
+ nextCursor = cardPaymentListResponse.nextCursor
+ additionalProperties = cardPaymentListResponse.additionalProperties.toMutableMap()
}
/** The contents of the list. */
@@ -167,7 +167,7 @@ private constructor(
}
/**
- * Returns an immutable instance of [CardPaymentListPageResponse].
+ * Returns an immutable instance of [CardPaymentListResponse].
*
* Further updates to this [Builder] will not mutate the returned instance.
*
@@ -179,8 +179,8 @@ private constructor(
*
* @throws IllegalStateException if any required field is unset.
*/
- fun build(): CardPaymentListPageResponse =
- CardPaymentListPageResponse(
+ fun build(): CardPaymentListResponse =
+ CardPaymentListResponse(
checkRequired("data", data).map { it.toImmutable() },
checkRequired("nextCursor", nextCursor),
additionalProperties.toMutableMap(),
@@ -189,7 +189,7 @@ private constructor(
private var validated: Boolean = false
- fun validate(): CardPaymentListPageResponse = apply {
+ fun validate(): CardPaymentListResponse = apply {
if (validated) {
return@apply
}
@@ -222,7 +222,7 @@ private constructor(
return true
}
- return other is CardPaymentListPageResponse &&
+ return other is CardPaymentListResponse &&
data == other.data &&
nextCursor == other.nextCursor &&
additionalProperties == other.additionalProperties
@@ -233,5 +233,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "CardPaymentListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}"
+ "CardPaymentListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}"
}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/cardpurchasesupplements/CardPurchaseSupplementListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/cardpurchasesupplements/CardPurchaseSupplementListPage.kt
deleted file mode 100644
index 9e36ee9ed..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/cardpurchasesupplements/CardPurchaseSupplementListPage.kt
+++ /dev/null
@@ -1,136 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.models.cardpurchasesupplements
-
-import com.increase.api.core.AutoPager
-import com.increase.api.core.Page
-import com.increase.api.core.checkRequired
-import com.increase.api.services.blocking.CardPurchaseSupplementService
-import java.util.Objects
-import java.util.Optional
-import kotlin.jvm.optionals.getOrNull
-
-/** @see CardPurchaseSupplementService.list */
-class CardPurchaseSupplementListPage
-private constructor(
- private val service: CardPurchaseSupplementService,
- private val params: CardPurchaseSupplementListParams,
- private val response: CardPurchaseSupplementListPageResponse,
-) : Page {
-
- /**
- * Delegates to [CardPurchaseSupplementListPageResponse], but gracefully handles missing data.
- *
- * @see CardPurchaseSupplementListPageResponse.data
- */
- fun data(): List =
- response._data().getOptional("data").getOrNull() ?: emptyList()
-
- /**
- * Delegates to [CardPurchaseSupplementListPageResponse], but gracefully handles missing data.
- *
- * @see CardPurchaseSupplementListPageResponse.nextCursor
- */
- fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor")
-
- override fun items(): List = data()
-
- override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent
-
- fun nextPageParams(): CardPurchaseSupplementListParams {
- val nextCursor =
- nextCursor().getOrNull()
- ?: throw IllegalStateException("Cannot construct next page params")
- return params.toBuilder().cursor(nextCursor).build()
- }
-
- override fun nextPage(): CardPurchaseSupplementListPage = service.list(nextPageParams())
-
- fun autoPager(): AutoPager = AutoPager.from(this)
-
- /** The parameters that were used to request this page. */
- fun params(): CardPurchaseSupplementListParams = params
-
- /** The response that this page was parsed from. */
- fun response(): CardPurchaseSupplementListPageResponse = response
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /**
- * Returns a mutable builder for constructing an instance of
- * [CardPurchaseSupplementListPage].
- *
- * The following fields are required:
- * ```java
- * .service()
- * .params()
- * .response()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [CardPurchaseSupplementListPage]. */
- class Builder internal constructor() {
-
- private var service: CardPurchaseSupplementService? = null
- private var params: CardPurchaseSupplementListParams? = null
- private var response: CardPurchaseSupplementListPageResponse? = null
-
- @JvmSynthetic
- internal fun from(cardPurchaseSupplementListPage: CardPurchaseSupplementListPage) = apply {
- service = cardPurchaseSupplementListPage.service
- params = cardPurchaseSupplementListPage.params
- response = cardPurchaseSupplementListPage.response
- }
-
- fun service(service: CardPurchaseSupplementService) = apply { this.service = service }
-
- /** The parameters that were used to request this page. */
- fun params(params: CardPurchaseSupplementListParams) = apply { this.params = params }
-
- /** The response that this page was parsed from. */
- fun response(response: CardPurchaseSupplementListPageResponse) = apply {
- this.response = response
- }
-
- /**
- * Returns an immutable instance of [CardPurchaseSupplementListPage].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .service()
- * .params()
- * .response()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): CardPurchaseSupplementListPage =
- CardPurchaseSupplementListPage(
- checkRequired("service", service),
- checkRequired("params", params),
- checkRequired("response", response),
- )
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is CardPurchaseSupplementListPage &&
- service == other.service &&
- params == other.params &&
- response == other.response
- }
-
- override fun hashCode(): Int = Objects.hash(service, params, response)
-
- override fun toString() =
- "CardPurchaseSupplementListPage{service=$service, params=$params, response=$response}"
-}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/cardpurchasesupplements/CardPurchaseSupplementListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/cardpurchasesupplements/CardPurchaseSupplementListPageAsync.kt
deleted file mode 100644
index 14c46682e..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/cardpurchasesupplements/CardPurchaseSupplementListPageAsync.kt
+++ /dev/null
@@ -1,153 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.models.cardpurchasesupplements
-
-import com.increase.api.core.AutoPagerAsync
-import com.increase.api.core.PageAsync
-import com.increase.api.core.checkRequired
-import com.increase.api.services.async.CardPurchaseSupplementServiceAsync
-import java.util.Objects
-import java.util.Optional
-import java.util.concurrent.CompletableFuture
-import java.util.concurrent.Executor
-import kotlin.jvm.optionals.getOrNull
-
-/** @see CardPurchaseSupplementServiceAsync.list */
-class CardPurchaseSupplementListPageAsync
-private constructor(
- private val service: CardPurchaseSupplementServiceAsync,
- private val streamHandlerExecutor: Executor,
- private val params: CardPurchaseSupplementListParams,
- private val response: CardPurchaseSupplementListPageResponse,
-) : PageAsync {
-
- /**
- * Delegates to [CardPurchaseSupplementListPageResponse], but gracefully handles missing data.
- *
- * @see CardPurchaseSupplementListPageResponse.data
- */
- fun data(): List =
- response._data().getOptional("data").getOrNull() ?: emptyList()
-
- /**
- * Delegates to [CardPurchaseSupplementListPageResponse], but gracefully handles missing data.
- *
- * @see CardPurchaseSupplementListPageResponse.nextCursor
- */
- fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor")
-
- override fun items(): List = data()
-
- override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent
-
- fun nextPageParams(): CardPurchaseSupplementListParams {
- val nextCursor =
- nextCursor().getOrNull()
- ?: throw IllegalStateException("Cannot construct next page params")
- return params.toBuilder().cursor(nextCursor).build()
- }
-
- override fun nextPage(): CompletableFuture =
- service.list(nextPageParams())
-
- fun autoPager(): AutoPagerAsync =
- AutoPagerAsync.from(this, streamHandlerExecutor)
-
- /** The parameters that were used to request this page. */
- fun params(): CardPurchaseSupplementListParams = params
-
- /** The response that this page was parsed from. */
- fun response(): CardPurchaseSupplementListPageResponse = response
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /**
- * Returns a mutable builder for constructing an instance of
- * [CardPurchaseSupplementListPageAsync].
- *
- * The following fields are required:
- * ```java
- * .service()
- * .streamHandlerExecutor()
- * .params()
- * .response()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [CardPurchaseSupplementListPageAsync]. */
- class Builder internal constructor() {
-
- private var service: CardPurchaseSupplementServiceAsync? = null
- private var streamHandlerExecutor: Executor? = null
- private var params: CardPurchaseSupplementListParams? = null
- private var response: CardPurchaseSupplementListPageResponse? = null
-
- @JvmSynthetic
- internal fun from(
- cardPurchaseSupplementListPageAsync: CardPurchaseSupplementListPageAsync
- ) = apply {
- service = cardPurchaseSupplementListPageAsync.service
- streamHandlerExecutor = cardPurchaseSupplementListPageAsync.streamHandlerExecutor
- params = cardPurchaseSupplementListPageAsync.params
- response = cardPurchaseSupplementListPageAsync.response
- }
-
- fun service(service: CardPurchaseSupplementServiceAsync) = apply { this.service = service }
-
- fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply {
- this.streamHandlerExecutor = streamHandlerExecutor
- }
-
- /** The parameters that were used to request this page. */
- fun params(params: CardPurchaseSupplementListParams) = apply { this.params = params }
-
- /** The response that this page was parsed from. */
- fun response(response: CardPurchaseSupplementListPageResponse) = apply {
- this.response = response
- }
-
- /**
- * Returns an immutable instance of [CardPurchaseSupplementListPageAsync].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .service()
- * .streamHandlerExecutor()
- * .params()
- * .response()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): CardPurchaseSupplementListPageAsync =
- CardPurchaseSupplementListPageAsync(
- checkRequired("service", service),
- checkRequired("streamHandlerExecutor", streamHandlerExecutor),
- checkRequired("params", params),
- checkRequired("response", response),
- )
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is CardPurchaseSupplementListPageAsync &&
- service == other.service &&
- streamHandlerExecutor == other.streamHandlerExecutor &&
- params == other.params &&
- response == other.response
- }
-
- override fun hashCode(): Int = Objects.hash(service, streamHandlerExecutor, params, response)
-
- override fun toString() =
- "CardPurchaseSupplementListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}"
-}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/cardpurchasesupplements/CardPurchaseSupplementListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/cardpurchasesupplements/CardPurchaseSupplementListResponse.kt
similarity index 89%
rename from increase-java-core/src/main/kotlin/com/increase/api/models/cardpurchasesupplements/CardPurchaseSupplementListPageResponse.kt
rename to increase-java-core/src/main/kotlin/com/increase/api/models/cardpurchasesupplements/CardPurchaseSupplementListResponse.kt
index fb8febe63..4eb072bf7 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/cardpurchasesupplements/CardPurchaseSupplementListPageResponse.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/cardpurchasesupplements/CardPurchaseSupplementListResponse.kt
@@ -20,7 +20,7 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/** A list of Card Purchase Supplement objects. */
-class CardPurchaseSupplementListPageResponse
+class CardPurchaseSupplementListResponse
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val data: JsonField>,
@@ -86,7 +86,7 @@ private constructor(
/**
* Returns a mutable builder for constructing an instance of
- * [CardPurchaseSupplementListPageResponse].
+ * [CardPurchaseSupplementListResponse].
*
* The following fields are required:
* ```java
@@ -97,7 +97,7 @@ private constructor(
@JvmStatic fun builder() = Builder()
}
- /** A builder for [CardPurchaseSupplementListPageResponse]. */
+ /** A builder for [CardPurchaseSupplementListResponse]. */
class Builder internal constructor() {
private var data: JsonField>? = null
@@ -105,14 +105,13 @@ private constructor(
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
- internal fun from(
- cardPurchaseSupplementListPageResponse: CardPurchaseSupplementListPageResponse
- ) = apply {
- data = cardPurchaseSupplementListPageResponse.data.map { it.toMutableList() }
- nextCursor = cardPurchaseSupplementListPageResponse.nextCursor
- additionalProperties =
- cardPurchaseSupplementListPageResponse.additionalProperties.toMutableMap()
- }
+ internal fun from(cardPurchaseSupplementListResponse: CardPurchaseSupplementListResponse) =
+ apply {
+ data = cardPurchaseSupplementListResponse.data.map { it.toMutableList() }
+ nextCursor = cardPurchaseSupplementListResponse.nextCursor
+ additionalProperties =
+ cardPurchaseSupplementListResponse.additionalProperties.toMutableMap()
+ }
/** The contents of the list. */
fun data(data: List) = data(JsonField.of(data))
@@ -175,7 +174,7 @@ private constructor(
}
/**
- * Returns an immutable instance of [CardPurchaseSupplementListPageResponse].
+ * Returns an immutable instance of [CardPurchaseSupplementListResponse].
*
* Further updates to this [Builder] will not mutate the returned instance.
*
@@ -187,8 +186,8 @@ private constructor(
*
* @throws IllegalStateException if any required field is unset.
*/
- fun build(): CardPurchaseSupplementListPageResponse =
- CardPurchaseSupplementListPageResponse(
+ fun build(): CardPurchaseSupplementListResponse =
+ CardPurchaseSupplementListResponse(
checkRequired("data", data).map { it.toImmutable() },
checkRequired("nextCursor", nextCursor),
additionalProperties.toMutableMap(),
@@ -197,7 +196,7 @@ private constructor(
private var validated: Boolean = false
- fun validate(): CardPurchaseSupplementListPageResponse = apply {
+ fun validate(): CardPurchaseSupplementListResponse = apply {
if (validated) {
return@apply
}
@@ -230,7 +229,7 @@ private constructor(
return true
}
- return other is CardPurchaseSupplementListPageResponse &&
+ return other is CardPurchaseSupplementListResponse &&
data == other.data &&
nextCursor == other.nextCursor &&
additionalProperties == other.additionalProperties
@@ -241,5 +240,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "CardPurchaseSupplementListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}"
+ "CardPurchaseSupplementListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}"
}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferListPage.kt
deleted file mode 100644
index 865cf24ad..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferListPage.kt
+++ /dev/null
@@ -1,135 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.models.cardpushtransfers
-
-import com.increase.api.core.AutoPager
-import com.increase.api.core.Page
-import com.increase.api.core.checkRequired
-import com.increase.api.services.blocking.CardPushTransferService
-import java.util.Objects
-import java.util.Optional
-import kotlin.jvm.optionals.getOrNull
-
-/** @see CardPushTransferService.list */
-class CardPushTransferListPage
-private constructor(
- private val service: CardPushTransferService,
- private val params: CardPushTransferListParams,
- private val response: CardPushTransferListPageResponse,
-) : Page {
-
- /**
- * Delegates to [CardPushTransferListPageResponse], but gracefully handles missing data.
- *
- * @see CardPushTransferListPageResponse.data
- */
- fun data(): List =
- response._data().getOptional("data").getOrNull() ?: emptyList()
-
- /**
- * Delegates to [CardPushTransferListPageResponse], but gracefully handles missing data.
- *
- * @see CardPushTransferListPageResponse.nextCursor
- */
- fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor")
-
- override fun items(): List = data()
-
- override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent
-
- fun nextPageParams(): CardPushTransferListParams {
- val nextCursor =
- nextCursor().getOrNull()
- ?: throw IllegalStateException("Cannot construct next page params")
- return params.toBuilder().cursor(nextCursor).build()
- }
-
- override fun nextPage(): CardPushTransferListPage = service.list(nextPageParams())
-
- fun autoPager(): AutoPager = AutoPager.from(this)
-
- /** The parameters that were used to request this page. */
- fun params(): CardPushTransferListParams = params
-
- /** The response that this page was parsed from. */
- fun response(): CardPushTransferListPageResponse = response
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /**
- * Returns a mutable builder for constructing an instance of [CardPushTransferListPage].
- *
- * The following fields are required:
- * ```java
- * .service()
- * .params()
- * .response()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [CardPushTransferListPage]. */
- class Builder internal constructor() {
-
- private var service: CardPushTransferService? = null
- private var params: CardPushTransferListParams? = null
- private var response: CardPushTransferListPageResponse? = null
-
- @JvmSynthetic
- internal fun from(cardPushTransferListPage: CardPushTransferListPage) = apply {
- service = cardPushTransferListPage.service
- params = cardPushTransferListPage.params
- response = cardPushTransferListPage.response
- }
-
- fun service(service: CardPushTransferService) = apply { this.service = service }
-
- /** The parameters that were used to request this page. */
- fun params(params: CardPushTransferListParams) = apply { this.params = params }
-
- /** The response that this page was parsed from. */
- fun response(response: CardPushTransferListPageResponse) = apply {
- this.response = response
- }
-
- /**
- * Returns an immutable instance of [CardPushTransferListPage].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .service()
- * .params()
- * .response()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): CardPushTransferListPage =
- CardPushTransferListPage(
- checkRequired("service", service),
- checkRequired("params", params),
- checkRequired("response", response),
- )
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is CardPushTransferListPage &&
- service == other.service &&
- params == other.params &&
- response == other.response
- }
-
- override fun hashCode(): Int = Objects.hash(service, params, response)
-
- override fun toString() =
- "CardPushTransferListPage{service=$service, params=$params, response=$response}"
-}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferListPageAsync.kt
deleted file mode 100644
index 603a9c2d0..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferListPageAsync.kt
+++ /dev/null
@@ -1,151 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.models.cardpushtransfers
-
-import com.increase.api.core.AutoPagerAsync
-import com.increase.api.core.PageAsync
-import com.increase.api.core.checkRequired
-import com.increase.api.services.async.CardPushTransferServiceAsync
-import java.util.Objects
-import java.util.Optional
-import java.util.concurrent.CompletableFuture
-import java.util.concurrent.Executor
-import kotlin.jvm.optionals.getOrNull
-
-/** @see CardPushTransferServiceAsync.list */
-class CardPushTransferListPageAsync
-private constructor(
- private val service: CardPushTransferServiceAsync,
- private val streamHandlerExecutor: Executor,
- private val params: CardPushTransferListParams,
- private val response: CardPushTransferListPageResponse,
-) : PageAsync {
-
- /**
- * Delegates to [CardPushTransferListPageResponse], but gracefully handles missing data.
- *
- * @see CardPushTransferListPageResponse.data
- */
- fun data(): List =
- response._data().getOptional("data").getOrNull() ?: emptyList()
-
- /**
- * Delegates to [CardPushTransferListPageResponse], but gracefully handles missing data.
- *
- * @see CardPushTransferListPageResponse.nextCursor
- */
- fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor")
-
- override fun items(): List = data()
-
- override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent
-
- fun nextPageParams(): CardPushTransferListParams {
- val nextCursor =
- nextCursor().getOrNull()
- ?: throw IllegalStateException("Cannot construct next page params")
- return params.toBuilder().cursor(nextCursor).build()
- }
-
- override fun nextPage(): CompletableFuture =
- service.list(nextPageParams())
-
- fun autoPager(): AutoPagerAsync =
- AutoPagerAsync.from(this, streamHandlerExecutor)
-
- /** The parameters that were used to request this page. */
- fun params(): CardPushTransferListParams = params
-
- /** The response that this page was parsed from. */
- fun response(): CardPushTransferListPageResponse = response
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /**
- * Returns a mutable builder for constructing an instance of
- * [CardPushTransferListPageAsync].
- *
- * The following fields are required:
- * ```java
- * .service()
- * .streamHandlerExecutor()
- * .params()
- * .response()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [CardPushTransferListPageAsync]. */
- class Builder internal constructor() {
-
- private var service: CardPushTransferServiceAsync? = null
- private var streamHandlerExecutor: Executor? = null
- private var params: CardPushTransferListParams? = null
- private var response: CardPushTransferListPageResponse? = null
-
- @JvmSynthetic
- internal fun from(cardPushTransferListPageAsync: CardPushTransferListPageAsync) = apply {
- service = cardPushTransferListPageAsync.service
- streamHandlerExecutor = cardPushTransferListPageAsync.streamHandlerExecutor
- params = cardPushTransferListPageAsync.params
- response = cardPushTransferListPageAsync.response
- }
-
- fun service(service: CardPushTransferServiceAsync) = apply { this.service = service }
-
- fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply {
- this.streamHandlerExecutor = streamHandlerExecutor
- }
-
- /** The parameters that were used to request this page. */
- fun params(params: CardPushTransferListParams) = apply { this.params = params }
-
- /** The response that this page was parsed from. */
- fun response(response: CardPushTransferListPageResponse) = apply {
- this.response = response
- }
-
- /**
- * Returns an immutable instance of [CardPushTransferListPageAsync].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .service()
- * .streamHandlerExecutor()
- * .params()
- * .response()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): CardPushTransferListPageAsync =
- CardPushTransferListPageAsync(
- checkRequired("service", service),
- checkRequired("streamHandlerExecutor", streamHandlerExecutor),
- checkRequired("params", params),
- checkRequired("response", response),
- )
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is CardPushTransferListPageAsync &&
- service == other.service &&
- streamHandlerExecutor == other.streamHandlerExecutor &&
- params == other.params &&
- response == other.response
- }
-
- override fun hashCode(): Int = Objects.hash(service, streamHandlerExecutor, params, response)
-
- override fun toString() =
- "CardPushTransferListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}"
-}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferListResponse.kt
similarity index 89%
rename from increase-java-core/src/main/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferListPageResponse.kt
rename to increase-java-core/src/main/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferListResponse.kt
index 7a8324456..e1589efb1 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferListPageResponse.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferListResponse.kt
@@ -20,7 +20,7 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/** A list of Card Push Transfer objects. */
-class CardPushTransferListPageResponse
+class CardPushTransferListResponse
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val data: JsonField>,
@@ -83,8 +83,7 @@ private constructor(
companion object {
/**
- * Returns a mutable builder for constructing an instance of
- * [CardPushTransferListPageResponse].
+ * Returns a mutable builder for constructing an instance of [CardPushTransferListResponse].
*
* The following fields are required:
* ```java
@@ -95,7 +94,7 @@ private constructor(
@JvmStatic fun builder() = Builder()
}
- /** A builder for [CardPushTransferListPageResponse]. */
+ /** A builder for [CardPushTransferListResponse]. */
class Builder internal constructor() {
private var data: JsonField>? = null
@@ -103,13 +102,11 @@ private constructor(
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
- internal fun from(cardPushTransferListPageResponse: CardPushTransferListPageResponse) =
- apply {
- data = cardPushTransferListPageResponse.data.map { it.toMutableList() }
- nextCursor = cardPushTransferListPageResponse.nextCursor
- additionalProperties =
- cardPushTransferListPageResponse.additionalProperties.toMutableMap()
- }
+ internal fun from(cardPushTransferListResponse: CardPushTransferListResponse) = apply {
+ data = cardPushTransferListResponse.data.map { it.toMutableList() }
+ nextCursor = cardPushTransferListResponse.nextCursor
+ additionalProperties = cardPushTransferListResponse.additionalProperties.toMutableMap()
+ }
/** The contents of the list. */
fun data(data: List) = data(JsonField.of(data))
@@ -172,7 +169,7 @@ private constructor(
}
/**
- * Returns an immutable instance of [CardPushTransferListPageResponse].
+ * Returns an immutable instance of [CardPushTransferListResponse].
*
* Further updates to this [Builder] will not mutate the returned instance.
*
@@ -184,8 +181,8 @@ private constructor(
*
* @throws IllegalStateException if any required field is unset.
*/
- fun build(): CardPushTransferListPageResponse =
- CardPushTransferListPageResponse(
+ fun build(): CardPushTransferListResponse =
+ CardPushTransferListResponse(
checkRequired("data", data).map { it.toImmutable() },
checkRequired("nextCursor", nextCursor),
additionalProperties.toMutableMap(),
@@ -194,7 +191,7 @@ private constructor(
private var validated: Boolean = false
- fun validate(): CardPushTransferListPageResponse = apply {
+ fun validate(): CardPushTransferListResponse = apply {
if (validated) {
return@apply
}
@@ -227,7 +224,7 @@ private constructor(
return true
}
- return other is CardPushTransferListPageResponse &&
+ return other is CardPushTransferListResponse &&
data == other.data &&
nextCursor == other.nextCursor &&
additionalProperties == other.additionalProperties
@@ -238,5 +235,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "CardPushTransferListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}"
+ "CardPushTransferListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}"
}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/cards/CardListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/cards/CardListPage.kt
deleted file mode 100644
index e9f8b8978..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/cards/CardListPage.kt
+++ /dev/null
@@ -1,131 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.models.cards
-
-import com.increase.api.core.AutoPager
-import com.increase.api.core.Page
-import com.increase.api.core.checkRequired
-import com.increase.api.services.blocking.CardService
-import java.util.Objects
-import java.util.Optional
-import kotlin.jvm.optionals.getOrNull
-
-/** @see CardService.list */
-class CardListPage
-private constructor(
- private val service: CardService,
- private val params: CardListParams,
- private val response: CardListPageResponse,
-) : Page {
-
- /**
- * Delegates to [CardListPageResponse], but gracefully handles missing data.
- *
- * @see CardListPageResponse.data
- */
- fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList()
-
- /**
- * Delegates to [CardListPageResponse], but gracefully handles missing data.
- *
- * @see CardListPageResponse.nextCursor
- */
- fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor")
-
- override fun items(): List = data()
-
- override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent
-
- fun nextPageParams(): CardListParams {
- val nextCursor =
- nextCursor().getOrNull()
- ?: throw IllegalStateException("Cannot construct next page params")
- return params.toBuilder().cursor(nextCursor).build()
- }
-
- override fun nextPage(): CardListPage = service.list(nextPageParams())
-
- fun autoPager(): AutoPager = AutoPager.from(this)
-
- /** The parameters that were used to request this page. */
- fun params(): CardListParams = params
-
- /** The response that this page was parsed from. */
- fun response(): CardListPageResponse = response
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /**
- * Returns a mutable builder for constructing an instance of [CardListPage].
- *
- * The following fields are required:
- * ```java
- * .service()
- * .params()
- * .response()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [CardListPage]. */
- class Builder internal constructor() {
-
- private var service: CardService? = null
- private var params: CardListParams? = null
- private var response: CardListPageResponse? = null
-
- @JvmSynthetic
- internal fun from(cardListPage: CardListPage) = apply {
- service = cardListPage.service
- params = cardListPage.params
- response = cardListPage.response
- }
-
- fun service(service: CardService) = apply { this.service = service }
-
- /** The parameters that were used to request this page. */
- fun params(params: CardListParams) = apply { this.params = params }
-
- /** The response that this page was parsed from. */
- fun response(response: CardListPageResponse) = apply { this.response = response }
-
- /**
- * Returns an immutable instance of [CardListPage].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .service()
- * .params()
- * .response()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): CardListPage =
- CardListPage(
- checkRequired("service", service),
- checkRequired("params", params),
- checkRequired("response", response),
- )
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is CardListPage &&
- service == other.service &&
- params == other.params &&
- response == other.response
- }
-
- override fun hashCode(): Int = Objects.hash(service, params, response)
-
- override fun toString() = "CardListPage{service=$service, params=$params, response=$response}"
-}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/cards/CardListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/cards/CardListPageAsync.kt
deleted file mode 100644
index 4b8f0975b..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/cards/CardListPageAsync.kt
+++ /dev/null
@@ -1,145 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.models.cards
-
-import com.increase.api.core.AutoPagerAsync
-import com.increase.api.core.PageAsync
-import com.increase.api.core.checkRequired
-import com.increase.api.services.async.CardServiceAsync
-import java.util.Objects
-import java.util.Optional
-import java.util.concurrent.CompletableFuture
-import java.util.concurrent.Executor
-import kotlin.jvm.optionals.getOrNull
-
-/** @see CardServiceAsync.list */
-class CardListPageAsync
-private constructor(
- private val service: CardServiceAsync,
- private val streamHandlerExecutor: Executor,
- private val params: CardListParams,
- private val response: CardListPageResponse,
-) : PageAsync {
-
- /**
- * Delegates to [CardListPageResponse], but gracefully handles missing data.
- *
- * @see CardListPageResponse.data
- */
- fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList()
-
- /**
- * Delegates to [CardListPageResponse], but gracefully handles missing data.
- *
- * @see CardListPageResponse.nextCursor
- */
- fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor")
-
- override fun items(): List = data()
-
- override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent
-
- fun nextPageParams(): CardListParams {
- val nextCursor =
- nextCursor().getOrNull()
- ?: throw IllegalStateException("Cannot construct next page params")
- return params.toBuilder().cursor(nextCursor).build()
- }
-
- override fun nextPage(): CompletableFuture = service.list(nextPageParams())
-
- fun autoPager(): AutoPagerAsync = AutoPagerAsync.from(this, streamHandlerExecutor)
-
- /** The parameters that were used to request this page. */
- fun params(): CardListParams = params
-
- /** The response that this page was parsed from. */
- fun response(): CardListPageResponse = response
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /**
- * Returns a mutable builder for constructing an instance of [CardListPageAsync].
- *
- * The following fields are required:
- * ```java
- * .service()
- * .streamHandlerExecutor()
- * .params()
- * .response()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [CardListPageAsync]. */
- class Builder internal constructor() {
-
- private var service: CardServiceAsync? = null
- private var streamHandlerExecutor: Executor? = null
- private var params: CardListParams? = null
- private var response: CardListPageResponse? = null
-
- @JvmSynthetic
- internal fun from(cardListPageAsync: CardListPageAsync) = apply {
- service = cardListPageAsync.service
- streamHandlerExecutor = cardListPageAsync.streamHandlerExecutor
- params = cardListPageAsync.params
- response = cardListPageAsync.response
- }
-
- fun service(service: CardServiceAsync) = apply { this.service = service }
-
- fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply {
- this.streamHandlerExecutor = streamHandlerExecutor
- }
-
- /** The parameters that were used to request this page. */
- fun params(params: CardListParams) = apply { this.params = params }
-
- /** The response that this page was parsed from. */
- fun response(response: CardListPageResponse) = apply { this.response = response }
-
- /**
- * Returns an immutable instance of [CardListPageAsync].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .service()
- * .streamHandlerExecutor()
- * .params()
- * .response()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): CardListPageAsync =
- CardListPageAsync(
- checkRequired("service", service),
- checkRequired("streamHandlerExecutor", streamHandlerExecutor),
- checkRequired("params", params),
- checkRequired("response", response),
- )
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is CardListPageAsync &&
- service == other.service &&
- streamHandlerExecutor == other.streamHandlerExecutor &&
- params == other.params &&
- response == other.response
- }
-
- override fun hashCode(): Int = Objects.hash(service, streamHandlerExecutor, params, response)
-
- override fun toString() =
- "CardListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}"
-}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/cards/CardListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/cards/CardListResponse.kt
similarity index 90%
rename from increase-java-core/src/main/kotlin/com/increase/api/models/cards/CardListPageResponse.kt
rename to increase-java-core/src/main/kotlin/com/increase/api/models/cards/CardListResponse.kt
index 69c2b231a..5bbc28191 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/cards/CardListPageResponse.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/cards/CardListResponse.kt
@@ -20,7 +20,7 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/** A list of Card objects. */
-class CardListPageResponse
+class CardListResponse
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val data: JsonField>,
@@ -81,7 +81,7 @@ private constructor(
companion object {
/**
- * Returns a mutable builder for constructing an instance of [CardListPageResponse].
+ * Returns a mutable builder for constructing an instance of [CardListResponse].
*
* The following fields are required:
* ```java
@@ -92,7 +92,7 @@ private constructor(
@JvmStatic fun builder() = Builder()
}
- /** A builder for [CardListPageResponse]. */
+ /** A builder for [CardListResponse]. */
class Builder internal constructor() {
private var data: JsonField>? = null
@@ -100,10 +100,10 @@ private constructor(
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
- internal fun from(cardListPageResponse: CardListPageResponse) = apply {
- data = cardListPageResponse.data.map { it.toMutableList() }
- nextCursor = cardListPageResponse.nextCursor
- additionalProperties = cardListPageResponse.additionalProperties.toMutableMap()
+ internal fun from(cardListResponse: CardListResponse) = apply {
+ data = cardListResponse.data.map { it.toMutableList() }
+ nextCursor = cardListResponse.nextCursor
+ additionalProperties = cardListResponse.additionalProperties.toMutableMap()
}
/** The contents of the list. */
@@ -166,7 +166,7 @@ private constructor(
}
/**
- * Returns an immutable instance of [CardListPageResponse].
+ * Returns an immutable instance of [CardListResponse].
*
* Further updates to this [Builder] will not mutate the returned instance.
*
@@ -178,8 +178,8 @@ private constructor(
*
* @throws IllegalStateException if any required field is unset.
*/
- fun build(): CardListPageResponse =
- CardListPageResponse(
+ fun build(): CardListResponse =
+ CardListResponse(
checkRequired("data", data).map { it.toImmutable() },
checkRequired("nextCursor", nextCursor),
additionalProperties.toMutableMap(),
@@ -188,7 +188,7 @@ private constructor(
private var validated: Boolean = false
- fun validate(): CardListPageResponse = apply {
+ fun validate(): CardListResponse = apply {
if (validated) {
return@apply
}
@@ -221,7 +221,7 @@ private constructor(
return true
}
- return other is CardListPageResponse &&
+ return other is CardListResponse &&
data == other.data &&
nextCursor == other.nextCursor &&
additionalProperties == other.additionalProperties
@@ -232,5 +232,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "CardListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}"
+ "CardListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}"
}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/cardtokens/CardTokenListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/cardtokens/CardTokenListPage.kt
deleted file mode 100644
index 1c7dfc628..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/cardtokens/CardTokenListPage.kt
+++ /dev/null
@@ -1,132 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.models.cardtokens
-
-import com.increase.api.core.AutoPager
-import com.increase.api.core.Page
-import com.increase.api.core.checkRequired
-import com.increase.api.services.blocking.CardTokenService
-import java.util.Objects
-import java.util.Optional
-import kotlin.jvm.optionals.getOrNull
-
-/** @see CardTokenService.list */
-class CardTokenListPage
-private constructor(
- private val service: CardTokenService,
- private val params: CardTokenListParams,
- private val response: CardTokenListPageResponse,
-) : Page {
-
- /**
- * Delegates to [CardTokenListPageResponse], but gracefully handles missing data.
- *
- * @see CardTokenListPageResponse.data
- */
- fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList()
-
- /**
- * Delegates to [CardTokenListPageResponse], but gracefully handles missing data.
- *
- * @see CardTokenListPageResponse.nextCursor
- */
- fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor")
-
- override fun items(): List = data()
-
- override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent
-
- fun nextPageParams(): CardTokenListParams {
- val nextCursor =
- nextCursor().getOrNull()
- ?: throw IllegalStateException("Cannot construct next page params")
- return params.toBuilder().cursor(nextCursor).build()
- }
-
- override fun nextPage(): CardTokenListPage = service.list(nextPageParams())
-
- fun autoPager(): AutoPager = AutoPager.from(this)
-
- /** The parameters that were used to request this page. */
- fun params(): CardTokenListParams = params
-
- /** The response that this page was parsed from. */
- fun response(): CardTokenListPageResponse = response
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /**
- * Returns a mutable builder for constructing an instance of [CardTokenListPage].
- *
- * The following fields are required:
- * ```java
- * .service()
- * .params()
- * .response()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [CardTokenListPage]. */
- class Builder internal constructor() {
-
- private var service: CardTokenService? = null
- private var params: CardTokenListParams? = null
- private var response: CardTokenListPageResponse? = null
-
- @JvmSynthetic
- internal fun from(cardTokenListPage: CardTokenListPage) = apply {
- service = cardTokenListPage.service
- params = cardTokenListPage.params
- response = cardTokenListPage.response
- }
-
- fun service(service: CardTokenService) = apply { this.service = service }
-
- /** The parameters that were used to request this page. */
- fun params(params: CardTokenListParams) = apply { this.params = params }
-
- /** The response that this page was parsed from. */
- fun response(response: CardTokenListPageResponse) = apply { this.response = response }
-
- /**
- * Returns an immutable instance of [CardTokenListPage].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .service()
- * .params()
- * .response()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): CardTokenListPage =
- CardTokenListPage(
- checkRequired("service", service),
- checkRequired("params", params),
- checkRequired("response", response),
- )
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is CardTokenListPage &&
- service == other.service &&
- params == other.params &&
- response == other.response
- }
-
- override fun hashCode(): Int = Objects.hash(service, params, response)
-
- override fun toString() =
- "CardTokenListPage{service=$service, params=$params, response=$response}"
-}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/cardtokens/CardTokenListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/cardtokens/CardTokenListPageAsync.kt
deleted file mode 100644
index e1b562f8d..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/cardtokens/CardTokenListPageAsync.kt
+++ /dev/null
@@ -1,146 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.models.cardtokens
-
-import com.increase.api.core.AutoPagerAsync
-import com.increase.api.core.PageAsync
-import com.increase.api.core.checkRequired
-import com.increase.api.services.async.CardTokenServiceAsync
-import java.util.Objects
-import java.util.Optional
-import java.util.concurrent.CompletableFuture
-import java.util.concurrent.Executor
-import kotlin.jvm.optionals.getOrNull
-
-/** @see CardTokenServiceAsync.list */
-class CardTokenListPageAsync
-private constructor(
- private val service: CardTokenServiceAsync,
- private val streamHandlerExecutor: Executor,
- private val params: CardTokenListParams,
- private val response: CardTokenListPageResponse,
-) : PageAsync {
-
- /**
- * Delegates to [CardTokenListPageResponse], but gracefully handles missing data.
- *
- * @see CardTokenListPageResponse.data
- */
- fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList()
-
- /**
- * Delegates to [CardTokenListPageResponse], but gracefully handles missing data.
- *
- * @see CardTokenListPageResponse.nextCursor
- */
- fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor")
-
- override fun items(): List = data()
-
- override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent
-
- fun nextPageParams(): CardTokenListParams {
- val nextCursor =
- nextCursor().getOrNull()
- ?: throw IllegalStateException("Cannot construct next page params")
- return params.toBuilder().cursor(nextCursor).build()
- }
-
- override fun nextPage(): CompletableFuture =
- service.list(nextPageParams())
-
- fun autoPager(): AutoPagerAsync = AutoPagerAsync.from(this, streamHandlerExecutor)
-
- /** The parameters that were used to request this page. */
- fun params(): CardTokenListParams = params
-
- /** The response that this page was parsed from. */
- fun response(): CardTokenListPageResponse = response
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /**
- * Returns a mutable builder for constructing an instance of [CardTokenListPageAsync].
- *
- * The following fields are required:
- * ```java
- * .service()
- * .streamHandlerExecutor()
- * .params()
- * .response()
- * ```
- */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [CardTokenListPageAsync]. */
- class Builder internal constructor() {
-
- private var service: CardTokenServiceAsync? = null
- private var streamHandlerExecutor: Executor? = null
- private var params: CardTokenListParams? = null
- private var response: CardTokenListPageResponse? = null
-
- @JvmSynthetic
- internal fun from(cardTokenListPageAsync: CardTokenListPageAsync) = apply {
- service = cardTokenListPageAsync.service
- streamHandlerExecutor = cardTokenListPageAsync.streamHandlerExecutor
- params = cardTokenListPageAsync.params
- response = cardTokenListPageAsync.response
- }
-
- fun service(service: CardTokenServiceAsync) = apply { this.service = service }
-
- fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply {
- this.streamHandlerExecutor = streamHandlerExecutor
- }
-
- /** The parameters that were used to request this page. */
- fun params(params: CardTokenListParams) = apply { this.params = params }
-
- /** The response that this page was parsed from. */
- fun response(response: CardTokenListPageResponse) = apply { this.response = response }
-
- /**
- * Returns an immutable instance of [CardTokenListPageAsync].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- *
- * The following fields are required:
- * ```java
- * .service()
- * .streamHandlerExecutor()
- * .params()
- * .response()
- * ```
- *
- * @throws IllegalStateException if any required field is unset.
- */
- fun build(): CardTokenListPageAsync =
- CardTokenListPageAsync(
- checkRequired("service", service),
- checkRequired("streamHandlerExecutor", streamHandlerExecutor),
- checkRequired("params", params),
- checkRequired("response", response),
- )
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return other is CardTokenListPageAsync &&
- service == other.service &&
- streamHandlerExecutor == other.streamHandlerExecutor &&
- params == other.params &&
- response == other.response
- }
-
- override fun hashCode(): Int = Objects.hash(service, streamHandlerExecutor, params, response)
-
- override fun toString() =
- "CardTokenListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}"
-}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/cardtokens/CardTokenListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/cardtokens/CardTokenListResponse.kt
similarity index 90%
rename from increase-java-core/src/main/kotlin/com/increase/api/models/cardtokens/CardTokenListPageResponse.kt
rename to increase-java-core/src/main/kotlin/com/increase/api/models/cardtokens/CardTokenListResponse.kt
index efe5e9148..2e89fc3da 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/cardtokens/CardTokenListPageResponse.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/cardtokens/CardTokenListResponse.kt
@@ -20,7 +20,7 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/** A list of Card Token objects. */
-class CardTokenListPageResponse
+class CardTokenListResponse
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val data: JsonField>,
@@ -81,7 +81,7 @@ private constructor(
companion object {
/**
- * Returns a mutable builder for constructing an instance of [CardTokenListPageResponse].
+ * Returns a mutable builder for constructing an instance of [CardTokenListResponse].
*
* The following fields are required:
* ```java
@@ -92,7 +92,7 @@ private constructor(
@JvmStatic fun builder() = Builder()
}
- /** A builder for [CardTokenListPageResponse]. */
+ /** A builder for [CardTokenListResponse]. */
class Builder internal constructor() {
private var data: JsonField>? = null
@@ -100,10 +100,10 @@ private constructor(
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
- internal fun from(cardTokenListPageResponse: CardTokenListPageResponse) = apply {
- data = cardTokenListPageResponse.data.map { it.toMutableList() }
- nextCursor = cardTokenListPageResponse.nextCursor
- additionalProperties = cardTokenListPageResponse.additionalProperties.toMutableMap()
+ internal fun from(cardTokenListResponse: CardTokenListResponse) = apply {
+ data = cardTokenListResponse.data.map { it.toMutableList() }
+ nextCursor = cardTokenListResponse.nextCursor
+ additionalProperties = cardTokenListResponse.additionalProperties.toMutableMap()
}
/** The contents of the list. */
@@ -167,7 +167,7 @@ private constructor(
}
/**
- * Returns an immutable instance of [CardTokenListPageResponse].
+ * Returns an immutable instance of [CardTokenListResponse].
*
* Further updates to this [Builder] will not mutate the returned instance.
*
@@ -179,8 +179,8 @@ private constructor(
*
* @throws IllegalStateException if any required field is unset.
*/
- fun build(): CardTokenListPageResponse =
- CardTokenListPageResponse(
+ fun build(): CardTokenListResponse =
+ CardTokenListResponse(
checkRequired("data", data).map { it.toImmutable() },
checkRequired("nextCursor", nextCursor),
additionalProperties.toMutableMap(),
@@ -189,7 +189,7 @@ private constructor(
private var validated: Boolean = false
- fun validate(): CardTokenListPageResponse = apply {
+ fun validate(): CardTokenListResponse = apply {
if (validated) {
return@apply
}
@@ -222,7 +222,7 @@ private constructor(
return true
}
- return other is CardTokenListPageResponse &&
+ return other is CardTokenListResponse &&
data == other.data &&
nextCursor == other.nextCursor &&
additionalProperties == other.additionalProperties
@@ -233,5 +233,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "CardTokenListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}"
+ "CardTokenListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}"
}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/cardvalidations/CardValidationListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/cardvalidations/CardValidationListPage.kt
deleted file mode 100644
index e1688cd1d..000000000
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/cardvalidations/CardValidationListPage.kt
+++ /dev/null
@@ -1,133 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.increase.api.models.cardvalidations
-
-import com.increase.api.core.AutoPager
-import com.increase.api.core.Page
-import com.increase.api.core.checkRequired
-import com.increase.api.services.blocking.CardValidationService
-import java.util.Objects
-import java.util.Optional
-import kotlin.jvm.optionals.getOrNull
-
-/** @see CardValidationService.list */
-class CardValidationListPage
-private constructor(
- private val service: CardValidationService,
- private val params: CardValidationListParams,
- private val response: CardValidationListPageResponse,
-) : Page {
-
- /**
- * Delegates to [CardValidationListPageResponse], but gracefully handles missing data.
- *
- * @see CardValidationListPageResponse.data
- */
- fun data(): List =
- response._data().getOptional("data").getOrNull() ?: emptyList()
-
- /**
- * Delegates to [CardValidationListPageResponse], but gracefully handles missing data.
- *
- * @see CardValidationListPageResponse.nextCursor
- */
- fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor")
-
- override fun items(): List