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 @@ -[![Maven Central](https://img.shields.io/maven-central/v/com.increase.api/increase-java)](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.368.0) -[![javadoc](https://javadoc.io/badge2/com.increase.api/increase-java/0.368.0/javadoc.svg)](https://javadoc.io/doc/com.increase.api/increase-java/0.368.0) +[![Maven Central](https://img.shields.io/maven-central/v/com.increase.api/increase-java)](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.369.0) +[![javadoc](https://javadoc.io/badge2/com.increase.api/increase-java/0.369.0/javadoc.svg)](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 = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): CardValidationListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): CardValidationListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): CardValidationListParams = params - - /** The response that this page was parsed from. */ - fun response(): CardValidationListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [CardValidationListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [CardValidationListPage]. */ - class Builder internal constructor() { - - private var service: CardValidationService? = null - private var params: CardValidationListParams? = null - private var response: CardValidationListPageResponse? = null - - @JvmSynthetic - internal fun from(cardValidationListPage: CardValidationListPage) = apply { - service = cardValidationListPage.service - params = cardValidationListPage.params - response = cardValidationListPage.response - } - - fun service(service: CardValidationService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: CardValidationListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: CardValidationListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [CardValidationListPage]. - * - * 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(): CardValidationListPage = - CardValidationListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is CardValidationListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = - "CardValidationListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/cardvalidations/CardValidationListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/cardvalidations/CardValidationListPageAsync.kt deleted file mode 100644 index 138cf333d..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/cardvalidations/CardValidationListPageAsync.kt +++ /dev/null @@ -1,148 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.cardvalidations - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.CardValidationServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see CardValidationServiceAsync.list */ -class CardValidationListPageAsync -private constructor( - private val service: CardValidationServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: CardValidationListParams, - private val response: CardValidationListPageResponse, -) : PageAsync { - - /** - * 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 = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): CardValidationListParams { - 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(): CardValidationListParams = params - - /** The response that this page was parsed from. */ - fun response(): CardValidationListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [CardValidationListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [CardValidationListPageAsync]. */ - class Builder internal constructor() { - - private var service: CardValidationServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: CardValidationListParams? = null - private var response: CardValidationListPageResponse? = null - - @JvmSynthetic - internal fun from(cardValidationListPageAsync: CardValidationListPageAsync) = apply { - service = cardValidationListPageAsync.service - streamHandlerExecutor = cardValidationListPageAsync.streamHandlerExecutor - params = cardValidationListPageAsync.params - response = cardValidationListPageAsync.response - } - - fun service(service: CardValidationServiceAsync) = apply { this.service = service } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: CardValidationListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: CardValidationListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [CardValidationListPageAsync]. - * - * 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(): CardValidationListPageAsync = - CardValidationListPageAsync( - 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 CardValidationListPageAsync && - 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() = - "CardValidationListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/cardvalidations/CardValidationListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/cardvalidations/CardValidationListResponse.kt similarity index 89% rename from increase-java-core/src/main/kotlin/com/increase/api/models/cardvalidations/CardValidationListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/cardvalidations/CardValidationListResponse.kt index 36bf00502..bbd22a5e3 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/cardvalidations/CardValidationListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/cardvalidations/CardValidationListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of Card Validation objects. */ -class CardValidationListPageResponse +class CardValidationListResponse @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 - * [CardValidationListPageResponse]. + * Returns a mutable builder for constructing an instance of [CardValidationListResponse]. * * The following fields are required: * ```java @@ -95,7 +94,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [CardValidationListPageResponse]. */ + /** A builder for [CardValidationListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -103,11 +102,10 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(cardValidationListPageResponse: CardValidationListPageResponse) = apply { - data = cardValidationListPageResponse.data.map { it.toMutableList() } - nextCursor = cardValidationListPageResponse.nextCursor - additionalProperties = - cardValidationListPageResponse.additionalProperties.toMutableMap() + internal fun from(cardValidationListResponse: CardValidationListResponse) = apply { + data = cardValidationListResponse.data.map { it.toMutableList() } + nextCursor = cardValidationListResponse.nextCursor + additionalProperties = cardValidationListResponse.additionalProperties.toMutableMap() } /** The contents of the list. */ @@ -171,7 +169,7 @@ private constructor( } /** - * Returns an immutable instance of [CardValidationListPageResponse]. + * Returns an immutable instance of [CardValidationListResponse]. * * Further updates to this [Builder] will not mutate the returned instance. * @@ -183,8 +181,8 @@ private constructor( * * @throws IllegalStateException if any required field is unset. */ - fun build(): CardValidationListPageResponse = - CardValidationListPageResponse( + fun build(): CardValidationListResponse = + CardValidationListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -193,7 +191,7 @@ private constructor( private var validated: Boolean = false - fun validate(): CardValidationListPageResponse = apply { + fun validate(): CardValidationListResponse = apply { if (validated) { return@apply } @@ -226,7 +224,7 @@ private constructor( return true } - return other is CardValidationListPageResponse && + return other is CardValidationListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -237,5 +235,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "CardValidationListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "CardValidationListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/checkdeposits/CheckDepositListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/checkdeposits/CheckDepositListPage.kt deleted file mode 100644 index a148ee5bb..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/checkdeposits/CheckDepositListPage.kt +++ /dev/null @@ -1,132 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.checkdeposits - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.CheckDepositService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see CheckDepositService.list */ -class CheckDepositListPage -private constructor( - private val service: CheckDepositService, - private val params: CheckDepositListParams, - private val response: CheckDepositListPageResponse, -) : Page { - - /** - * Delegates to [CheckDepositListPageResponse], but gracefully handles missing data. - * - * @see CheckDepositListPageResponse.data - */ - fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [CheckDepositListPageResponse], but gracefully handles missing data. - * - * @see CheckDepositListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): CheckDepositListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): CheckDepositListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): CheckDepositListParams = params - - /** The response that this page was parsed from. */ - fun response(): CheckDepositListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [CheckDepositListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [CheckDepositListPage]. */ - class Builder internal constructor() { - - private var service: CheckDepositService? = null - private var params: CheckDepositListParams? = null - private var response: CheckDepositListPageResponse? = null - - @JvmSynthetic - internal fun from(checkDepositListPage: CheckDepositListPage) = apply { - service = checkDepositListPage.service - params = checkDepositListPage.params - response = checkDepositListPage.response - } - - fun service(service: CheckDepositService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: CheckDepositListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: CheckDepositListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [CheckDepositListPage]. - * - * 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(): CheckDepositListPage = - CheckDepositListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is CheckDepositListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = - "CheckDepositListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/checkdeposits/CheckDepositListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/checkdeposits/CheckDepositListPageAsync.kt deleted file mode 100644 index c383eda8f..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/checkdeposits/CheckDepositListPageAsync.kt +++ /dev/null @@ -1,146 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.checkdeposits - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.CheckDepositServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see CheckDepositServiceAsync.list */ -class CheckDepositListPageAsync -private constructor( - private val service: CheckDepositServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: CheckDepositListParams, - private val response: CheckDepositListPageResponse, -) : PageAsync { - - /** - * Delegates to [CheckDepositListPageResponse], but gracefully handles missing data. - * - * @see CheckDepositListPageResponse.data - */ - fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [CheckDepositListPageResponse], but gracefully handles missing data. - * - * @see CheckDepositListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): CheckDepositListParams { - 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(): CheckDepositListParams = params - - /** The response that this page was parsed from. */ - fun response(): CheckDepositListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [CheckDepositListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [CheckDepositListPageAsync]. */ - class Builder internal constructor() { - - private var service: CheckDepositServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: CheckDepositListParams? = null - private var response: CheckDepositListPageResponse? = null - - @JvmSynthetic - internal fun from(checkDepositListPageAsync: CheckDepositListPageAsync) = apply { - service = checkDepositListPageAsync.service - streamHandlerExecutor = checkDepositListPageAsync.streamHandlerExecutor - params = checkDepositListPageAsync.params - response = checkDepositListPageAsync.response - } - - fun service(service: CheckDepositServiceAsync) = apply { this.service = service } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: CheckDepositListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: CheckDepositListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [CheckDepositListPageAsync]. - * - * 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(): CheckDepositListPageAsync = - CheckDepositListPageAsync( - 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 CheckDepositListPageAsync && - 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() = - "CheckDepositListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/checkdeposits/CheckDepositListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/checkdeposits/CheckDepositListResponse.kt similarity index 89% rename from increase-java-core/src/main/kotlin/com/increase/api/models/checkdeposits/CheckDepositListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/checkdeposits/CheckDepositListResponse.kt index fca0aa67e..0f07d35ec 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/checkdeposits/CheckDepositListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/checkdeposits/CheckDepositListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of Check Deposit objects. */ -class CheckDepositListPageResponse +class CheckDepositListResponse @JsonCreator(mode = JsonCreator.Mode.DISABLED) private constructor( private val data: JsonField>, @@ -83,7 +83,7 @@ private constructor( companion object { /** - * Returns a mutable builder for constructing an instance of [CheckDepositListPageResponse]. + * Returns a mutable builder for constructing an instance of [CheckDepositListResponse]. * * The following fields are required: * ```java @@ -94,7 +94,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [CheckDepositListPageResponse]. */ + /** A builder for [CheckDepositListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -102,10 +102,10 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(checkDepositListPageResponse: CheckDepositListPageResponse) = apply { - data = checkDepositListPageResponse.data.map { it.toMutableList() } - nextCursor = checkDepositListPageResponse.nextCursor - additionalProperties = checkDepositListPageResponse.additionalProperties.toMutableMap() + internal fun from(checkDepositListResponse: CheckDepositListResponse) = apply { + data = checkDepositListResponse.data.map { it.toMutableList() } + nextCursor = checkDepositListResponse.nextCursor + additionalProperties = checkDepositListResponse.additionalProperties.toMutableMap() } /** The contents of the list. */ @@ -169,7 +169,7 @@ private constructor( } /** - * Returns an immutable instance of [CheckDepositListPageResponse]. + * Returns an immutable instance of [CheckDepositListResponse]. * * Further updates to this [Builder] will not mutate the returned instance. * @@ -181,8 +181,8 @@ private constructor( * * @throws IllegalStateException if any required field is unset. */ - fun build(): CheckDepositListPageResponse = - CheckDepositListPageResponse( + fun build(): CheckDepositListResponse = + CheckDepositListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -191,7 +191,7 @@ private constructor( private var validated: Boolean = false - fun validate(): CheckDepositListPageResponse = apply { + fun validate(): CheckDepositListResponse = apply { if (validated) { return@apply } @@ -224,7 +224,7 @@ private constructor( return true } - return other is CheckDepositListPageResponse && + return other is CheckDepositListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -235,5 +235,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "CheckDepositListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "CheckDepositListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/checktransfers/CheckTransferListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/checktransfers/CheckTransferListPage.kt deleted file mode 100644 index 2919fc707..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/checktransfers/CheckTransferListPage.kt +++ /dev/null @@ -1,133 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.checktransfers - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.CheckTransferService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see CheckTransferService.list */ -class CheckTransferListPage -private constructor( - private val service: CheckTransferService, - private val params: CheckTransferListParams, - private val response: CheckTransferListPageResponse, -) : Page { - - /** - * Delegates to [CheckTransferListPageResponse], but gracefully handles missing data. - * - * @see CheckTransferListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [CheckTransferListPageResponse], but gracefully handles missing data. - * - * @see CheckTransferListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): CheckTransferListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): CheckTransferListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): CheckTransferListParams = params - - /** The response that this page was parsed from. */ - fun response(): CheckTransferListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [CheckTransferListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [CheckTransferListPage]. */ - class Builder internal constructor() { - - private var service: CheckTransferService? = null - private var params: CheckTransferListParams? = null - private var response: CheckTransferListPageResponse? = null - - @JvmSynthetic - internal fun from(checkTransferListPage: CheckTransferListPage) = apply { - service = checkTransferListPage.service - params = checkTransferListPage.params - response = checkTransferListPage.response - } - - fun service(service: CheckTransferService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: CheckTransferListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: CheckTransferListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [CheckTransferListPage]. - * - * 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(): CheckTransferListPage = - CheckTransferListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is CheckTransferListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = - "CheckTransferListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/checktransfers/CheckTransferListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/checktransfers/CheckTransferListPageAsync.kt deleted file mode 100644 index c848e411a..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/checktransfers/CheckTransferListPageAsync.kt +++ /dev/null @@ -1,148 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.checktransfers - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.CheckTransferServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see CheckTransferServiceAsync.list */ -class CheckTransferListPageAsync -private constructor( - private val service: CheckTransferServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: CheckTransferListParams, - private val response: CheckTransferListPageResponse, -) : PageAsync { - - /** - * Delegates to [CheckTransferListPageResponse], but gracefully handles missing data. - * - * @see CheckTransferListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [CheckTransferListPageResponse], but gracefully handles missing data. - * - * @see CheckTransferListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): CheckTransferListParams { - 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(): CheckTransferListParams = params - - /** The response that this page was parsed from. */ - fun response(): CheckTransferListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [CheckTransferListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [CheckTransferListPageAsync]. */ - class Builder internal constructor() { - - private var service: CheckTransferServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: CheckTransferListParams? = null - private var response: CheckTransferListPageResponse? = null - - @JvmSynthetic - internal fun from(checkTransferListPageAsync: CheckTransferListPageAsync) = apply { - service = checkTransferListPageAsync.service - streamHandlerExecutor = checkTransferListPageAsync.streamHandlerExecutor - params = checkTransferListPageAsync.params - response = checkTransferListPageAsync.response - } - - fun service(service: CheckTransferServiceAsync) = apply { this.service = service } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: CheckTransferListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: CheckTransferListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [CheckTransferListPageAsync]. - * - * 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(): CheckTransferListPageAsync = - CheckTransferListPageAsync( - 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 CheckTransferListPageAsync && - 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() = - "CheckTransferListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/checktransfers/CheckTransferListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/checktransfers/CheckTransferListResponse.kt similarity index 89% rename from increase-java-core/src/main/kotlin/com/increase/api/models/checktransfers/CheckTransferListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/checktransfers/CheckTransferListResponse.kt index 011fd93dd..7cdad0067 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/checktransfers/CheckTransferListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/checktransfers/CheckTransferListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of Check Transfer objects. */ -class CheckTransferListPageResponse +class CheckTransferListResponse @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 - * [CheckTransferListPageResponse]. + * Returns a mutable builder for constructing an instance of [CheckTransferListResponse]. * * The following fields are required: * ```java @@ -95,7 +94,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [CheckTransferListPageResponse]. */ + /** A builder for [CheckTransferListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -103,10 +102,10 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(checkTransferListPageResponse: CheckTransferListPageResponse) = apply { - data = checkTransferListPageResponse.data.map { it.toMutableList() } - nextCursor = checkTransferListPageResponse.nextCursor - additionalProperties = checkTransferListPageResponse.additionalProperties.toMutableMap() + internal fun from(checkTransferListResponse: CheckTransferListResponse) = apply { + data = checkTransferListResponse.data.map { it.toMutableList() } + nextCursor = checkTransferListResponse.nextCursor + additionalProperties = checkTransferListResponse.additionalProperties.toMutableMap() } /** The contents of the list. */ @@ -170,7 +169,7 @@ private constructor( } /** - * Returns an immutable instance of [CheckTransferListPageResponse]. + * Returns an immutable instance of [CheckTransferListResponse]. * * 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(): CheckTransferListPageResponse = - CheckTransferListPageResponse( + fun build(): CheckTransferListResponse = + CheckTransferListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -192,7 +191,7 @@ private constructor( private var validated: Boolean = false - fun validate(): CheckTransferListPageResponse = apply { + fun validate(): CheckTransferListResponse = apply { if (validated) { return@apply } @@ -225,7 +224,7 @@ private constructor( return true } - return other is CheckTransferListPageResponse && + return other is CheckTransferListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -236,5 +235,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "CheckTransferListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "CheckTransferListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/declinedtransactions/DeclinedTransactionListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/declinedtransactions/DeclinedTransactionListPage.kt deleted file mode 100644 index ebdb124c0..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/declinedtransactions/DeclinedTransactionListPage.kt +++ /dev/null @@ -1,135 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.declinedtransactions - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.DeclinedTransactionService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see DeclinedTransactionService.list */ -class DeclinedTransactionListPage -private constructor( - private val service: DeclinedTransactionService, - private val params: DeclinedTransactionListParams, - private val response: DeclinedTransactionListPageResponse, -) : Page { - - /** - * Delegates to [DeclinedTransactionListPageResponse], but gracefully handles missing data. - * - * @see DeclinedTransactionListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [DeclinedTransactionListPageResponse], but gracefully handles missing data. - * - * @see DeclinedTransactionListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): DeclinedTransactionListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): DeclinedTransactionListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): DeclinedTransactionListParams = params - - /** The response that this page was parsed from. */ - fun response(): DeclinedTransactionListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [DeclinedTransactionListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [DeclinedTransactionListPage]. */ - class Builder internal constructor() { - - private var service: DeclinedTransactionService? = null - private var params: DeclinedTransactionListParams? = null - private var response: DeclinedTransactionListPageResponse? = null - - @JvmSynthetic - internal fun from(declinedTransactionListPage: DeclinedTransactionListPage) = apply { - service = declinedTransactionListPage.service - params = declinedTransactionListPage.params - response = declinedTransactionListPage.response - } - - fun service(service: DeclinedTransactionService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: DeclinedTransactionListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: DeclinedTransactionListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [DeclinedTransactionListPage]. - * - * 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(): DeclinedTransactionListPage = - DeclinedTransactionListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is DeclinedTransactionListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = - "DeclinedTransactionListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/declinedtransactions/DeclinedTransactionListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/declinedtransactions/DeclinedTransactionListPageAsync.kt deleted file mode 100644 index c1ddcb079..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/declinedtransactions/DeclinedTransactionListPageAsync.kt +++ /dev/null @@ -1,152 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.declinedtransactions - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.DeclinedTransactionServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see DeclinedTransactionServiceAsync.list */ -class DeclinedTransactionListPageAsync -private constructor( - private val service: DeclinedTransactionServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: DeclinedTransactionListParams, - private val response: DeclinedTransactionListPageResponse, -) : PageAsync { - - /** - * Delegates to [DeclinedTransactionListPageResponse], but gracefully handles missing data. - * - * @see DeclinedTransactionListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [DeclinedTransactionListPageResponse], but gracefully handles missing data. - * - * @see DeclinedTransactionListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): DeclinedTransactionListParams { - 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(): DeclinedTransactionListParams = params - - /** The response that this page was parsed from. */ - fun response(): DeclinedTransactionListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of - * [DeclinedTransactionListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [DeclinedTransactionListPageAsync]. */ - class Builder internal constructor() { - - private var service: DeclinedTransactionServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: DeclinedTransactionListParams? = null - private var response: DeclinedTransactionListPageResponse? = null - - @JvmSynthetic - internal fun from(declinedTransactionListPageAsync: DeclinedTransactionListPageAsync) = - apply { - service = declinedTransactionListPageAsync.service - streamHandlerExecutor = declinedTransactionListPageAsync.streamHandlerExecutor - params = declinedTransactionListPageAsync.params - response = declinedTransactionListPageAsync.response - } - - fun service(service: DeclinedTransactionServiceAsync) = apply { this.service = service } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: DeclinedTransactionListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: DeclinedTransactionListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [DeclinedTransactionListPageAsync]. - * - * 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(): DeclinedTransactionListPageAsync = - DeclinedTransactionListPageAsync( - 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 DeclinedTransactionListPageAsync && - 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() = - "DeclinedTransactionListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/declinedtransactions/DeclinedTransactionListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/declinedtransactions/DeclinedTransactionListResponse.kt similarity index 89% rename from increase-java-core/src/main/kotlin/com/increase/api/models/declinedtransactions/DeclinedTransactionListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/declinedtransactions/DeclinedTransactionListResponse.kt index 772ba046e..1c3a0b9fd 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/declinedtransactions/DeclinedTransactionListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/declinedtransactions/DeclinedTransactionListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of Declined Transaction objects. */ -class DeclinedTransactionListPageResponse +class DeclinedTransactionListResponse @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 - * [DeclinedTransactionListPageResponse]. + * [DeclinedTransactionListResponse]. * * The following fields are required: * ```java @@ -95,7 +95,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [DeclinedTransactionListPageResponse]. */ + /** A builder for [DeclinedTransactionListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -103,14 +103,13 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from( - declinedTransactionListPageResponse: DeclinedTransactionListPageResponse - ) = apply { - data = declinedTransactionListPageResponse.data.map { it.toMutableList() } - nextCursor = declinedTransactionListPageResponse.nextCursor - additionalProperties = - declinedTransactionListPageResponse.additionalProperties.toMutableMap() - } + internal fun from(declinedTransactionListResponse: DeclinedTransactionListResponse) = + apply { + data = declinedTransactionListResponse.data.map { it.toMutableList() } + nextCursor = declinedTransactionListResponse.nextCursor + additionalProperties = + declinedTransactionListResponse.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 [DeclinedTransactionListPageResponse]. + * Returns an immutable instance of [DeclinedTransactionListResponse]. * * 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(): DeclinedTransactionListPageResponse = - DeclinedTransactionListPageResponse( + fun build(): DeclinedTransactionListResponse = + DeclinedTransactionListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -195,7 +194,7 @@ private constructor( private var validated: Boolean = false - fun validate(): DeclinedTransactionListPageResponse = apply { + fun validate(): DeclinedTransactionListResponse = apply { if (validated) { return@apply } @@ -228,7 +227,7 @@ private constructor( return true } - return other is DeclinedTransactionListPageResponse && + return other is DeclinedTransactionListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -239,5 +238,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "DeclinedTransactionListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "DeclinedTransactionListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/digitalcardprofiles/DigitalCardProfileListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/digitalcardprofiles/DigitalCardProfileListPage.kt deleted file mode 100644 index 194ce6679..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/digitalcardprofiles/DigitalCardProfileListPage.kt +++ /dev/null @@ -1,135 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.digitalcardprofiles - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.DigitalCardProfileService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see DigitalCardProfileService.list */ -class DigitalCardProfileListPage -private constructor( - private val service: DigitalCardProfileService, - private val params: DigitalCardProfileListParams, - private val response: DigitalCardProfileListPageResponse, -) : Page { - - /** - * Delegates to [DigitalCardProfileListPageResponse], but gracefully handles missing data. - * - * @see DigitalCardProfileListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [DigitalCardProfileListPageResponse], but gracefully handles missing data. - * - * @see DigitalCardProfileListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): DigitalCardProfileListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): DigitalCardProfileListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): DigitalCardProfileListParams = params - - /** The response that this page was parsed from. */ - fun response(): DigitalCardProfileListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [DigitalCardProfileListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [DigitalCardProfileListPage]. */ - class Builder internal constructor() { - - private var service: DigitalCardProfileService? = null - private var params: DigitalCardProfileListParams? = null - private var response: DigitalCardProfileListPageResponse? = null - - @JvmSynthetic - internal fun from(digitalCardProfileListPage: DigitalCardProfileListPage) = apply { - service = digitalCardProfileListPage.service - params = digitalCardProfileListPage.params - response = digitalCardProfileListPage.response - } - - fun service(service: DigitalCardProfileService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: DigitalCardProfileListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: DigitalCardProfileListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [DigitalCardProfileListPage]. - * - * 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(): DigitalCardProfileListPage = - DigitalCardProfileListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is DigitalCardProfileListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = - "DigitalCardProfileListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/digitalcardprofiles/DigitalCardProfileListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/digitalcardprofiles/DigitalCardProfileListPageAsync.kt deleted file mode 100644 index 970db868e..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/digitalcardprofiles/DigitalCardProfileListPageAsync.kt +++ /dev/null @@ -1,152 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.digitalcardprofiles - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.DigitalCardProfileServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see DigitalCardProfileServiceAsync.list */ -class DigitalCardProfileListPageAsync -private constructor( - private val service: DigitalCardProfileServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: DigitalCardProfileListParams, - private val response: DigitalCardProfileListPageResponse, -) : PageAsync { - - /** - * Delegates to [DigitalCardProfileListPageResponse], but gracefully handles missing data. - * - * @see DigitalCardProfileListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [DigitalCardProfileListPageResponse], but gracefully handles missing data. - * - * @see DigitalCardProfileListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): DigitalCardProfileListParams { - 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(): DigitalCardProfileListParams = params - - /** The response that this page was parsed from. */ - fun response(): DigitalCardProfileListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of - * [DigitalCardProfileListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [DigitalCardProfileListPageAsync]. */ - class Builder internal constructor() { - - private var service: DigitalCardProfileServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: DigitalCardProfileListParams? = null - private var response: DigitalCardProfileListPageResponse? = null - - @JvmSynthetic - internal fun from(digitalCardProfileListPageAsync: DigitalCardProfileListPageAsync) = - apply { - service = digitalCardProfileListPageAsync.service - streamHandlerExecutor = digitalCardProfileListPageAsync.streamHandlerExecutor - params = digitalCardProfileListPageAsync.params - response = digitalCardProfileListPageAsync.response - } - - fun service(service: DigitalCardProfileServiceAsync) = apply { this.service = service } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: DigitalCardProfileListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: DigitalCardProfileListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [DigitalCardProfileListPageAsync]. - * - * 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(): DigitalCardProfileListPageAsync = - DigitalCardProfileListPageAsync( - 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 DigitalCardProfileListPageAsync && - 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() = - "DigitalCardProfileListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/digitalcardprofiles/DigitalCardProfileListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/digitalcardprofiles/DigitalCardProfileListResponse.kt similarity index 88% rename from increase-java-core/src/main/kotlin/com/increase/api/models/digitalcardprofiles/DigitalCardProfileListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/digitalcardprofiles/DigitalCardProfileListResponse.kt index b79889b74..8735d0f98 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/digitalcardprofiles/DigitalCardProfileListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/digitalcardprofiles/DigitalCardProfileListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of Digital Card Profile objects. */ -class DigitalCardProfileListPageResponse +class DigitalCardProfileListResponse @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 - * [DigitalCardProfileListPageResponse]. + * [DigitalCardProfileListResponse]. * * The following fields are required: * ```java @@ -95,7 +95,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [DigitalCardProfileListPageResponse]. */ + /** A builder for [DigitalCardProfileListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -103,13 +103,12 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(digitalCardProfileListPageResponse: DigitalCardProfileListPageResponse) = - apply { - data = digitalCardProfileListPageResponse.data.map { it.toMutableList() } - nextCursor = digitalCardProfileListPageResponse.nextCursor - additionalProperties = - digitalCardProfileListPageResponse.additionalProperties.toMutableMap() - } + internal fun from(digitalCardProfileListResponse: DigitalCardProfileListResponse) = apply { + data = digitalCardProfileListResponse.data.map { it.toMutableList() } + nextCursor = digitalCardProfileListResponse.nextCursor + additionalProperties = + digitalCardProfileListResponse.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 [DigitalCardProfileListPageResponse]. + * Returns an immutable instance of [DigitalCardProfileListResponse]. * * 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(): DigitalCardProfileListPageResponse = - DigitalCardProfileListPageResponse( + fun build(): DigitalCardProfileListResponse = + DigitalCardProfileListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -194,7 +193,7 @@ private constructor( private var validated: Boolean = false - fun validate(): DigitalCardProfileListPageResponse = apply { + fun validate(): DigitalCardProfileListResponse = apply { if (validated) { return@apply } @@ -227,7 +226,7 @@ private constructor( return true } - return other is DigitalCardProfileListPageResponse && + return other is DigitalCardProfileListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -238,5 +237,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "DigitalCardProfileListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "DigitalCardProfileListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/digitalwallettokens/DigitalWalletTokenListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/digitalwallettokens/DigitalWalletTokenListPage.kt deleted file mode 100644 index df1d5f2d8..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/digitalwallettokens/DigitalWalletTokenListPage.kt +++ /dev/null @@ -1,135 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.digitalwallettokens - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.DigitalWalletTokenService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see DigitalWalletTokenService.list */ -class DigitalWalletTokenListPage -private constructor( - private val service: DigitalWalletTokenService, - private val params: DigitalWalletTokenListParams, - private val response: DigitalWalletTokenListPageResponse, -) : Page { - - /** - * Delegates to [DigitalWalletTokenListPageResponse], but gracefully handles missing data. - * - * @see DigitalWalletTokenListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [DigitalWalletTokenListPageResponse], but gracefully handles missing data. - * - * @see DigitalWalletTokenListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): DigitalWalletTokenListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): DigitalWalletTokenListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): DigitalWalletTokenListParams = params - - /** The response that this page was parsed from. */ - fun response(): DigitalWalletTokenListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [DigitalWalletTokenListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [DigitalWalletTokenListPage]. */ - class Builder internal constructor() { - - private var service: DigitalWalletTokenService? = null - private var params: DigitalWalletTokenListParams? = null - private var response: DigitalWalletTokenListPageResponse? = null - - @JvmSynthetic - internal fun from(digitalWalletTokenListPage: DigitalWalletTokenListPage) = apply { - service = digitalWalletTokenListPage.service - params = digitalWalletTokenListPage.params - response = digitalWalletTokenListPage.response - } - - fun service(service: DigitalWalletTokenService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: DigitalWalletTokenListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: DigitalWalletTokenListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [DigitalWalletTokenListPage]. - * - * 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(): DigitalWalletTokenListPage = - DigitalWalletTokenListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is DigitalWalletTokenListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = - "DigitalWalletTokenListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/digitalwallettokens/DigitalWalletTokenListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/digitalwallettokens/DigitalWalletTokenListPageAsync.kt deleted file mode 100644 index ef5841287..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/digitalwallettokens/DigitalWalletTokenListPageAsync.kt +++ /dev/null @@ -1,152 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.digitalwallettokens - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.DigitalWalletTokenServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see DigitalWalletTokenServiceAsync.list */ -class DigitalWalletTokenListPageAsync -private constructor( - private val service: DigitalWalletTokenServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: DigitalWalletTokenListParams, - private val response: DigitalWalletTokenListPageResponse, -) : PageAsync { - - /** - * Delegates to [DigitalWalletTokenListPageResponse], but gracefully handles missing data. - * - * @see DigitalWalletTokenListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [DigitalWalletTokenListPageResponse], but gracefully handles missing data. - * - * @see DigitalWalletTokenListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): DigitalWalletTokenListParams { - 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(): DigitalWalletTokenListParams = params - - /** The response that this page was parsed from. */ - fun response(): DigitalWalletTokenListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of - * [DigitalWalletTokenListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [DigitalWalletTokenListPageAsync]. */ - class Builder internal constructor() { - - private var service: DigitalWalletTokenServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: DigitalWalletTokenListParams? = null - private var response: DigitalWalletTokenListPageResponse? = null - - @JvmSynthetic - internal fun from(digitalWalletTokenListPageAsync: DigitalWalletTokenListPageAsync) = - apply { - service = digitalWalletTokenListPageAsync.service - streamHandlerExecutor = digitalWalletTokenListPageAsync.streamHandlerExecutor - params = digitalWalletTokenListPageAsync.params - response = digitalWalletTokenListPageAsync.response - } - - fun service(service: DigitalWalletTokenServiceAsync) = apply { this.service = service } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: DigitalWalletTokenListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: DigitalWalletTokenListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [DigitalWalletTokenListPageAsync]. - * - * 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(): DigitalWalletTokenListPageAsync = - DigitalWalletTokenListPageAsync( - 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 DigitalWalletTokenListPageAsync && - 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() = - "DigitalWalletTokenListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/digitalwallettokens/DigitalWalletTokenListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/digitalwallettokens/DigitalWalletTokenListResponse.kt similarity index 88% rename from increase-java-core/src/main/kotlin/com/increase/api/models/digitalwallettokens/DigitalWalletTokenListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/digitalwallettokens/DigitalWalletTokenListResponse.kt index 5a5e6de79..f8a422357 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/digitalwallettokens/DigitalWalletTokenListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/digitalwallettokens/DigitalWalletTokenListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of Digital Wallet Token objects. */ -class DigitalWalletTokenListPageResponse +class DigitalWalletTokenListResponse @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 - * [DigitalWalletTokenListPageResponse]. + * [DigitalWalletTokenListResponse]. * * The following fields are required: * ```java @@ -95,7 +95,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [DigitalWalletTokenListPageResponse]. */ + /** A builder for [DigitalWalletTokenListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -103,13 +103,12 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(digitalWalletTokenListPageResponse: DigitalWalletTokenListPageResponse) = - apply { - data = digitalWalletTokenListPageResponse.data.map { it.toMutableList() } - nextCursor = digitalWalletTokenListPageResponse.nextCursor - additionalProperties = - digitalWalletTokenListPageResponse.additionalProperties.toMutableMap() - } + internal fun from(digitalWalletTokenListResponse: DigitalWalletTokenListResponse) = apply { + data = digitalWalletTokenListResponse.data.map { it.toMutableList() } + nextCursor = digitalWalletTokenListResponse.nextCursor + additionalProperties = + digitalWalletTokenListResponse.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 [DigitalWalletTokenListPageResponse]. + * Returns an immutable instance of [DigitalWalletTokenListResponse]. * * 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(): DigitalWalletTokenListPageResponse = - DigitalWalletTokenListPageResponse( + fun build(): DigitalWalletTokenListResponse = + DigitalWalletTokenListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -194,7 +193,7 @@ private constructor( private var validated: Boolean = false - fun validate(): DigitalWalletTokenListPageResponse = apply { + fun validate(): DigitalWalletTokenListResponse = apply { if (validated) { return@apply } @@ -227,7 +226,7 @@ private constructor( return true } - return other is DigitalWalletTokenListPageResponse && + return other is DigitalWalletTokenListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -238,5 +237,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "DigitalWalletTokenListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "DigitalWalletTokenListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/documents/DocumentListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/documents/DocumentListPage.kt deleted file mode 100644 index 43fe262a0..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/documents/DocumentListPage.kt +++ /dev/null @@ -1,132 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.documents - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.DocumentService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see DocumentService.list */ -class DocumentListPage -private constructor( - private val service: DocumentService, - private val params: DocumentListParams, - private val response: DocumentListPageResponse, -) : Page { - - /** - * Delegates to [DocumentListPageResponse], but gracefully handles missing data. - * - * @see DocumentListPageResponse.data - */ - fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [DocumentListPageResponse], but gracefully handles missing data. - * - * @see DocumentListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): DocumentListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): DocumentListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): DocumentListParams = params - - /** The response that this page was parsed from. */ - fun response(): DocumentListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [DocumentListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [DocumentListPage]. */ - class Builder internal constructor() { - - private var service: DocumentService? = null - private var params: DocumentListParams? = null - private var response: DocumentListPageResponse? = null - - @JvmSynthetic - internal fun from(documentListPage: DocumentListPage) = apply { - service = documentListPage.service - params = documentListPage.params - response = documentListPage.response - } - - fun service(service: DocumentService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: DocumentListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: DocumentListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [DocumentListPage]. - * - * 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(): DocumentListPage = - DocumentListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is DocumentListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = - "DocumentListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/documents/DocumentListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/documents/DocumentListPageAsync.kt deleted file mode 100644 index 1f25b5f54..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/documents/DocumentListPageAsync.kt +++ /dev/null @@ -1,146 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.documents - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.DocumentServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see DocumentServiceAsync.list */ -class DocumentListPageAsync -private constructor( - private val service: DocumentServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: DocumentListParams, - private val response: DocumentListPageResponse, -) : PageAsync { - - /** - * Delegates to [DocumentListPageResponse], but gracefully handles missing data. - * - * @see DocumentListPageResponse.data - */ - fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [DocumentListPageResponse], but gracefully handles missing data. - * - * @see DocumentListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): DocumentListParams { - 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(): DocumentListParams = params - - /** The response that this page was parsed from. */ - fun response(): DocumentListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [DocumentListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [DocumentListPageAsync]. */ - class Builder internal constructor() { - - private var service: DocumentServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: DocumentListParams? = null - private var response: DocumentListPageResponse? = null - - @JvmSynthetic - internal fun from(documentListPageAsync: DocumentListPageAsync) = apply { - service = documentListPageAsync.service - streamHandlerExecutor = documentListPageAsync.streamHandlerExecutor - params = documentListPageAsync.params - response = documentListPageAsync.response - } - - fun service(service: DocumentServiceAsync) = apply { this.service = service } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: DocumentListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: DocumentListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [DocumentListPageAsync]. - * - * 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(): DocumentListPageAsync = - DocumentListPageAsync( - 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 DocumentListPageAsync && - 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() = - "DocumentListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/documents/DocumentListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/documents/DocumentListResponse.kt similarity index 90% rename from increase-java-core/src/main/kotlin/com/increase/api/models/documents/DocumentListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/documents/DocumentListResponse.kt index 93f51e96a..1e47c1724 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/documents/DocumentListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/documents/DocumentListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of Document objects. */ -class DocumentListPageResponse +class DocumentListResponse @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 [DocumentListPageResponse]. + * Returns a mutable builder for constructing an instance of [DocumentListResponse]. * * The following fields are required: * ```java @@ -92,7 +92,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [DocumentListPageResponse]. */ + /** A builder for [DocumentListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -100,10 +100,10 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(documentListPageResponse: DocumentListPageResponse) = apply { - data = documentListPageResponse.data.map { it.toMutableList() } - nextCursor = documentListPageResponse.nextCursor - additionalProperties = documentListPageResponse.additionalProperties.toMutableMap() + internal fun from(documentListResponse: DocumentListResponse) = apply { + data = documentListResponse.data.map { it.toMutableList() } + nextCursor = documentListResponse.nextCursor + additionalProperties = documentListResponse.additionalProperties.toMutableMap() } /** The contents of the list. */ @@ -167,7 +167,7 @@ private constructor( } /** - * Returns an immutable instance of [DocumentListPageResponse]. + * Returns an immutable instance of [DocumentListResponse]. * * 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(): DocumentListPageResponse = - DocumentListPageResponse( + fun build(): DocumentListResponse = + DocumentListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -189,7 +189,7 @@ private constructor( private var validated: Boolean = false - fun validate(): DocumentListPageResponse = apply { + fun validate(): DocumentListResponse = apply { if (validated) { return@apply } @@ -222,7 +222,7 @@ private constructor( return true } - return other is DocumentListPageResponse && + return other is DocumentListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -233,5 +233,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "DocumentListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "DocumentListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/entities/EntityListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/entities/EntityListPage.kt deleted file mode 100644 index 791ed51fc..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/entities/EntityListPage.kt +++ /dev/null @@ -1,131 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.entities - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.EntityService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see EntityService.list */ -class EntityListPage -private constructor( - private val service: EntityService, - private val params: EntityListParams, - private val response: EntityListPageResponse, -) : Page { - - /** - * Delegates to [EntityListPageResponse], but gracefully handles missing data. - * - * @see EntityListPageResponse.data - */ - fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [EntityListPageResponse], but gracefully handles missing data. - * - * @see EntityListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): EntityListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): EntityListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): EntityListParams = params - - /** The response that this page was parsed from. */ - fun response(): EntityListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [EntityListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [EntityListPage]. */ - class Builder internal constructor() { - - private var service: EntityService? = null - private var params: EntityListParams? = null - private var response: EntityListPageResponse? = null - - @JvmSynthetic - internal fun from(entityListPage: EntityListPage) = apply { - service = entityListPage.service - params = entityListPage.params - response = entityListPage.response - } - - fun service(service: EntityService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: EntityListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: EntityListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [EntityListPage]. - * - * 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(): EntityListPage = - EntityListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is EntityListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = "EntityListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/entities/EntityListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/entities/EntityListPageAsync.kt deleted file mode 100644 index 122f55861..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/entities/EntityListPageAsync.kt +++ /dev/null @@ -1,145 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.entities - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.EntityServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see EntityServiceAsync.list */ -class EntityListPageAsync -private constructor( - private val service: EntityServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: EntityListParams, - private val response: EntityListPageResponse, -) : PageAsync { - - /** - * Delegates to [EntityListPageResponse], but gracefully handles missing data. - * - * @see EntityListPageResponse.data - */ - fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [EntityListPageResponse], but gracefully handles missing data. - * - * @see EntityListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): EntityListParams { - 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(): EntityListParams = params - - /** The response that this page was parsed from. */ - fun response(): EntityListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [EntityListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [EntityListPageAsync]. */ - class Builder internal constructor() { - - private var service: EntityServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: EntityListParams? = null - private var response: EntityListPageResponse? = null - - @JvmSynthetic - internal fun from(entityListPageAsync: EntityListPageAsync) = apply { - service = entityListPageAsync.service - streamHandlerExecutor = entityListPageAsync.streamHandlerExecutor - params = entityListPageAsync.params - response = entityListPageAsync.response - } - - fun service(service: EntityServiceAsync) = apply { this.service = service } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: EntityListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: EntityListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [EntityListPageAsync]. - * - * 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(): EntityListPageAsync = - EntityListPageAsync( - 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 EntityListPageAsync && - 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() = - "EntityListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/entities/EntityListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/entities/EntityListResponse.kt similarity index 90% rename from increase-java-core/src/main/kotlin/com/increase/api/models/entities/EntityListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/entities/EntityListResponse.kt index 0b14c799f..ab2f6ad8b 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/entities/EntityListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/entities/EntityListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of Entity objects. */ -class EntityListPageResponse +class EntityListResponse @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 [EntityListPageResponse]. + * Returns a mutable builder for constructing an instance of [EntityListResponse]. * * The following fields are required: * ```java @@ -92,7 +92,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [EntityListPageResponse]. */ + /** A builder for [EntityListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -100,10 +100,10 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(entityListPageResponse: EntityListPageResponse) = apply { - data = entityListPageResponse.data.map { it.toMutableList() } - nextCursor = entityListPageResponse.nextCursor - additionalProperties = entityListPageResponse.additionalProperties.toMutableMap() + internal fun from(entityListResponse: EntityListResponse) = apply { + data = entityListResponse.data.map { it.toMutableList() } + nextCursor = entityListResponse.nextCursor + additionalProperties = entityListResponse.additionalProperties.toMutableMap() } /** The contents of the list. */ @@ -167,7 +167,7 @@ private constructor( } /** - * Returns an immutable instance of [EntityListPageResponse]. + * Returns an immutable instance of [EntityListResponse]. * * 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(): EntityListPageResponse = - EntityListPageResponse( + fun build(): EntityListResponse = + EntityListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -189,7 +189,7 @@ private constructor( private var validated: Boolean = false - fun validate(): EntityListPageResponse = apply { + fun validate(): EntityListResponse = apply { if (validated) { return@apply } @@ -222,7 +222,7 @@ private constructor( return true } - return other is EntityListPageResponse && + return other is EntityListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -233,5 +233,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "EntityListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "EntityListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/events/EventListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/events/EventListPage.kt deleted file mode 100644 index 826988ccc..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/events/EventListPage.kt +++ /dev/null @@ -1,131 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.events - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.EventService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see EventService.list */ -class EventListPage -private constructor( - private val service: EventService, - private val params: EventListParams, - private val response: EventListPageResponse, -) : Page { - - /** - * Delegates to [EventListPageResponse], but gracefully handles missing data. - * - * @see EventListPageResponse.data - */ - fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [EventListPageResponse], but gracefully handles missing data. - * - * @see EventListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): EventListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): EventListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): EventListParams = params - - /** The response that this page was parsed from. */ - fun response(): EventListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [EventListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [EventListPage]. */ - class Builder internal constructor() { - - private var service: EventService? = null - private var params: EventListParams? = null - private var response: EventListPageResponse? = null - - @JvmSynthetic - internal fun from(eventListPage: EventListPage) = apply { - service = eventListPage.service - params = eventListPage.params - response = eventListPage.response - } - - fun service(service: EventService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: EventListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: EventListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [EventListPage]. - * - * 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(): EventListPage = - EventListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is EventListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = "EventListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/events/EventListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/events/EventListPageAsync.kt deleted file mode 100644 index 141cb4a75..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/events/EventListPageAsync.kt +++ /dev/null @@ -1,145 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.events - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.EventServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see EventServiceAsync.list */ -class EventListPageAsync -private constructor( - private val service: EventServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: EventListParams, - private val response: EventListPageResponse, -) : PageAsync { - - /** - * Delegates to [EventListPageResponse], but gracefully handles missing data. - * - * @see EventListPageResponse.data - */ - fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [EventListPageResponse], but gracefully handles missing data. - * - * @see EventListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): EventListParams { - 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(): EventListParams = params - - /** The response that this page was parsed from. */ - fun response(): EventListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [EventListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [EventListPageAsync]. */ - class Builder internal constructor() { - - private var service: EventServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: EventListParams? = null - private var response: EventListPageResponse? = null - - @JvmSynthetic - internal fun from(eventListPageAsync: EventListPageAsync) = apply { - service = eventListPageAsync.service - streamHandlerExecutor = eventListPageAsync.streamHandlerExecutor - params = eventListPageAsync.params - response = eventListPageAsync.response - } - - fun service(service: EventServiceAsync) = apply { this.service = service } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: EventListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: EventListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [EventListPageAsync]. - * - * 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(): EventListPageAsync = - EventListPageAsync( - 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 EventListPageAsync && - 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() = - "EventListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/events/EventListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/events/EventListResponse.kt similarity index 90% rename from increase-java-core/src/main/kotlin/com/increase/api/models/events/EventListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/events/EventListResponse.kt index e9745d07e..ccf493b59 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/events/EventListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/events/EventListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of Event objects. */ -class EventListPageResponse +class EventListResponse @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 [EventListPageResponse]. + * Returns a mutable builder for constructing an instance of [EventListResponse]. * * The following fields are required: * ```java @@ -92,7 +92,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [EventListPageResponse]. */ + /** A builder for [EventListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -100,10 +100,10 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(eventListPageResponse: EventListPageResponse) = apply { - data = eventListPageResponse.data.map { it.toMutableList() } - nextCursor = eventListPageResponse.nextCursor - additionalProperties = eventListPageResponse.additionalProperties.toMutableMap() + internal fun from(eventListResponse: EventListResponse) = apply { + data = eventListResponse.data.map { it.toMutableList() } + nextCursor = eventListResponse.nextCursor + additionalProperties = eventListResponse.additionalProperties.toMutableMap() } /** The contents of the list. */ @@ -167,7 +167,7 @@ private constructor( } /** - * Returns an immutable instance of [EventListPageResponse]. + * Returns an immutable instance of [EventListResponse]. * * 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(): EventListPageResponse = - EventListPageResponse( + fun build(): EventListResponse = + EventListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -189,7 +189,7 @@ private constructor( private var validated: Boolean = false - fun validate(): EventListPageResponse = apply { + fun validate(): EventListResponse = apply { if (validated) { return@apply } @@ -222,7 +222,7 @@ private constructor( return true } - return other is EventListPageResponse && + return other is EventListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -233,5 +233,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "EventListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "EventListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/eventsubscriptions/EventSubscriptionListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/eventsubscriptions/EventSubscriptionListPage.kt deleted file mode 100644 index 66719630c..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/eventsubscriptions/EventSubscriptionListPage.kt +++ /dev/null @@ -1,135 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.eventsubscriptions - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.EventSubscriptionService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see EventSubscriptionService.list */ -class EventSubscriptionListPage -private constructor( - private val service: EventSubscriptionService, - private val params: EventSubscriptionListParams, - private val response: EventSubscriptionListPageResponse, -) : Page { - - /** - * Delegates to [EventSubscriptionListPageResponse], but gracefully handles missing data. - * - * @see EventSubscriptionListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [EventSubscriptionListPageResponse], but gracefully handles missing data. - * - * @see EventSubscriptionListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): EventSubscriptionListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): EventSubscriptionListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): EventSubscriptionListParams = params - - /** The response that this page was parsed from. */ - fun response(): EventSubscriptionListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [EventSubscriptionListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [EventSubscriptionListPage]. */ - class Builder internal constructor() { - - private var service: EventSubscriptionService? = null - private var params: EventSubscriptionListParams? = null - private var response: EventSubscriptionListPageResponse? = null - - @JvmSynthetic - internal fun from(eventSubscriptionListPage: EventSubscriptionListPage) = apply { - service = eventSubscriptionListPage.service - params = eventSubscriptionListPage.params - response = eventSubscriptionListPage.response - } - - fun service(service: EventSubscriptionService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: EventSubscriptionListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: EventSubscriptionListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [EventSubscriptionListPage]. - * - * 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(): EventSubscriptionListPage = - EventSubscriptionListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is EventSubscriptionListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = - "EventSubscriptionListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/eventsubscriptions/EventSubscriptionListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/eventsubscriptions/EventSubscriptionListPageAsync.kt deleted file mode 100644 index b6deb1f81..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/eventsubscriptions/EventSubscriptionListPageAsync.kt +++ /dev/null @@ -1,151 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.eventsubscriptions - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.EventSubscriptionServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see EventSubscriptionServiceAsync.list */ -class EventSubscriptionListPageAsync -private constructor( - private val service: EventSubscriptionServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: EventSubscriptionListParams, - private val response: EventSubscriptionListPageResponse, -) : PageAsync { - - /** - * Delegates to [EventSubscriptionListPageResponse], but gracefully handles missing data. - * - * @see EventSubscriptionListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [EventSubscriptionListPageResponse], but gracefully handles missing data. - * - * @see EventSubscriptionListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): EventSubscriptionListParams { - 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(): EventSubscriptionListParams = params - - /** The response that this page was parsed from. */ - fun response(): EventSubscriptionListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of - * [EventSubscriptionListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [EventSubscriptionListPageAsync]. */ - class Builder internal constructor() { - - private var service: EventSubscriptionServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: EventSubscriptionListParams? = null - private var response: EventSubscriptionListPageResponse? = null - - @JvmSynthetic - internal fun from(eventSubscriptionListPageAsync: EventSubscriptionListPageAsync) = apply { - service = eventSubscriptionListPageAsync.service - streamHandlerExecutor = eventSubscriptionListPageAsync.streamHandlerExecutor - params = eventSubscriptionListPageAsync.params - response = eventSubscriptionListPageAsync.response - } - - fun service(service: EventSubscriptionServiceAsync) = apply { this.service = service } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: EventSubscriptionListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: EventSubscriptionListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [EventSubscriptionListPageAsync]. - * - * 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(): EventSubscriptionListPageAsync = - EventSubscriptionListPageAsync( - 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 EventSubscriptionListPageAsync && - 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() = - "EventSubscriptionListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/eventsubscriptions/EventSubscriptionListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/eventsubscriptions/EventSubscriptionListResponse.kt similarity index 89% rename from increase-java-core/src/main/kotlin/com/increase/api/models/eventsubscriptions/EventSubscriptionListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/eventsubscriptions/EventSubscriptionListResponse.kt index 7bb8a523c..b0dbfff07 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/eventsubscriptions/EventSubscriptionListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/eventsubscriptions/EventSubscriptionListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of Event Subscription objects. */ -class EventSubscriptionListPageResponse +class EventSubscriptionListResponse @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 - * [EventSubscriptionListPageResponse]. + * [EventSubscriptionListResponse]. * * The following fields are required: * ```java @@ -95,7 +95,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [EventSubscriptionListPageResponse]. */ + /** A builder for [EventSubscriptionListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -103,13 +103,11 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(eventSubscriptionListPageResponse: EventSubscriptionListPageResponse) = - apply { - data = eventSubscriptionListPageResponse.data.map { it.toMutableList() } - nextCursor = eventSubscriptionListPageResponse.nextCursor - additionalProperties = - eventSubscriptionListPageResponse.additionalProperties.toMutableMap() - } + internal fun from(eventSubscriptionListResponse: EventSubscriptionListResponse) = apply { + data = eventSubscriptionListResponse.data.map { it.toMutableList() } + nextCursor = eventSubscriptionListResponse.nextCursor + additionalProperties = eventSubscriptionListResponse.additionalProperties.toMutableMap() + } /** The contents of the list. */ fun data(data: List) = data(JsonField.of(data)) @@ -172,7 +170,7 @@ private constructor( } /** - * Returns an immutable instance of [EventSubscriptionListPageResponse]. + * Returns an immutable instance of [EventSubscriptionListResponse]. * * Further updates to this [Builder] will not mutate the returned instance. * @@ -184,8 +182,8 @@ private constructor( * * @throws IllegalStateException if any required field is unset. */ - fun build(): EventSubscriptionListPageResponse = - EventSubscriptionListPageResponse( + fun build(): EventSubscriptionListResponse = + EventSubscriptionListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -194,7 +192,7 @@ private constructor( private var validated: Boolean = false - fun validate(): EventSubscriptionListPageResponse = apply { + fun validate(): EventSubscriptionListResponse = apply { if (validated) { return@apply } @@ -227,7 +225,7 @@ private constructor( return true } - return other is EventSubscriptionListPageResponse && + return other is EventSubscriptionListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -238,5 +236,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "EventSubscriptionListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "EventSubscriptionListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/exports/ExportListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/exports/ExportListPage.kt deleted file mode 100644 index 7f937393e..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/exports/ExportListPage.kt +++ /dev/null @@ -1,131 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.exports - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.ExportService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see ExportService.list */ -class ExportListPage -private constructor( - private val service: ExportService, - private val params: ExportListParams, - private val response: ExportListPageResponse, -) : Page { - - /** - * Delegates to [ExportListPageResponse], but gracefully handles missing data. - * - * @see ExportListPageResponse.data - */ - fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [ExportListPageResponse], but gracefully handles missing data. - * - * @see ExportListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): ExportListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): ExportListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): ExportListParams = params - - /** The response that this page was parsed from. */ - fun response(): ExportListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [ExportListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [ExportListPage]. */ - class Builder internal constructor() { - - private var service: ExportService? = null - private var params: ExportListParams? = null - private var response: ExportListPageResponse? = null - - @JvmSynthetic - internal fun from(exportListPage: ExportListPage) = apply { - service = exportListPage.service - params = exportListPage.params - response = exportListPage.response - } - - fun service(service: ExportService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: ExportListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: ExportListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [ExportListPage]. - * - * 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(): ExportListPage = - ExportListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is ExportListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = "ExportListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/exports/ExportListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/exports/ExportListPageAsync.kt deleted file mode 100644 index 366c4f8a9..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/exports/ExportListPageAsync.kt +++ /dev/null @@ -1,145 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.exports - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.ExportServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see ExportServiceAsync.list */ -class ExportListPageAsync -private constructor( - private val service: ExportServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: ExportListParams, - private val response: ExportListPageResponse, -) : PageAsync { - - /** - * Delegates to [ExportListPageResponse], but gracefully handles missing data. - * - * @see ExportListPageResponse.data - */ - fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [ExportListPageResponse], but gracefully handles missing data. - * - * @see ExportListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): ExportListParams { - 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(): ExportListParams = params - - /** The response that this page was parsed from. */ - fun response(): ExportListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [ExportListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [ExportListPageAsync]. */ - class Builder internal constructor() { - - private var service: ExportServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: ExportListParams? = null - private var response: ExportListPageResponse? = null - - @JvmSynthetic - internal fun from(exportListPageAsync: ExportListPageAsync) = apply { - service = exportListPageAsync.service - streamHandlerExecutor = exportListPageAsync.streamHandlerExecutor - params = exportListPageAsync.params - response = exportListPageAsync.response - } - - fun service(service: ExportServiceAsync) = apply { this.service = service } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: ExportListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: ExportListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [ExportListPageAsync]. - * - * 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(): ExportListPageAsync = - ExportListPageAsync( - 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 ExportListPageAsync && - 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() = - "ExportListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/exports/ExportListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/exports/ExportListResponse.kt similarity index 90% rename from increase-java-core/src/main/kotlin/com/increase/api/models/exports/ExportListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/exports/ExportListResponse.kt index 224854996..2a7b7b913 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/exports/ExportListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/exports/ExportListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of Export objects. */ -class ExportListPageResponse +class ExportListResponse @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 [ExportListPageResponse]. + * Returns a mutable builder for constructing an instance of [ExportListResponse]. * * The following fields are required: * ```java @@ -92,7 +92,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [ExportListPageResponse]. */ + /** A builder for [ExportListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -100,10 +100,10 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(exportListPageResponse: ExportListPageResponse) = apply { - data = exportListPageResponse.data.map { it.toMutableList() } - nextCursor = exportListPageResponse.nextCursor - additionalProperties = exportListPageResponse.additionalProperties.toMutableMap() + internal fun from(exportListResponse: ExportListResponse) = apply { + data = exportListResponse.data.map { it.toMutableList() } + nextCursor = exportListResponse.nextCursor + additionalProperties = exportListResponse.additionalProperties.toMutableMap() } /** The contents of the list. */ @@ -167,7 +167,7 @@ private constructor( } /** - * Returns an immutable instance of [ExportListPageResponse]. + * Returns an immutable instance of [ExportListResponse]. * * 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(): ExportListPageResponse = - ExportListPageResponse( + fun build(): ExportListResponse = + ExportListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -189,7 +189,7 @@ private constructor( private var validated: Boolean = false - fun validate(): ExportListPageResponse = apply { + fun validate(): ExportListResponse = apply { if (validated) { return@apply } @@ -222,7 +222,7 @@ private constructor( return true } - return other is ExportListPageResponse && + return other is ExportListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -233,5 +233,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "ExportListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "ExportListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/externalaccounts/ExternalAccountListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/externalaccounts/ExternalAccountListPage.kt deleted file mode 100644 index d1737836c..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/externalaccounts/ExternalAccountListPage.kt +++ /dev/null @@ -1,133 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.externalaccounts - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.ExternalAccountService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see ExternalAccountService.list */ -class ExternalAccountListPage -private constructor( - private val service: ExternalAccountService, - private val params: ExternalAccountListParams, - private val response: ExternalAccountListPageResponse, -) : Page { - - /** - * Delegates to [ExternalAccountListPageResponse], but gracefully handles missing data. - * - * @see ExternalAccountListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [ExternalAccountListPageResponse], but gracefully handles missing data. - * - * @see ExternalAccountListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): ExternalAccountListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): ExternalAccountListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): ExternalAccountListParams = params - - /** The response that this page was parsed from. */ - fun response(): ExternalAccountListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [ExternalAccountListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [ExternalAccountListPage]. */ - class Builder internal constructor() { - - private var service: ExternalAccountService? = null - private var params: ExternalAccountListParams? = null - private var response: ExternalAccountListPageResponse? = null - - @JvmSynthetic - internal fun from(externalAccountListPage: ExternalAccountListPage) = apply { - service = externalAccountListPage.service - params = externalAccountListPage.params - response = externalAccountListPage.response - } - - fun service(service: ExternalAccountService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: ExternalAccountListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: ExternalAccountListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [ExternalAccountListPage]. - * - * 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(): ExternalAccountListPage = - ExternalAccountListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is ExternalAccountListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = - "ExternalAccountListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/externalaccounts/ExternalAccountListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/externalaccounts/ExternalAccountListPageAsync.kt deleted file mode 100644 index 116109af3..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/externalaccounts/ExternalAccountListPageAsync.kt +++ /dev/null @@ -1,148 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.externalaccounts - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.ExternalAccountServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see ExternalAccountServiceAsync.list */ -class ExternalAccountListPageAsync -private constructor( - private val service: ExternalAccountServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: ExternalAccountListParams, - private val response: ExternalAccountListPageResponse, -) : PageAsync { - - /** - * Delegates to [ExternalAccountListPageResponse], but gracefully handles missing data. - * - * @see ExternalAccountListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [ExternalAccountListPageResponse], but gracefully handles missing data. - * - * @see ExternalAccountListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): ExternalAccountListParams { - 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(): ExternalAccountListParams = params - - /** The response that this page was parsed from. */ - fun response(): ExternalAccountListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [ExternalAccountListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [ExternalAccountListPageAsync]. */ - class Builder internal constructor() { - - private var service: ExternalAccountServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: ExternalAccountListParams? = null - private var response: ExternalAccountListPageResponse? = null - - @JvmSynthetic - internal fun from(externalAccountListPageAsync: ExternalAccountListPageAsync) = apply { - service = externalAccountListPageAsync.service - streamHandlerExecutor = externalAccountListPageAsync.streamHandlerExecutor - params = externalAccountListPageAsync.params - response = externalAccountListPageAsync.response - } - - fun service(service: ExternalAccountServiceAsync) = apply { this.service = service } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: ExternalAccountListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: ExternalAccountListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [ExternalAccountListPageAsync]. - * - * 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(): ExternalAccountListPageAsync = - ExternalAccountListPageAsync( - 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 ExternalAccountListPageAsync && - 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() = - "ExternalAccountListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/externalaccounts/ExternalAccountListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/externalaccounts/ExternalAccountListResponse.kt similarity index 89% rename from increase-java-core/src/main/kotlin/com/increase/api/models/externalaccounts/ExternalAccountListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/externalaccounts/ExternalAccountListResponse.kt index a2c30b3ad..55226923b 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/externalaccounts/ExternalAccountListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/externalaccounts/ExternalAccountListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of External Account objects. */ -class ExternalAccountListPageResponse +class ExternalAccountListResponse @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 - * [ExternalAccountListPageResponse]. + * Returns a mutable builder for constructing an instance of [ExternalAccountListResponse]. * * The following fields are required: * ```java @@ -95,7 +94,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [ExternalAccountListPageResponse]. */ + /** A builder for [ExternalAccountListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -103,13 +102,11 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(externalAccountListPageResponse: ExternalAccountListPageResponse) = - apply { - data = externalAccountListPageResponse.data.map { it.toMutableList() } - nextCursor = externalAccountListPageResponse.nextCursor - additionalProperties = - externalAccountListPageResponse.additionalProperties.toMutableMap() - } + internal fun from(externalAccountListResponse: ExternalAccountListResponse) = apply { + data = externalAccountListResponse.data.map { it.toMutableList() } + nextCursor = externalAccountListResponse.nextCursor + additionalProperties = externalAccountListResponse.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 [ExternalAccountListPageResponse]. + * Returns an immutable instance of [ExternalAccountListResponse]. * * 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(): ExternalAccountListPageResponse = - ExternalAccountListPageResponse( + fun build(): ExternalAccountListResponse = + ExternalAccountListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -194,7 +191,7 @@ private constructor( private var validated: Boolean = false - fun validate(): ExternalAccountListPageResponse = apply { + fun validate(): ExternalAccountListResponse = apply { if (validated) { return@apply } @@ -227,7 +224,7 @@ private constructor( return true } - return other is ExternalAccountListPageResponse && + return other is ExternalAccountListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -238,5 +235,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "ExternalAccountListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "ExternalAccountListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/fednowtransfers/FednowTransferListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/fednowtransfers/FednowTransferListPage.kt deleted file mode 100644 index d0e10bbdb..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/fednowtransfers/FednowTransferListPage.kt +++ /dev/null @@ -1,133 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.fednowtransfers - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.FednowTransferService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see FednowTransferService.list */ -class FednowTransferListPage -private constructor( - private val service: FednowTransferService, - private val params: FednowTransferListParams, - private val response: FednowTransferListPageResponse, -) : Page { - - /** - * Delegates to [FednowTransferListPageResponse], but gracefully handles missing data. - * - * @see FednowTransferListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [FednowTransferListPageResponse], but gracefully handles missing data. - * - * @see FednowTransferListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): FednowTransferListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): FednowTransferListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): FednowTransferListParams = params - - /** The response that this page was parsed from. */ - fun response(): FednowTransferListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [FednowTransferListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [FednowTransferListPage]. */ - class Builder internal constructor() { - - private var service: FednowTransferService? = null - private var params: FednowTransferListParams? = null - private var response: FednowTransferListPageResponse? = null - - @JvmSynthetic - internal fun from(fednowTransferListPage: FednowTransferListPage) = apply { - service = fednowTransferListPage.service - params = fednowTransferListPage.params - response = fednowTransferListPage.response - } - - fun service(service: FednowTransferService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: FednowTransferListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: FednowTransferListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [FednowTransferListPage]. - * - * 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(): FednowTransferListPage = - FednowTransferListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is FednowTransferListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = - "FednowTransferListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/fednowtransfers/FednowTransferListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/fednowtransfers/FednowTransferListPageAsync.kt deleted file mode 100644 index c8812f290..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/fednowtransfers/FednowTransferListPageAsync.kt +++ /dev/null @@ -1,148 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.fednowtransfers - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.FednowTransferServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see FednowTransferServiceAsync.list */ -class FednowTransferListPageAsync -private constructor( - private val service: FednowTransferServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: FednowTransferListParams, - private val response: FednowTransferListPageResponse, -) : PageAsync { - - /** - * Delegates to [FednowTransferListPageResponse], but gracefully handles missing data. - * - * @see FednowTransferListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [FednowTransferListPageResponse], but gracefully handles missing data. - * - * @see FednowTransferListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): FednowTransferListParams { - 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(): FednowTransferListParams = params - - /** The response that this page was parsed from. */ - fun response(): FednowTransferListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [FednowTransferListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [FednowTransferListPageAsync]. */ - class Builder internal constructor() { - - private var service: FednowTransferServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: FednowTransferListParams? = null - private var response: FednowTransferListPageResponse? = null - - @JvmSynthetic - internal fun from(fednowTransferListPageAsync: FednowTransferListPageAsync) = apply { - service = fednowTransferListPageAsync.service - streamHandlerExecutor = fednowTransferListPageAsync.streamHandlerExecutor - params = fednowTransferListPageAsync.params - response = fednowTransferListPageAsync.response - } - - fun service(service: FednowTransferServiceAsync) = apply { this.service = service } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: FednowTransferListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: FednowTransferListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [FednowTransferListPageAsync]. - * - * 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(): FednowTransferListPageAsync = - FednowTransferListPageAsync( - 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 FednowTransferListPageAsync && - 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() = - "FednowTransferListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/fednowtransfers/FednowTransferListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/fednowtransfers/FednowTransferListResponse.kt similarity index 89% rename from increase-java-core/src/main/kotlin/com/increase/api/models/fednowtransfers/FednowTransferListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/fednowtransfers/FednowTransferListResponse.kt index 42b40ec21..5072ac3f6 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/fednowtransfers/FednowTransferListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/fednowtransfers/FednowTransferListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of FedNow Transfer objects. */ -class FednowTransferListPageResponse +class FednowTransferListResponse @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 - * [FednowTransferListPageResponse]. + * Returns a mutable builder for constructing an instance of [FednowTransferListResponse]. * * The following fields are required: * ```java @@ -95,7 +94,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [FednowTransferListPageResponse]. */ + /** A builder for [FednowTransferListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -103,11 +102,10 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(fednowTransferListPageResponse: FednowTransferListPageResponse) = apply { - data = fednowTransferListPageResponse.data.map { it.toMutableList() } - nextCursor = fednowTransferListPageResponse.nextCursor - additionalProperties = - fednowTransferListPageResponse.additionalProperties.toMutableMap() + internal fun from(fednowTransferListResponse: FednowTransferListResponse) = apply { + data = fednowTransferListResponse.data.map { it.toMutableList() } + nextCursor = fednowTransferListResponse.nextCursor + additionalProperties = fednowTransferListResponse.additionalProperties.toMutableMap() } /** The contents of the list. */ @@ -171,7 +169,7 @@ private constructor( } /** - * Returns an immutable instance of [FednowTransferListPageResponse]. + * Returns an immutable instance of [FednowTransferListResponse]. * * Further updates to this [Builder] will not mutate the returned instance. * @@ -183,8 +181,8 @@ private constructor( * * @throws IllegalStateException if any required field is unset. */ - fun build(): FednowTransferListPageResponse = - FednowTransferListPageResponse( + fun build(): FednowTransferListResponse = + FednowTransferListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -193,7 +191,7 @@ private constructor( private var validated: Boolean = false - fun validate(): FednowTransferListPageResponse = apply { + fun validate(): FednowTransferListResponse = apply { if (validated) { return@apply } @@ -226,7 +224,7 @@ private constructor( return true } - return other is FednowTransferListPageResponse && + return other is FednowTransferListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -237,5 +235,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "FednowTransferListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "FednowTransferListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/files/FileListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/files/FileListPage.kt deleted file mode 100644 index 6980ae048..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/files/FileListPage.kt +++ /dev/null @@ -1,131 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.files - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.FileService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see FileService.list */ -class FileListPage -private constructor( - private val service: FileService, - private val params: FileListParams, - private val response: FileListPageResponse, -) : Page { - - /** - * Delegates to [FileListPageResponse], but gracefully handles missing data. - * - * @see FileListPageResponse.data - */ - fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [FileListPageResponse], but gracefully handles missing data. - * - * @see FileListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): FileListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): FileListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): FileListParams = params - - /** The response that this page was parsed from. */ - fun response(): FileListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [FileListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [FileListPage]. */ - class Builder internal constructor() { - - private var service: FileService? = null - private var params: FileListParams? = null - private var response: FileListPageResponse? = null - - @JvmSynthetic - internal fun from(fileListPage: FileListPage) = apply { - service = fileListPage.service - params = fileListPage.params - response = fileListPage.response - } - - fun service(service: FileService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: FileListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: FileListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [FileListPage]. - * - * 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(): FileListPage = - FileListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is FileListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = "FileListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/files/FileListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/files/FileListPageAsync.kt deleted file mode 100644 index 1b7d4a96a..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/files/FileListPageAsync.kt +++ /dev/null @@ -1,145 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.files - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.FileServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see FileServiceAsync.list */ -class FileListPageAsync -private constructor( - private val service: FileServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: FileListParams, - private val response: FileListPageResponse, -) : PageAsync { - - /** - * Delegates to [FileListPageResponse], but gracefully handles missing data. - * - * @see FileListPageResponse.data - */ - fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [FileListPageResponse], but gracefully handles missing data. - * - * @see FileListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): FileListParams { - 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(): FileListParams = params - - /** The response that this page was parsed from. */ - fun response(): FileListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [FileListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [FileListPageAsync]. */ - class Builder internal constructor() { - - private var service: FileServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: FileListParams? = null - private var response: FileListPageResponse? = null - - @JvmSynthetic - internal fun from(fileListPageAsync: FileListPageAsync) = apply { - service = fileListPageAsync.service - streamHandlerExecutor = fileListPageAsync.streamHandlerExecutor - params = fileListPageAsync.params - response = fileListPageAsync.response - } - - fun service(service: FileServiceAsync) = apply { this.service = service } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: FileListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: FileListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [FileListPageAsync]. - * - * 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(): FileListPageAsync = - FileListPageAsync( - 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 FileListPageAsync && - 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() = - "FileListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/files/FileListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/files/FileListResponse.kt similarity index 90% rename from increase-java-core/src/main/kotlin/com/increase/api/models/files/FileListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/files/FileListResponse.kt index d19d77aa3..a64201fb5 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/files/FileListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/files/FileListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of File objects. */ -class FileListPageResponse +class FileListResponse @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 [FileListPageResponse]. + * Returns a mutable builder for constructing an instance of [FileListResponse]. * * The following fields are required: * ```java @@ -92,7 +92,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [FileListPageResponse]. */ + /** A builder for [FileListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -100,10 +100,10 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(fileListPageResponse: FileListPageResponse) = apply { - data = fileListPageResponse.data.map { it.toMutableList() } - nextCursor = fileListPageResponse.nextCursor - additionalProperties = fileListPageResponse.additionalProperties.toMutableMap() + internal fun from(fileListResponse: FileListResponse) = apply { + data = fileListResponse.data.map { it.toMutableList() } + nextCursor = fileListResponse.nextCursor + additionalProperties = fileListResponse.additionalProperties.toMutableMap() } /** The contents of the list. */ @@ -166,7 +166,7 @@ private constructor( } /** - * Returns an immutable instance of [FileListPageResponse]. + * Returns an immutable instance of [FileListResponse]. * * 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(): FileListPageResponse = - FileListPageResponse( + fun build(): FileListResponse = + FileListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -188,7 +188,7 @@ private constructor( private var validated: Boolean = false - fun validate(): FileListPageResponse = apply { + fun validate(): FileListResponse = apply { if (validated) { return@apply } @@ -221,7 +221,7 @@ private constructor( return true } - return other is FileListPageResponse && + return other is FileListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -232,5 +232,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "FileListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "FileListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundachtransfers/InboundAchTransferListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/inboundachtransfers/InboundAchTransferListPage.kt deleted file mode 100644 index 744338c48..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundachtransfers/InboundAchTransferListPage.kt +++ /dev/null @@ -1,135 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.inboundachtransfers - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.InboundAchTransferService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see InboundAchTransferService.list */ -class InboundAchTransferListPage -private constructor( - private val service: InboundAchTransferService, - private val params: InboundAchTransferListParams, - private val response: InboundAchTransferListPageResponse, -) : Page { - - /** - * Delegates to [InboundAchTransferListPageResponse], but gracefully handles missing data. - * - * @see InboundAchTransferListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [InboundAchTransferListPageResponse], but gracefully handles missing data. - * - * @see InboundAchTransferListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): InboundAchTransferListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): InboundAchTransferListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): InboundAchTransferListParams = params - - /** The response that this page was parsed from. */ - fun response(): InboundAchTransferListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [InboundAchTransferListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [InboundAchTransferListPage]. */ - class Builder internal constructor() { - - private var service: InboundAchTransferService? = null - private var params: InboundAchTransferListParams? = null - private var response: InboundAchTransferListPageResponse? = null - - @JvmSynthetic - internal fun from(inboundAchTransferListPage: InboundAchTransferListPage) = apply { - service = inboundAchTransferListPage.service - params = inboundAchTransferListPage.params - response = inboundAchTransferListPage.response - } - - fun service(service: InboundAchTransferService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: InboundAchTransferListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: InboundAchTransferListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [InboundAchTransferListPage]. - * - * 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(): InboundAchTransferListPage = - InboundAchTransferListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is InboundAchTransferListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = - "InboundAchTransferListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundachtransfers/InboundAchTransferListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/inboundachtransfers/InboundAchTransferListPageAsync.kt deleted file mode 100644 index 72fa30da6..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundachtransfers/InboundAchTransferListPageAsync.kt +++ /dev/null @@ -1,152 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.inboundachtransfers - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.InboundAchTransferServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see InboundAchTransferServiceAsync.list */ -class InboundAchTransferListPageAsync -private constructor( - private val service: InboundAchTransferServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: InboundAchTransferListParams, - private val response: InboundAchTransferListPageResponse, -) : PageAsync { - - /** - * Delegates to [InboundAchTransferListPageResponse], but gracefully handles missing data. - * - * @see InboundAchTransferListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [InboundAchTransferListPageResponse], but gracefully handles missing data. - * - * @see InboundAchTransferListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): InboundAchTransferListParams { - 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(): InboundAchTransferListParams = params - - /** The response that this page was parsed from. */ - fun response(): InboundAchTransferListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of - * [InboundAchTransferListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [InboundAchTransferListPageAsync]. */ - class Builder internal constructor() { - - private var service: InboundAchTransferServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: InboundAchTransferListParams? = null - private var response: InboundAchTransferListPageResponse? = null - - @JvmSynthetic - internal fun from(inboundAchTransferListPageAsync: InboundAchTransferListPageAsync) = - apply { - service = inboundAchTransferListPageAsync.service - streamHandlerExecutor = inboundAchTransferListPageAsync.streamHandlerExecutor - params = inboundAchTransferListPageAsync.params - response = inboundAchTransferListPageAsync.response - } - - fun service(service: InboundAchTransferServiceAsync) = apply { this.service = service } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: InboundAchTransferListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: InboundAchTransferListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [InboundAchTransferListPageAsync]. - * - * 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(): InboundAchTransferListPageAsync = - InboundAchTransferListPageAsync( - 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 InboundAchTransferListPageAsync && - 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() = - "InboundAchTransferListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundachtransfers/InboundAchTransferListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/inboundachtransfers/InboundAchTransferListResponse.kt similarity index 88% rename from increase-java-core/src/main/kotlin/com/increase/api/models/inboundachtransfers/InboundAchTransferListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/inboundachtransfers/InboundAchTransferListResponse.kt index 9d5c71ce5..c56651038 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundachtransfers/InboundAchTransferListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/inboundachtransfers/InboundAchTransferListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of Inbound ACH Transfer objects. */ -class InboundAchTransferListPageResponse +class InboundAchTransferListResponse @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 - * [InboundAchTransferListPageResponse]. + * [InboundAchTransferListResponse]. * * The following fields are required: * ```java @@ -95,7 +95,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [InboundAchTransferListPageResponse]. */ + /** A builder for [InboundAchTransferListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -103,13 +103,12 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(inboundAchTransferListPageResponse: InboundAchTransferListPageResponse) = - apply { - data = inboundAchTransferListPageResponse.data.map { it.toMutableList() } - nextCursor = inboundAchTransferListPageResponse.nextCursor - additionalProperties = - inboundAchTransferListPageResponse.additionalProperties.toMutableMap() - } + internal fun from(inboundAchTransferListResponse: InboundAchTransferListResponse) = apply { + data = inboundAchTransferListResponse.data.map { it.toMutableList() } + nextCursor = inboundAchTransferListResponse.nextCursor + additionalProperties = + inboundAchTransferListResponse.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 [InboundAchTransferListPageResponse]. + * Returns an immutable instance of [InboundAchTransferListResponse]. * * 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(): InboundAchTransferListPageResponse = - InboundAchTransferListPageResponse( + fun build(): InboundAchTransferListResponse = + InboundAchTransferListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -194,7 +193,7 @@ private constructor( private var validated: Boolean = false - fun validate(): InboundAchTransferListPageResponse = apply { + fun validate(): InboundAchTransferListResponse = apply { if (validated) { return@apply } @@ -227,7 +226,7 @@ private constructor( return true } - return other is InboundAchTransferListPageResponse && + return other is InboundAchTransferListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -238,5 +237,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "InboundAchTransferListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "InboundAchTransferListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundcheckdeposits/InboundCheckDepositListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/inboundcheckdeposits/InboundCheckDepositListPage.kt deleted file mode 100644 index 2a637fa54..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundcheckdeposits/InboundCheckDepositListPage.kt +++ /dev/null @@ -1,135 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.inboundcheckdeposits - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.InboundCheckDepositService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see InboundCheckDepositService.list */ -class InboundCheckDepositListPage -private constructor( - private val service: InboundCheckDepositService, - private val params: InboundCheckDepositListParams, - private val response: InboundCheckDepositListPageResponse, -) : Page { - - /** - * Delegates to [InboundCheckDepositListPageResponse], but gracefully handles missing data. - * - * @see InboundCheckDepositListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [InboundCheckDepositListPageResponse], but gracefully handles missing data. - * - * @see InboundCheckDepositListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): InboundCheckDepositListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): InboundCheckDepositListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): InboundCheckDepositListParams = params - - /** The response that this page was parsed from. */ - fun response(): InboundCheckDepositListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [InboundCheckDepositListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [InboundCheckDepositListPage]. */ - class Builder internal constructor() { - - private var service: InboundCheckDepositService? = null - private var params: InboundCheckDepositListParams? = null - private var response: InboundCheckDepositListPageResponse? = null - - @JvmSynthetic - internal fun from(inboundCheckDepositListPage: InboundCheckDepositListPage) = apply { - service = inboundCheckDepositListPage.service - params = inboundCheckDepositListPage.params - response = inboundCheckDepositListPage.response - } - - fun service(service: InboundCheckDepositService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: InboundCheckDepositListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: InboundCheckDepositListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [InboundCheckDepositListPage]. - * - * 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(): InboundCheckDepositListPage = - InboundCheckDepositListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is InboundCheckDepositListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = - "InboundCheckDepositListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundcheckdeposits/InboundCheckDepositListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/inboundcheckdeposits/InboundCheckDepositListPageAsync.kt deleted file mode 100644 index 37b80f74e..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundcheckdeposits/InboundCheckDepositListPageAsync.kt +++ /dev/null @@ -1,152 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.inboundcheckdeposits - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.InboundCheckDepositServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see InboundCheckDepositServiceAsync.list */ -class InboundCheckDepositListPageAsync -private constructor( - private val service: InboundCheckDepositServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: InboundCheckDepositListParams, - private val response: InboundCheckDepositListPageResponse, -) : PageAsync { - - /** - * Delegates to [InboundCheckDepositListPageResponse], but gracefully handles missing data. - * - * @see InboundCheckDepositListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [InboundCheckDepositListPageResponse], but gracefully handles missing data. - * - * @see InboundCheckDepositListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): InboundCheckDepositListParams { - 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(): InboundCheckDepositListParams = params - - /** The response that this page was parsed from. */ - fun response(): InboundCheckDepositListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of - * [InboundCheckDepositListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [InboundCheckDepositListPageAsync]. */ - class Builder internal constructor() { - - private var service: InboundCheckDepositServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: InboundCheckDepositListParams? = null - private var response: InboundCheckDepositListPageResponse? = null - - @JvmSynthetic - internal fun from(inboundCheckDepositListPageAsync: InboundCheckDepositListPageAsync) = - apply { - service = inboundCheckDepositListPageAsync.service - streamHandlerExecutor = inboundCheckDepositListPageAsync.streamHandlerExecutor - params = inboundCheckDepositListPageAsync.params - response = inboundCheckDepositListPageAsync.response - } - - fun service(service: InboundCheckDepositServiceAsync) = apply { this.service = service } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: InboundCheckDepositListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: InboundCheckDepositListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [InboundCheckDepositListPageAsync]. - * - * 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(): InboundCheckDepositListPageAsync = - InboundCheckDepositListPageAsync( - 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 InboundCheckDepositListPageAsync && - 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() = - "InboundCheckDepositListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundcheckdeposits/InboundCheckDepositListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/inboundcheckdeposits/InboundCheckDepositListResponse.kt similarity index 89% rename from increase-java-core/src/main/kotlin/com/increase/api/models/inboundcheckdeposits/InboundCheckDepositListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/inboundcheckdeposits/InboundCheckDepositListResponse.kt index 21382c712..8b268c04c 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundcheckdeposits/InboundCheckDepositListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/inboundcheckdeposits/InboundCheckDepositListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of Inbound Check Deposit objects. */ -class InboundCheckDepositListPageResponse +class InboundCheckDepositListResponse @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 - * [InboundCheckDepositListPageResponse]. + * [InboundCheckDepositListResponse]. * * The following fields are required: * ```java @@ -95,7 +95,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [InboundCheckDepositListPageResponse]. */ + /** A builder for [InboundCheckDepositListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -103,14 +103,13 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from( - inboundCheckDepositListPageResponse: InboundCheckDepositListPageResponse - ) = apply { - data = inboundCheckDepositListPageResponse.data.map { it.toMutableList() } - nextCursor = inboundCheckDepositListPageResponse.nextCursor - additionalProperties = - inboundCheckDepositListPageResponse.additionalProperties.toMutableMap() - } + internal fun from(inboundCheckDepositListResponse: InboundCheckDepositListResponse) = + apply { + data = inboundCheckDepositListResponse.data.map { it.toMutableList() } + nextCursor = inboundCheckDepositListResponse.nextCursor + additionalProperties = + inboundCheckDepositListResponse.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 [InboundCheckDepositListPageResponse]. + * Returns an immutable instance of [InboundCheckDepositListResponse]. * * 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(): InboundCheckDepositListPageResponse = - InboundCheckDepositListPageResponse( + fun build(): InboundCheckDepositListResponse = + InboundCheckDepositListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -195,7 +194,7 @@ private constructor( private var validated: Boolean = false - fun validate(): InboundCheckDepositListPageResponse = apply { + fun validate(): InboundCheckDepositListResponse = apply { if (validated) { return@apply } @@ -228,7 +227,7 @@ private constructor( return true } - return other is InboundCheckDepositListPageResponse && + return other is InboundCheckDepositListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -239,5 +238,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "InboundCheckDepositListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "InboundCheckDepositListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundfednowtransfers/InboundFednowTransferListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/inboundfednowtransfers/InboundFednowTransferListPage.kt deleted file mode 100644 index 88d87e5d4..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundfednowtransfers/InboundFednowTransferListPage.kt +++ /dev/null @@ -1,136 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.inboundfednowtransfers - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.InboundFednowTransferService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see InboundFednowTransferService.list */ -class InboundFednowTransferListPage -private constructor( - private val service: InboundFednowTransferService, - private val params: InboundFednowTransferListParams, - private val response: InboundFednowTransferListPageResponse, -) : Page { - - /** - * Delegates to [InboundFednowTransferListPageResponse], but gracefully handles missing data. - * - * @see InboundFednowTransferListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [InboundFednowTransferListPageResponse], but gracefully handles missing data. - * - * @see InboundFednowTransferListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): InboundFednowTransferListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): InboundFednowTransferListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): InboundFednowTransferListParams = params - - /** The response that this page was parsed from. */ - fun response(): InboundFednowTransferListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of - * [InboundFednowTransferListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [InboundFednowTransferListPage]. */ - class Builder internal constructor() { - - private var service: InboundFednowTransferService? = null - private var params: InboundFednowTransferListParams? = null - private var response: InboundFednowTransferListPageResponse? = null - - @JvmSynthetic - internal fun from(inboundFednowTransferListPage: InboundFednowTransferListPage) = apply { - service = inboundFednowTransferListPage.service - params = inboundFednowTransferListPage.params - response = inboundFednowTransferListPage.response - } - - fun service(service: InboundFednowTransferService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: InboundFednowTransferListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: InboundFednowTransferListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [InboundFednowTransferListPage]. - * - * 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(): InboundFednowTransferListPage = - InboundFednowTransferListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is InboundFednowTransferListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = - "InboundFednowTransferListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundfednowtransfers/InboundFednowTransferListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/inboundfednowtransfers/InboundFednowTransferListPageAsync.kt deleted file mode 100644 index 95c6b183e..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundfednowtransfers/InboundFednowTransferListPageAsync.kt +++ /dev/null @@ -1,152 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.inboundfednowtransfers - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.InboundFednowTransferServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see InboundFednowTransferServiceAsync.list */ -class InboundFednowTransferListPageAsync -private constructor( - private val service: InboundFednowTransferServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: InboundFednowTransferListParams, - private val response: InboundFednowTransferListPageResponse, -) : PageAsync { - - /** - * Delegates to [InboundFednowTransferListPageResponse], but gracefully handles missing data. - * - * @see InboundFednowTransferListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [InboundFednowTransferListPageResponse], but gracefully handles missing data. - * - * @see InboundFednowTransferListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): InboundFednowTransferListParams { - 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(): InboundFednowTransferListParams = params - - /** The response that this page was parsed from. */ - fun response(): InboundFednowTransferListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of - * [InboundFednowTransferListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [InboundFednowTransferListPageAsync]. */ - class Builder internal constructor() { - - private var service: InboundFednowTransferServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: InboundFednowTransferListParams? = null - private var response: InboundFednowTransferListPageResponse? = null - - @JvmSynthetic - internal fun from(inboundFednowTransferListPageAsync: InboundFednowTransferListPageAsync) = - apply { - service = inboundFednowTransferListPageAsync.service - streamHandlerExecutor = inboundFednowTransferListPageAsync.streamHandlerExecutor - params = inboundFednowTransferListPageAsync.params - response = inboundFednowTransferListPageAsync.response - } - - fun service(service: InboundFednowTransferServiceAsync) = apply { this.service = service } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: InboundFednowTransferListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: InboundFednowTransferListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [InboundFednowTransferListPageAsync]. - * - * 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(): InboundFednowTransferListPageAsync = - InboundFednowTransferListPageAsync( - 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 InboundFednowTransferListPageAsync && - 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() = - "InboundFednowTransferListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundfednowtransfers/InboundFednowTransferListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/inboundfednowtransfers/InboundFednowTransferListResponse.kt similarity index 89% rename from increase-java-core/src/main/kotlin/com/increase/api/models/inboundfednowtransfers/InboundFednowTransferListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/inboundfednowtransfers/InboundFednowTransferListResponse.kt index 7ba304261..1fe58407c 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundfednowtransfers/InboundFednowTransferListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/inboundfednowtransfers/InboundFednowTransferListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of Inbound FedNow Transfer objects. */ -class InboundFednowTransferListPageResponse +class InboundFednowTransferListResponse @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 - * [InboundFednowTransferListPageResponse]. + * [InboundFednowTransferListResponse]. * * The following fields are required: * ```java @@ -95,7 +95,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [InboundFednowTransferListPageResponse]. */ + /** A builder for [InboundFednowTransferListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -103,14 +103,13 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from( - inboundFednowTransferListPageResponse: InboundFednowTransferListPageResponse - ) = apply { - data = inboundFednowTransferListPageResponse.data.map { it.toMutableList() } - nextCursor = inboundFednowTransferListPageResponse.nextCursor - additionalProperties = - inboundFednowTransferListPageResponse.additionalProperties.toMutableMap() - } + internal fun from(inboundFednowTransferListResponse: InboundFednowTransferListResponse) = + apply { + data = inboundFednowTransferListResponse.data.map { it.toMutableList() } + nextCursor = inboundFednowTransferListResponse.nextCursor + additionalProperties = + inboundFednowTransferListResponse.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 [InboundFednowTransferListPageResponse]. + * Returns an immutable instance of [InboundFednowTransferListResponse]. * * 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(): InboundFednowTransferListPageResponse = - InboundFednowTransferListPageResponse( + fun build(): InboundFednowTransferListResponse = + InboundFednowTransferListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -195,7 +194,7 @@ private constructor( private var validated: Boolean = false - fun validate(): InboundFednowTransferListPageResponse = apply { + fun validate(): InboundFednowTransferListResponse = apply { if (validated) { return@apply } @@ -228,7 +227,7 @@ private constructor( return true } - return other is InboundFednowTransferListPageResponse && + return other is InboundFednowTransferListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -239,5 +238,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "InboundFednowTransferListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "InboundFednowTransferListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundmailitems/InboundMailItemListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/inboundmailitems/InboundMailItemListPage.kt deleted file mode 100644 index c31f2b7b9..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundmailitems/InboundMailItemListPage.kt +++ /dev/null @@ -1,133 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.inboundmailitems - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.InboundMailItemService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see InboundMailItemService.list */ -class InboundMailItemListPage -private constructor( - private val service: InboundMailItemService, - private val params: InboundMailItemListParams, - private val response: InboundMailItemListPageResponse, -) : Page { - - /** - * Delegates to [InboundMailItemListPageResponse], but gracefully handles missing data. - * - * @see InboundMailItemListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [InboundMailItemListPageResponse], but gracefully handles missing data. - * - * @see InboundMailItemListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): InboundMailItemListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): InboundMailItemListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): InboundMailItemListParams = params - - /** The response that this page was parsed from. */ - fun response(): InboundMailItemListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [InboundMailItemListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [InboundMailItemListPage]. */ - class Builder internal constructor() { - - private var service: InboundMailItemService? = null - private var params: InboundMailItemListParams? = null - private var response: InboundMailItemListPageResponse? = null - - @JvmSynthetic - internal fun from(inboundMailItemListPage: InboundMailItemListPage) = apply { - service = inboundMailItemListPage.service - params = inboundMailItemListPage.params - response = inboundMailItemListPage.response - } - - fun service(service: InboundMailItemService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: InboundMailItemListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: InboundMailItemListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [InboundMailItemListPage]. - * - * 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(): InboundMailItemListPage = - InboundMailItemListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is InboundMailItemListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = - "InboundMailItemListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundmailitems/InboundMailItemListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/inboundmailitems/InboundMailItemListPageAsync.kt deleted file mode 100644 index fd626951e..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundmailitems/InboundMailItemListPageAsync.kt +++ /dev/null @@ -1,148 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.inboundmailitems - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.InboundMailItemServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see InboundMailItemServiceAsync.list */ -class InboundMailItemListPageAsync -private constructor( - private val service: InboundMailItemServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: InboundMailItemListParams, - private val response: InboundMailItemListPageResponse, -) : PageAsync { - - /** - * Delegates to [InboundMailItemListPageResponse], but gracefully handles missing data. - * - * @see InboundMailItemListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [InboundMailItemListPageResponse], but gracefully handles missing data. - * - * @see InboundMailItemListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): InboundMailItemListParams { - 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(): InboundMailItemListParams = params - - /** The response that this page was parsed from. */ - fun response(): InboundMailItemListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [InboundMailItemListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [InboundMailItemListPageAsync]. */ - class Builder internal constructor() { - - private var service: InboundMailItemServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: InboundMailItemListParams? = null - private var response: InboundMailItemListPageResponse? = null - - @JvmSynthetic - internal fun from(inboundMailItemListPageAsync: InboundMailItemListPageAsync) = apply { - service = inboundMailItemListPageAsync.service - streamHandlerExecutor = inboundMailItemListPageAsync.streamHandlerExecutor - params = inboundMailItemListPageAsync.params - response = inboundMailItemListPageAsync.response - } - - fun service(service: InboundMailItemServiceAsync) = apply { this.service = service } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: InboundMailItemListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: InboundMailItemListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [InboundMailItemListPageAsync]. - * - * 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(): InboundMailItemListPageAsync = - InboundMailItemListPageAsync( - 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 InboundMailItemListPageAsync && - 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() = - "InboundMailItemListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundmailitems/InboundMailItemListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/inboundmailitems/InboundMailItemListResponse.kt similarity index 89% rename from increase-java-core/src/main/kotlin/com/increase/api/models/inboundmailitems/InboundMailItemListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/inboundmailitems/InboundMailItemListResponse.kt index 71b62bea8..3c30dd73b 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundmailitems/InboundMailItemListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/inboundmailitems/InboundMailItemListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of Inbound Mail Item objects. */ -class InboundMailItemListPageResponse +class InboundMailItemListResponse @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 - * [InboundMailItemListPageResponse]. + * Returns a mutable builder for constructing an instance of [InboundMailItemListResponse]. * * The following fields are required: * ```java @@ -95,7 +94,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [InboundMailItemListPageResponse]. */ + /** A builder for [InboundMailItemListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -103,13 +102,11 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(inboundMailItemListPageResponse: InboundMailItemListPageResponse) = - apply { - data = inboundMailItemListPageResponse.data.map { it.toMutableList() } - nextCursor = inboundMailItemListPageResponse.nextCursor - additionalProperties = - inboundMailItemListPageResponse.additionalProperties.toMutableMap() - } + internal fun from(inboundMailItemListResponse: InboundMailItemListResponse) = apply { + data = inboundMailItemListResponse.data.map { it.toMutableList() } + nextCursor = inboundMailItemListResponse.nextCursor + additionalProperties = inboundMailItemListResponse.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 [InboundMailItemListPageResponse]. + * Returns an immutable instance of [InboundMailItemListResponse]. * * 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(): InboundMailItemListPageResponse = - InboundMailItemListPageResponse( + fun build(): InboundMailItemListResponse = + InboundMailItemListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -194,7 +191,7 @@ private constructor( private var validated: Boolean = false - fun validate(): InboundMailItemListPageResponse = apply { + fun validate(): InboundMailItemListResponse = apply { if (validated) { return@apply } @@ -227,7 +224,7 @@ private constructor( return true } - return other is InboundMailItemListPageResponse && + return other is InboundMailItemListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -238,5 +235,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "InboundMailItemListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "InboundMailItemListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransferListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransferListPage.kt deleted file mode 100644 index 3d0e406c2..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransferListPage.kt +++ /dev/null @@ -1,145 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.inboundrealtimepaymentstransfers - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.InboundRealTimePaymentsTransferService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see InboundRealTimePaymentsTransferService.list */ -class InboundRealTimePaymentsTransferListPage -private constructor( - private val service: InboundRealTimePaymentsTransferService, - private val params: InboundRealTimePaymentsTransferListParams, - private val response: InboundRealTimePaymentsTransferListPageResponse, -) : Page { - - /** - * Delegates to [InboundRealTimePaymentsTransferListPageResponse], but gracefully handles - * missing data. - * - * @see InboundRealTimePaymentsTransferListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [InboundRealTimePaymentsTransferListPageResponse], but gracefully handles - * missing data. - * - * @see InboundRealTimePaymentsTransferListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): InboundRealTimePaymentsTransferListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): InboundRealTimePaymentsTransferListPage = - service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): InboundRealTimePaymentsTransferListParams = params - - /** The response that this page was parsed from. */ - fun response(): InboundRealTimePaymentsTransferListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of - * [InboundRealTimePaymentsTransferListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [InboundRealTimePaymentsTransferListPage]. */ - class Builder internal constructor() { - - private var service: InboundRealTimePaymentsTransferService? = null - private var params: InboundRealTimePaymentsTransferListParams? = null - private var response: InboundRealTimePaymentsTransferListPageResponse? = null - - @JvmSynthetic - internal fun from( - inboundRealTimePaymentsTransferListPage: InboundRealTimePaymentsTransferListPage - ) = apply { - service = inboundRealTimePaymentsTransferListPage.service - params = inboundRealTimePaymentsTransferListPage.params - response = inboundRealTimePaymentsTransferListPage.response - } - - fun service(service: InboundRealTimePaymentsTransferService) = apply { - this.service = service - } - - /** The parameters that were used to request this page. */ - fun params(params: InboundRealTimePaymentsTransferListParams) = apply { - this.params = params - } - - /** The response that this page was parsed from. */ - fun response(response: InboundRealTimePaymentsTransferListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [InboundRealTimePaymentsTransferListPage]. - * - * 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(): InboundRealTimePaymentsTransferListPage = - InboundRealTimePaymentsTransferListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is InboundRealTimePaymentsTransferListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = - "InboundRealTimePaymentsTransferListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransferListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransferListPageAsync.kt deleted file mode 100644 index 1f48912fc..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransferListPageAsync.kt +++ /dev/null @@ -1,161 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.inboundrealtimepaymentstransfers - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.InboundRealTimePaymentsTransferServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see InboundRealTimePaymentsTransferServiceAsync.list */ -class InboundRealTimePaymentsTransferListPageAsync -private constructor( - private val service: InboundRealTimePaymentsTransferServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: InboundRealTimePaymentsTransferListParams, - private val response: InboundRealTimePaymentsTransferListPageResponse, -) : PageAsync { - - /** - * Delegates to [InboundRealTimePaymentsTransferListPageResponse], but gracefully handles - * missing data. - * - * @see InboundRealTimePaymentsTransferListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [InboundRealTimePaymentsTransferListPageResponse], but gracefully handles - * missing data. - * - * @see InboundRealTimePaymentsTransferListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): InboundRealTimePaymentsTransferListParams { - 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(): InboundRealTimePaymentsTransferListParams = params - - /** The response that this page was parsed from. */ - fun response(): InboundRealTimePaymentsTransferListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of - * [InboundRealTimePaymentsTransferListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [InboundRealTimePaymentsTransferListPageAsync]. */ - class Builder internal constructor() { - - private var service: InboundRealTimePaymentsTransferServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: InboundRealTimePaymentsTransferListParams? = null - private var response: InboundRealTimePaymentsTransferListPageResponse? = null - - @JvmSynthetic - internal fun from( - inboundRealTimePaymentsTransferListPageAsync: - InboundRealTimePaymentsTransferListPageAsync - ) = apply { - service = inboundRealTimePaymentsTransferListPageAsync.service - streamHandlerExecutor = - inboundRealTimePaymentsTransferListPageAsync.streamHandlerExecutor - params = inboundRealTimePaymentsTransferListPageAsync.params - response = inboundRealTimePaymentsTransferListPageAsync.response - } - - fun service(service: InboundRealTimePaymentsTransferServiceAsync) = apply { - this.service = service - } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: InboundRealTimePaymentsTransferListParams) = apply { - this.params = params - } - - /** The response that this page was parsed from. */ - fun response(response: InboundRealTimePaymentsTransferListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [InboundRealTimePaymentsTransferListPageAsync]. - * - * 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(): InboundRealTimePaymentsTransferListPageAsync = - InboundRealTimePaymentsTransferListPageAsync( - 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 InboundRealTimePaymentsTransferListPageAsync && - 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() = - "InboundRealTimePaymentsTransferListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransferListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransferListResponse.kt similarity index 88% rename from increase-java-core/src/main/kotlin/com/increase/api/models/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransferListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransferListResponse.kt index 8dfaacb78..ac0a3219f 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransferListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransferListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of Inbound Real-Time Payments Transfer objects. */ -class InboundRealTimePaymentsTransferListPageResponse +class InboundRealTimePaymentsTransferListResponse @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 - * [InboundRealTimePaymentsTransferListPageResponse]. + * [InboundRealTimePaymentsTransferListResponse]. * * The following fields are required: * ```java @@ -97,7 +97,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [InboundRealTimePaymentsTransferListPageResponse]. */ + /** A builder for [InboundRealTimePaymentsTransferListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -106,13 +106,12 @@ private constructor( @JvmSynthetic internal fun from( - inboundRealTimePaymentsTransferListPageResponse: - InboundRealTimePaymentsTransferListPageResponse + inboundRealTimePaymentsTransferListResponse: InboundRealTimePaymentsTransferListResponse ) = apply { - data = inboundRealTimePaymentsTransferListPageResponse.data.map { it.toMutableList() } - nextCursor = inboundRealTimePaymentsTransferListPageResponse.nextCursor + data = inboundRealTimePaymentsTransferListResponse.data.map { it.toMutableList() } + nextCursor = inboundRealTimePaymentsTransferListResponse.nextCursor additionalProperties = - inboundRealTimePaymentsTransferListPageResponse.additionalProperties.toMutableMap() + inboundRealTimePaymentsTransferListResponse.additionalProperties.toMutableMap() } /** The contents of the list. */ @@ -176,7 +175,7 @@ private constructor( } /** - * Returns an immutable instance of [InboundRealTimePaymentsTransferListPageResponse]. + * Returns an immutable instance of [InboundRealTimePaymentsTransferListResponse]. * * Further updates to this [Builder] will not mutate the returned instance. * @@ -188,8 +187,8 @@ private constructor( * * @throws IllegalStateException if any required field is unset. */ - fun build(): InboundRealTimePaymentsTransferListPageResponse = - InboundRealTimePaymentsTransferListPageResponse( + fun build(): InboundRealTimePaymentsTransferListResponse = + InboundRealTimePaymentsTransferListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -198,7 +197,7 @@ private constructor( private var validated: Boolean = false - fun validate(): InboundRealTimePaymentsTransferListPageResponse = apply { + fun validate(): InboundRealTimePaymentsTransferListResponse = apply { if (validated) { return@apply } @@ -231,7 +230,7 @@ private constructor( return true } - return other is InboundRealTimePaymentsTransferListPageResponse && + return other is InboundRealTimePaymentsTransferListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -242,5 +241,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "InboundRealTimePaymentsTransferListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "InboundRealTimePaymentsTransferListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundwiredrawdownrequests/InboundWireDrawdownRequestListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/inboundwiredrawdownrequests/InboundWireDrawdownRequestListPage.kt deleted file mode 100644 index 30b8e63fa..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundwiredrawdownrequests/InboundWireDrawdownRequestListPage.kt +++ /dev/null @@ -1,139 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.inboundwiredrawdownrequests - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.InboundWireDrawdownRequestService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see InboundWireDrawdownRequestService.list */ -class InboundWireDrawdownRequestListPage -private constructor( - private val service: InboundWireDrawdownRequestService, - private val params: InboundWireDrawdownRequestListParams, - private val response: InboundWireDrawdownRequestListPageResponse, -) : Page { - - /** - * Delegates to [InboundWireDrawdownRequestListPageResponse], but gracefully handles missing - * data. - * - * @see InboundWireDrawdownRequestListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [InboundWireDrawdownRequestListPageResponse], but gracefully handles missing - * data. - * - * @see InboundWireDrawdownRequestListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): InboundWireDrawdownRequestListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): InboundWireDrawdownRequestListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): InboundWireDrawdownRequestListParams = params - - /** The response that this page was parsed from. */ - fun response(): InboundWireDrawdownRequestListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of - * [InboundWireDrawdownRequestListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [InboundWireDrawdownRequestListPage]. */ - class Builder internal constructor() { - - private var service: InboundWireDrawdownRequestService? = null - private var params: InboundWireDrawdownRequestListParams? = null - private var response: InboundWireDrawdownRequestListPageResponse? = null - - @JvmSynthetic - internal fun from(inboundWireDrawdownRequestListPage: InboundWireDrawdownRequestListPage) = - apply { - service = inboundWireDrawdownRequestListPage.service - params = inboundWireDrawdownRequestListPage.params - response = inboundWireDrawdownRequestListPage.response - } - - fun service(service: InboundWireDrawdownRequestService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: InboundWireDrawdownRequestListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: InboundWireDrawdownRequestListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [InboundWireDrawdownRequestListPage]. - * - * 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(): InboundWireDrawdownRequestListPage = - InboundWireDrawdownRequestListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is InboundWireDrawdownRequestListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = - "InboundWireDrawdownRequestListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundwiredrawdownrequests/InboundWireDrawdownRequestListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/inboundwiredrawdownrequests/InboundWireDrawdownRequestListPageAsync.kt deleted file mode 100644 index c5072493c..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundwiredrawdownrequests/InboundWireDrawdownRequestListPageAsync.kt +++ /dev/null @@ -1,157 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.inboundwiredrawdownrequests - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.InboundWireDrawdownRequestServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see InboundWireDrawdownRequestServiceAsync.list */ -class InboundWireDrawdownRequestListPageAsync -private constructor( - private val service: InboundWireDrawdownRequestServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: InboundWireDrawdownRequestListParams, - private val response: InboundWireDrawdownRequestListPageResponse, -) : PageAsync { - - /** - * Delegates to [InboundWireDrawdownRequestListPageResponse], but gracefully handles missing - * data. - * - * @see InboundWireDrawdownRequestListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [InboundWireDrawdownRequestListPageResponse], but gracefully handles missing - * data. - * - * @see InboundWireDrawdownRequestListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): InboundWireDrawdownRequestListParams { - 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(): InboundWireDrawdownRequestListParams = params - - /** The response that this page was parsed from. */ - fun response(): InboundWireDrawdownRequestListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of - * [InboundWireDrawdownRequestListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [InboundWireDrawdownRequestListPageAsync]. */ - class Builder internal constructor() { - - private var service: InboundWireDrawdownRequestServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: InboundWireDrawdownRequestListParams? = null - private var response: InboundWireDrawdownRequestListPageResponse? = null - - @JvmSynthetic - internal fun from( - inboundWireDrawdownRequestListPageAsync: InboundWireDrawdownRequestListPageAsync - ) = apply { - service = inboundWireDrawdownRequestListPageAsync.service - streamHandlerExecutor = inboundWireDrawdownRequestListPageAsync.streamHandlerExecutor - params = inboundWireDrawdownRequestListPageAsync.params - response = inboundWireDrawdownRequestListPageAsync.response - } - - fun service(service: InboundWireDrawdownRequestServiceAsync) = apply { - this.service = service - } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: InboundWireDrawdownRequestListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: InboundWireDrawdownRequestListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [InboundWireDrawdownRequestListPageAsync]. - * - * 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(): InboundWireDrawdownRequestListPageAsync = - InboundWireDrawdownRequestListPageAsync( - 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 InboundWireDrawdownRequestListPageAsync && - 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() = - "InboundWireDrawdownRequestListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundwiredrawdownrequests/InboundWireDrawdownRequestListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/inboundwiredrawdownrequests/InboundWireDrawdownRequestListResponse.kt similarity index 89% rename from increase-java-core/src/main/kotlin/com/increase/api/models/inboundwiredrawdownrequests/InboundWireDrawdownRequestListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/inboundwiredrawdownrequests/InboundWireDrawdownRequestListResponse.kt index 0694fbae6..a059de1c2 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundwiredrawdownrequests/InboundWireDrawdownRequestListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/inboundwiredrawdownrequests/InboundWireDrawdownRequestListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of Inbound Wire Drawdown Request objects. */ -class InboundWireDrawdownRequestListPageResponse +class InboundWireDrawdownRequestListResponse @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 - * [InboundWireDrawdownRequestListPageResponse]. + * [InboundWireDrawdownRequestListResponse]. * * The following fields are required: * ```java @@ -97,7 +97,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [InboundWireDrawdownRequestListPageResponse]. */ + /** A builder for [InboundWireDrawdownRequestListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -106,12 +106,12 @@ private constructor( @JvmSynthetic internal fun from( - inboundWireDrawdownRequestListPageResponse: InboundWireDrawdownRequestListPageResponse + inboundWireDrawdownRequestListResponse: InboundWireDrawdownRequestListResponse ) = apply { - data = inboundWireDrawdownRequestListPageResponse.data.map { it.toMutableList() } - nextCursor = inboundWireDrawdownRequestListPageResponse.nextCursor + data = inboundWireDrawdownRequestListResponse.data.map { it.toMutableList() } + nextCursor = inboundWireDrawdownRequestListResponse.nextCursor additionalProperties = - inboundWireDrawdownRequestListPageResponse.additionalProperties.toMutableMap() + inboundWireDrawdownRequestListResponse.additionalProperties.toMutableMap() } /** The contents of the list. */ @@ -175,7 +175,7 @@ private constructor( } /** - * Returns an immutable instance of [InboundWireDrawdownRequestListPageResponse]. + * Returns an immutable instance of [InboundWireDrawdownRequestListResponse]. * * Further updates to this [Builder] will not mutate the returned instance. * @@ -187,8 +187,8 @@ private constructor( * * @throws IllegalStateException if any required field is unset. */ - fun build(): InboundWireDrawdownRequestListPageResponse = - InboundWireDrawdownRequestListPageResponse( + fun build(): InboundWireDrawdownRequestListResponse = + InboundWireDrawdownRequestListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -197,7 +197,7 @@ private constructor( private var validated: Boolean = false - fun validate(): InboundWireDrawdownRequestListPageResponse = apply { + fun validate(): InboundWireDrawdownRequestListResponse = apply { if (validated) { return@apply } @@ -230,7 +230,7 @@ private constructor( return true } - return other is InboundWireDrawdownRequestListPageResponse && + return other is InboundWireDrawdownRequestListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -241,5 +241,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "InboundWireDrawdownRequestListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "InboundWireDrawdownRequestListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundwiretransfers/InboundWireTransferListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/inboundwiretransfers/InboundWireTransferListPage.kt deleted file mode 100644 index c6515db06..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundwiretransfers/InboundWireTransferListPage.kt +++ /dev/null @@ -1,135 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.inboundwiretransfers - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.InboundWireTransferService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see InboundWireTransferService.list */ -class InboundWireTransferListPage -private constructor( - private val service: InboundWireTransferService, - private val params: InboundWireTransferListParams, - private val response: InboundWireTransferListPageResponse, -) : Page { - - /** - * Delegates to [InboundWireTransferListPageResponse], but gracefully handles missing data. - * - * @see InboundWireTransferListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [InboundWireTransferListPageResponse], but gracefully handles missing data. - * - * @see InboundWireTransferListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): InboundWireTransferListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): InboundWireTransferListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): InboundWireTransferListParams = params - - /** The response that this page was parsed from. */ - fun response(): InboundWireTransferListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [InboundWireTransferListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [InboundWireTransferListPage]. */ - class Builder internal constructor() { - - private var service: InboundWireTransferService? = null - private var params: InboundWireTransferListParams? = null - private var response: InboundWireTransferListPageResponse? = null - - @JvmSynthetic - internal fun from(inboundWireTransferListPage: InboundWireTransferListPage) = apply { - service = inboundWireTransferListPage.service - params = inboundWireTransferListPage.params - response = inboundWireTransferListPage.response - } - - fun service(service: InboundWireTransferService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: InboundWireTransferListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: InboundWireTransferListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [InboundWireTransferListPage]. - * - * 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(): InboundWireTransferListPage = - InboundWireTransferListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is InboundWireTransferListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = - "InboundWireTransferListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundwiretransfers/InboundWireTransferListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/inboundwiretransfers/InboundWireTransferListPageAsync.kt deleted file mode 100644 index 9cfcb91d5..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundwiretransfers/InboundWireTransferListPageAsync.kt +++ /dev/null @@ -1,152 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.inboundwiretransfers - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.InboundWireTransferServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see InboundWireTransferServiceAsync.list */ -class InboundWireTransferListPageAsync -private constructor( - private val service: InboundWireTransferServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: InboundWireTransferListParams, - private val response: InboundWireTransferListPageResponse, -) : PageAsync { - - /** - * Delegates to [InboundWireTransferListPageResponse], but gracefully handles missing data. - * - * @see InboundWireTransferListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [InboundWireTransferListPageResponse], but gracefully handles missing data. - * - * @see InboundWireTransferListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): InboundWireTransferListParams { - 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(): InboundWireTransferListParams = params - - /** The response that this page was parsed from. */ - fun response(): InboundWireTransferListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of - * [InboundWireTransferListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [InboundWireTransferListPageAsync]. */ - class Builder internal constructor() { - - private var service: InboundWireTransferServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: InboundWireTransferListParams? = null - private var response: InboundWireTransferListPageResponse? = null - - @JvmSynthetic - internal fun from(inboundWireTransferListPageAsync: InboundWireTransferListPageAsync) = - apply { - service = inboundWireTransferListPageAsync.service - streamHandlerExecutor = inboundWireTransferListPageAsync.streamHandlerExecutor - params = inboundWireTransferListPageAsync.params - response = inboundWireTransferListPageAsync.response - } - - fun service(service: InboundWireTransferServiceAsync) = apply { this.service = service } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: InboundWireTransferListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: InboundWireTransferListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [InboundWireTransferListPageAsync]. - * - * 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(): InboundWireTransferListPageAsync = - InboundWireTransferListPageAsync( - 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 InboundWireTransferListPageAsync && - 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() = - "InboundWireTransferListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundwiretransfers/InboundWireTransferListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/inboundwiretransfers/InboundWireTransferListResponse.kt similarity index 89% rename from increase-java-core/src/main/kotlin/com/increase/api/models/inboundwiretransfers/InboundWireTransferListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/inboundwiretransfers/InboundWireTransferListResponse.kt index 9a819fa83..900fb89c2 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundwiretransfers/InboundWireTransferListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/inboundwiretransfers/InboundWireTransferListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of Inbound Wire Transfer objects. */ -class InboundWireTransferListPageResponse +class InboundWireTransferListResponse @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 - * [InboundWireTransferListPageResponse]. + * [InboundWireTransferListResponse]. * * The following fields are required: * ```java @@ -95,7 +95,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [InboundWireTransferListPageResponse]. */ + /** A builder for [InboundWireTransferListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -103,14 +103,13 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from( - inboundWireTransferListPageResponse: InboundWireTransferListPageResponse - ) = apply { - data = inboundWireTransferListPageResponse.data.map { it.toMutableList() } - nextCursor = inboundWireTransferListPageResponse.nextCursor - additionalProperties = - inboundWireTransferListPageResponse.additionalProperties.toMutableMap() - } + internal fun from(inboundWireTransferListResponse: InboundWireTransferListResponse) = + apply { + data = inboundWireTransferListResponse.data.map { it.toMutableList() } + nextCursor = inboundWireTransferListResponse.nextCursor + additionalProperties = + inboundWireTransferListResponse.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 [InboundWireTransferListPageResponse]. + * Returns an immutable instance of [InboundWireTransferListResponse]. * * 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(): InboundWireTransferListPageResponse = - InboundWireTransferListPageResponse( + fun build(): InboundWireTransferListResponse = + InboundWireTransferListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -195,7 +194,7 @@ private constructor( private var validated: Boolean = false - fun validate(): InboundWireTransferListPageResponse = apply { + fun validate(): InboundWireTransferListResponse = apply { if (validated) { return@apply } @@ -228,7 +227,7 @@ private constructor( return true } - return other is InboundWireTransferListPageResponse && + return other is InboundWireTransferListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -239,5 +238,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "InboundWireTransferListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "InboundWireTransferListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/intrafiaccountenrollments/IntrafiAccountEnrollmentListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/intrafiaccountenrollments/IntrafiAccountEnrollmentListPage.kt deleted file mode 100644 index f39354f51..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/intrafiaccountenrollments/IntrafiAccountEnrollmentListPage.kt +++ /dev/null @@ -1,137 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.intrafiaccountenrollments - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.IntrafiAccountEnrollmentService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see IntrafiAccountEnrollmentService.list */ -class IntrafiAccountEnrollmentListPage -private constructor( - private val service: IntrafiAccountEnrollmentService, - private val params: IntrafiAccountEnrollmentListParams, - private val response: IntrafiAccountEnrollmentListPageResponse, -) : Page { - - /** - * Delegates to [IntrafiAccountEnrollmentListPageResponse], but gracefully handles missing data. - * - * @see IntrafiAccountEnrollmentListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [IntrafiAccountEnrollmentListPageResponse], but gracefully handles missing data. - * - * @see IntrafiAccountEnrollmentListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): IntrafiAccountEnrollmentListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): IntrafiAccountEnrollmentListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): IntrafiAccountEnrollmentListParams = params - - /** The response that this page was parsed from. */ - fun response(): IntrafiAccountEnrollmentListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of - * [IntrafiAccountEnrollmentListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [IntrafiAccountEnrollmentListPage]. */ - class Builder internal constructor() { - - private var service: IntrafiAccountEnrollmentService? = null - private var params: IntrafiAccountEnrollmentListParams? = null - private var response: IntrafiAccountEnrollmentListPageResponse? = null - - @JvmSynthetic - internal fun from(intrafiAccountEnrollmentListPage: IntrafiAccountEnrollmentListPage) = - apply { - service = intrafiAccountEnrollmentListPage.service - params = intrafiAccountEnrollmentListPage.params - response = intrafiAccountEnrollmentListPage.response - } - - fun service(service: IntrafiAccountEnrollmentService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: IntrafiAccountEnrollmentListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: IntrafiAccountEnrollmentListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [IntrafiAccountEnrollmentListPage]. - * - * 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(): IntrafiAccountEnrollmentListPage = - IntrafiAccountEnrollmentListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is IntrafiAccountEnrollmentListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = - "IntrafiAccountEnrollmentListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/intrafiaccountenrollments/IntrafiAccountEnrollmentListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/intrafiaccountenrollments/IntrafiAccountEnrollmentListPageAsync.kt deleted file mode 100644 index e86ab9e2f..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/intrafiaccountenrollments/IntrafiAccountEnrollmentListPageAsync.kt +++ /dev/null @@ -1,155 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.intrafiaccountenrollments - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.IntrafiAccountEnrollmentServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see IntrafiAccountEnrollmentServiceAsync.list */ -class IntrafiAccountEnrollmentListPageAsync -private constructor( - private val service: IntrafiAccountEnrollmentServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: IntrafiAccountEnrollmentListParams, - private val response: IntrafiAccountEnrollmentListPageResponse, -) : PageAsync { - - /** - * Delegates to [IntrafiAccountEnrollmentListPageResponse], but gracefully handles missing data. - * - * @see IntrafiAccountEnrollmentListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [IntrafiAccountEnrollmentListPageResponse], but gracefully handles missing data. - * - * @see IntrafiAccountEnrollmentListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): IntrafiAccountEnrollmentListParams { - 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(): IntrafiAccountEnrollmentListParams = params - - /** The response that this page was parsed from. */ - fun response(): IntrafiAccountEnrollmentListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of - * [IntrafiAccountEnrollmentListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [IntrafiAccountEnrollmentListPageAsync]. */ - class Builder internal constructor() { - - private var service: IntrafiAccountEnrollmentServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: IntrafiAccountEnrollmentListParams? = null - private var response: IntrafiAccountEnrollmentListPageResponse? = null - - @JvmSynthetic - internal fun from( - intrafiAccountEnrollmentListPageAsync: IntrafiAccountEnrollmentListPageAsync - ) = apply { - service = intrafiAccountEnrollmentListPageAsync.service - streamHandlerExecutor = intrafiAccountEnrollmentListPageAsync.streamHandlerExecutor - params = intrafiAccountEnrollmentListPageAsync.params - response = intrafiAccountEnrollmentListPageAsync.response - } - - fun service(service: IntrafiAccountEnrollmentServiceAsync) = apply { - this.service = service - } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: IntrafiAccountEnrollmentListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: IntrafiAccountEnrollmentListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [IntrafiAccountEnrollmentListPageAsync]. - * - * 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(): IntrafiAccountEnrollmentListPageAsync = - IntrafiAccountEnrollmentListPageAsync( - 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 IntrafiAccountEnrollmentListPageAsync && - 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() = - "IntrafiAccountEnrollmentListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/intrafiaccountenrollments/IntrafiAccountEnrollmentListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/intrafiaccountenrollments/IntrafiAccountEnrollmentListResponse.kt similarity index 89% rename from increase-java-core/src/main/kotlin/com/increase/api/models/intrafiaccountenrollments/IntrafiAccountEnrollmentListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/intrafiaccountenrollments/IntrafiAccountEnrollmentListResponse.kt index baa3b0ff3..4ae9165c3 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/intrafiaccountenrollments/IntrafiAccountEnrollmentListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/intrafiaccountenrollments/IntrafiAccountEnrollmentListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of IntraFi Account Enrollment objects. */ -class IntrafiAccountEnrollmentListPageResponse +class IntrafiAccountEnrollmentListResponse @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 - * [IntrafiAccountEnrollmentListPageResponse]. + * [IntrafiAccountEnrollmentListResponse]. * * The following fields are required: * ```java @@ -97,7 +97,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [IntrafiAccountEnrollmentListPageResponse]. */ + /** A builder for [IntrafiAccountEnrollmentListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -106,12 +106,12 @@ private constructor( @JvmSynthetic internal fun from( - intrafiAccountEnrollmentListPageResponse: IntrafiAccountEnrollmentListPageResponse + intrafiAccountEnrollmentListResponse: IntrafiAccountEnrollmentListResponse ) = apply { - data = intrafiAccountEnrollmentListPageResponse.data.map { it.toMutableList() } - nextCursor = intrafiAccountEnrollmentListPageResponse.nextCursor + data = intrafiAccountEnrollmentListResponse.data.map { it.toMutableList() } + nextCursor = intrafiAccountEnrollmentListResponse.nextCursor additionalProperties = - intrafiAccountEnrollmentListPageResponse.additionalProperties.toMutableMap() + intrafiAccountEnrollmentListResponse.additionalProperties.toMutableMap() } /** The contents of the list. */ @@ -175,7 +175,7 @@ private constructor( } /** - * Returns an immutable instance of [IntrafiAccountEnrollmentListPageResponse]. + * Returns an immutable instance of [IntrafiAccountEnrollmentListResponse]. * * Further updates to this [Builder] will not mutate the returned instance. * @@ -187,8 +187,8 @@ private constructor( * * @throws IllegalStateException if any required field is unset. */ - fun build(): IntrafiAccountEnrollmentListPageResponse = - IntrafiAccountEnrollmentListPageResponse( + fun build(): IntrafiAccountEnrollmentListResponse = + IntrafiAccountEnrollmentListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -197,7 +197,7 @@ private constructor( private var validated: Boolean = false - fun validate(): IntrafiAccountEnrollmentListPageResponse = apply { + fun validate(): IntrafiAccountEnrollmentListResponse = apply { if (validated) { return@apply } @@ -230,7 +230,7 @@ private constructor( return true } - return other is IntrafiAccountEnrollmentListPageResponse && + return other is IntrafiAccountEnrollmentListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -241,5 +241,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "IntrafiAccountEnrollmentListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "IntrafiAccountEnrollmentListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/intrafiexclusions/IntrafiExclusionListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/intrafiexclusions/IntrafiExclusionListPage.kt deleted file mode 100644 index 5b48cf044..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/intrafiexclusions/IntrafiExclusionListPage.kt +++ /dev/null @@ -1,135 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.intrafiexclusions - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.IntrafiExclusionService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see IntrafiExclusionService.list */ -class IntrafiExclusionListPage -private constructor( - private val service: IntrafiExclusionService, - private val params: IntrafiExclusionListParams, - private val response: IntrafiExclusionListPageResponse, -) : Page { - - /** - * Delegates to [IntrafiExclusionListPageResponse], but gracefully handles missing data. - * - * @see IntrafiExclusionListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [IntrafiExclusionListPageResponse], but gracefully handles missing data. - * - * @see IntrafiExclusionListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): IntrafiExclusionListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): IntrafiExclusionListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): IntrafiExclusionListParams = params - - /** The response that this page was parsed from. */ - fun response(): IntrafiExclusionListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [IntrafiExclusionListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [IntrafiExclusionListPage]. */ - class Builder internal constructor() { - - private var service: IntrafiExclusionService? = null - private var params: IntrafiExclusionListParams? = null - private var response: IntrafiExclusionListPageResponse? = null - - @JvmSynthetic - internal fun from(intrafiExclusionListPage: IntrafiExclusionListPage) = apply { - service = intrafiExclusionListPage.service - params = intrafiExclusionListPage.params - response = intrafiExclusionListPage.response - } - - fun service(service: IntrafiExclusionService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: IntrafiExclusionListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: IntrafiExclusionListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [IntrafiExclusionListPage]. - * - * 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(): IntrafiExclusionListPage = - IntrafiExclusionListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is IntrafiExclusionListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = - "IntrafiExclusionListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/intrafiexclusions/IntrafiExclusionListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/intrafiexclusions/IntrafiExclusionListPageAsync.kt deleted file mode 100644 index 403a0ce46..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/intrafiexclusions/IntrafiExclusionListPageAsync.kt +++ /dev/null @@ -1,151 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.intrafiexclusions - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.IntrafiExclusionServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see IntrafiExclusionServiceAsync.list */ -class IntrafiExclusionListPageAsync -private constructor( - private val service: IntrafiExclusionServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: IntrafiExclusionListParams, - private val response: IntrafiExclusionListPageResponse, -) : PageAsync { - - /** - * Delegates to [IntrafiExclusionListPageResponse], but gracefully handles missing data. - * - * @see IntrafiExclusionListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [IntrafiExclusionListPageResponse], but gracefully handles missing data. - * - * @see IntrafiExclusionListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): IntrafiExclusionListParams { - 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(): IntrafiExclusionListParams = params - - /** The response that this page was parsed from. */ - fun response(): IntrafiExclusionListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of - * [IntrafiExclusionListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [IntrafiExclusionListPageAsync]. */ - class Builder internal constructor() { - - private var service: IntrafiExclusionServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: IntrafiExclusionListParams? = null - private var response: IntrafiExclusionListPageResponse? = null - - @JvmSynthetic - internal fun from(intrafiExclusionListPageAsync: IntrafiExclusionListPageAsync) = apply { - service = intrafiExclusionListPageAsync.service - streamHandlerExecutor = intrafiExclusionListPageAsync.streamHandlerExecutor - params = intrafiExclusionListPageAsync.params - response = intrafiExclusionListPageAsync.response - } - - fun service(service: IntrafiExclusionServiceAsync) = apply { this.service = service } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: IntrafiExclusionListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: IntrafiExclusionListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [IntrafiExclusionListPageAsync]. - * - * 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(): IntrafiExclusionListPageAsync = - IntrafiExclusionListPageAsync( - 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 IntrafiExclusionListPageAsync && - 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() = - "IntrafiExclusionListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/intrafiexclusions/IntrafiExclusionListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/intrafiexclusions/IntrafiExclusionListResponse.kt similarity index 89% rename from increase-java-core/src/main/kotlin/com/increase/api/models/intrafiexclusions/IntrafiExclusionListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/intrafiexclusions/IntrafiExclusionListResponse.kt index 24c9ea4fb..c799e6ec4 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/intrafiexclusions/IntrafiExclusionListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/intrafiexclusions/IntrafiExclusionListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of IntraFi Exclusion objects. */ -class IntrafiExclusionListPageResponse +class IntrafiExclusionListResponse @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 - * [IntrafiExclusionListPageResponse]. + * Returns a mutable builder for constructing an instance of [IntrafiExclusionListResponse]. * * The following fields are required: * ```java @@ -95,7 +94,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [IntrafiExclusionListPageResponse]. */ + /** A builder for [IntrafiExclusionListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -103,13 +102,11 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(intrafiExclusionListPageResponse: IntrafiExclusionListPageResponse) = - apply { - data = intrafiExclusionListPageResponse.data.map { it.toMutableList() } - nextCursor = intrafiExclusionListPageResponse.nextCursor - additionalProperties = - intrafiExclusionListPageResponse.additionalProperties.toMutableMap() - } + internal fun from(intrafiExclusionListResponse: IntrafiExclusionListResponse) = apply { + data = intrafiExclusionListResponse.data.map { it.toMutableList() } + nextCursor = intrafiExclusionListResponse.nextCursor + additionalProperties = intrafiExclusionListResponse.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 [IntrafiExclusionListPageResponse]. + * Returns an immutable instance of [IntrafiExclusionListResponse]. * * 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(): IntrafiExclusionListPageResponse = - IntrafiExclusionListPageResponse( + fun build(): IntrafiExclusionListResponse = + IntrafiExclusionListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -194,7 +191,7 @@ private constructor( private var validated: Boolean = false - fun validate(): IntrafiExclusionListPageResponse = apply { + fun validate(): IntrafiExclusionListResponse = apply { if (validated) { return@apply } @@ -227,7 +224,7 @@ private constructor( return true } - return other is IntrafiExclusionListPageResponse && + return other is IntrafiExclusionListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -238,5 +235,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "IntrafiExclusionListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "IntrafiExclusionListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/LockboxListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/LockboxListPage.kt deleted file mode 100644 index ade6e2650..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/LockboxListPage.kt +++ /dev/null @@ -1,132 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.lockboxes - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.LockboxService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see LockboxService.list */ -class LockboxListPage -private constructor( - private val service: LockboxService, - private val params: LockboxListParams, - private val response: LockboxListPageResponse, -) : Page { - - /** - * Delegates to [LockboxListPageResponse], but gracefully handles missing data. - * - * @see LockboxListPageResponse.data - */ - fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [LockboxListPageResponse], but gracefully handles missing data. - * - * @see LockboxListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): LockboxListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): LockboxListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): LockboxListParams = params - - /** The response that this page was parsed from. */ - fun response(): LockboxListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [LockboxListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [LockboxListPage]. */ - class Builder internal constructor() { - - private var service: LockboxService? = null - private var params: LockboxListParams? = null - private var response: LockboxListPageResponse? = null - - @JvmSynthetic - internal fun from(lockboxListPage: LockboxListPage) = apply { - service = lockboxListPage.service - params = lockboxListPage.params - response = lockboxListPage.response - } - - fun service(service: LockboxService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: LockboxListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: LockboxListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [LockboxListPage]. - * - * 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(): LockboxListPage = - LockboxListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is LockboxListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = - "LockboxListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/LockboxListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/LockboxListPageAsync.kt deleted file mode 100644 index 10e81908f..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/LockboxListPageAsync.kt +++ /dev/null @@ -1,146 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.lockboxes - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.LockboxServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see LockboxServiceAsync.list */ -class LockboxListPageAsync -private constructor( - private val service: LockboxServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: LockboxListParams, - private val response: LockboxListPageResponse, -) : PageAsync { - - /** - * Delegates to [LockboxListPageResponse], but gracefully handles missing data. - * - * @see LockboxListPageResponse.data - */ - fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [LockboxListPageResponse], but gracefully handles missing data. - * - * @see LockboxListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): LockboxListParams { - 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(): LockboxListParams = params - - /** The response that this page was parsed from. */ - fun response(): LockboxListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [LockboxListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [LockboxListPageAsync]. */ - class Builder internal constructor() { - - private var service: LockboxServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: LockboxListParams? = null - private var response: LockboxListPageResponse? = null - - @JvmSynthetic - internal fun from(lockboxListPageAsync: LockboxListPageAsync) = apply { - service = lockboxListPageAsync.service - streamHandlerExecutor = lockboxListPageAsync.streamHandlerExecutor - params = lockboxListPageAsync.params - response = lockboxListPageAsync.response - } - - fun service(service: LockboxServiceAsync) = apply { this.service = service } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: LockboxListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: LockboxListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [LockboxListPageAsync]. - * - * 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(): LockboxListPageAsync = - LockboxListPageAsync( - 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 LockboxListPageAsync && - 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() = - "LockboxListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/LockboxListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/LockboxListResponse.kt similarity index 90% rename from increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/LockboxListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/LockboxListResponse.kt index 6f58c0358..45eb46ca7 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/LockboxListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/LockboxListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of Lockbox objects. */ -class LockboxListPageResponse +class LockboxListResponse @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 [LockboxListPageResponse]. + * Returns a mutable builder for constructing an instance of [LockboxListResponse]. * * The following fields are required: * ```java @@ -92,7 +92,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [LockboxListPageResponse]. */ + /** A builder for [LockboxListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -100,10 +100,10 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(lockboxListPageResponse: LockboxListPageResponse) = apply { - data = lockboxListPageResponse.data.map { it.toMutableList() } - nextCursor = lockboxListPageResponse.nextCursor - additionalProperties = lockboxListPageResponse.additionalProperties.toMutableMap() + internal fun from(lockboxListResponse: LockboxListResponse) = apply { + data = lockboxListResponse.data.map { it.toMutableList() } + nextCursor = lockboxListResponse.nextCursor + additionalProperties = lockboxListResponse.additionalProperties.toMutableMap() } /** The contents of the list. */ @@ -167,7 +167,7 @@ private constructor( } /** - * Returns an immutable instance of [LockboxListPageResponse]. + * Returns an immutable instance of [LockboxListResponse]. * * 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(): LockboxListPageResponse = - LockboxListPageResponse( + fun build(): LockboxListResponse = + LockboxListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -189,7 +189,7 @@ private constructor( private var validated: Boolean = false - fun validate(): LockboxListPageResponse = apply { + fun validate(): LockboxListResponse = apply { if (validated) { return@apply } @@ -222,7 +222,7 @@ private constructor( return true } - return other is LockboxListPageResponse && + return other is LockboxListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -233,5 +233,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "LockboxListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "LockboxListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/oauthapplications/OAuthApplicationListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/oauthapplications/OAuthApplicationListPage.kt deleted file mode 100644 index 57d7b2fe0..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/oauthapplications/OAuthApplicationListPage.kt +++ /dev/null @@ -1,135 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.oauthapplications - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.OAuthApplicationService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see OAuthApplicationService.list */ -class OAuthApplicationListPage -private constructor( - private val service: OAuthApplicationService, - private val params: OAuthApplicationListParams, - private val response: OAuthApplicationListPageResponse, -) : Page { - - /** - * Delegates to [OAuthApplicationListPageResponse], but gracefully handles missing data. - * - * @see OAuthApplicationListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [OAuthApplicationListPageResponse], but gracefully handles missing data. - * - * @see OAuthApplicationListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): OAuthApplicationListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): OAuthApplicationListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): OAuthApplicationListParams = params - - /** The response that this page was parsed from. */ - fun response(): OAuthApplicationListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [OAuthApplicationListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [OAuthApplicationListPage]. */ - class Builder internal constructor() { - - private var service: OAuthApplicationService? = null - private var params: OAuthApplicationListParams? = null - private var response: OAuthApplicationListPageResponse? = null - - @JvmSynthetic - internal fun from(oauthApplicationListPage: OAuthApplicationListPage) = apply { - service = oauthApplicationListPage.service - params = oauthApplicationListPage.params - response = oauthApplicationListPage.response - } - - fun service(service: OAuthApplicationService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: OAuthApplicationListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: OAuthApplicationListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [OAuthApplicationListPage]. - * - * 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(): OAuthApplicationListPage = - OAuthApplicationListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is OAuthApplicationListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = - "OAuthApplicationListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/oauthapplications/OAuthApplicationListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/oauthapplications/OAuthApplicationListPageAsync.kt deleted file mode 100644 index 6eb16dbc4..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/oauthapplications/OAuthApplicationListPageAsync.kt +++ /dev/null @@ -1,151 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.oauthapplications - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.OAuthApplicationServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see OAuthApplicationServiceAsync.list */ -class OAuthApplicationListPageAsync -private constructor( - private val service: OAuthApplicationServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: OAuthApplicationListParams, - private val response: OAuthApplicationListPageResponse, -) : PageAsync { - - /** - * Delegates to [OAuthApplicationListPageResponse], but gracefully handles missing data. - * - * @see OAuthApplicationListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [OAuthApplicationListPageResponse], but gracefully handles missing data. - * - * @see OAuthApplicationListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): OAuthApplicationListParams { - 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(): OAuthApplicationListParams = params - - /** The response that this page was parsed from. */ - fun response(): OAuthApplicationListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of - * [OAuthApplicationListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [OAuthApplicationListPageAsync]. */ - class Builder internal constructor() { - - private var service: OAuthApplicationServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: OAuthApplicationListParams? = null - private var response: OAuthApplicationListPageResponse? = null - - @JvmSynthetic - internal fun from(oauthApplicationListPageAsync: OAuthApplicationListPageAsync) = apply { - service = oauthApplicationListPageAsync.service - streamHandlerExecutor = oauthApplicationListPageAsync.streamHandlerExecutor - params = oauthApplicationListPageAsync.params - response = oauthApplicationListPageAsync.response - } - - fun service(service: OAuthApplicationServiceAsync) = apply { this.service = service } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: OAuthApplicationListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: OAuthApplicationListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [OAuthApplicationListPageAsync]. - * - * 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(): OAuthApplicationListPageAsync = - OAuthApplicationListPageAsync( - 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 OAuthApplicationListPageAsync && - 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() = - "OAuthApplicationListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/oauthapplications/OAuthApplicationListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/oauthapplications/OAuthApplicationListResponse.kt similarity index 89% rename from increase-java-core/src/main/kotlin/com/increase/api/models/oauthapplications/OAuthApplicationListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/oauthapplications/OAuthApplicationListResponse.kt index fbe4d6bfe..4b8444e24 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/oauthapplications/OAuthApplicationListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/oauthapplications/OAuthApplicationListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of OAuth Application objects. */ -class OAuthApplicationListPageResponse +class OAuthApplicationListResponse @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 - * [OAuthApplicationListPageResponse]. + * Returns a mutable builder for constructing an instance of [OAuthApplicationListResponse]. * * The following fields are required: * ```java @@ -95,7 +94,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [OAuthApplicationListPageResponse]. */ + /** A builder for [OAuthApplicationListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -103,13 +102,11 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(oauthApplicationListPageResponse: OAuthApplicationListPageResponse) = - apply { - data = oauthApplicationListPageResponse.data.map { it.toMutableList() } - nextCursor = oauthApplicationListPageResponse.nextCursor - additionalProperties = - oauthApplicationListPageResponse.additionalProperties.toMutableMap() - } + internal fun from(oauthApplicationListResponse: OAuthApplicationListResponse) = apply { + data = oauthApplicationListResponse.data.map { it.toMutableList() } + nextCursor = oauthApplicationListResponse.nextCursor + additionalProperties = oauthApplicationListResponse.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 [OAuthApplicationListPageResponse]. + * Returns an immutable instance of [OAuthApplicationListResponse]. * * 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(): OAuthApplicationListPageResponse = - OAuthApplicationListPageResponse( + fun build(): OAuthApplicationListResponse = + OAuthApplicationListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -194,7 +191,7 @@ private constructor( private var validated: Boolean = false - fun validate(): OAuthApplicationListPageResponse = apply { + fun validate(): OAuthApplicationListResponse = apply { if (validated) { return@apply } @@ -227,7 +224,7 @@ private constructor( return true } - return other is OAuthApplicationListPageResponse && + return other is OAuthApplicationListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -238,5 +235,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "OAuthApplicationListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "OAuthApplicationListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/oauthconnections/OAuthConnectionListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/oauthconnections/OAuthConnectionListPage.kt deleted file mode 100644 index e7f4364b1..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/oauthconnections/OAuthConnectionListPage.kt +++ /dev/null @@ -1,133 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.oauthconnections - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.OAuthConnectionService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see OAuthConnectionService.list */ -class OAuthConnectionListPage -private constructor( - private val service: OAuthConnectionService, - private val params: OAuthConnectionListParams, - private val response: OAuthConnectionListPageResponse, -) : Page { - - /** - * Delegates to [OAuthConnectionListPageResponse], but gracefully handles missing data. - * - * @see OAuthConnectionListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [OAuthConnectionListPageResponse], but gracefully handles missing data. - * - * @see OAuthConnectionListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): OAuthConnectionListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): OAuthConnectionListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): OAuthConnectionListParams = params - - /** The response that this page was parsed from. */ - fun response(): OAuthConnectionListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [OAuthConnectionListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [OAuthConnectionListPage]. */ - class Builder internal constructor() { - - private var service: OAuthConnectionService? = null - private var params: OAuthConnectionListParams? = null - private var response: OAuthConnectionListPageResponse? = null - - @JvmSynthetic - internal fun from(oauthConnectionListPage: OAuthConnectionListPage) = apply { - service = oauthConnectionListPage.service - params = oauthConnectionListPage.params - response = oauthConnectionListPage.response - } - - fun service(service: OAuthConnectionService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: OAuthConnectionListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: OAuthConnectionListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [OAuthConnectionListPage]. - * - * 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(): OAuthConnectionListPage = - OAuthConnectionListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is OAuthConnectionListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = - "OAuthConnectionListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/oauthconnections/OAuthConnectionListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/oauthconnections/OAuthConnectionListPageAsync.kt deleted file mode 100644 index 9ca53e4c5..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/oauthconnections/OAuthConnectionListPageAsync.kt +++ /dev/null @@ -1,148 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.oauthconnections - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.OAuthConnectionServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see OAuthConnectionServiceAsync.list */ -class OAuthConnectionListPageAsync -private constructor( - private val service: OAuthConnectionServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: OAuthConnectionListParams, - private val response: OAuthConnectionListPageResponse, -) : PageAsync { - - /** - * Delegates to [OAuthConnectionListPageResponse], but gracefully handles missing data. - * - * @see OAuthConnectionListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [OAuthConnectionListPageResponse], but gracefully handles missing data. - * - * @see OAuthConnectionListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): OAuthConnectionListParams { - 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(): OAuthConnectionListParams = params - - /** The response that this page was parsed from. */ - fun response(): OAuthConnectionListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [OAuthConnectionListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [OAuthConnectionListPageAsync]. */ - class Builder internal constructor() { - - private var service: OAuthConnectionServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: OAuthConnectionListParams? = null - private var response: OAuthConnectionListPageResponse? = null - - @JvmSynthetic - internal fun from(oauthConnectionListPageAsync: OAuthConnectionListPageAsync) = apply { - service = oauthConnectionListPageAsync.service - streamHandlerExecutor = oauthConnectionListPageAsync.streamHandlerExecutor - params = oauthConnectionListPageAsync.params - response = oauthConnectionListPageAsync.response - } - - fun service(service: OAuthConnectionServiceAsync) = apply { this.service = service } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: OAuthConnectionListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: OAuthConnectionListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [OAuthConnectionListPageAsync]. - * - * 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(): OAuthConnectionListPageAsync = - OAuthConnectionListPageAsync( - 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 OAuthConnectionListPageAsync && - 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() = - "OAuthConnectionListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/oauthconnections/OAuthConnectionListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/oauthconnections/OAuthConnectionListResponse.kt similarity index 89% rename from increase-java-core/src/main/kotlin/com/increase/api/models/oauthconnections/OAuthConnectionListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/oauthconnections/OAuthConnectionListResponse.kt index 8f2c66a26..aa9132adf 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/oauthconnections/OAuthConnectionListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/oauthconnections/OAuthConnectionListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of OAuth Connection objects. */ -class OAuthConnectionListPageResponse +class OAuthConnectionListResponse @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 - * [OAuthConnectionListPageResponse]. + * Returns a mutable builder for constructing an instance of [OAuthConnectionListResponse]. * * The following fields are required: * ```java @@ -95,7 +94,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [OAuthConnectionListPageResponse]. */ + /** A builder for [OAuthConnectionListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -103,13 +102,11 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(oauthConnectionListPageResponse: OAuthConnectionListPageResponse) = - apply { - data = oauthConnectionListPageResponse.data.map { it.toMutableList() } - nextCursor = oauthConnectionListPageResponse.nextCursor - additionalProperties = - oauthConnectionListPageResponse.additionalProperties.toMutableMap() - } + internal fun from(oauthConnectionListResponse: OAuthConnectionListResponse) = apply { + data = oauthConnectionListResponse.data.map { it.toMutableList() } + nextCursor = oauthConnectionListResponse.nextCursor + additionalProperties = oauthConnectionListResponse.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 [OAuthConnectionListPageResponse]. + * Returns an immutable instance of [OAuthConnectionListResponse]. * * 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(): OAuthConnectionListPageResponse = - OAuthConnectionListPageResponse( + fun build(): OAuthConnectionListResponse = + OAuthConnectionListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -194,7 +191,7 @@ private constructor( private var validated: Boolean = false - fun validate(): OAuthConnectionListPageResponse = apply { + fun validate(): OAuthConnectionListResponse = apply { if (validated) { return@apply } @@ -227,7 +224,7 @@ private constructor( return true } - return other is OAuthConnectionListPageResponse && + return other is OAuthConnectionListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -238,5 +235,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "OAuthConnectionListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "OAuthConnectionListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/pendingtransactions/PendingTransactionListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/pendingtransactions/PendingTransactionListPage.kt deleted file mode 100644 index c7aaa0fc9..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/pendingtransactions/PendingTransactionListPage.kt +++ /dev/null @@ -1,135 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.pendingtransactions - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.PendingTransactionService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see PendingTransactionService.list */ -class PendingTransactionListPage -private constructor( - private val service: PendingTransactionService, - private val params: PendingTransactionListParams, - private val response: PendingTransactionListPageResponse, -) : Page { - - /** - * Delegates to [PendingTransactionListPageResponse], but gracefully handles missing data. - * - * @see PendingTransactionListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [PendingTransactionListPageResponse], but gracefully handles missing data. - * - * @see PendingTransactionListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): PendingTransactionListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): PendingTransactionListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): PendingTransactionListParams = params - - /** The response that this page was parsed from. */ - fun response(): PendingTransactionListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [PendingTransactionListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [PendingTransactionListPage]. */ - class Builder internal constructor() { - - private var service: PendingTransactionService? = null - private var params: PendingTransactionListParams? = null - private var response: PendingTransactionListPageResponse? = null - - @JvmSynthetic - internal fun from(pendingTransactionListPage: PendingTransactionListPage) = apply { - service = pendingTransactionListPage.service - params = pendingTransactionListPage.params - response = pendingTransactionListPage.response - } - - fun service(service: PendingTransactionService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: PendingTransactionListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: PendingTransactionListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [PendingTransactionListPage]. - * - * 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(): PendingTransactionListPage = - PendingTransactionListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is PendingTransactionListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = - "PendingTransactionListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/pendingtransactions/PendingTransactionListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/pendingtransactions/PendingTransactionListPageAsync.kt deleted file mode 100644 index 63331bc3e..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/pendingtransactions/PendingTransactionListPageAsync.kt +++ /dev/null @@ -1,152 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.pendingtransactions - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.PendingTransactionServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see PendingTransactionServiceAsync.list */ -class PendingTransactionListPageAsync -private constructor( - private val service: PendingTransactionServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: PendingTransactionListParams, - private val response: PendingTransactionListPageResponse, -) : PageAsync { - - /** - * Delegates to [PendingTransactionListPageResponse], but gracefully handles missing data. - * - * @see PendingTransactionListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [PendingTransactionListPageResponse], but gracefully handles missing data. - * - * @see PendingTransactionListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): PendingTransactionListParams { - 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(): PendingTransactionListParams = params - - /** The response that this page was parsed from. */ - fun response(): PendingTransactionListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of - * [PendingTransactionListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [PendingTransactionListPageAsync]. */ - class Builder internal constructor() { - - private var service: PendingTransactionServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: PendingTransactionListParams? = null - private var response: PendingTransactionListPageResponse? = null - - @JvmSynthetic - internal fun from(pendingTransactionListPageAsync: PendingTransactionListPageAsync) = - apply { - service = pendingTransactionListPageAsync.service - streamHandlerExecutor = pendingTransactionListPageAsync.streamHandlerExecutor - params = pendingTransactionListPageAsync.params - response = pendingTransactionListPageAsync.response - } - - fun service(service: PendingTransactionServiceAsync) = apply { this.service = service } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: PendingTransactionListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: PendingTransactionListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [PendingTransactionListPageAsync]. - * - * 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(): PendingTransactionListPageAsync = - PendingTransactionListPageAsync( - 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 PendingTransactionListPageAsync && - 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() = - "PendingTransactionListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/pendingtransactions/PendingTransactionListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/pendingtransactions/PendingTransactionListResponse.kt similarity index 88% rename from increase-java-core/src/main/kotlin/com/increase/api/models/pendingtransactions/PendingTransactionListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/pendingtransactions/PendingTransactionListResponse.kt index d7db61a20..a8e32b4ab 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/pendingtransactions/PendingTransactionListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/pendingtransactions/PendingTransactionListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of Pending Transaction objects. */ -class PendingTransactionListPageResponse +class PendingTransactionListResponse @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 - * [PendingTransactionListPageResponse]. + * [PendingTransactionListResponse]. * * The following fields are required: * ```java @@ -95,7 +95,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [PendingTransactionListPageResponse]. */ + /** A builder for [PendingTransactionListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -103,13 +103,12 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(pendingTransactionListPageResponse: PendingTransactionListPageResponse) = - apply { - data = pendingTransactionListPageResponse.data.map { it.toMutableList() } - nextCursor = pendingTransactionListPageResponse.nextCursor - additionalProperties = - pendingTransactionListPageResponse.additionalProperties.toMutableMap() - } + internal fun from(pendingTransactionListResponse: PendingTransactionListResponse) = apply { + data = pendingTransactionListResponse.data.map { it.toMutableList() } + nextCursor = pendingTransactionListResponse.nextCursor + additionalProperties = + pendingTransactionListResponse.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 [PendingTransactionListPageResponse]. + * Returns an immutable instance of [PendingTransactionListResponse]. * * 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(): PendingTransactionListPageResponse = - PendingTransactionListPageResponse( + fun build(): PendingTransactionListResponse = + PendingTransactionListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -194,7 +193,7 @@ private constructor( private var validated: Boolean = false - fun validate(): PendingTransactionListPageResponse = apply { + fun validate(): PendingTransactionListResponse = apply { if (validated) { return@apply } @@ -227,7 +226,7 @@ private constructor( return true } - return other is PendingTransactionListPageResponse && + return other is PendingTransactionListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -238,5 +237,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "PendingTransactionListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "PendingTransactionListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/physicalcardprofiles/PhysicalCardProfileListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/physicalcardprofiles/PhysicalCardProfileListPage.kt deleted file mode 100644 index dd7338c6f..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/physicalcardprofiles/PhysicalCardProfileListPage.kt +++ /dev/null @@ -1,135 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.physicalcardprofiles - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.PhysicalCardProfileService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see PhysicalCardProfileService.list */ -class PhysicalCardProfileListPage -private constructor( - private val service: PhysicalCardProfileService, - private val params: PhysicalCardProfileListParams, - private val response: PhysicalCardProfileListPageResponse, -) : Page { - - /** - * Delegates to [PhysicalCardProfileListPageResponse], but gracefully handles missing data. - * - * @see PhysicalCardProfileListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [PhysicalCardProfileListPageResponse], but gracefully handles missing data. - * - * @see PhysicalCardProfileListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): PhysicalCardProfileListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): PhysicalCardProfileListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): PhysicalCardProfileListParams = params - - /** The response that this page was parsed from. */ - fun response(): PhysicalCardProfileListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [PhysicalCardProfileListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [PhysicalCardProfileListPage]. */ - class Builder internal constructor() { - - private var service: PhysicalCardProfileService? = null - private var params: PhysicalCardProfileListParams? = null - private var response: PhysicalCardProfileListPageResponse? = null - - @JvmSynthetic - internal fun from(physicalCardProfileListPage: PhysicalCardProfileListPage) = apply { - service = physicalCardProfileListPage.service - params = physicalCardProfileListPage.params - response = physicalCardProfileListPage.response - } - - fun service(service: PhysicalCardProfileService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: PhysicalCardProfileListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: PhysicalCardProfileListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [PhysicalCardProfileListPage]. - * - * 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(): PhysicalCardProfileListPage = - PhysicalCardProfileListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is PhysicalCardProfileListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = - "PhysicalCardProfileListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/physicalcardprofiles/PhysicalCardProfileListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/physicalcardprofiles/PhysicalCardProfileListPageAsync.kt deleted file mode 100644 index 27bccad0a..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/physicalcardprofiles/PhysicalCardProfileListPageAsync.kt +++ /dev/null @@ -1,152 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.physicalcardprofiles - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.PhysicalCardProfileServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see PhysicalCardProfileServiceAsync.list */ -class PhysicalCardProfileListPageAsync -private constructor( - private val service: PhysicalCardProfileServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: PhysicalCardProfileListParams, - private val response: PhysicalCardProfileListPageResponse, -) : PageAsync { - - /** - * Delegates to [PhysicalCardProfileListPageResponse], but gracefully handles missing data. - * - * @see PhysicalCardProfileListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [PhysicalCardProfileListPageResponse], but gracefully handles missing data. - * - * @see PhysicalCardProfileListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): PhysicalCardProfileListParams { - 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(): PhysicalCardProfileListParams = params - - /** The response that this page was parsed from. */ - fun response(): PhysicalCardProfileListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of - * [PhysicalCardProfileListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [PhysicalCardProfileListPageAsync]. */ - class Builder internal constructor() { - - private var service: PhysicalCardProfileServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: PhysicalCardProfileListParams? = null - private var response: PhysicalCardProfileListPageResponse? = null - - @JvmSynthetic - internal fun from(physicalCardProfileListPageAsync: PhysicalCardProfileListPageAsync) = - apply { - service = physicalCardProfileListPageAsync.service - streamHandlerExecutor = physicalCardProfileListPageAsync.streamHandlerExecutor - params = physicalCardProfileListPageAsync.params - response = physicalCardProfileListPageAsync.response - } - - fun service(service: PhysicalCardProfileServiceAsync) = apply { this.service = service } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: PhysicalCardProfileListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: PhysicalCardProfileListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [PhysicalCardProfileListPageAsync]. - * - * 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(): PhysicalCardProfileListPageAsync = - PhysicalCardProfileListPageAsync( - 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 PhysicalCardProfileListPageAsync && - 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() = - "PhysicalCardProfileListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/physicalcardprofiles/PhysicalCardProfileListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/physicalcardprofiles/PhysicalCardProfileListResponse.kt similarity index 89% rename from increase-java-core/src/main/kotlin/com/increase/api/models/physicalcardprofiles/PhysicalCardProfileListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/physicalcardprofiles/PhysicalCardProfileListResponse.kt index f67b66899..a987f1290 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/physicalcardprofiles/PhysicalCardProfileListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/physicalcardprofiles/PhysicalCardProfileListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of Physical Card Profile objects. */ -class PhysicalCardProfileListPageResponse +class PhysicalCardProfileListResponse @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 - * [PhysicalCardProfileListPageResponse]. + * [PhysicalCardProfileListResponse]. * * The following fields are required: * ```java @@ -95,7 +95,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [PhysicalCardProfileListPageResponse]. */ + /** A builder for [PhysicalCardProfileListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -103,14 +103,13 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from( - physicalCardProfileListPageResponse: PhysicalCardProfileListPageResponse - ) = apply { - data = physicalCardProfileListPageResponse.data.map { it.toMutableList() } - nextCursor = physicalCardProfileListPageResponse.nextCursor - additionalProperties = - physicalCardProfileListPageResponse.additionalProperties.toMutableMap() - } + internal fun from(physicalCardProfileListResponse: PhysicalCardProfileListResponse) = + apply { + data = physicalCardProfileListResponse.data.map { it.toMutableList() } + nextCursor = physicalCardProfileListResponse.nextCursor + additionalProperties = + physicalCardProfileListResponse.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 [PhysicalCardProfileListPageResponse]. + * Returns an immutable instance of [PhysicalCardProfileListResponse]. * * 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(): PhysicalCardProfileListPageResponse = - PhysicalCardProfileListPageResponse( + fun build(): PhysicalCardProfileListResponse = + PhysicalCardProfileListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -195,7 +194,7 @@ private constructor( private var validated: Boolean = false - fun validate(): PhysicalCardProfileListPageResponse = apply { + fun validate(): PhysicalCardProfileListResponse = apply { if (validated) { return@apply } @@ -228,7 +227,7 @@ private constructor( return true } - return other is PhysicalCardProfileListPageResponse && + return other is PhysicalCardProfileListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -239,5 +238,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "PhysicalCardProfileListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "PhysicalCardProfileListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/physicalcards/PhysicalCardListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/physicalcards/PhysicalCardListPage.kt deleted file mode 100644 index dd4b27f81..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/physicalcards/PhysicalCardListPage.kt +++ /dev/null @@ -1,132 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.physicalcards - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.PhysicalCardService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see PhysicalCardService.list */ -class PhysicalCardListPage -private constructor( - private val service: PhysicalCardService, - private val params: PhysicalCardListParams, - private val response: PhysicalCardListPageResponse, -) : Page { - - /** - * Delegates to [PhysicalCardListPageResponse], but gracefully handles missing data. - * - * @see PhysicalCardListPageResponse.data - */ - fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [PhysicalCardListPageResponse], but gracefully handles missing data. - * - * @see PhysicalCardListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): PhysicalCardListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): PhysicalCardListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): PhysicalCardListParams = params - - /** The response that this page was parsed from. */ - fun response(): PhysicalCardListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [PhysicalCardListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [PhysicalCardListPage]. */ - class Builder internal constructor() { - - private var service: PhysicalCardService? = null - private var params: PhysicalCardListParams? = null - private var response: PhysicalCardListPageResponse? = null - - @JvmSynthetic - internal fun from(physicalCardListPage: PhysicalCardListPage) = apply { - service = physicalCardListPage.service - params = physicalCardListPage.params - response = physicalCardListPage.response - } - - fun service(service: PhysicalCardService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: PhysicalCardListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: PhysicalCardListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [PhysicalCardListPage]. - * - * 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(): PhysicalCardListPage = - PhysicalCardListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is PhysicalCardListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = - "PhysicalCardListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/physicalcards/PhysicalCardListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/physicalcards/PhysicalCardListPageAsync.kt deleted file mode 100644 index 1a63b48ed..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/physicalcards/PhysicalCardListPageAsync.kt +++ /dev/null @@ -1,146 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.physicalcards - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.PhysicalCardServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see PhysicalCardServiceAsync.list */ -class PhysicalCardListPageAsync -private constructor( - private val service: PhysicalCardServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: PhysicalCardListParams, - private val response: PhysicalCardListPageResponse, -) : PageAsync { - - /** - * Delegates to [PhysicalCardListPageResponse], but gracefully handles missing data. - * - * @see PhysicalCardListPageResponse.data - */ - fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [PhysicalCardListPageResponse], but gracefully handles missing data. - * - * @see PhysicalCardListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): PhysicalCardListParams { - 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(): PhysicalCardListParams = params - - /** The response that this page was parsed from. */ - fun response(): PhysicalCardListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [PhysicalCardListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [PhysicalCardListPageAsync]. */ - class Builder internal constructor() { - - private var service: PhysicalCardServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: PhysicalCardListParams? = null - private var response: PhysicalCardListPageResponse? = null - - @JvmSynthetic - internal fun from(physicalCardListPageAsync: PhysicalCardListPageAsync) = apply { - service = physicalCardListPageAsync.service - streamHandlerExecutor = physicalCardListPageAsync.streamHandlerExecutor - params = physicalCardListPageAsync.params - response = physicalCardListPageAsync.response - } - - fun service(service: PhysicalCardServiceAsync) = apply { this.service = service } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: PhysicalCardListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: PhysicalCardListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [PhysicalCardListPageAsync]. - * - * 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(): PhysicalCardListPageAsync = - PhysicalCardListPageAsync( - 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 PhysicalCardListPageAsync && - 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() = - "PhysicalCardListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/physicalcards/PhysicalCardListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/physicalcards/PhysicalCardListResponse.kt similarity index 89% rename from increase-java-core/src/main/kotlin/com/increase/api/models/physicalcards/PhysicalCardListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/physicalcards/PhysicalCardListResponse.kt index c70a9bc5c..7c7a4b696 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/physicalcards/PhysicalCardListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/physicalcards/PhysicalCardListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of Physical Card objects. */ -class PhysicalCardListPageResponse +class PhysicalCardListResponse @JsonCreator(mode = JsonCreator.Mode.DISABLED) private constructor( private val data: JsonField>, @@ -83,7 +83,7 @@ private constructor( companion object { /** - * Returns a mutable builder for constructing an instance of [PhysicalCardListPageResponse]. + * Returns a mutable builder for constructing an instance of [PhysicalCardListResponse]. * * The following fields are required: * ```java @@ -94,7 +94,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [PhysicalCardListPageResponse]. */ + /** A builder for [PhysicalCardListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -102,10 +102,10 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(physicalCardListPageResponse: PhysicalCardListPageResponse) = apply { - data = physicalCardListPageResponse.data.map { it.toMutableList() } - nextCursor = physicalCardListPageResponse.nextCursor - additionalProperties = physicalCardListPageResponse.additionalProperties.toMutableMap() + internal fun from(physicalCardListResponse: PhysicalCardListResponse) = apply { + data = physicalCardListResponse.data.map { it.toMutableList() } + nextCursor = physicalCardListResponse.nextCursor + additionalProperties = physicalCardListResponse.additionalProperties.toMutableMap() } /** The contents of the list. */ @@ -169,7 +169,7 @@ private constructor( } /** - * Returns an immutable instance of [PhysicalCardListPageResponse]. + * Returns an immutable instance of [PhysicalCardListResponse]. * * Further updates to this [Builder] will not mutate the returned instance. * @@ -181,8 +181,8 @@ private constructor( * * @throws IllegalStateException if any required field is unset. */ - fun build(): PhysicalCardListPageResponse = - PhysicalCardListPageResponse( + fun build(): PhysicalCardListResponse = + PhysicalCardListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -191,7 +191,7 @@ private constructor( private var validated: Boolean = false - fun validate(): PhysicalCardListPageResponse = apply { + fun validate(): PhysicalCardListResponse = apply { if (validated) { return@apply } @@ -224,7 +224,7 @@ private constructor( return true } - return other is PhysicalCardListPageResponse && + return other is PhysicalCardListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -235,5 +235,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "PhysicalCardListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "PhysicalCardListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/programs/ProgramListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/programs/ProgramListPage.kt deleted file mode 100644 index 993cd3c0b..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/programs/ProgramListPage.kt +++ /dev/null @@ -1,132 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.programs - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.ProgramService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see ProgramService.list */ -class ProgramListPage -private constructor( - private val service: ProgramService, - private val params: ProgramListParams, - private val response: ProgramListPageResponse, -) : Page { - - /** - * Delegates to [ProgramListPageResponse], but gracefully handles missing data. - * - * @see ProgramListPageResponse.data - */ - fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [ProgramListPageResponse], but gracefully handles missing data. - * - * @see ProgramListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): ProgramListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): ProgramListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): ProgramListParams = params - - /** The response that this page was parsed from. */ - fun response(): ProgramListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [ProgramListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [ProgramListPage]. */ - class Builder internal constructor() { - - private var service: ProgramService? = null - private var params: ProgramListParams? = null - private var response: ProgramListPageResponse? = null - - @JvmSynthetic - internal fun from(programListPage: ProgramListPage) = apply { - service = programListPage.service - params = programListPage.params - response = programListPage.response - } - - fun service(service: ProgramService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: ProgramListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: ProgramListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [ProgramListPage]. - * - * 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(): ProgramListPage = - ProgramListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is ProgramListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = - "ProgramListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/programs/ProgramListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/programs/ProgramListPageAsync.kt deleted file mode 100644 index c995d9181..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/programs/ProgramListPageAsync.kt +++ /dev/null @@ -1,146 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.programs - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.ProgramServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see ProgramServiceAsync.list */ -class ProgramListPageAsync -private constructor( - private val service: ProgramServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: ProgramListParams, - private val response: ProgramListPageResponse, -) : PageAsync { - - /** - * Delegates to [ProgramListPageResponse], but gracefully handles missing data. - * - * @see ProgramListPageResponse.data - */ - fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [ProgramListPageResponse], but gracefully handles missing data. - * - * @see ProgramListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): ProgramListParams { - 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(): ProgramListParams = params - - /** The response that this page was parsed from. */ - fun response(): ProgramListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [ProgramListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [ProgramListPageAsync]. */ - class Builder internal constructor() { - - private var service: ProgramServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: ProgramListParams? = null - private var response: ProgramListPageResponse? = null - - @JvmSynthetic - internal fun from(programListPageAsync: ProgramListPageAsync) = apply { - service = programListPageAsync.service - streamHandlerExecutor = programListPageAsync.streamHandlerExecutor - params = programListPageAsync.params - response = programListPageAsync.response - } - - fun service(service: ProgramServiceAsync) = apply { this.service = service } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: ProgramListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: ProgramListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [ProgramListPageAsync]. - * - * 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(): ProgramListPageAsync = - ProgramListPageAsync( - 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 ProgramListPageAsync && - 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() = - "ProgramListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/programs/ProgramListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/programs/ProgramListResponse.kt similarity index 90% rename from increase-java-core/src/main/kotlin/com/increase/api/models/programs/ProgramListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/programs/ProgramListResponse.kt index f653285aa..074d739d0 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/programs/ProgramListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/programs/ProgramListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of Program objects. */ -class ProgramListPageResponse +class ProgramListResponse @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 [ProgramListPageResponse]. + * Returns a mutable builder for constructing an instance of [ProgramListResponse]. * * The following fields are required: * ```java @@ -92,7 +92,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [ProgramListPageResponse]. */ + /** A builder for [ProgramListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -100,10 +100,10 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(programListPageResponse: ProgramListPageResponse) = apply { - data = programListPageResponse.data.map { it.toMutableList() } - nextCursor = programListPageResponse.nextCursor - additionalProperties = programListPageResponse.additionalProperties.toMutableMap() + internal fun from(programListResponse: ProgramListResponse) = apply { + data = programListResponse.data.map { it.toMutableList() } + nextCursor = programListResponse.nextCursor + additionalProperties = programListResponse.additionalProperties.toMutableMap() } /** The contents of the list. */ @@ -167,7 +167,7 @@ private constructor( } /** - * Returns an immutable instance of [ProgramListPageResponse]. + * Returns an immutable instance of [ProgramListResponse]. * * 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(): ProgramListPageResponse = - ProgramListPageResponse( + fun build(): ProgramListResponse = + ProgramListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -189,7 +189,7 @@ private constructor( private var validated: Boolean = false - fun validate(): ProgramListPageResponse = apply { + fun validate(): ProgramListResponse = apply { if (validated) { return@apply } @@ -222,7 +222,7 @@ private constructor( return true } - return other is ProgramListPageResponse && + return other is ProgramListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -233,5 +233,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "ProgramListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "ProgramListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransferListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransferListPage.kt deleted file mode 100644 index f4af3a383..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransferListPage.kt +++ /dev/null @@ -1,137 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.realtimepaymentstransfers - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.RealTimePaymentsTransferService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see RealTimePaymentsTransferService.list */ -class RealTimePaymentsTransferListPage -private constructor( - private val service: RealTimePaymentsTransferService, - private val params: RealTimePaymentsTransferListParams, - private val response: RealTimePaymentsTransferListPageResponse, -) : Page { - - /** - * Delegates to [RealTimePaymentsTransferListPageResponse], but gracefully handles missing data. - * - * @see RealTimePaymentsTransferListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [RealTimePaymentsTransferListPageResponse], but gracefully handles missing data. - * - * @see RealTimePaymentsTransferListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): RealTimePaymentsTransferListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): RealTimePaymentsTransferListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): RealTimePaymentsTransferListParams = params - - /** The response that this page was parsed from. */ - fun response(): RealTimePaymentsTransferListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of - * [RealTimePaymentsTransferListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [RealTimePaymentsTransferListPage]. */ - class Builder internal constructor() { - - private var service: RealTimePaymentsTransferService? = null - private var params: RealTimePaymentsTransferListParams? = null - private var response: RealTimePaymentsTransferListPageResponse? = null - - @JvmSynthetic - internal fun from(realTimePaymentsTransferListPage: RealTimePaymentsTransferListPage) = - apply { - service = realTimePaymentsTransferListPage.service - params = realTimePaymentsTransferListPage.params - response = realTimePaymentsTransferListPage.response - } - - fun service(service: RealTimePaymentsTransferService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: RealTimePaymentsTransferListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: RealTimePaymentsTransferListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [RealTimePaymentsTransferListPage]. - * - * 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(): RealTimePaymentsTransferListPage = - RealTimePaymentsTransferListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is RealTimePaymentsTransferListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = - "RealTimePaymentsTransferListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransferListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransferListPageAsync.kt deleted file mode 100644 index 7468ca5b8..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransferListPageAsync.kt +++ /dev/null @@ -1,155 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.realtimepaymentstransfers - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.RealTimePaymentsTransferServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see RealTimePaymentsTransferServiceAsync.list */ -class RealTimePaymentsTransferListPageAsync -private constructor( - private val service: RealTimePaymentsTransferServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: RealTimePaymentsTransferListParams, - private val response: RealTimePaymentsTransferListPageResponse, -) : PageAsync { - - /** - * Delegates to [RealTimePaymentsTransferListPageResponse], but gracefully handles missing data. - * - * @see RealTimePaymentsTransferListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [RealTimePaymentsTransferListPageResponse], but gracefully handles missing data. - * - * @see RealTimePaymentsTransferListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): RealTimePaymentsTransferListParams { - 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(): RealTimePaymentsTransferListParams = params - - /** The response that this page was parsed from. */ - fun response(): RealTimePaymentsTransferListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of - * [RealTimePaymentsTransferListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [RealTimePaymentsTransferListPageAsync]. */ - class Builder internal constructor() { - - private var service: RealTimePaymentsTransferServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: RealTimePaymentsTransferListParams? = null - private var response: RealTimePaymentsTransferListPageResponse? = null - - @JvmSynthetic - internal fun from( - realTimePaymentsTransferListPageAsync: RealTimePaymentsTransferListPageAsync - ) = apply { - service = realTimePaymentsTransferListPageAsync.service - streamHandlerExecutor = realTimePaymentsTransferListPageAsync.streamHandlerExecutor - params = realTimePaymentsTransferListPageAsync.params - response = realTimePaymentsTransferListPageAsync.response - } - - fun service(service: RealTimePaymentsTransferServiceAsync) = apply { - this.service = service - } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: RealTimePaymentsTransferListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: RealTimePaymentsTransferListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [RealTimePaymentsTransferListPageAsync]. - * - * 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(): RealTimePaymentsTransferListPageAsync = - RealTimePaymentsTransferListPageAsync( - 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 RealTimePaymentsTransferListPageAsync && - 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() = - "RealTimePaymentsTransferListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransferListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransferListResponse.kt similarity index 89% rename from increase-java-core/src/main/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransferListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransferListResponse.kt index ca717db89..2756501d6 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransferListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransferListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of Real-Time Payments Transfer objects. */ -class RealTimePaymentsTransferListPageResponse +class RealTimePaymentsTransferListResponse @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 - * [RealTimePaymentsTransferListPageResponse]. + * [RealTimePaymentsTransferListResponse]. * * The following fields are required: * ```java @@ -97,7 +97,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [RealTimePaymentsTransferListPageResponse]. */ + /** A builder for [RealTimePaymentsTransferListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -106,12 +106,12 @@ private constructor( @JvmSynthetic internal fun from( - realTimePaymentsTransferListPageResponse: RealTimePaymentsTransferListPageResponse + realTimePaymentsTransferListResponse: RealTimePaymentsTransferListResponse ) = apply { - data = realTimePaymentsTransferListPageResponse.data.map { it.toMutableList() } - nextCursor = realTimePaymentsTransferListPageResponse.nextCursor + data = realTimePaymentsTransferListResponse.data.map { it.toMutableList() } + nextCursor = realTimePaymentsTransferListResponse.nextCursor additionalProperties = - realTimePaymentsTransferListPageResponse.additionalProperties.toMutableMap() + realTimePaymentsTransferListResponse.additionalProperties.toMutableMap() } /** The contents of the list. */ @@ -175,7 +175,7 @@ private constructor( } /** - * Returns an immutable instance of [RealTimePaymentsTransferListPageResponse]. + * Returns an immutable instance of [RealTimePaymentsTransferListResponse]. * * Further updates to this [Builder] will not mutate the returned instance. * @@ -187,8 +187,8 @@ private constructor( * * @throws IllegalStateException if any required field is unset. */ - fun build(): RealTimePaymentsTransferListPageResponse = - RealTimePaymentsTransferListPageResponse( + fun build(): RealTimePaymentsTransferListResponse = + RealTimePaymentsTransferListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -197,7 +197,7 @@ private constructor( private var validated: Boolean = false - fun validate(): RealTimePaymentsTransferListPageResponse = apply { + fun validate(): RealTimePaymentsTransferListResponse = apply { if (validated) { return@apply } @@ -230,7 +230,7 @@ private constructor( return true } - return other is RealTimePaymentsTransferListPageResponse && + return other is RealTimePaymentsTransferListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -241,5 +241,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "RealTimePaymentsTransferListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "RealTimePaymentsTransferListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/routingnumbers/RoutingNumberListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/routingnumbers/RoutingNumberListPage.kt deleted file mode 100644 index bc0550cb3..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/routingnumbers/RoutingNumberListPage.kt +++ /dev/null @@ -1,133 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.routingnumbers - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.RoutingNumberService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see RoutingNumberService.list */ -class RoutingNumberListPage -private constructor( - private val service: RoutingNumberService, - private val params: RoutingNumberListParams, - private val response: RoutingNumberListPageResponse, -) : Page { - - /** - * Delegates to [RoutingNumberListPageResponse], but gracefully handles missing data. - * - * @see RoutingNumberListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [RoutingNumberListPageResponse], but gracefully handles missing data. - * - * @see RoutingNumberListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): RoutingNumberListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): RoutingNumberListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): RoutingNumberListParams = params - - /** The response that this page was parsed from. */ - fun response(): RoutingNumberListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [RoutingNumberListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [RoutingNumberListPage]. */ - class Builder internal constructor() { - - private var service: RoutingNumberService? = null - private var params: RoutingNumberListParams? = null - private var response: RoutingNumberListPageResponse? = null - - @JvmSynthetic - internal fun from(routingNumberListPage: RoutingNumberListPage) = apply { - service = routingNumberListPage.service - params = routingNumberListPage.params - response = routingNumberListPage.response - } - - fun service(service: RoutingNumberService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: RoutingNumberListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: RoutingNumberListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [RoutingNumberListPage]. - * - * 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(): RoutingNumberListPage = - RoutingNumberListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is RoutingNumberListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = - "RoutingNumberListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/routingnumbers/RoutingNumberListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/routingnumbers/RoutingNumberListPageAsync.kt deleted file mode 100644 index d84692df1..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/routingnumbers/RoutingNumberListPageAsync.kt +++ /dev/null @@ -1,148 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.routingnumbers - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.RoutingNumberServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see RoutingNumberServiceAsync.list */ -class RoutingNumberListPageAsync -private constructor( - private val service: RoutingNumberServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: RoutingNumberListParams, - private val response: RoutingNumberListPageResponse, -) : PageAsync { - - /** - * Delegates to [RoutingNumberListPageResponse], but gracefully handles missing data. - * - * @see RoutingNumberListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [RoutingNumberListPageResponse], but gracefully handles missing data. - * - * @see RoutingNumberListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): RoutingNumberListParams { - 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(): RoutingNumberListParams = params - - /** The response that this page was parsed from. */ - fun response(): RoutingNumberListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [RoutingNumberListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [RoutingNumberListPageAsync]. */ - class Builder internal constructor() { - - private var service: RoutingNumberServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: RoutingNumberListParams? = null - private var response: RoutingNumberListPageResponse? = null - - @JvmSynthetic - internal fun from(routingNumberListPageAsync: RoutingNumberListPageAsync) = apply { - service = routingNumberListPageAsync.service - streamHandlerExecutor = routingNumberListPageAsync.streamHandlerExecutor - params = routingNumberListPageAsync.params - response = routingNumberListPageAsync.response - } - - fun service(service: RoutingNumberServiceAsync) = apply { this.service = service } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: RoutingNumberListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: RoutingNumberListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [RoutingNumberListPageAsync]. - * - * 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(): RoutingNumberListPageAsync = - RoutingNumberListPageAsync( - 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 RoutingNumberListPageAsync && - 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() = - "RoutingNumberListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/routingnumbers/RoutingNumberListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/routingnumbers/RoutingNumberListPageResponse.kt deleted file mode 100644 index 8b944fbe8..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/routingnumbers/RoutingNumberListPageResponse.kt +++ /dev/null @@ -1,242 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.routingnumbers - -import com.fasterxml.jackson.annotation.JsonAnyGetter -import com.fasterxml.jackson.annotation.JsonAnySetter -import com.fasterxml.jackson.annotation.JsonCreator -import com.fasterxml.jackson.annotation.JsonProperty -import com.increase.api.core.ExcludeMissing -import com.increase.api.core.JsonField -import com.increase.api.core.JsonMissing -import com.increase.api.core.JsonValue -import com.increase.api.core.checkKnown -import com.increase.api.core.checkRequired -import com.increase.api.core.toImmutable -import com.increase.api.errors.IncreaseInvalidDataException -import java.util.Collections -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** A list of Routing Number objects. */ -class RoutingNumberListPageResponse -@JsonCreator(mode = JsonCreator.Mode.DISABLED) -private constructor( - private val data: JsonField>, - private val nextCursor: JsonField, - private val additionalProperties: MutableMap, -) { - - @JsonCreator - private constructor( - @JsonProperty("data") - @ExcludeMissing - data: JsonField> = JsonMissing.of(), - @JsonProperty("next_cursor") - @ExcludeMissing - nextCursor: JsonField = JsonMissing.of(), - ) : this(data, nextCursor, mutableMapOf()) - - /** - * The contents of the list. - * - * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is - * unexpectedly missing or null (e.g. if the server responded with an unexpected value). - */ - fun data(): List = data.getRequired("data") - - /** - * A pointer to a place in the list. - * - * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the - * server responded with an unexpected value). - */ - fun nextCursor(): Optional = nextCursor.getOptional("next_cursor") - - /** - * Returns the raw JSON value of [data]. - * - * Unlike [data], this method doesn't throw if the JSON field has an unexpected type. - */ - @JsonProperty("data") - @ExcludeMissing - fun _data(): JsonField> = data - - /** - * Returns the raw JSON value of [nextCursor]. - * - * Unlike [nextCursor], this method doesn't throw if the JSON field has an unexpected type. - */ - @JsonProperty("next_cursor") @ExcludeMissing fun _nextCursor(): JsonField = nextCursor - - @JsonAnySetter - private fun putAdditionalProperty(key: String, value: JsonValue) { - additionalProperties.put(key, value) - } - - @JsonAnyGetter - @ExcludeMissing - fun _additionalProperties(): Map = - Collections.unmodifiableMap(additionalProperties) - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of - * [RoutingNumberListPageResponse]. - * - * The following fields are required: - * ```java - * .data() - * .nextCursor() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [RoutingNumberListPageResponse]. */ - class Builder internal constructor() { - - private var data: JsonField>? = null - private var nextCursor: JsonField? = null - private var additionalProperties: MutableMap = mutableMapOf() - - @JvmSynthetic - internal fun from(routingNumberListPageResponse: RoutingNumberListPageResponse) = apply { - data = routingNumberListPageResponse.data.map { it.toMutableList() } - nextCursor = routingNumberListPageResponse.nextCursor - additionalProperties = routingNumberListPageResponse.additionalProperties.toMutableMap() - } - - /** The contents of the list. */ - fun data(data: List) = data(JsonField.of(data)) - - /** - * Sets [Builder.data] to an arbitrary JSON value. - * - * You should usually call [Builder.data] with a well-typed - * `List` value instead. This method is primarily for setting the - * field to an undocumented or not yet supported value. - */ - fun data(data: JsonField>) = apply { - this.data = data.map { it.toMutableList() } - } - - /** - * Adds a single [RoutingNumberListResponse] to [Builder.data]. - * - * @throws IllegalStateException if the field was previously set to a non-list. - */ - fun addData(data: RoutingNumberListResponse) = apply { - this.data = - (this.data ?: JsonField.of(mutableListOf())).also { - checkKnown("data", it).add(data) - } - } - - /** A pointer to a place in the list. */ - fun nextCursor(nextCursor: String?) = nextCursor(JsonField.ofNullable(nextCursor)) - - /** Alias for calling [Builder.nextCursor] with `nextCursor.orElse(null)`. */ - fun nextCursor(nextCursor: Optional) = nextCursor(nextCursor.getOrNull()) - - /** - * Sets [Builder.nextCursor] to an arbitrary JSON value. - * - * You should usually call [Builder.nextCursor] with a well-typed [String] value instead. - * This method is primarily for setting the field to an undocumented or not yet supported - * value. - */ - fun nextCursor(nextCursor: JsonField) = apply { this.nextCursor = nextCursor } - - fun additionalProperties(additionalProperties: Map) = apply { - this.additionalProperties.clear() - putAllAdditionalProperties(additionalProperties) - } - - fun putAdditionalProperty(key: String, value: JsonValue) = apply { - additionalProperties.put(key, value) - } - - fun putAllAdditionalProperties(additionalProperties: Map) = apply { - this.additionalProperties.putAll(additionalProperties) - } - - fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) } - - fun removeAllAdditionalProperties(keys: Set) = apply { - keys.forEach(::removeAdditionalProperty) - } - - /** - * Returns an immutable instance of [RoutingNumberListPageResponse]. - * - * Further updates to this [Builder] will not mutate the returned instance. - * - * The following fields are required: - * ```java - * .data() - * .nextCursor() - * ``` - * - * @throws IllegalStateException if any required field is unset. - */ - fun build(): RoutingNumberListPageResponse = - RoutingNumberListPageResponse( - checkRequired("data", data).map { it.toImmutable() }, - checkRequired("nextCursor", nextCursor), - additionalProperties.toMutableMap(), - ) - } - - private var validated: Boolean = false - - fun validate(): RoutingNumberListPageResponse = apply { - if (validated) { - return@apply - } - - data().forEach { it.validate() } - nextCursor() - validated = true - } - - fun isValid(): Boolean = - try { - validate() - true - } catch (e: IncreaseInvalidDataException) { - false - } - - /** - * Returns a score indicating how many valid values are contained in this object recursively. - * - * Used for best match union deserialization. - */ - @JvmSynthetic - internal fun validity(): Int = - (data.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) + - (if (nextCursor.asKnown().isPresent) 1 else 0) - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is RoutingNumberListPageResponse && - data == other.data && - nextCursor == other.nextCursor && - additionalProperties == other.additionalProperties - } - - private val hashCode: Int by lazy { Objects.hash(data, nextCursor, additionalProperties) } - - override fun hashCode(): Int = hashCode - - override fun toString() = - "RoutingNumberListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/routingnumbers/RoutingNumberListResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/routingnumbers/RoutingNumberListResponse.kt index 11de04d8a..d112a93b2 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/routingnumbers/RoutingNumberListResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/routingnumbers/RoutingNumberListResponse.kt @@ -11,174 +11,61 @@ import com.increase.api.core.ExcludeMissing import com.increase.api.core.JsonField import com.increase.api.core.JsonMissing import com.increase.api.core.JsonValue +import com.increase.api.core.checkKnown import com.increase.api.core.checkRequired +import com.increase.api.core.toImmutable import com.increase.api.errors.IncreaseInvalidDataException import java.util.Collections import java.util.Objects +import java.util.Optional import kotlin.jvm.optionals.getOrNull -/** Routing numbers are used to identify your bank in a financial transaction. */ +/** A list of Routing Number objects. */ class RoutingNumberListResponse @JsonCreator(mode = JsonCreator.Mode.DISABLED) private constructor( - private val achTransfers: JsonField, - private val fednowTransfers: JsonField, - private val name: JsonField, - private val realTimePaymentsTransfers: JsonField, - private val routingNumber: JsonField, - private val type: JsonField, - private val wireTransfers: JsonField, + private val data: JsonField>, + private val nextCursor: JsonField, private val additionalProperties: MutableMap, ) { @JsonCreator private constructor( - @JsonProperty("ach_transfers") - @ExcludeMissing - achTransfers: JsonField = JsonMissing.of(), - @JsonProperty("fednow_transfers") - @ExcludeMissing - fednowTransfers: JsonField = JsonMissing.of(), - @JsonProperty("name") @ExcludeMissing name: JsonField = JsonMissing.of(), - @JsonProperty("real_time_payments_transfers") - @ExcludeMissing - realTimePaymentsTransfers: JsonField = JsonMissing.of(), - @JsonProperty("routing_number") - @ExcludeMissing - routingNumber: JsonField = JsonMissing.of(), - @JsonProperty("type") @ExcludeMissing type: JsonField = JsonMissing.of(), - @JsonProperty("wire_transfers") + @JsonProperty("data") @ExcludeMissing data: JsonField> = JsonMissing.of(), + @JsonProperty("next_cursor") @ExcludeMissing - wireTransfers: JsonField = JsonMissing.of(), - ) : this( - achTransfers, - fednowTransfers, - name, - realTimePaymentsTransfers, - routingNumber, - type, - wireTransfers, - mutableMapOf(), - ) - - /** - * This routing number's support for ACH Transfers. - * - * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is - * unexpectedly missing or null (e.g. if the server responded with an unexpected value). - */ - fun achTransfers(): AchTransfers = achTransfers.getRequired("ach_transfers") - - /** - * This routing number's support for FedNow Transfers. - * - * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is - * unexpectedly missing or null (e.g. if the server responded with an unexpected value). - */ - fun fednowTransfers(): FednowTransfers = fednowTransfers.getRequired("fednow_transfers") - - /** - * The name of the financial institution belonging to a routing number. - * - * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is - * unexpectedly missing or null (e.g. if the server responded with an unexpected value). - */ - fun name(): String = name.getRequired("name") - - /** - * This routing number's support for Real-Time Payments Transfers. - * - * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is - * unexpectedly missing or null (e.g. if the server responded with an unexpected value). - */ - fun realTimePaymentsTransfers(): RealTimePaymentsTransfers = - realTimePaymentsTransfers.getRequired("real_time_payments_transfers") - - /** - * The nine digit routing number identifier. - * - * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is - * unexpectedly missing or null (e.g. if the server responded with an unexpected value). - */ - fun routingNumber(): String = routingNumber.getRequired("routing_number") + nextCursor: JsonField = JsonMissing.of(), + ) : this(data, nextCursor, mutableMapOf()) /** - * A constant representing the object's type. For this resource it will always be - * `routing_number`. + * The contents of the list. * * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). */ - fun type(): Type = type.getRequired("type") - - /** - * This routing number's support for Wire Transfers. - * - * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is - * unexpectedly missing or null (e.g. if the server responded with an unexpected value). - */ - fun wireTransfers(): WireTransfers = wireTransfers.getRequired("wire_transfers") - - /** - * Returns the raw JSON value of [achTransfers]. - * - * Unlike [achTransfers], this method doesn't throw if the JSON field has an unexpected type. - */ - @JsonProperty("ach_transfers") - @ExcludeMissing - fun _achTransfers(): JsonField = achTransfers - - /** - * Returns the raw JSON value of [fednowTransfers]. - * - * Unlike [fednowTransfers], this method doesn't throw if the JSON field has an unexpected type. - */ - @JsonProperty("fednow_transfers") - @ExcludeMissing - fun _fednowTransfers(): JsonField = fednowTransfers - - /** - * Returns the raw JSON value of [name]. - * - * Unlike [name], this method doesn't throw if the JSON field has an unexpected type. - */ - @JsonProperty("name") @ExcludeMissing fun _name(): JsonField = name - - /** - * Returns the raw JSON value of [realTimePaymentsTransfers]. - * - * Unlike [realTimePaymentsTransfers], this method doesn't throw if the JSON field has an - * unexpected type. - */ - @JsonProperty("real_time_payments_transfers") - @ExcludeMissing - fun _realTimePaymentsTransfers(): JsonField = - realTimePaymentsTransfers + fun data(): List = data.getRequired("data") /** - * Returns the raw JSON value of [routingNumber]. + * A pointer to a place in the list. * - * Unlike [routingNumber], this method doesn't throw if the JSON field has an unexpected type. + * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). */ - @JsonProperty("routing_number") - @ExcludeMissing - fun _routingNumber(): JsonField = routingNumber + fun nextCursor(): Optional = nextCursor.getOptional("next_cursor") /** - * Returns the raw JSON value of [type]. + * Returns the raw JSON value of [data]. * - * Unlike [type], this method doesn't throw if the JSON field has an unexpected type. + * Unlike [data], this method doesn't throw if the JSON field has an unexpected type. */ - @JsonProperty("type") @ExcludeMissing fun _type(): JsonField = type + @JsonProperty("data") @ExcludeMissing fun _data(): JsonField> = data /** - * Returns the raw JSON value of [wireTransfers]. + * Returns the raw JSON value of [nextCursor]. * - * Unlike [wireTransfers], this method doesn't throw if the JSON field has an unexpected type. + * Unlike [nextCursor], this method doesn't throw if the JSON field has an unexpected type. */ - @JsonProperty("wire_transfers") - @ExcludeMissing - fun _wireTransfers(): JsonField = wireTransfers + @JsonProperty("next_cursor") @ExcludeMissing fun _nextCursor(): JsonField = nextCursor @JsonAnySetter private fun putAdditionalProperty(key: String, value: JsonValue) { @@ -199,13 +86,8 @@ private constructor( * * The following fields are required: * ```java - * .achTransfers() - * .fednowTransfers() - * .name() - * .realTimePaymentsTransfers() - * .routingNumber() - * .type() - * .wireTransfers() + * .data() + * .nextCursor() * ``` */ @JvmStatic fun builder() = Builder() @@ -214,123 +96,56 @@ private constructor( /** A builder for [RoutingNumberListResponse]. */ class Builder internal constructor() { - private var achTransfers: JsonField? = null - private var fednowTransfers: JsonField? = null - private var name: JsonField? = null - private var realTimePaymentsTransfers: JsonField? = null - private var routingNumber: JsonField? = null - private var type: JsonField? = null - private var wireTransfers: JsonField? = null + private var data: JsonField>? = null + private var nextCursor: JsonField? = null private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(routingNumberListResponse: RoutingNumberListResponse) = apply { - achTransfers = routingNumberListResponse.achTransfers - fednowTransfers = routingNumberListResponse.fednowTransfers - name = routingNumberListResponse.name - realTimePaymentsTransfers = routingNumberListResponse.realTimePaymentsTransfers - routingNumber = routingNumberListResponse.routingNumber - type = routingNumberListResponse.type - wireTransfers = routingNumberListResponse.wireTransfers + data = routingNumberListResponse.data.map { it.toMutableList() } + nextCursor = routingNumberListResponse.nextCursor additionalProperties = routingNumberListResponse.additionalProperties.toMutableMap() } - /** This routing number's support for ACH Transfers. */ - fun achTransfers(achTransfers: AchTransfers) = achTransfers(JsonField.of(achTransfers)) + /** The contents of the list. */ + fun data(data: List) = data(JsonField.of(data)) /** - * Sets [Builder.achTransfers] to an arbitrary JSON value. + * Sets [Builder.data] to an arbitrary JSON value. * - * You should usually call [Builder.achTransfers] with a well-typed [AchTransfers] value - * instead. This method is primarily for setting the field to an undocumented or not yet - * supported value. + * You should usually call [Builder.data] with a well-typed `List` value instead. This + * method is primarily for setting the field to an undocumented or not yet supported value. */ - fun achTransfers(achTransfers: JsonField) = apply { - this.achTransfers = achTransfers + fun data(data: JsonField>) = apply { + this.data = data.map { it.toMutableList() } } - /** This routing number's support for FedNow Transfers. */ - fun fednowTransfers(fednowTransfers: FednowTransfers) = - fednowTransfers(JsonField.of(fednowTransfers)) - /** - * Sets [Builder.fednowTransfers] to an arbitrary JSON value. + * Adds a single [Data] to [Builder.data]. * - * You should usually call [Builder.fednowTransfers] with a well-typed [FednowTransfers] - * value instead. This method is primarily for setting the field to an undocumented or not - * yet supported value. + * @throws IllegalStateException if the field was previously set to a non-list. */ - fun fednowTransfers(fednowTransfers: JsonField) = apply { - this.fednowTransfers = fednowTransfers + fun addData(data: Data) = apply { + this.data = + (this.data ?: JsonField.of(mutableListOf())).also { + checkKnown("data", it).add(data) + } } - /** The name of the financial institution belonging to a routing number. */ - fun name(name: String) = name(JsonField.of(name)) + /** A pointer to a place in the list. */ + fun nextCursor(nextCursor: String?) = nextCursor(JsonField.ofNullable(nextCursor)) - /** - * Sets [Builder.name] to an arbitrary JSON value. - * - * You should usually call [Builder.name] with a well-typed [String] value instead. This - * method is primarily for setting the field to an undocumented or not yet supported value. - */ - fun name(name: JsonField) = apply { this.name = name } - - /** This routing number's support for Real-Time Payments Transfers. */ - fun realTimePaymentsTransfers(realTimePaymentsTransfers: RealTimePaymentsTransfers) = - realTimePaymentsTransfers(JsonField.of(realTimePaymentsTransfers)) + /** Alias for calling [Builder.nextCursor] with `nextCursor.orElse(null)`. */ + fun nextCursor(nextCursor: Optional) = nextCursor(nextCursor.getOrNull()) /** - * Sets [Builder.realTimePaymentsTransfers] to an arbitrary JSON value. + * Sets [Builder.nextCursor] to an arbitrary JSON value. * - * You should usually call [Builder.realTimePaymentsTransfers] with a well-typed - * [RealTimePaymentsTransfers] value instead. This method is primarily for setting the field - * to an undocumented or not yet supported value. - */ - fun realTimePaymentsTransfers( - realTimePaymentsTransfers: JsonField - ) = apply { this.realTimePaymentsTransfers = realTimePaymentsTransfers } - - /** The nine digit routing number identifier. */ - fun routingNumber(routingNumber: String) = routingNumber(JsonField.of(routingNumber)) - - /** - * Sets [Builder.routingNumber] to an arbitrary JSON value. - * - * You should usually call [Builder.routingNumber] with a well-typed [String] value instead. + * You should usually call [Builder.nextCursor] with a well-typed [String] value instead. * This method is primarily for setting the field to an undocumented or not yet supported * value. */ - fun routingNumber(routingNumber: JsonField) = apply { - this.routingNumber = routingNumber - } - - /** - * A constant representing the object's type. For this resource it will always be - * `routing_number`. - */ - fun type(type: Type) = type(JsonField.of(type)) - - /** - * Sets [Builder.type] to an arbitrary JSON value. - * - * You should usually call [Builder.type] with a well-typed [Type] value instead. This - * method is primarily for setting the field to an undocumented or not yet supported value. - */ - fun type(type: JsonField) = apply { this.type = type } - - /** This routing number's support for Wire Transfers. */ - fun wireTransfers(wireTransfers: WireTransfers) = wireTransfers(JsonField.of(wireTransfers)) - - /** - * Sets [Builder.wireTransfers] to an arbitrary JSON value. - * - * You should usually call [Builder.wireTransfers] with a well-typed [WireTransfers] value - * instead. This method is primarily for setting the field to an undocumented or not yet - * supported value. - */ - fun wireTransfers(wireTransfers: JsonField) = apply { - this.wireTransfers = wireTransfers - } + fun nextCursor(nextCursor: JsonField) = apply { this.nextCursor = nextCursor } fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() @@ -358,26 +173,16 @@ private constructor( * * The following fields are required: * ```java - * .achTransfers() - * .fednowTransfers() - * .name() - * .realTimePaymentsTransfers() - * .routingNumber() - * .type() - * .wireTransfers() + * .data() + * .nextCursor() * ``` * * @throws IllegalStateException if any required field is unset. */ fun build(): RoutingNumberListResponse = RoutingNumberListResponse( - checkRequired("achTransfers", achTransfers), - checkRequired("fednowTransfers", fednowTransfers), - checkRequired("name", name), - checkRequired("realTimePaymentsTransfers", realTimePaymentsTransfers), - checkRequired("routingNumber", routingNumber), - checkRequired("type", type), - checkRequired("wireTransfers", wireTransfers), + checkRequired("data", data).map { it.toImmutable() }, + checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), ) } @@ -389,13 +194,8 @@ private constructor( return@apply } - achTransfers().validate() - fednowTransfers().validate() - name() - realTimePaymentsTransfers().validate() - routingNumber() - type().validate() - wireTransfers().validate() + data().forEach { it.validate() } + nextCursor() validated = true } @@ -414,257 +214,395 @@ private constructor( */ @JvmSynthetic internal fun validity(): Int = - (achTransfers.asKnown().getOrNull()?.validity() ?: 0) + - (fednowTransfers.asKnown().getOrNull()?.validity() ?: 0) + - (if (name.asKnown().isPresent) 1 else 0) + - (realTimePaymentsTransfers.asKnown().getOrNull()?.validity() ?: 0) + - (if (routingNumber.asKnown().isPresent) 1 else 0) + - (type.asKnown().getOrNull()?.validity() ?: 0) + - (wireTransfers.asKnown().getOrNull()?.validity() ?: 0) - - /** This routing number's support for ACH Transfers. */ - class AchTransfers @JsonCreator private constructor(private val value: JsonField) : - Enum { + (data.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) + + (if (nextCursor.asKnown().isPresent) 1 else 0) + + /** Routing numbers are used to identify your bank in a financial transaction. */ + class Data + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val achTransfers: JsonField, + private val fednowTransfers: JsonField, + private val name: JsonField, + private val realTimePaymentsTransfers: JsonField, + private val routingNumber: JsonField, + private val type: JsonField, + private val wireTransfers: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("ach_transfers") + @ExcludeMissing + achTransfers: JsonField = JsonMissing.of(), + @JsonProperty("fednow_transfers") + @ExcludeMissing + fednowTransfers: JsonField = JsonMissing.of(), + @JsonProperty("name") @ExcludeMissing name: JsonField = JsonMissing.of(), + @JsonProperty("real_time_payments_transfers") + @ExcludeMissing + realTimePaymentsTransfers: JsonField = JsonMissing.of(), + @JsonProperty("routing_number") + @ExcludeMissing + routingNumber: JsonField = JsonMissing.of(), + @JsonProperty("type") @ExcludeMissing type: JsonField = JsonMissing.of(), + @JsonProperty("wire_transfers") + @ExcludeMissing + wireTransfers: JsonField = JsonMissing.of(), + ) : this( + achTransfers, + fednowTransfers, + name, + realTimePaymentsTransfers, + routingNumber, + type, + wireTransfers, + mutableMapOf(), + ) /** - * Returns this class instance's raw value. + * This routing number's support for ACH Transfers. * - * This is usually only useful if this instance was deserialized from data that doesn't - * match any known member, and you want to know that value. For example, if the SDK is on an - * older version than the API, then the API may respond with new members that the SDK is - * unaware of. + * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected value). */ - @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + fun achTransfers(): AchTransfers = achTransfers.getRequired("ach_transfers") - companion object { + /** + * This routing number's support for FedNow Transfers. + * + * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + */ + fun fednowTransfers(): FednowTransfers = fednowTransfers.getRequired("fednow_transfers") - /** The routing number can receive this transfer type. */ - @JvmField val SUPPORTED = of("supported") + /** + * The name of the financial institution belonging to a routing number. + * + * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + */ + fun name(): String = name.getRequired("name") - /** The routing number cannot receive this transfer type. */ - @JvmField val NOT_SUPPORTED = of("not_supported") + /** + * This routing number's support for Real-Time Payments Transfers. + * + * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + */ + fun realTimePaymentsTransfers(): RealTimePaymentsTransfers = + realTimePaymentsTransfers.getRequired("real_time_payments_transfers") - @JvmStatic fun of(value: String) = AchTransfers(JsonField.of(value)) - } + /** + * The nine digit routing number identifier. + * + * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + */ + fun routingNumber(): String = routingNumber.getRequired("routing_number") - /** An enum containing [AchTransfers]'s known values. */ - enum class Known { - /** The routing number can receive this transfer type. */ - SUPPORTED, - /** The routing number cannot receive this transfer type. */ - NOT_SUPPORTED, - } + /** + * A constant representing the object's type. For this resource it will always be + * `routing_number`. + * + * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + */ + fun type(): Type = type.getRequired("type") /** - * An enum containing [AchTransfers]'s known values, as well as an [_UNKNOWN] member. + * This routing number's support for Wire Transfers. * - * An instance of [AchTransfers] can contain an unknown value in a couple of cases: - * - It was deserialized from data that doesn't match any known member. For example, if the - * SDK is on an older version than the API, then the API may respond with new members that - * the SDK is unaware of. - * - It was constructed with an arbitrary value using the [of] method. + * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected value). */ - enum class Value { - /** The routing number can receive this transfer type. */ - SUPPORTED, - /** The routing number cannot receive this transfer type. */ - NOT_SUPPORTED, - /** - * An enum member indicating that [AchTransfers] was instantiated with an unknown value. - */ - _UNKNOWN, - } + fun wireTransfers(): WireTransfers = wireTransfers.getRequired("wire_transfers") /** - * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN] - * if the class was instantiated with an unknown value. + * Returns the raw JSON value of [achTransfers]. * - * Use the [known] method instead if you're certain the value is always known or if you want - * to throw for the unknown case. + * Unlike [achTransfers], this method doesn't throw if the JSON field has an unexpected + * type. */ - fun value(): Value = - when (this) { - SUPPORTED -> Value.SUPPORTED - NOT_SUPPORTED -> Value.NOT_SUPPORTED - else -> Value._UNKNOWN - } + @JsonProperty("ach_transfers") + @ExcludeMissing + fun _achTransfers(): JsonField = achTransfers /** - * Returns an enum member corresponding to this class instance's value. + * Returns the raw JSON value of [fednowTransfers]. * - * Use the [value] method instead if you're uncertain the value is always known and don't - * want to throw for the unknown case. + * Unlike [fednowTransfers], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("fednow_transfers") + @ExcludeMissing + fun _fednowTransfers(): JsonField = fednowTransfers + + /** + * Returns the raw JSON value of [name]. * - * @throws IncreaseInvalidDataException if this class instance's value is a not a known - * member. + * Unlike [name], this method doesn't throw if the JSON field has an unexpected type. */ - fun known(): Known = - when (this) { - SUPPORTED -> Known.SUPPORTED - NOT_SUPPORTED -> Known.NOT_SUPPORTED - else -> throw IncreaseInvalidDataException("Unknown AchTransfers: $value") - } + @JsonProperty("name") @ExcludeMissing fun _name(): JsonField = name /** - * Returns this class instance's primitive wire representation. + * Returns the raw JSON value of [realTimePaymentsTransfers]. * - * This differs from the [toString] method because that method is primarily for debugging - * and generally doesn't throw. + * Unlike [realTimePaymentsTransfers], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("real_time_payments_transfers") + @ExcludeMissing + fun _realTimePaymentsTransfers(): JsonField = + realTimePaymentsTransfers + + /** + * Returns the raw JSON value of [routingNumber]. * - * @throws IncreaseInvalidDataException if this class instance's value does not have the - * expected primitive type. + * Unlike [routingNumber], this method doesn't throw if the JSON field has an unexpected + * type. */ - fun asString(): String = - _value().asString().orElseThrow { - IncreaseInvalidDataException("Value is not a String") - } + @JsonProperty("routing_number") + @ExcludeMissing + fun _routingNumber(): JsonField = routingNumber - private var validated: Boolean = false + /** + * Returns the raw JSON value of [type]. + * + * Unlike [type], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("type") @ExcludeMissing fun _type(): JsonField = type - fun validate(): AchTransfers = apply { - if (validated) { - return@apply - } + /** + * Returns the raw JSON value of [wireTransfers]. + * + * Unlike [wireTransfers], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("wire_transfers") + @ExcludeMissing + fun _wireTransfers(): JsonField = wireTransfers - known() - validated = true + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) } - fun isValid(): Boolean = - try { - validate() - true - } catch (e: IncreaseInvalidDataException) { - false - } + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) - /** - * Returns a score indicating how many valid values are contained in this object - * recursively. - * - * Used for best match union deserialization. - */ - @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + fun toBuilder() = Builder().from(this) - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } + companion object { - return other is AchTransfers && value == other.value + /** + * Returns a mutable builder for constructing an instance of [Data]. + * + * The following fields are required: + * ```java + * .achTransfers() + * .fednowTransfers() + * .name() + * .realTimePaymentsTransfers() + * .routingNumber() + * .type() + * .wireTransfers() + * ``` + */ + @JvmStatic fun builder() = Builder() } - override fun hashCode() = value.hashCode() + /** A builder for [Data]. */ + class Builder internal constructor() { + + private var achTransfers: JsonField? = null + private var fednowTransfers: JsonField? = null + private var name: JsonField? = null + private var realTimePaymentsTransfers: JsonField? = null + private var routingNumber: JsonField? = null + private var type: JsonField? = null + private var wireTransfers: JsonField? = null + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(data: Data) = apply { + achTransfers = data.achTransfers + fednowTransfers = data.fednowTransfers + name = data.name + realTimePaymentsTransfers = data.realTimePaymentsTransfers + routingNumber = data.routingNumber + type = data.type + wireTransfers = data.wireTransfers + additionalProperties = data.additionalProperties.toMutableMap() + } - override fun toString() = value.toString() - } + /** This routing number's support for ACH Transfers. */ + fun achTransfers(achTransfers: AchTransfers) = achTransfers(JsonField.of(achTransfers)) - /** This routing number's support for FedNow Transfers. */ - class FednowTransfers @JsonCreator private constructor(private val value: JsonField) : - Enum { + /** + * Sets [Builder.achTransfers] to an arbitrary JSON value. + * + * You should usually call [Builder.achTransfers] with a well-typed [AchTransfers] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun achTransfers(achTransfers: JsonField) = apply { + this.achTransfers = achTransfers + } - /** - * Returns this class instance's raw value. - * - * This is usually only useful if this instance was deserialized from data that doesn't - * match any known member, and you want to know that value. For example, if the SDK is on an - * older version than the API, then the API may respond with new members that the SDK is - * unaware of. - */ - @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + /** This routing number's support for FedNow Transfers. */ + fun fednowTransfers(fednowTransfers: FednowTransfers) = + fednowTransfers(JsonField.of(fednowTransfers)) - companion object { + /** + * Sets [Builder.fednowTransfers] to an arbitrary JSON value. + * + * You should usually call [Builder.fednowTransfers] with a well-typed [FednowTransfers] + * value instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun fednowTransfers(fednowTransfers: JsonField) = apply { + this.fednowTransfers = fednowTransfers + } - /** The routing number can receive this transfer type. */ - @JvmField val SUPPORTED = of("supported") + /** The name of the financial institution belonging to a routing number. */ + fun name(name: String) = name(JsonField.of(name)) - /** The routing number cannot receive this transfer type. */ - @JvmField val NOT_SUPPORTED = of("not_supported") + /** + * Sets [Builder.name] to an arbitrary JSON value. + * + * You should usually call [Builder.name] with a well-typed [String] value instead. This + * method is primarily for setting the field to an undocumented or not yet supported + * value. + */ + fun name(name: JsonField) = apply { this.name = name } - @JvmStatic fun of(value: String) = FednowTransfers(JsonField.of(value)) - } + /** This routing number's support for Real-Time Payments Transfers. */ + fun realTimePaymentsTransfers(realTimePaymentsTransfers: RealTimePaymentsTransfers) = + realTimePaymentsTransfers(JsonField.of(realTimePaymentsTransfers)) - /** An enum containing [FednowTransfers]'s known values. */ - enum class Known { - /** The routing number can receive this transfer type. */ - SUPPORTED, - /** The routing number cannot receive this transfer type. */ - NOT_SUPPORTED, - } + /** + * Sets [Builder.realTimePaymentsTransfers] to an arbitrary JSON value. + * + * You should usually call [Builder.realTimePaymentsTransfers] with a well-typed + * [RealTimePaymentsTransfers] value instead. This method is primarily for setting the + * field to an undocumented or not yet supported value. + */ + fun realTimePaymentsTransfers( + realTimePaymentsTransfers: JsonField + ) = apply { this.realTimePaymentsTransfers = realTimePaymentsTransfers } + + /** The nine digit routing number identifier. */ + fun routingNumber(routingNumber: String) = routingNumber(JsonField.of(routingNumber)) - /** - * An enum containing [FednowTransfers]'s known values, as well as an [_UNKNOWN] member. - * - * An instance of [FednowTransfers] can contain an unknown value in a couple of cases: - * - It was deserialized from data that doesn't match any known member. For example, if the - * SDK is on an older version than the API, then the API may respond with new members that - * the SDK is unaware of. - * - It was constructed with an arbitrary value using the [of] method. - */ - enum class Value { - /** The routing number can receive this transfer type. */ - SUPPORTED, - /** The routing number cannot receive this transfer type. */ - NOT_SUPPORTED, /** - * An enum member indicating that [FednowTransfers] was instantiated with an unknown + * Sets [Builder.routingNumber] to an arbitrary JSON value. + * + * You should usually call [Builder.routingNumber] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun routingNumber(routingNumber: JsonField) = apply { + this.routingNumber = routingNumber + } + + /** + * A constant representing the object's type. For this resource it will always be + * `routing_number`. + */ + fun type(type: Type) = type(JsonField.of(type)) + + /** + * Sets [Builder.type] to an arbitrary JSON value. + * + * You should usually call [Builder.type] with a well-typed [Type] value instead. This + * method is primarily for setting the field to an undocumented or not yet supported * value. */ - _UNKNOWN, - } + fun type(type: JsonField) = apply { this.type = type } - /** - * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN] - * if the class was instantiated with an unknown value. - * - * Use the [known] method instead if you're certain the value is always known or if you want - * to throw for the unknown case. - */ - fun value(): Value = - when (this) { - SUPPORTED -> Value.SUPPORTED - NOT_SUPPORTED -> Value.NOT_SUPPORTED - else -> Value._UNKNOWN + /** This routing number's support for Wire Transfers. */ + fun wireTransfers(wireTransfers: WireTransfers) = + wireTransfers(JsonField.of(wireTransfers)) + + /** + * Sets [Builder.wireTransfers] to an arbitrary JSON value. + * + * You should usually call [Builder.wireTransfers] with a well-typed [WireTransfers] + * value instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun wireTransfers(wireTransfers: JsonField) = apply { + this.wireTransfers = wireTransfers } - /** - * Returns an enum member corresponding to this class instance's value. - * - * Use the [value] method instead if you're uncertain the value is always known and don't - * want to throw for the unknown case. - * - * @throws IncreaseInvalidDataException if this class instance's value is a not a known - * member. - */ - fun known(): Known = - when (this) { - SUPPORTED -> Known.SUPPORTED - NOT_SUPPORTED -> Known.NOT_SUPPORTED - else -> throw IncreaseInvalidDataException("Unknown FednowTransfers: $value") + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) } - /** - * Returns this class instance's primitive wire representation. - * - * This differs from the [toString] method because that method is primarily for debugging - * and generally doesn't throw. - * - * @throws IncreaseInvalidDataException if this class instance's value does not have the - * expected primitive type. - */ - fun asString(): String = - _value().asString().orElseThrow { - IncreaseInvalidDataException("Value is not a String") + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) } + fun putAllAdditionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [Data]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```java + * .achTransfers() + * .fednowTransfers() + * .name() + * .realTimePaymentsTransfers() + * .routingNumber() + * .type() + * .wireTransfers() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ + fun build(): Data = + Data( + checkRequired("achTransfers", achTransfers), + checkRequired("fednowTransfers", fednowTransfers), + checkRequired("name", name), + checkRequired("realTimePaymentsTransfers", realTimePaymentsTransfers), + checkRequired("routingNumber", routingNumber), + checkRequired("type", type), + checkRequired("wireTransfers", wireTransfers), + additionalProperties.toMutableMap(), + ) + } + private var validated: Boolean = false - fun validate(): FednowTransfers = apply { + fun validate(): Data = apply { if (validated) { return@apply } - known() + achTransfers().validate() + fednowTransfers().validate() + name() + realTimePaymentsTransfers().validate() + routingNumber() + type().validate() + wireTransfers().validate() validated = true } @@ -682,424 +620,733 @@ private constructor( * * Used for best match union deserialization. */ - @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + @JvmSynthetic + internal fun validity(): Int = + (achTransfers.asKnown().getOrNull()?.validity() ?: 0) + + (fednowTransfers.asKnown().getOrNull()?.validity() ?: 0) + + (if (name.asKnown().isPresent) 1 else 0) + + (realTimePaymentsTransfers.asKnown().getOrNull()?.validity() ?: 0) + + (if (routingNumber.asKnown().isPresent) 1 else 0) + + (type.asKnown().getOrNull()?.validity() ?: 0) + + (wireTransfers.asKnown().getOrNull()?.validity() ?: 0) - override fun equals(other: Any?): Boolean { - if (this === other) { - return true + /** This routing number's support for ACH Transfers. */ + class AchTransfers @JsonCreator private constructor(private val value: JsonField) : + Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is + * on an older version than the API, then the API may respond with new members that the + * SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + /** The routing number can receive this transfer type. */ + @JvmField val SUPPORTED = of("supported") + + /** The routing number cannot receive this transfer type. */ + @JvmField val NOT_SUPPORTED = of("not_supported") + + @JvmStatic fun of(value: String) = AchTransfers(JsonField.of(value)) } - return other is FednowTransfers && value == other.value - } + /** An enum containing [AchTransfers]'s known values. */ + enum class Known { + /** The routing number can receive this transfer type. */ + SUPPORTED, + /** The routing number cannot receive this transfer type. */ + NOT_SUPPORTED, + } - override fun hashCode() = value.hashCode() + /** + * An enum containing [AchTransfers]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [AchTransfers] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + /** The routing number can receive this transfer type. */ + SUPPORTED, + /** The routing number cannot receive this transfer type. */ + NOT_SUPPORTED, + /** + * An enum member indicating that [AchTransfers] was instantiated with an unknown + * value. + */ + _UNKNOWN, + } - override fun toString() = value.toString() - } + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you + * want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + SUPPORTED -> Value.SUPPORTED + NOT_SUPPORTED -> Value.NOT_SUPPORTED + else -> Value._UNKNOWN + } - /** This routing number's support for Real-Time Payments Transfers. */ - class RealTimePaymentsTransfers - @JsonCreator - private constructor(private val value: JsonField) : Enum { + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and + * don't want to throw for the unknown case. + * + * @throws IncreaseInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + SUPPORTED -> Known.SUPPORTED + NOT_SUPPORTED -> Known.NOT_SUPPORTED + else -> throw IncreaseInvalidDataException("Unknown AchTransfers: $value") + } - /** - * Returns this class instance's raw value. - * - * This is usually only useful if this instance was deserialized from data that doesn't - * match any known member, and you want to know that value. For example, if the SDK is on an - * older version than the API, then the API may respond with new members that the SDK is - * unaware of. - */ - @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws IncreaseInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + IncreaseInvalidDataException("Value is not a String") + } - companion object { + private var validated: Boolean = false + + fun validate(): AchTransfers = apply { + if (validated) { + return@apply + } - /** The routing number can receive this transfer type. */ - @JvmField val SUPPORTED = of("supported") + known() + validated = true + } - /** The routing number cannot receive this transfer type. */ - @JvmField val NOT_SUPPORTED = of("not_supported") + fun isValid(): Boolean = + try { + validate() + true + } catch (e: IncreaseInvalidDataException) { + false + } - @JvmStatic fun of(value: String) = RealTimePaymentsTransfers(JsonField.of(value)) - } + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 - /** An enum containing [RealTimePaymentsTransfers]'s known values. */ - enum class Known { - /** The routing number can receive this transfer type. */ - SUPPORTED, - /** The routing number cannot receive this transfer type. */ - NOT_SUPPORTED, + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is AchTransfers && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() } - /** - * An enum containing [RealTimePaymentsTransfers]'s known values, as well as an [_UNKNOWN] - * member. - * - * An instance of [RealTimePaymentsTransfers] can contain an unknown value in a couple of - * cases: - * - It was deserialized from data that doesn't match any known member. For example, if the - * SDK is on an older version than the API, then the API may respond with new members that - * the SDK is unaware of. - * - It was constructed with an arbitrary value using the [of] method. - */ - enum class Value { - /** The routing number can receive this transfer type. */ - SUPPORTED, - /** The routing number cannot receive this transfer type. */ - NOT_SUPPORTED, + /** This routing number's support for FedNow Transfers. */ + class FednowTransfers + @JsonCreator + private constructor(private val value: JsonField) : Enum { + /** - * An enum member indicating that [RealTimePaymentsTransfers] was instantiated with an - * unknown value. + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is + * on an older version than the API, then the API may respond with new members that the + * SDK is unaware of. */ - _UNKNOWN, - } + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value - /** - * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN] - * if the class was instantiated with an unknown value. - * - * Use the [known] method instead if you're certain the value is always known or if you want - * to throw for the unknown case. - */ - fun value(): Value = - when (this) { - SUPPORTED -> Value.SUPPORTED - NOT_SUPPORTED -> Value.NOT_SUPPORTED - else -> Value._UNKNOWN + companion object { + + /** The routing number can receive this transfer type. */ + @JvmField val SUPPORTED = of("supported") + + /** The routing number cannot receive this transfer type. */ + @JvmField val NOT_SUPPORTED = of("not_supported") + + @JvmStatic fun of(value: String) = FednowTransfers(JsonField.of(value)) } - /** - * Returns an enum member corresponding to this class instance's value. - * - * Use the [value] method instead if you're uncertain the value is always known and don't - * want to throw for the unknown case. - * - * @throws IncreaseInvalidDataException if this class instance's value is a not a known - * member. - */ - fun known(): Known = - when (this) { - SUPPORTED -> Known.SUPPORTED - NOT_SUPPORTED -> Known.NOT_SUPPORTED - else -> - throw IncreaseInvalidDataException("Unknown RealTimePaymentsTransfers: $value") + /** An enum containing [FednowTransfers]'s known values. */ + enum class Known { + /** The routing number can receive this transfer type. */ + SUPPORTED, + /** The routing number cannot receive this transfer type. */ + NOT_SUPPORTED, } - /** - * Returns this class instance's primitive wire representation. - * - * This differs from the [toString] method because that method is primarily for debugging - * and generally doesn't throw. - * - * @throws IncreaseInvalidDataException if this class instance's value does not have the - * expected primitive type. - */ - fun asString(): String = - _value().asString().orElseThrow { - IncreaseInvalidDataException("Value is not a String") + /** + * An enum containing [FednowTransfers]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [FednowTransfers] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + /** The routing number can receive this transfer type. */ + SUPPORTED, + /** The routing number cannot receive this transfer type. */ + NOT_SUPPORTED, + /** + * An enum member indicating that [FednowTransfers] was instantiated with an unknown + * value. + */ + _UNKNOWN, } - private var validated: Boolean = false + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you + * want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + SUPPORTED -> Value.SUPPORTED + NOT_SUPPORTED -> Value.NOT_SUPPORTED + else -> Value._UNKNOWN + } - fun validate(): RealTimePaymentsTransfers = apply { - if (validated) { - return@apply - } + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and + * don't want to throw for the unknown case. + * + * @throws IncreaseInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + SUPPORTED -> Known.SUPPORTED + NOT_SUPPORTED -> Known.NOT_SUPPORTED + else -> throw IncreaseInvalidDataException("Unknown FednowTransfers: $value") + } - known() - validated = true - } + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws IncreaseInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + IncreaseInvalidDataException("Value is not a String") + } - fun isValid(): Boolean = - try { - validate() - true - } catch (e: IncreaseInvalidDataException) { - false - } + private var validated: Boolean = false - /** - * Returns a score indicating how many valid values are contained in this object - * recursively. - * - * Used for best match union deserialization. - */ - @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + fun validate(): FednowTransfers = apply { + if (validated) { + return@apply + } - override fun equals(other: Any?): Boolean { - if (this === other) { - return true + known() + validated = true } - return other is RealTimePaymentsTransfers && value == other.value - } + fun isValid(): Boolean = + try { + validate() + true + } catch (e: IncreaseInvalidDataException) { + false + } - override fun hashCode() = value.hashCode() + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 - override fun toString() = value.toString() - } + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } - /** - * A constant representing the object's type. For this resource it will always be - * `routing_number`. - */ - class Type @JsonCreator private constructor(private val value: JsonField) : Enum { + return other is FednowTransfers && value == other.value + } - /** - * Returns this class instance's raw value. - * - * This is usually only useful if this instance was deserialized from data that doesn't - * match any known member, and you want to know that value. For example, if the SDK is on an - * older version than the API, then the API may respond with new members that the SDK is - * unaware of. - */ - @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + override fun hashCode() = value.hashCode() - companion object { + override fun toString() = value.toString() + } - @JvmField val ROUTING_NUMBER = of("routing_number") + /** This routing number's support for Real-Time Payments Transfers. */ + class RealTimePaymentsTransfers + @JsonCreator + private constructor(private val value: JsonField) : Enum { - @JvmStatic fun of(value: String) = Type(JsonField.of(value)) - } + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is + * on an older version than the API, then the API may respond with new members that the + * SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value - /** An enum containing [Type]'s known values. */ - enum class Known { - ROUTING_NUMBER - } + companion object { - /** - * An enum containing [Type]'s known values, as well as an [_UNKNOWN] member. - * - * An instance of [Type] can contain an unknown value in a couple of cases: - * - It was deserialized from data that doesn't match any known member. For example, if the - * SDK is on an older version than the API, then the API may respond with new members that - * the SDK is unaware of. - * - It was constructed with an arbitrary value using the [of] method. - */ - enum class Value { - ROUTING_NUMBER, - /** An enum member indicating that [Type] was instantiated with an unknown value. */ - _UNKNOWN, - } + /** The routing number can receive this transfer type. */ + @JvmField val SUPPORTED = of("supported") - /** - * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN] - * if the class was instantiated with an unknown value. - * - * Use the [known] method instead if you're certain the value is always known or if you want - * to throw for the unknown case. - */ - fun value(): Value = - when (this) { - ROUTING_NUMBER -> Value.ROUTING_NUMBER - else -> Value._UNKNOWN + /** The routing number cannot receive this transfer type. */ + @JvmField val NOT_SUPPORTED = of("not_supported") + + @JvmStatic fun of(value: String) = RealTimePaymentsTransfers(JsonField.of(value)) } - /** - * Returns an enum member corresponding to this class instance's value. - * - * Use the [value] method instead if you're uncertain the value is always known and don't - * want to throw for the unknown case. - * - * @throws IncreaseInvalidDataException if this class instance's value is a not a known - * member. - */ - fun known(): Known = - when (this) { - ROUTING_NUMBER -> Known.ROUTING_NUMBER - else -> throw IncreaseInvalidDataException("Unknown Type: $value") + /** An enum containing [RealTimePaymentsTransfers]'s known values. */ + enum class Known { + /** The routing number can receive this transfer type. */ + SUPPORTED, + /** The routing number cannot receive this transfer type. */ + NOT_SUPPORTED, } - /** - * Returns this class instance's primitive wire representation. - * - * This differs from the [toString] method because that method is primarily for debugging - * and generally doesn't throw. - * - * @throws IncreaseInvalidDataException if this class instance's value does not have the - * expected primitive type. - */ - fun asString(): String = - _value().asString().orElseThrow { - IncreaseInvalidDataException("Value is not a String") + /** + * An enum containing [RealTimePaymentsTransfers]'s known values, as well as an + * [_UNKNOWN] member. + * + * An instance of [RealTimePaymentsTransfers] can contain an unknown value in a couple + * of cases: + * - It was deserialized from data that doesn't match any known member. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + /** The routing number can receive this transfer type. */ + SUPPORTED, + /** The routing number cannot receive this transfer type. */ + NOT_SUPPORTED, + /** + * An enum member indicating that [RealTimePaymentsTransfers] was instantiated with + * an unknown value. + */ + _UNKNOWN, } - private var validated: Boolean = false + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you + * want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + SUPPORTED -> Value.SUPPORTED + NOT_SUPPORTED -> Value.NOT_SUPPORTED + else -> Value._UNKNOWN + } - fun validate(): Type = apply { - if (validated) { - return@apply + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and + * don't want to throw for the unknown case. + * + * @throws IncreaseInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + SUPPORTED -> Known.SUPPORTED + NOT_SUPPORTED -> Known.NOT_SUPPORTED + else -> + throw IncreaseInvalidDataException( + "Unknown RealTimePaymentsTransfers: $value" + ) + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws IncreaseInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + IncreaseInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + fun validate(): RealTimePaymentsTransfers = apply { + if (validated) { + return@apply + } + + known() + validated = true } - known() - validated = true - } + fun isValid(): Boolean = + try { + validate() + true + } catch (e: IncreaseInvalidDataException) { + false + } - fun isValid(): Boolean = - try { - validate() - true - } catch (e: IncreaseInvalidDataException) { - false + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is RealTimePaymentsTransfers && value == other.value } + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + /** - * Returns a score indicating how many valid values are contained in this object - * recursively. - * - * Used for best match union deserialization. + * A constant representing the object's type. For this resource it will always be + * `routing_number`. */ - @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + class Type @JsonCreator private constructor(private val value: JsonField) : Enum { - override fun equals(other: Any?): Boolean { - if (this === other) { - return true + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is + * on an older version than the API, then the API may respond with new members that the + * SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val ROUTING_NUMBER = of("routing_number") + + @JvmStatic fun of(value: String) = Type(JsonField.of(value)) } - return other is Type && value == other.value - } + /** An enum containing [Type]'s known values. */ + enum class Known { + ROUTING_NUMBER + } - override fun hashCode() = value.hashCode() + /** + * An enum containing [Type]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [Type] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + ROUTING_NUMBER, + /** An enum member indicating that [Type] was instantiated with an unknown value. */ + _UNKNOWN, + } - override fun toString() = value.toString() - } + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you + * want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + ROUTING_NUMBER -> Value.ROUTING_NUMBER + else -> Value._UNKNOWN + } - /** This routing number's support for Wire Transfers. */ - class WireTransfers @JsonCreator private constructor(private val value: JsonField) : - Enum { + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and + * don't want to throw for the unknown case. + * + * @throws IncreaseInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + ROUTING_NUMBER -> Known.ROUTING_NUMBER + else -> throw IncreaseInvalidDataException("Unknown Type: $value") + } - /** - * Returns this class instance's raw value. - * - * This is usually only useful if this instance was deserialized from data that doesn't - * match any known member, and you want to know that value. For example, if the SDK is on an - * older version than the API, then the API may respond with new members that the SDK is - * unaware of. - */ - @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws IncreaseInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + IncreaseInvalidDataException("Value is not a String") + } - companion object { + private var validated: Boolean = false - /** The routing number can receive this transfer type. */ - @JvmField val SUPPORTED = of("supported") + fun validate(): Type = apply { + if (validated) { + return@apply + } - /** The routing number cannot receive this transfer type. */ - @JvmField val NOT_SUPPORTED = of("not_supported") + known() + validated = true + } - @JvmStatic fun of(value: String) = WireTransfers(JsonField.of(value)) - } + fun isValid(): Boolean = + try { + validate() + true + } catch (e: IncreaseInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Type && value == other.value + } - /** An enum containing [WireTransfers]'s known values. */ - enum class Known { - /** The routing number can receive this transfer type. */ - SUPPORTED, - /** The routing number cannot receive this transfer type. */ - NOT_SUPPORTED, + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() } - /** - * An enum containing [WireTransfers]'s known values, as well as an [_UNKNOWN] member. - * - * An instance of [WireTransfers] can contain an unknown value in a couple of cases: - * - It was deserialized from data that doesn't match any known member. For example, if the - * SDK is on an older version than the API, then the API may respond with new members that - * the SDK is unaware of. - * - It was constructed with an arbitrary value using the [of] method. - */ - enum class Value { - /** The routing number can receive this transfer type. */ - SUPPORTED, - /** The routing number cannot receive this transfer type. */ - NOT_SUPPORTED, + /** This routing number's support for Wire Transfers. */ + class WireTransfers @JsonCreator private constructor(private val value: JsonField) : + Enum { + /** - * An enum member indicating that [WireTransfers] was instantiated with an unknown - * value. + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is + * on an older version than the API, then the API may respond with new members that the + * SDK is unaware of. */ - _UNKNOWN, - } + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value - /** - * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN] - * if the class was instantiated with an unknown value. - * - * Use the [known] method instead if you're certain the value is always known or if you want - * to throw for the unknown case. - */ - fun value(): Value = - when (this) { - SUPPORTED -> Value.SUPPORTED - NOT_SUPPORTED -> Value.NOT_SUPPORTED - else -> Value._UNKNOWN + companion object { + + /** The routing number can receive this transfer type. */ + @JvmField val SUPPORTED = of("supported") + + /** The routing number cannot receive this transfer type. */ + @JvmField val NOT_SUPPORTED = of("not_supported") + + @JvmStatic fun of(value: String) = WireTransfers(JsonField.of(value)) } - /** - * Returns an enum member corresponding to this class instance's value. - * - * Use the [value] method instead if you're uncertain the value is always known and don't - * want to throw for the unknown case. - * - * @throws IncreaseInvalidDataException if this class instance's value is a not a known - * member. - */ - fun known(): Known = - when (this) { - SUPPORTED -> Known.SUPPORTED - NOT_SUPPORTED -> Known.NOT_SUPPORTED - else -> throw IncreaseInvalidDataException("Unknown WireTransfers: $value") + /** An enum containing [WireTransfers]'s known values. */ + enum class Known { + /** The routing number can receive this transfer type. */ + SUPPORTED, + /** The routing number cannot receive this transfer type. */ + NOT_SUPPORTED, } - /** - * Returns this class instance's primitive wire representation. - * - * This differs from the [toString] method because that method is primarily for debugging - * and generally doesn't throw. - * - * @throws IncreaseInvalidDataException if this class instance's value does not have the - * expected primitive type. - */ - fun asString(): String = - _value().asString().orElseThrow { - IncreaseInvalidDataException("Value is not a String") + /** + * An enum containing [WireTransfers]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [WireTransfers] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + /** The routing number can receive this transfer type. */ + SUPPORTED, + /** The routing number cannot receive this transfer type. */ + NOT_SUPPORTED, + /** + * An enum member indicating that [WireTransfers] was instantiated with an unknown + * value. + */ + _UNKNOWN, } - private var validated: Boolean = false + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you + * want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + SUPPORTED -> Value.SUPPORTED + NOT_SUPPORTED -> Value.NOT_SUPPORTED + else -> Value._UNKNOWN + } - fun validate(): WireTransfers = apply { - if (validated) { - return@apply + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and + * don't want to throw for the unknown case. + * + * @throws IncreaseInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + SUPPORTED -> Known.SUPPORTED + NOT_SUPPORTED -> Known.NOT_SUPPORTED + else -> throw IncreaseInvalidDataException("Unknown WireTransfers: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws IncreaseInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + IncreaseInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + fun validate(): WireTransfers = apply { + if (validated) { + return@apply + } + + known() + validated = true } - known() - validated = true - } + fun isValid(): Boolean = + try { + validate() + true + } catch (e: IncreaseInvalidDataException) { + false + } - fun isValid(): Boolean = - try { - validate() - true - } catch (e: IncreaseInvalidDataException) { - false + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is WireTransfers && value == other.value } - /** - * Returns a score indicating how many valid values are contained in this object - * recursively. - * - * Used for best match union deserialization. - */ - @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } override fun equals(other: Any?): Boolean { if (this === other) { return true } - return other is WireTransfers && value == other.value + return other is Data && + achTransfers == other.achTransfers && + fednowTransfers == other.fednowTransfers && + name == other.name && + realTimePaymentsTransfers == other.realTimePaymentsTransfers && + routingNumber == other.routingNumber && + type == other.type && + wireTransfers == other.wireTransfers && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { + Objects.hash( + achTransfers, + fednowTransfers, + name, + realTimePaymentsTransfers, + routingNumber, + type, + wireTransfers, + additionalProperties, + ) } - override fun hashCode() = value.hashCode() + override fun hashCode(): Int = hashCode - override fun toString() = value.toString() + override fun toString() = + "Data{achTransfers=$achTransfers, fednowTransfers=$fednowTransfers, name=$name, realTimePaymentsTransfers=$realTimePaymentsTransfers, routingNumber=$routingNumber, type=$type, wireTransfers=$wireTransfers, additionalProperties=$additionalProperties}" } override fun equals(other: Any?): Boolean { @@ -1108,31 +1355,15 @@ private constructor( } return other is RoutingNumberListResponse && - achTransfers == other.achTransfers && - fednowTransfers == other.fednowTransfers && - name == other.name && - realTimePaymentsTransfers == other.realTimePaymentsTransfers && - routingNumber == other.routingNumber && - type == other.type && - wireTransfers == other.wireTransfers && + data == other.data && + nextCursor == other.nextCursor && additionalProperties == other.additionalProperties } - private val hashCode: Int by lazy { - Objects.hash( - achTransfers, - fednowTransfers, - name, - realTimePaymentsTransfers, - routingNumber, - type, - wireTransfers, - additionalProperties, - ) - } + private val hashCode: Int by lazy { Objects.hash(data, nextCursor, additionalProperties) } override fun hashCode(): Int = hashCode override fun toString() = - "RoutingNumberListResponse{achTransfers=$achTransfers, fednowTransfers=$fednowTransfers, name=$name, realTimePaymentsTransfers=$realTimePaymentsTransfers, routingNumber=$routingNumber, type=$type, wireTransfers=$wireTransfers, additionalProperties=$additionalProperties}" + "RoutingNumberListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/supplementaldocuments/SupplementalDocumentListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/supplementaldocuments/SupplementalDocumentListPage.kt deleted file mode 100644 index 363840e40..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/supplementaldocuments/SupplementalDocumentListPage.kt +++ /dev/null @@ -1,135 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.supplementaldocuments - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.SupplementalDocumentService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see SupplementalDocumentService.list */ -class SupplementalDocumentListPage -private constructor( - private val service: SupplementalDocumentService, - private val params: SupplementalDocumentListParams, - private val response: SupplementalDocumentListPageResponse, -) : Page { - - /** - * Delegates to [SupplementalDocumentListPageResponse], but gracefully handles missing data. - * - * @see SupplementalDocumentListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [SupplementalDocumentListPageResponse], but gracefully handles missing data. - * - * @see SupplementalDocumentListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): SupplementalDocumentListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): SupplementalDocumentListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): SupplementalDocumentListParams = params - - /** The response that this page was parsed from. */ - fun response(): SupplementalDocumentListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [SupplementalDocumentListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [SupplementalDocumentListPage]. */ - class Builder internal constructor() { - - private var service: SupplementalDocumentService? = null - private var params: SupplementalDocumentListParams? = null - private var response: SupplementalDocumentListPageResponse? = null - - @JvmSynthetic - internal fun from(supplementalDocumentListPage: SupplementalDocumentListPage) = apply { - service = supplementalDocumentListPage.service - params = supplementalDocumentListPage.params - response = supplementalDocumentListPage.response - } - - fun service(service: SupplementalDocumentService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: SupplementalDocumentListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: SupplementalDocumentListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [SupplementalDocumentListPage]. - * - * 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(): SupplementalDocumentListPage = - SupplementalDocumentListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is SupplementalDocumentListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = - "SupplementalDocumentListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/supplementaldocuments/SupplementalDocumentListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/supplementaldocuments/SupplementalDocumentListPageAsync.kt deleted file mode 100644 index a5f795cb1..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/supplementaldocuments/SupplementalDocumentListPageAsync.kt +++ /dev/null @@ -1,152 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.supplementaldocuments - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.SupplementalDocumentServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see SupplementalDocumentServiceAsync.list */ -class SupplementalDocumentListPageAsync -private constructor( - private val service: SupplementalDocumentServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: SupplementalDocumentListParams, - private val response: SupplementalDocumentListPageResponse, -) : PageAsync { - - /** - * Delegates to [SupplementalDocumentListPageResponse], but gracefully handles missing data. - * - * @see SupplementalDocumentListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [SupplementalDocumentListPageResponse], but gracefully handles missing data. - * - * @see SupplementalDocumentListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): SupplementalDocumentListParams { - 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(): SupplementalDocumentListParams = params - - /** The response that this page was parsed from. */ - fun response(): SupplementalDocumentListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of - * [SupplementalDocumentListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [SupplementalDocumentListPageAsync]. */ - class Builder internal constructor() { - - private var service: SupplementalDocumentServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: SupplementalDocumentListParams? = null - private var response: SupplementalDocumentListPageResponse? = null - - @JvmSynthetic - internal fun from(supplementalDocumentListPageAsync: SupplementalDocumentListPageAsync) = - apply { - service = supplementalDocumentListPageAsync.service - streamHandlerExecutor = supplementalDocumentListPageAsync.streamHandlerExecutor - params = supplementalDocumentListPageAsync.params - response = supplementalDocumentListPageAsync.response - } - - fun service(service: SupplementalDocumentServiceAsync) = apply { this.service = service } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: SupplementalDocumentListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: SupplementalDocumentListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [SupplementalDocumentListPageAsync]. - * - * 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(): SupplementalDocumentListPageAsync = - SupplementalDocumentListPageAsync( - 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 SupplementalDocumentListPageAsync && - 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() = - "SupplementalDocumentListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/supplementaldocuments/SupplementalDocumentListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/supplementaldocuments/SupplementalDocumentListResponse.kt similarity index 89% rename from increase-java-core/src/main/kotlin/com/increase/api/models/supplementaldocuments/SupplementalDocumentListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/supplementaldocuments/SupplementalDocumentListResponse.kt index 87630b151..029417cd4 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/supplementaldocuments/SupplementalDocumentListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/supplementaldocuments/SupplementalDocumentListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of Supplemental Document objects. */ -class SupplementalDocumentListPageResponse +class SupplementalDocumentListResponse @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 - * [SupplementalDocumentListPageResponse]. + * [SupplementalDocumentListResponse]. * * The following fields are required: * ```java @@ -97,7 +97,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [SupplementalDocumentListPageResponse]. */ + /** A builder for [SupplementalDocumentListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -105,14 +105,13 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from( - supplementalDocumentListPageResponse: SupplementalDocumentListPageResponse - ) = apply { - data = supplementalDocumentListPageResponse.data.map { it.toMutableList() } - nextCursor = supplementalDocumentListPageResponse.nextCursor - additionalProperties = - supplementalDocumentListPageResponse.additionalProperties.toMutableMap() - } + internal fun from(supplementalDocumentListResponse: SupplementalDocumentListResponse) = + apply { + data = supplementalDocumentListResponse.data.map { it.toMutableList() } + nextCursor = supplementalDocumentListResponse.nextCursor + additionalProperties = + supplementalDocumentListResponse.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 [SupplementalDocumentListPageResponse]. + * Returns an immutable instance of [SupplementalDocumentListResponse]. * * 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(): SupplementalDocumentListPageResponse = - SupplementalDocumentListPageResponse( + fun build(): SupplementalDocumentListResponse = + SupplementalDocumentListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -197,7 +196,7 @@ private constructor( private var validated: Boolean = false - fun validate(): SupplementalDocumentListPageResponse = apply { + fun validate(): SupplementalDocumentListResponse = apply { if (validated) { return@apply } @@ -230,7 +229,7 @@ private constructor( return true } - return other is SupplementalDocumentListPageResponse && + return other is SupplementalDocumentListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -241,5 +240,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "SupplementalDocumentListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "SupplementalDocumentListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/transactions/TransactionListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/transactions/TransactionListPage.kt deleted file mode 100644 index 39195ec5a..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/transactions/TransactionListPage.kt +++ /dev/null @@ -1,132 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.transactions - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.TransactionService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see TransactionService.list */ -class TransactionListPage -private constructor( - private val service: TransactionService, - private val params: TransactionListParams, - private val response: TransactionListPageResponse, -) : Page { - - /** - * Delegates to [TransactionListPageResponse], but gracefully handles missing data. - * - * @see TransactionListPageResponse.data - */ - fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [TransactionListPageResponse], but gracefully handles missing data. - * - * @see TransactionListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): TransactionListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): TransactionListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): TransactionListParams = params - - /** The response that this page was parsed from. */ - fun response(): TransactionListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [TransactionListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [TransactionListPage]. */ - class Builder internal constructor() { - - private var service: TransactionService? = null - private var params: TransactionListParams? = null - private var response: TransactionListPageResponse? = null - - @JvmSynthetic - internal fun from(transactionListPage: TransactionListPage) = apply { - service = transactionListPage.service - params = transactionListPage.params - response = transactionListPage.response - } - - fun service(service: TransactionService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: TransactionListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: TransactionListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [TransactionListPage]. - * - * 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(): TransactionListPage = - TransactionListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is TransactionListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = - "TransactionListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/transactions/TransactionListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/transactions/TransactionListPageAsync.kt deleted file mode 100644 index 6ac1142b1..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/transactions/TransactionListPageAsync.kt +++ /dev/null @@ -1,146 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.transactions - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.TransactionServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see TransactionServiceAsync.list */ -class TransactionListPageAsync -private constructor( - private val service: TransactionServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: TransactionListParams, - private val response: TransactionListPageResponse, -) : PageAsync { - - /** - * Delegates to [TransactionListPageResponse], but gracefully handles missing data. - * - * @see TransactionListPageResponse.data - */ - fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [TransactionListPageResponse], but gracefully handles missing data. - * - * @see TransactionListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): TransactionListParams { - 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(): TransactionListParams = params - - /** The response that this page was parsed from. */ - fun response(): TransactionListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [TransactionListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [TransactionListPageAsync]. */ - class Builder internal constructor() { - - private var service: TransactionServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: TransactionListParams? = null - private var response: TransactionListPageResponse? = null - - @JvmSynthetic - internal fun from(transactionListPageAsync: TransactionListPageAsync) = apply { - service = transactionListPageAsync.service - streamHandlerExecutor = transactionListPageAsync.streamHandlerExecutor - params = transactionListPageAsync.params - response = transactionListPageAsync.response - } - - fun service(service: TransactionServiceAsync) = apply { this.service = service } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: TransactionListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: TransactionListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [TransactionListPageAsync]. - * - * 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(): TransactionListPageAsync = - TransactionListPageAsync( - 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 TransactionListPageAsync && - 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() = - "TransactionListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/transactions/TransactionListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/transactions/TransactionListResponse.kt similarity index 89% rename from increase-java-core/src/main/kotlin/com/increase/api/models/transactions/TransactionListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/transactions/TransactionListResponse.kt index 463455347..50bdecc55 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/transactions/TransactionListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/transactions/TransactionListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of Transaction objects. */ -class TransactionListPageResponse +class TransactionListResponse @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 [TransactionListPageResponse]. + * Returns a mutable builder for constructing an instance of [TransactionListResponse]. * * The following fields are required: * ```java @@ -92,7 +92,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [TransactionListPageResponse]. */ + /** A builder for [TransactionListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -100,10 +100,10 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(transactionListPageResponse: TransactionListPageResponse) = apply { - data = transactionListPageResponse.data.map { it.toMutableList() } - nextCursor = transactionListPageResponse.nextCursor - additionalProperties = transactionListPageResponse.additionalProperties.toMutableMap() + internal fun from(transactionListResponse: TransactionListResponse) = apply { + data = transactionListResponse.data.map { it.toMutableList() } + nextCursor = transactionListResponse.nextCursor + additionalProperties = transactionListResponse.additionalProperties.toMutableMap() } /** The contents of the list. */ @@ -167,7 +167,7 @@ private constructor( } /** - * Returns an immutable instance of [TransactionListPageResponse]. + * Returns an immutable instance of [TransactionListResponse]. * * 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(): TransactionListPageResponse = - TransactionListPageResponse( + fun build(): TransactionListResponse = + TransactionListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -189,7 +189,7 @@ private constructor( private var validated: Boolean = false - fun validate(): TransactionListPageResponse = apply { + fun validate(): TransactionListResponse = apply { if (validated) { return@apply } @@ -222,7 +222,7 @@ private constructor( return true } - return other is TransactionListPageResponse && + return other is TransactionListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -233,5 +233,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "TransactionListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "TransactionListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequestListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequestListPage.kt deleted file mode 100644 index 06ca2a61d..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequestListPage.kt +++ /dev/null @@ -1,135 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.wiredrawdownrequests - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.WireDrawdownRequestService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see WireDrawdownRequestService.list */ -class WireDrawdownRequestListPage -private constructor( - private val service: WireDrawdownRequestService, - private val params: WireDrawdownRequestListParams, - private val response: WireDrawdownRequestListPageResponse, -) : Page { - - /** - * Delegates to [WireDrawdownRequestListPageResponse], but gracefully handles missing data. - * - * @see WireDrawdownRequestListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [WireDrawdownRequestListPageResponse], but gracefully handles missing data. - * - * @see WireDrawdownRequestListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): WireDrawdownRequestListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): WireDrawdownRequestListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): WireDrawdownRequestListParams = params - - /** The response that this page was parsed from. */ - fun response(): WireDrawdownRequestListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [WireDrawdownRequestListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [WireDrawdownRequestListPage]. */ - class Builder internal constructor() { - - private var service: WireDrawdownRequestService? = null - private var params: WireDrawdownRequestListParams? = null - private var response: WireDrawdownRequestListPageResponse? = null - - @JvmSynthetic - internal fun from(wireDrawdownRequestListPage: WireDrawdownRequestListPage) = apply { - service = wireDrawdownRequestListPage.service - params = wireDrawdownRequestListPage.params - response = wireDrawdownRequestListPage.response - } - - fun service(service: WireDrawdownRequestService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: WireDrawdownRequestListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: WireDrawdownRequestListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [WireDrawdownRequestListPage]. - * - * 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(): WireDrawdownRequestListPage = - WireDrawdownRequestListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is WireDrawdownRequestListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = - "WireDrawdownRequestListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequestListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequestListPageAsync.kt deleted file mode 100644 index 1b2f9dd6f..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequestListPageAsync.kt +++ /dev/null @@ -1,152 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.wiredrawdownrequests - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.WireDrawdownRequestServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see WireDrawdownRequestServiceAsync.list */ -class WireDrawdownRequestListPageAsync -private constructor( - private val service: WireDrawdownRequestServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: WireDrawdownRequestListParams, - private val response: WireDrawdownRequestListPageResponse, -) : PageAsync { - - /** - * Delegates to [WireDrawdownRequestListPageResponse], but gracefully handles missing data. - * - * @see WireDrawdownRequestListPageResponse.data - */ - fun data(): List = - response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [WireDrawdownRequestListPageResponse], but gracefully handles missing data. - * - * @see WireDrawdownRequestListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): WireDrawdownRequestListParams { - 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(): WireDrawdownRequestListParams = params - - /** The response that this page was parsed from. */ - fun response(): WireDrawdownRequestListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of - * [WireDrawdownRequestListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [WireDrawdownRequestListPageAsync]. */ - class Builder internal constructor() { - - private var service: WireDrawdownRequestServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: WireDrawdownRequestListParams? = null - private var response: WireDrawdownRequestListPageResponse? = null - - @JvmSynthetic - internal fun from(wireDrawdownRequestListPageAsync: WireDrawdownRequestListPageAsync) = - apply { - service = wireDrawdownRequestListPageAsync.service - streamHandlerExecutor = wireDrawdownRequestListPageAsync.streamHandlerExecutor - params = wireDrawdownRequestListPageAsync.params - response = wireDrawdownRequestListPageAsync.response - } - - fun service(service: WireDrawdownRequestServiceAsync) = apply { this.service = service } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: WireDrawdownRequestListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: WireDrawdownRequestListPageResponse) = apply { - this.response = response - } - - /** - * Returns an immutable instance of [WireDrawdownRequestListPageAsync]. - * - * 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(): WireDrawdownRequestListPageAsync = - WireDrawdownRequestListPageAsync( - 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 WireDrawdownRequestListPageAsync && - 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() = - "WireDrawdownRequestListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequestListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequestListResponse.kt similarity index 89% rename from increase-java-core/src/main/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequestListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequestListResponse.kt index 52e9d6477..88f69104a 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequestListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequestListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of Wire Drawdown Request objects. */ -class WireDrawdownRequestListPageResponse +class WireDrawdownRequestListResponse @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 - * [WireDrawdownRequestListPageResponse]. + * [WireDrawdownRequestListResponse]. * * The following fields are required: * ```java @@ -95,7 +95,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [WireDrawdownRequestListPageResponse]. */ + /** A builder for [WireDrawdownRequestListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -103,14 +103,13 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from( - wireDrawdownRequestListPageResponse: WireDrawdownRequestListPageResponse - ) = apply { - data = wireDrawdownRequestListPageResponse.data.map { it.toMutableList() } - nextCursor = wireDrawdownRequestListPageResponse.nextCursor - additionalProperties = - wireDrawdownRequestListPageResponse.additionalProperties.toMutableMap() - } + internal fun from(wireDrawdownRequestListResponse: WireDrawdownRequestListResponse) = + apply { + data = wireDrawdownRequestListResponse.data.map { it.toMutableList() } + nextCursor = wireDrawdownRequestListResponse.nextCursor + additionalProperties = + wireDrawdownRequestListResponse.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 [WireDrawdownRequestListPageResponse]. + * Returns an immutable instance of [WireDrawdownRequestListResponse]. * * 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(): WireDrawdownRequestListPageResponse = - WireDrawdownRequestListPageResponse( + fun build(): WireDrawdownRequestListResponse = + WireDrawdownRequestListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -195,7 +194,7 @@ private constructor( private var validated: Boolean = false - fun validate(): WireDrawdownRequestListPageResponse = apply { + fun validate(): WireDrawdownRequestListResponse = apply { if (validated) { return@apply } @@ -228,7 +227,7 @@ private constructor( return true } - return other is WireDrawdownRequestListPageResponse && + return other is WireDrawdownRequestListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -239,5 +238,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "WireDrawdownRequestListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "WireDrawdownRequestListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/wiretransfers/WireTransferListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/wiretransfers/WireTransferListPage.kt deleted file mode 100644 index 12a197685..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/wiretransfers/WireTransferListPage.kt +++ /dev/null @@ -1,132 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.wiretransfers - -import com.increase.api.core.AutoPager -import com.increase.api.core.Page -import com.increase.api.core.checkRequired -import com.increase.api.services.blocking.WireTransferService -import java.util.Objects -import java.util.Optional -import kotlin.jvm.optionals.getOrNull - -/** @see WireTransferService.list */ -class WireTransferListPage -private constructor( - private val service: WireTransferService, - private val params: WireTransferListParams, - private val response: WireTransferListPageResponse, -) : Page { - - /** - * Delegates to [WireTransferListPageResponse], but gracefully handles missing data. - * - * @see WireTransferListPageResponse.data - */ - fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [WireTransferListPageResponse], but gracefully handles missing data. - * - * @see WireTransferListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): WireTransferListParams { - val nextCursor = - nextCursor().getOrNull() - ?: throw IllegalStateException("Cannot construct next page params") - return params.toBuilder().cursor(nextCursor).build() - } - - override fun nextPage(): WireTransferListPage = service.list(nextPageParams()) - - fun autoPager(): AutoPager = AutoPager.from(this) - - /** The parameters that were used to request this page. */ - fun params(): WireTransferListParams = params - - /** The response that this page was parsed from. */ - fun response(): WireTransferListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [WireTransferListPage]. - * - * The following fields are required: - * ```java - * .service() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [WireTransferListPage]. */ - class Builder internal constructor() { - - private var service: WireTransferService? = null - private var params: WireTransferListParams? = null - private var response: WireTransferListPageResponse? = null - - @JvmSynthetic - internal fun from(wireTransferListPage: WireTransferListPage) = apply { - service = wireTransferListPage.service - params = wireTransferListPage.params - response = wireTransferListPage.response - } - - fun service(service: WireTransferService) = apply { this.service = service } - - /** The parameters that were used to request this page. */ - fun params(params: WireTransferListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: WireTransferListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [WireTransferListPage]. - * - * 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(): WireTransferListPage = - WireTransferListPage( - checkRequired("service", service), - checkRequired("params", params), - checkRequired("response", response), - ) - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is WireTransferListPage && - service == other.service && - params == other.params && - response == other.response - } - - override fun hashCode(): Int = Objects.hash(service, params, response) - - override fun toString() = - "WireTransferListPage{service=$service, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/wiretransfers/WireTransferListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/wiretransfers/WireTransferListPageAsync.kt deleted file mode 100644 index 92d257bd6..000000000 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/wiretransfers/WireTransferListPageAsync.kt +++ /dev/null @@ -1,146 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.wiretransfers - -import com.increase.api.core.AutoPagerAsync -import com.increase.api.core.PageAsync -import com.increase.api.core.checkRequired -import com.increase.api.services.async.WireTransferServiceAsync -import java.util.Objects -import java.util.Optional -import java.util.concurrent.CompletableFuture -import java.util.concurrent.Executor -import kotlin.jvm.optionals.getOrNull - -/** @see WireTransferServiceAsync.list */ -class WireTransferListPageAsync -private constructor( - private val service: WireTransferServiceAsync, - private val streamHandlerExecutor: Executor, - private val params: WireTransferListParams, - private val response: WireTransferListPageResponse, -) : PageAsync { - - /** - * Delegates to [WireTransferListPageResponse], but gracefully handles missing data. - * - * @see WireTransferListPageResponse.data - */ - fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList() - - /** - * Delegates to [WireTransferListPageResponse], but gracefully handles missing data. - * - * @see WireTransferListPageResponse.nextCursor - */ - fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor") - - override fun items(): List = data() - - override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent - - fun nextPageParams(): WireTransferListParams { - 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(): WireTransferListParams = params - - /** The response that this page was parsed from. */ - fun response(): WireTransferListPageResponse = response - - fun toBuilder() = Builder().from(this) - - companion object { - - /** - * Returns a mutable builder for constructing an instance of [WireTransferListPageAsync]. - * - * The following fields are required: - * ```java - * .service() - * .streamHandlerExecutor() - * .params() - * .response() - * ``` - */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [WireTransferListPageAsync]. */ - class Builder internal constructor() { - - private var service: WireTransferServiceAsync? = null - private var streamHandlerExecutor: Executor? = null - private var params: WireTransferListParams? = null - private var response: WireTransferListPageResponse? = null - - @JvmSynthetic - internal fun from(wireTransferListPageAsync: WireTransferListPageAsync) = apply { - service = wireTransferListPageAsync.service - streamHandlerExecutor = wireTransferListPageAsync.streamHandlerExecutor - params = wireTransferListPageAsync.params - response = wireTransferListPageAsync.response - } - - fun service(service: WireTransferServiceAsync) = apply { this.service = service } - - fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply { - this.streamHandlerExecutor = streamHandlerExecutor - } - - /** The parameters that were used to request this page. */ - fun params(params: WireTransferListParams) = apply { this.params = params } - - /** The response that this page was parsed from. */ - fun response(response: WireTransferListPageResponse) = apply { this.response = response } - - /** - * Returns an immutable instance of [WireTransferListPageAsync]. - * - * 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(): WireTransferListPageAsync = - WireTransferListPageAsync( - 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 WireTransferListPageAsync && - 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() = - "WireTransferListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}" -} diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/wiretransfers/WireTransferListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/wiretransfers/WireTransferListResponse.kt similarity index 89% rename from increase-java-core/src/main/kotlin/com/increase/api/models/wiretransfers/WireTransferListPageResponse.kt rename to increase-java-core/src/main/kotlin/com/increase/api/models/wiretransfers/WireTransferListResponse.kt index 8f775277a..88788abb7 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/wiretransfers/WireTransferListPageResponse.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/wiretransfers/WireTransferListResponse.kt @@ -20,7 +20,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A list of Wire Transfer objects. */ -class WireTransferListPageResponse +class WireTransferListResponse @JsonCreator(mode = JsonCreator.Mode.DISABLED) private constructor( private val data: JsonField>, @@ -83,7 +83,7 @@ private constructor( companion object { /** - * Returns a mutable builder for constructing an instance of [WireTransferListPageResponse]. + * Returns a mutable builder for constructing an instance of [WireTransferListResponse]. * * The following fields are required: * ```java @@ -94,7 +94,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [WireTransferListPageResponse]. */ + /** A builder for [WireTransferListResponse]. */ class Builder internal constructor() { private var data: JsonField>? = null @@ -102,10 +102,10 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(wireTransferListPageResponse: WireTransferListPageResponse) = apply { - data = wireTransferListPageResponse.data.map { it.toMutableList() } - nextCursor = wireTransferListPageResponse.nextCursor - additionalProperties = wireTransferListPageResponse.additionalProperties.toMutableMap() + internal fun from(wireTransferListResponse: WireTransferListResponse) = apply { + data = wireTransferListResponse.data.map { it.toMutableList() } + nextCursor = wireTransferListResponse.nextCursor + additionalProperties = wireTransferListResponse.additionalProperties.toMutableMap() } /** The contents of the list. */ @@ -169,7 +169,7 @@ private constructor( } /** - * Returns an immutable instance of [WireTransferListPageResponse]. + * Returns an immutable instance of [WireTransferListResponse]. * * Further updates to this [Builder] will not mutate the returned instance. * @@ -181,8 +181,8 @@ private constructor( * * @throws IllegalStateException if any required field is unset. */ - fun build(): WireTransferListPageResponse = - WireTransferListPageResponse( + fun build(): WireTransferListResponse = + WireTransferListResponse( checkRequired("data", data).map { it.toImmutable() }, checkRequired("nextCursor", nextCursor), additionalProperties.toMutableMap(), @@ -191,7 +191,7 @@ private constructor( private var validated: Boolean = false - fun validate(): WireTransferListPageResponse = apply { + fun validate(): WireTransferListResponse = apply { if (validated) { return@apply } @@ -224,7 +224,7 @@ private constructor( return true } - return other is WireTransferListPageResponse && + return other is WireTransferListResponse && data == other.data && nextCursor == other.nextCursor && additionalProperties == other.additionalProperties @@ -235,5 +235,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "WireTransferListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" + "WireTransferListResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/AccountNumberServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/AccountNumberServiceAsync.kt index 9b72bf3f4..ca160e686 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/AccountNumberServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/AccountNumberServiceAsync.kt @@ -7,8 +7,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.accountnumbers.AccountNumber import com.increase.api.models.accountnumbers.AccountNumberCreateParams -import com.increase.api.models.accountnumbers.AccountNumberListPageAsync import com.increase.api.models.accountnumbers.AccountNumberListParams +import com.increase.api.models.accountnumbers.AccountNumberListResponse import com.increase.api.models.accountnumbers.AccountNumberRetrieveParams import com.increase.api.models.accountnumbers.AccountNumberUpdateParams import java.util.concurrent.CompletableFuture @@ -109,21 +109,21 @@ interface AccountNumberServiceAsync { update(accountNumberId, AccountNumberUpdateParams.none(), requestOptions) /** List Account Numbers */ - fun list(): CompletableFuture = list(AccountNumberListParams.none()) + fun list(): CompletableFuture = list(AccountNumberListParams.none()) /** @see list */ fun list( params: AccountNumberListParams = AccountNumberListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: AccountNumberListParams = AccountNumberListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(AccountNumberListParams.none(), requestOptions) /** @@ -240,25 +240,25 @@ interface AccountNumberServiceAsync { * Returns a raw HTTP response for `get /account_numbers`, but is otherwise the same as * [AccountNumberServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(AccountNumberListParams.none()) /** @see list */ fun list( params: AccountNumberListParams = AccountNumberListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: AccountNumberListParams = AccountNumberListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(AccountNumberListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/AccountNumberServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/AccountNumberServiceAsyncImpl.kt index 7d3a780f8..6ff13e233 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/AccountNumberServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/AccountNumberServiceAsyncImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync import com.increase.api.models.accountnumbers.AccountNumber import com.increase.api.models.accountnumbers.AccountNumberCreateParams -import com.increase.api.models.accountnumbers.AccountNumberListPageAsync -import com.increase.api.models.accountnumbers.AccountNumberListPageResponse import com.increase.api.models.accountnumbers.AccountNumberListParams +import com.increase.api.models.accountnumbers.AccountNumberListResponse import com.increase.api.models.accountnumbers.AccountNumberRetrieveParams import com.increase.api.models.accountnumbers.AccountNumberUpdateParams import java.util.concurrent.CompletableFuture @@ -63,7 +62,7 @@ class AccountNumberServiceAsyncImpl internal constructor(private val clientOptio override fun list( params: AccountNumberListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /account_numbers withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -178,13 +177,13 @@ class AccountNumberServiceAsyncImpl internal constructor(private val clientOptio } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: AccountNumberListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -204,14 +203,6 @@ class AccountNumberServiceAsyncImpl internal constructor(private val clientOptio it.validate() } } - .let { - AccountNumberListPageAsync.builder() - .service(AccountNumberServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/AccountServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/AccountServiceAsync.kt index 8cbebecce..ce6d2e149 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/AccountServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/AccountServiceAsync.kt @@ -9,8 +9,8 @@ import com.increase.api.models.accounts.Account import com.increase.api.models.accounts.AccountBalanceParams import com.increase.api.models.accounts.AccountCloseParams import com.increase.api.models.accounts.AccountCreateParams -import com.increase.api.models.accounts.AccountListPageAsync import com.increase.api.models.accounts.AccountListParams +import com.increase.api.models.accounts.AccountListResponse import com.increase.api.models.accounts.AccountRetrieveParams import com.increase.api.models.accounts.AccountUpdateParams import com.increase.api.models.accounts.BalanceLookup @@ -106,21 +106,21 @@ interface AccountServiceAsync { update(accountId, AccountUpdateParams.none(), requestOptions) /** List Accounts */ - fun list(): CompletableFuture = list(AccountListParams.none()) + fun list(): CompletableFuture = list(AccountListParams.none()) /** @see list */ fun list( params: AccountListParams = AccountListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: AccountListParams = AccountListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(AccountListParams.none(), requestOptions) /** @@ -302,25 +302,25 @@ interface AccountServiceAsync { * Returns a raw HTTP response for `get /accounts`, but is otherwise the same as * [AccountServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(AccountListParams.none()) /** @see list */ fun list( params: AccountListParams = AccountListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: AccountListParams = AccountListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(AccountListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/AccountServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/AccountServiceAsyncImpl.kt index 236b8462e..d11664f84 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/AccountServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/AccountServiceAsyncImpl.kt @@ -20,9 +20,8 @@ import com.increase.api.models.accounts.Account import com.increase.api.models.accounts.AccountBalanceParams import com.increase.api.models.accounts.AccountCloseParams import com.increase.api.models.accounts.AccountCreateParams -import com.increase.api.models.accounts.AccountListPageAsync -import com.increase.api.models.accounts.AccountListPageResponse import com.increase.api.models.accounts.AccountListParams +import com.increase.api.models.accounts.AccountListResponse import com.increase.api.models.accounts.AccountRetrieveParams import com.increase.api.models.accounts.AccountUpdateParams import com.increase.api.models.accounts.BalanceLookup @@ -66,7 +65,7 @@ class AccountServiceAsyncImpl internal constructor(private val clientOptions: Cl override fun list( params: AccountListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /accounts withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -193,13 +192,13 @@ class AccountServiceAsyncImpl internal constructor(private val clientOptions: Cl } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: AccountListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -219,14 +218,6 @@ class AccountServiceAsyncImpl internal constructor(private val clientOptions: Cl it.validate() } } - .let { - AccountListPageAsync.builder() - .service(AccountServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/AccountStatementServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/AccountStatementServiceAsync.kt index b6a0da9c0..476b5eb3d 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/AccountStatementServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/AccountStatementServiceAsync.kt @@ -6,8 +6,8 @@ import com.increase.api.core.ClientOptions import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.accountstatements.AccountStatement -import com.increase.api.models.accountstatements.AccountStatementListPageAsync import com.increase.api.models.accountstatements.AccountStatementListParams +import com.increase.api.models.accountstatements.AccountStatementListResponse import com.increase.api.models.accountstatements.AccountStatementRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -63,22 +63,22 @@ interface AccountStatementServiceAsync { retrieve(accountStatementId, AccountStatementRetrieveParams.none(), requestOptions) /** List Account Statements */ - fun list(): CompletableFuture = + fun list(): CompletableFuture = list(AccountStatementListParams.none()) /** @see list */ fun list( params: AccountStatementListParams = AccountStatementListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: AccountStatementListParams = AccountStatementListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(AccountStatementListParams.none(), requestOptions) /** @@ -146,25 +146,25 @@ interface AccountStatementServiceAsync { * Returns a raw HTTP response for `get /account_statements`, but is otherwise the same as * [AccountStatementServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(AccountStatementListParams.none()) /** @see list */ fun list( params: AccountStatementListParams = AccountStatementListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: AccountStatementListParams = AccountStatementListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(AccountStatementListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/AccountStatementServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/AccountStatementServiceAsyncImpl.kt index 7958f4ff1..c1402cf11 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/AccountStatementServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/AccountStatementServiceAsyncImpl.kt @@ -16,9 +16,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync import com.increase.api.models.accountstatements.AccountStatement -import com.increase.api.models.accountstatements.AccountStatementListPageAsync -import com.increase.api.models.accountstatements.AccountStatementListPageResponse import com.increase.api.models.accountstatements.AccountStatementListParams +import com.increase.api.models.accountstatements.AccountStatementListResponse import com.increase.api.models.accountstatements.AccountStatementRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -48,7 +47,7 @@ internal constructor(private val clientOptions: ClientOptions) : AccountStatemen override fun list( params: AccountStatementListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /account_statements withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -98,13 +97,13 @@ internal constructor(private val clientOptions: ClientOptions) : AccountStatemen } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: AccountStatementListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -124,14 +123,6 @@ internal constructor(private val clientOptions: ClientOptions) : AccountStatemen it.validate() } } - .let { - AccountStatementListPageAsync.builder() - .service(AccountStatementServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/AccountTransferServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/AccountTransferServiceAsync.kt index 04ab44dce..57ec6b181 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/AccountTransferServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/AccountTransferServiceAsync.kt @@ -9,8 +9,8 @@ import com.increase.api.models.accounttransfers.AccountTransfer import com.increase.api.models.accounttransfers.AccountTransferApproveParams import com.increase.api.models.accounttransfers.AccountTransferCancelParams import com.increase.api.models.accounttransfers.AccountTransferCreateParams -import com.increase.api.models.accounttransfers.AccountTransferListPageAsync import com.increase.api.models.accounttransfers.AccountTransferListParams +import com.increase.api.models.accounttransfers.AccountTransferListResponse import com.increase.api.models.accounttransfers.AccountTransferRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -76,22 +76,22 @@ interface AccountTransferServiceAsync { retrieve(accountTransferId, AccountTransferRetrieveParams.none(), requestOptions) /** List Account Transfers */ - fun list(): CompletableFuture = + fun list(): CompletableFuture = list(AccountTransferListParams.none()) /** @see list */ fun list( params: AccountTransferListParams = AccountTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: AccountTransferListParams = AccountTransferListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(AccountTransferListParams.none(), requestOptions) /** Approves an Account Transfer in status `pending_approval`. */ @@ -245,25 +245,25 @@ interface AccountTransferServiceAsync { * Returns a raw HTTP response for `get /account_transfers`, but is otherwise the same as * [AccountTransferServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(AccountTransferListParams.none()) /** @see list */ fun list( params: AccountTransferListParams = AccountTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: AccountTransferListParams = AccountTransferListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(AccountTransferListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/AccountTransferServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/AccountTransferServiceAsyncImpl.kt index f1176b6d7..aa7c5cb2b 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/AccountTransferServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/AccountTransferServiceAsyncImpl.kt @@ -20,9 +20,8 @@ import com.increase.api.models.accounttransfers.AccountTransfer import com.increase.api.models.accounttransfers.AccountTransferApproveParams import com.increase.api.models.accounttransfers.AccountTransferCancelParams import com.increase.api.models.accounttransfers.AccountTransferCreateParams -import com.increase.api.models.accounttransfers.AccountTransferListPageAsync -import com.increase.api.models.accounttransfers.AccountTransferListPageResponse import com.increase.api.models.accounttransfers.AccountTransferListParams +import com.increase.api.models.accounttransfers.AccountTransferListResponse import com.increase.api.models.accounttransfers.AccountTransferRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -59,7 +58,7 @@ internal constructor(private val clientOptions: ClientOptions) : AccountTransfer override fun list( params: AccountTransferListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /account_transfers withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -154,13 +153,13 @@ internal constructor(private val clientOptions: ClientOptions) : AccountTransfer } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: AccountTransferListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -180,14 +179,6 @@ internal constructor(private val clientOptions: ClientOptions) : AccountTransfer it.validate() } } - .let { - AccountTransferListPageAsync.builder() - .service(AccountTransferServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/AchPrenotificationServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/AchPrenotificationServiceAsync.kt index e1b0d5a45..0a55b336c 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/AchPrenotificationServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/AchPrenotificationServiceAsync.kt @@ -7,8 +7,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.achprenotifications.AchPrenotification import com.increase.api.models.achprenotifications.AchPrenotificationCreateParams -import com.increase.api.models.achprenotifications.AchPrenotificationListPageAsync import com.increase.api.models.achprenotifications.AchPrenotificationListParams +import com.increase.api.models.achprenotifications.AchPrenotificationListResponse import com.increase.api.models.achprenotifications.AchPrenotificationRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -77,22 +77,22 @@ interface AchPrenotificationServiceAsync { retrieve(achPrenotificationId, AchPrenotificationRetrieveParams.none(), requestOptions) /** List ACH Prenotifications */ - fun list(): CompletableFuture = + fun list(): CompletableFuture = list(AchPrenotificationListParams.none()) /** @see list */ fun list( params: AchPrenotificationListParams = AchPrenotificationListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: AchPrenotificationListParams = AchPrenotificationListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(AchPrenotificationListParams.none(), requestOptions) /** @@ -175,25 +175,25 @@ interface AchPrenotificationServiceAsync { * Returns a raw HTTP response for `get /ach_prenotifications`, but is otherwise the same as * [AchPrenotificationServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(AchPrenotificationListParams.none()) /** @see list */ fun list( params: AchPrenotificationListParams = AchPrenotificationListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: AchPrenotificationListParams = AchPrenotificationListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(AchPrenotificationListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/AchPrenotificationServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/AchPrenotificationServiceAsyncImpl.kt index 44378140a..babd14f56 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/AchPrenotificationServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/AchPrenotificationServiceAsyncImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync import com.increase.api.models.achprenotifications.AchPrenotification import com.increase.api.models.achprenotifications.AchPrenotificationCreateParams -import com.increase.api.models.achprenotifications.AchPrenotificationListPageAsync -import com.increase.api.models.achprenotifications.AchPrenotificationListPageResponse import com.increase.api.models.achprenotifications.AchPrenotificationListParams +import com.increase.api.models.achprenotifications.AchPrenotificationListResponse import com.increase.api.models.achprenotifications.AchPrenotificationRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -59,7 +58,7 @@ internal constructor(private val clientOptions: ClientOptions) : AchPrenotificat override fun list( params: AchPrenotificationListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /ach_prenotifications withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -140,13 +139,13 @@ internal constructor(private val clientOptions: ClientOptions) : AchPrenotificat } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: AchPrenotificationListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -166,14 +165,6 @@ internal constructor(private val clientOptions: ClientOptions) : AchPrenotificat it.validate() } } - .let { - AchPrenotificationListPageAsync.builder() - .service(AchPrenotificationServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/AchTransferServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/AchTransferServiceAsync.kt index 28fc3c023..04fbc61e2 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/AchTransferServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/AchTransferServiceAsync.kt @@ -9,8 +9,8 @@ import com.increase.api.models.achtransfers.AchTransfer import com.increase.api.models.achtransfers.AchTransferApproveParams import com.increase.api.models.achtransfers.AchTransferCancelParams import com.increase.api.models.achtransfers.AchTransferCreateParams -import com.increase.api.models.achtransfers.AchTransferListPageAsync import com.increase.api.models.achtransfers.AchTransferListParams +import com.increase.api.models.achtransfers.AchTransferListResponse import com.increase.api.models.achtransfers.AchTransferRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -75,21 +75,21 @@ interface AchTransferServiceAsync { retrieve(achTransferId, AchTransferRetrieveParams.none(), requestOptions) /** List ACH Transfers */ - fun list(): CompletableFuture = list(AchTransferListParams.none()) + fun list(): CompletableFuture = list(AchTransferListParams.none()) /** @see list */ fun list( params: AchTransferListParams = AchTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: AchTransferListParams = AchTransferListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(AchTransferListParams.none(), requestOptions) /** Approves an ACH Transfer in a pending_approval state. */ @@ -235,25 +235,25 @@ interface AchTransferServiceAsync { * Returns a raw HTTP response for `get /ach_transfers`, but is otherwise the same as * [AchTransferServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(AchTransferListParams.none()) /** @see list */ fun list( params: AchTransferListParams = AchTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: AchTransferListParams = AchTransferListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(AchTransferListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/AchTransferServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/AchTransferServiceAsyncImpl.kt index b96b42809..4f138bb77 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/AchTransferServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/AchTransferServiceAsyncImpl.kt @@ -20,9 +20,8 @@ import com.increase.api.models.achtransfers.AchTransfer import com.increase.api.models.achtransfers.AchTransferApproveParams import com.increase.api.models.achtransfers.AchTransferCancelParams import com.increase.api.models.achtransfers.AchTransferCreateParams -import com.increase.api.models.achtransfers.AchTransferListPageAsync -import com.increase.api.models.achtransfers.AchTransferListPageResponse import com.increase.api.models.achtransfers.AchTransferListParams +import com.increase.api.models.achtransfers.AchTransferListResponse import com.increase.api.models.achtransfers.AchTransferRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -57,7 +56,7 @@ class AchTransferServiceAsyncImpl internal constructor(private val clientOptions override fun list( params: AchTransferListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /ach_transfers withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -152,13 +151,13 @@ class AchTransferServiceAsyncImpl internal constructor(private val clientOptions } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: AchTransferListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -178,14 +177,6 @@ class AchTransferServiceAsyncImpl internal constructor(private val clientOptions it.validate() } } - .let { - AchTransferListPageAsync.builder() - .service(AchTransferServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/BookkeepingAccountServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/BookkeepingAccountServiceAsync.kt index a0a1d3f58..c34cc50c9 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/BookkeepingAccountServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/BookkeepingAccountServiceAsync.kt @@ -8,8 +8,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.bookkeepingaccounts.BookkeepingAccount import com.increase.api.models.bookkeepingaccounts.BookkeepingAccountBalanceParams import com.increase.api.models.bookkeepingaccounts.BookkeepingAccountCreateParams -import com.increase.api.models.bookkeepingaccounts.BookkeepingAccountListPageAsync import com.increase.api.models.bookkeepingaccounts.BookkeepingAccountListParams +import com.increase.api.models.bookkeepingaccounts.BookkeepingAccountListResponse import com.increase.api.models.bookkeepingaccounts.BookkeepingAccountUpdateParams import com.increase.api.models.bookkeepingaccounts.BookkeepingBalanceLookup import java.util.concurrent.CompletableFuture @@ -68,22 +68,22 @@ interface BookkeepingAccountServiceAsync { ): CompletableFuture /** List Bookkeeping Accounts */ - fun list(): CompletableFuture = + fun list(): CompletableFuture = list(BookkeepingAccountListParams.none()) /** @see list */ fun list( params: BookkeepingAccountListParams = BookkeepingAccountListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: BookkeepingAccountListParams = BookkeepingAccountListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(BookkeepingAccountListParams.none(), requestOptions) /** Retrieve a Bookkeeping Account Balance */ @@ -193,25 +193,25 @@ interface BookkeepingAccountServiceAsync { * Returns a raw HTTP response for `get /bookkeeping_accounts`, but is otherwise the same as * [BookkeepingAccountServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(BookkeepingAccountListParams.none()) /** @see list */ fun list( params: BookkeepingAccountListParams = BookkeepingAccountListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: BookkeepingAccountListParams = BookkeepingAccountListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(BookkeepingAccountListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/BookkeepingAccountServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/BookkeepingAccountServiceAsyncImpl.kt index 821815ac7..c6ad477df 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/BookkeepingAccountServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/BookkeepingAccountServiceAsyncImpl.kt @@ -19,9 +19,8 @@ import com.increase.api.core.prepareAsync import com.increase.api.models.bookkeepingaccounts.BookkeepingAccount import com.increase.api.models.bookkeepingaccounts.BookkeepingAccountBalanceParams import com.increase.api.models.bookkeepingaccounts.BookkeepingAccountCreateParams -import com.increase.api.models.bookkeepingaccounts.BookkeepingAccountListPageAsync -import com.increase.api.models.bookkeepingaccounts.BookkeepingAccountListPageResponse import com.increase.api.models.bookkeepingaccounts.BookkeepingAccountListParams +import com.increase.api.models.bookkeepingaccounts.BookkeepingAccountListResponse import com.increase.api.models.bookkeepingaccounts.BookkeepingAccountUpdateParams import com.increase.api.models.bookkeepingaccounts.BookkeepingBalanceLookup import java.util.concurrent.CompletableFuture @@ -61,7 +60,7 @@ internal constructor(private val clientOptions: ClientOptions) : BookkeepingAcco override fun list( params: BookkeepingAccountListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /bookkeeping_accounts withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -150,13 +149,13 @@ internal constructor(private val clientOptions: ClientOptions) : BookkeepingAcco } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: BookkeepingAccountListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -176,14 +175,6 @@ internal constructor(private val clientOptions: ClientOptions) : BookkeepingAcco it.validate() } } - .let { - BookkeepingAccountListPageAsync.builder() - .service(BookkeepingAccountServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/BookkeepingEntryServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/BookkeepingEntryServiceAsync.kt index 1320c427f..596cb45a2 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/BookkeepingEntryServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/BookkeepingEntryServiceAsync.kt @@ -6,8 +6,8 @@ import com.increase.api.core.ClientOptions import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.bookkeepingentries.BookkeepingEntry -import com.increase.api.models.bookkeepingentries.BookkeepingEntryListPageAsync import com.increase.api.models.bookkeepingentries.BookkeepingEntryListParams +import com.increase.api.models.bookkeepingentries.BookkeepingEntryListResponse import com.increase.api.models.bookkeepingentries.BookkeepingEntryRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -63,22 +63,22 @@ interface BookkeepingEntryServiceAsync { retrieve(bookkeepingEntryId, BookkeepingEntryRetrieveParams.none(), requestOptions) /** List Bookkeeping Entries */ - fun list(): CompletableFuture = + fun list(): CompletableFuture = list(BookkeepingEntryListParams.none()) /** @see list */ fun list( params: BookkeepingEntryListParams = BookkeepingEntryListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: BookkeepingEntryListParams = BookkeepingEntryListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(BookkeepingEntryListParams.none(), requestOptions) /** @@ -146,25 +146,25 @@ interface BookkeepingEntryServiceAsync { * Returns a raw HTTP response for `get /bookkeeping_entries`, but is otherwise the same as * [BookkeepingEntryServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(BookkeepingEntryListParams.none()) /** @see list */ fun list( params: BookkeepingEntryListParams = BookkeepingEntryListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: BookkeepingEntryListParams = BookkeepingEntryListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(BookkeepingEntryListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/BookkeepingEntryServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/BookkeepingEntryServiceAsyncImpl.kt index b4577b894..d2e2e1ed9 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/BookkeepingEntryServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/BookkeepingEntryServiceAsyncImpl.kt @@ -16,9 +16,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync import com.increase.api.models.bookkeepingentries.BookkeepingEntry -import com.increase.api.models.bookkeepingentries.BookkeepingEntryListPageAsync -import com.increase.api.models.bookkeepingentries.BookkeepingEntryListPageResponse import com.increase.api.models.bookkeepingentries.BookkeepingEntryListParams +import com.increase.api.models.bookkeepingentries.BookkeepingEntryListResponse import com.increase.api.models.bookkeepingentries.BookkeepingEntryRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -48,7 +47,7 @@ internal constructor(private val clientOptions: ClientOptions) : BookkeepingEntr override fun list( params: BookkeepingEntryListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /bookkeeping_entries withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -98,13 +97,13 @@ internal constructor(private val clientOptions: ClientOptions) : BookkeepingEntr } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: BookkeepingEntryListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -124,14 +123,6 @@ internal constructor(private val clientOptions: ClientOptions) : BookkeepingEntr it.validate() } } - .let { - BookkeepingEntryListPageAsync.builder() - .service(BookkeepingEntryServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/BookkeepingEntrySetServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/BookkeepingEntrySetServiceAsync.kt index 166d683a0..b82402b42 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/BookkeepingEntrySetServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/BookkeepingEntrySetServiceAsync.kt @@ -7,8 +7,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.bookkeepingentrysets.BookkeepingEntrySet import com.increase.api.models.bookkeepingentrysets.BookkeepingEntrySetCreateParams -import com.increase.api.models.bookkeepingentrysets.BookkeepingEntrySetListPageAsync import com.increase.api.models.bookkeepingentrysets.BookkeepingEntrySetListParams +import com.increase.api.models.bookkeepingentrysets.BookkeepingEntrySetListResponse import com.increase.api.models.bookkeepingentrysets.BookkeepingEntrySetRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -78,22 +78,22 @@ interface BookkeepingEntrySetServiceAsync { retrieve(bookkeepingEntrySetId, BookkeepingEntrySetRetrieveParams.none(), requestOptions) /** List Bookkeeping Entry Sets */ - fun list(): CompletableFuture = + fun list(): CompletableFuture = list(BookkeepingEntrySetListParams.none()) /** @see list */ fun list( params: BookkeepingEntrySetListParams = BookkeepingEntrySetListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: BookkeepingEntrySetListParams = BookkeepingEntrySetListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(BookkeepingEntrySetListParams.none(), requestOptions) /** @@ -180,25 +180,25 @@ interface BookkeepingEntrySetServiceAsync { * Returns a raw HTTP response for `get /bookkeeping_entry_sets`, but is otherwise the same * as [BookkeepingEntrySetServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(BookkeepingEntrySetListParams.none()) /** @see list */ fun list( params: BookkeepingEntrySetListParams = BookkeepingEntrySetListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: BookkeepingEntrySetListParams = BookkeepingEntrySetListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(BookkeepingEntrySetListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/BookkeepingEntrySetServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/BookkeepingEntrySetServiceAsyncImpl.kt index 9531c2895..b924b7e52 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/BookkeepingEntrySetServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/BookkeepingEntrySetServiceAsyncImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync import com.increase.api.models.bookkeepingentrysets.BookkeepingEntrySet import com.increase.api.models.bookkeepingentrysets.BookkeepingEntrySetCreateParams -import com.increase.api.models.bookkeepingentrysets.BookkeepingEntrySetListPageAsync -import com.increase.api.models.bookkeepingentrysets.BookkeepingEntrySetListPageResponse import com.increase.api.models.bookkeepingentrysets.BookkeepingEntrySetListParams +import com.increase.api.models.bookkeepingentrysets.BookkeepingEntrySetListResponse import com.increase.api.models.bookkeepingentrysets.BookkeepingEntrySetRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -60,7 +59,7 @@ internal constructor(private val clientOptions: ClientOptions) : BookkeepingEntr override fun list( params: BookkeepingEntrySetListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /bookkeeping_entry_sets withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -141,13 +140,13 @@ internal constructor(private val clientOptions: ClientOptions) : BookkeepingEntr } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: BookkeepingEntrySetListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -167,14 +166,6 @@ internal constructor(private val clientOptions: ClientOptions) : BookkeepingEntr it.validate() } } - .let { - BookkeepingEntrySetListPageAsync.builder() - .service(BookkeepingEntrySetServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardDisputeServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardDisputeServiceAsync.kt index da5b6fddc..cd15c03b0 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardDisputeServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardDisputeServiceAsync.kt @@ -7,8 +7,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.carddisputes.CardDispute import com.increase.api.models.carddisputes.CardDisputeCreateParams -import com.increase.api.models.carddisputes.CardDisputeListPageAsync import com.increase.api.models.carddisputes.CardDisputeListParams +import com.increase.api.models.carddisputes.CardDisputeListResponse import com.increase.api.models.carddisputes.CardDisputeRetrieveParams import com.increase.api.models.carddisputes.CardDisputeSubmitUserSubmissionParams import com.increase.api.models.carddisputes.CardDisputeWithdrawParams @@ -75,21 +75,21 @@ interface CardDisputeServiceAsync { retrieve(cardDisputeId, CardDisputeRetrieveParams.none(), requestOptions) /** List Card Disputes */ - fun list(): CompletableFuture = list(CardDisputeListParams.none()) + fun list(): CompletableFuture = list(CardDisputeListParams.none()) /** @see list */ fun list( params: CardDisputeListParams = CardDisputeListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: CardDisputeListParams = CardDisputeListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(CardDisputeListParams.none(), requestOptions) /** Submit a User Submission for a Card Dispute */ @@ -229,25 +229,25 @@ interface CardDisputeServiceAsync { * Returns a raw HTTP response for `get /card_disputes`, but is otherwise the same as * [CardDisputeServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(CardDisputeListParams.none()) /** @see list */ fun list( params: CardDisputeListParams = CardDisputeListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: CardDisputeListParams = CardDisputeListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(CardDisputeListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardDisputeServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardDisputeServiceAsyncImpl.kt index 8714063fe..e298e1ca9 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardDisputeServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardDisputeServiceAsyncImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync import com.increase.api.models.carddisputes.CardDispute import com.increase.api.models.carddisputes.CardDisputeCreateParams -import com.increase.api.models.carddisputes.CardDisputeListPageAsync -import com.increase.api.models.carddisputes.CardDisputeListPageResponse import com.increase.api.models.carddisputes.CardDisputeListParams +import com.increase.api.models.carddisputes.CardDisputeListResponse import com.increase.api.models.carddisputes.CardDisputeRetrieveParams import com.increase.api.models.carddisputes.CardDisputeSubmitUserSubmissionParams import com.increase.api.models.carddisputes.CardDisputeWithdrawParams @@ -57,7 +56,7 @@ class CardDisputeServiceAsyncImpl internal constructor(private val clientOptions override fun list( params: CardDisputeListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /card_disputes withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -152,13 +151,13 @@ class CardDisputeServiceAsyncImpl internal constructor(private val clientOptions } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: CardDisputeListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -178,14 +177,6 @@ class CardDisputeServiceAsyncImpl internal constructor(private val clientOptions it.validate() } } - .let { - CardDisputeListPageAsync.builder() - .service(CardDisputeServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardPaymentServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardPaymentServiceAsync.kt index 233e0fcc3..71d45942e 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardPaymentServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardPaymentServiceAsync.kt @@ -6,8 +6,8 @@ import com.increase.api.core.ClientOptions import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.cardpayments.CardPayment -import com.increase.api.models.cardpayments.CardPaymentListPageAsync import com.increase.api.models.cardpayments.CardPaymentListParams +import com.increase.api.models.cardpayments.CardPaymentListResponse import com.increase.api.models.cardpayments.CardPaymentRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -62,21 +62,21 @@ interface CardPaymentServiceAsync { retrieve(cardPaymentId, CardPaymentRetrieveParams.none(), requestOptions) /** List Card Payments */ - fun list(): CompletableFuture = list(CardPaymentListParams.none()) + fun list(): CompletableFuture = list(CardPaymentListParams.none()) /** @see list */ fun list( params: CardPaymentListParams = CardPaymentListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: CardPaymentListParams = CardPaymentListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(CardPaymentListParams.none(), requestOptions) /** @@ -138,25 +138,25 @@ interface CardPaymentServiceAsync { * Returns a raw HTTP response for `get /card_payments`, but is otherwise the same as * [CardPaymentServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(CardPaymentListParams.none()) /** @see list */ fun list( params: CardPaymentListParams = CardPaymentListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: CardPaymentListParams = CardPaymentListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(CardPaymentListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardPaymentServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardPaymentServiceAsyncImpl.kt index 602987d3c..565fa254e 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardPaymentServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardPaymentServiceAsyncImpl.kt @@ -16,9 +16,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync import com.increase.api.models.cardpayments.CardPayment -import com.increase.api.models.cardpayments.CardPaymentListPageAsync -import com.increase.api.models.cardpayments.CardPaymentListPageResponse import com.increase.api.models.cardpayments.CardPaymentListParams +import com.increase.api.models.cardpayments.CardPaymentListResponse import com.increase.api.models.cardpayments.CardPaymentRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -46,7 +45,7 @@ class CardPaymentServiceAsyncImpl internal constructor(private val clientOptions override fun list( params: CardPaymentListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /card_payments withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -96,13 +95,13 @@ class CardPaymentServiceAsyncImpl internal constructor(private val clientOptions } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: CardPaymentListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -122,14 +121,6 @@ class CardPaymentServiceAsyncImpl internal constructor(private val clientOptions it.validate() } } - .let { - CardPaymentListPageAsync.builder() - .service(CardPaymentServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardPurchaseSupplementServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardPurchaseSupplementServiceAsync.kt index 7cdcc2d98..9ff60fcdc 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardPurchaseSupplementServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardPurchaseSupplementServiceAsync.kt @@ -6,8 +6,8 @@ import com.increase.api.core.ClientOptions import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.cardpurchasesupplements.CardPurchaseSupplement -import com.increase.api.models.cardpurchasesupplements.CardPurchaseSupplementListPageAsync import com.increase.api.models.cardpurchasesupplements.CardPurchaseSupplementListParams +import com.increase.api.models.cardpurchasesupplements.CardPurchaseSupplementListResponse import com.increase.api.models.cardpurchasesupplements.CardPurchaseSupplementRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -71,24 +71,24 @@ interface CardPurchaseSupplementServiceAsync { ) /** List Card Purchase Supplements */ - fun list(): CompletableFuture = + fun list(): CompletableFuture = list(CardPurchaseSupplementListParams.none()) /** @see list */ fun list( params: CardPurchaseSupplementListParams = CardPurchaseSupplementListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: CardPurchaseSupplementListParams = CardPurchaseSupplementListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture = + ): CompletableFuture = list(CardPurchaseSupplementListParams.none(), requestOptions) /** @@ -163,25 +163,25 @@ interface CardPurchaseSupplementServiceAsync { * Returns a raw HTTP response for `get /card_purchase_supplements`, but is otherwise the * same as [CardPurchaseSupplementServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(CardPurchaseSupplementListParams.none()) /** @see list */ fun list( params: CardPurchaseSupplementListParams = CardPurchaseSupplementListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: CardPurchaseSupplementListParams = CardPurchaseSupplementListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(CardPurchaseSupplementListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardPurchaseSupplementServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardPurchaseSupplementServiceAsyncImpl.kt index 20c2a998c..2b4b3604b 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardPurchaseSupplementServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardPurchaseSupplementServiceAsyncImpl.kt @@ -16,9 +16,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync import com.increase.api.models.cardpurchasesupplements.CardPurchaseSupplement -import com.increase.api.models.cardpurchasesupplements.CardPurchaseSupplementListPageAsync -import com.increase.api.models.cardpurchasesupplements.CardPurchaseSupplementListPageResponse import com.increase.api.models.cardpurchasesupplements.CardPurchaseSupplementListParams +import com.increase.api.models.cardpurchasesupplements.CardPurchaseSupplementListResponse import com.increase.api.models.cardpurchasesupplements.CardPurchaseSupplementRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -52,7 +51,7 @@ internal constructor(private val clientOptions: ClientOptions) : override fun list( params: CardPurchaseSupplementListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /card_purchase_supplements withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -102,13 +101,13 @@ internal constructor(private val clientOptions: ClientOptions) : } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: CardPurchaseSupplementListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -128,14 +127,6 @@ internal constructor(private val clientOptions: ClientOptions) : it.validate() } } - .let { - CardPurchaseSupplementListPageAsync.builder() - .service(CardPurchaseSupplementServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardPushTransferServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardPushTransferServiceAsync.kt index c403c059f..ce1c615db 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardPushTransferServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardPushTransferServiceAsync.kt @@ -9,8 +9,8 @@ import com.increase.api.models.cardpushtransfers.CardPushTransfer import com.increase.api.models.cardpushtransfers.CardPushTransferApproveParams import com.increase.api.models.cardpushtransfers.CardPushTransferCancelParams import com.increase.api.models.cardpushtransfers.CardPushTransferCreateParams -import com.increase.api.models.cardpushtransfers.CardPushTransferListPageAsync import com.increase.api.models.cardpushtransfers.CardPushTransferListParams +import com.increase.api.models.cardpushtransfers.CardPushTransferListResponse import com.increase.api.models.cardpushtransfers.CardPushTransferRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -76,22 +76,22 @@ interface CardPushTransferServiceAsync { retrieve(cardPushTransferId, CardPushTransferRetrieveParams.none(), requestOptions) /** List Card Push Transfers */ - fun list(): CompletableFuture = + fun list(): CompletableFuture = list(CardPushTransferListParams.none()) /** @see list */ fun list( params: CardPushTransferListParams = CardPushTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: CardPushTransferListParams = CardPushTransferListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(CardPushTransferListParams.none(), requestOptions) /** Approves a Card Push Transfer in a pending_approval state. */ @@ -246,25 +246,25 @@ interface CardPushTransferServiceAsync { * Returns a raw HTTP response for `get /card_push_transfers`, but is otherwise the same as * [CardPushTransferServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(CardPushTransferListParams.none()) /** @see list */ fun list( params: CardPushTransferListParams = CardPushTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: CardPushTransferListParams = CardPushTransferListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(CardPushTransferListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardPushTransferServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardPushTransferServiceAsyncImpl.kt index 96ac722c2..288de93d3 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardPushTransferServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardPushTransferServiceAsyncImpl.kt @@ -20,9 +20,8 @@ import com.increase.api.models.cardpushtransfers.CardPushTransfer import com.increase.api.models.cardpushtransfers.CardPushTransferApproveParams import com.increase.api.models.cardpushtransfers.CardPushTransferCancelParams import com.increase.api.models.cardpushtransfers.CardPushTransferCreateParams -import com.increase.api.models.cardpushtransfers.CardPushTransferListPageAsync -import com.increase.api.models.cardpushtransfers.CardPushTransferListPageResponse import com.increase.api.models.cardpushtransfers.CardPushTransferListParams +import com.increase.api.models.cardpushtransfers.CardPushTransferListResponse import com.increase.api.models.cardpushtransfers.CardPushTransferRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -59,7 +58,7 @@ internal constructor(private val clientOptions: ClientOptions) : CardPushTransfe override fun list( params: CardPushTransferListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /card_push_transfers withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -154,13 +153,13 @@ internal constructor(private val clientOptions: ClientOptions) : CardPushTransfe } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: CardPushTransferListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -180,14 +179,6 @@ internal constructor(private val clientOptions: ClientOptions) : CardPushTransfe it.validate() } } - .let { - CardPushTransferListPageAsync.builder() - .service(CardPushTransferServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardServiceAsync.kt index 61e3df8f8..94de5a262 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardServiceAsync.kt @@ -11,8 +11,8 @@ import com.increase.api.models.cards.CardCreateParams import com.increase.api.models.cards.CardDetails import com.increase.api.models.cards.CardDetailsParams import com.increase.api.models.cards.CardIframeUrl -import com.increase.api.models.cards.CardListPageAsync import com.increase.api.models.cards.CardListParams +import com.increase.api.models.cards.CardListResponse import com.increase.api.models.cards.CardRetrieveParams import com.increase.api.models.cards.CardUpdateParams import com.increase.api.models.cards.CardUpdatePinParams @@ -105,20 +105,20 @@ interface CardServiceAsync { update(cardId, CardUpdateParams.none(), requestOptions) /** List Cards */ - fun list(): CompletableFuture = list(CardListParams.none()) + fun list(): CompletableFuture = list(CardListParams.none()) /** @see list */ fun list( params: CardListParams = CardListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ - fun list(params: CardListParams = CardListParams.none()): CompletableFuture = + fun list(params: CardListParams = CardListParams.none()): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(CardListParams.none(), requestOptions) /** @@ -321,25 +321,25 @@ interface CardServiceAsync { * Returns a raw HTTP response for `get /cards`, but is otherwise the same as * [CardServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(CardListParams.none()) /** @see list */ fun list( params: CardListParams = CardListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: CardListParams = CardListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(CardListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardServiceAsyncImpl.kt index 4c3d94703..d96941338 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardServiceAsyncImpl.kt @@ -22,9 +22,8 @@ import com.increase.api.models.cards.CardCreateParams import com.increase.api.models.cards.CardDetails import com.increase.api.models.cards.CardDetailsParams import com.increase.api.models.cards.CardIframeUrl -import com.increase.api.models.cards.CardListPageAsync -import com.increase.api.models.cards.CardListPageResponse import com.increase.api.models.cards.CardListParams +import com.increase.api.models.cards.CardListResponse import com.increase.api.models.cards.CardRetrieveParams import com.increase.api.models.cards.CardUpdateParams import com.increase.api.models.cards.CardUpdatePinParams @@ -68,7 +67,7 @@ class CardServiceAsyncImpl internal constructor(private val clientOptions: Clien override fun list( params: CardListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /cards withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -201,13 +200,13 @@ class CardServiceAsyncImpl internal constructor(private val clientOptions: Clien } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: CardListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -227,14 +226,6 @@ class CardServiceAsyncImpl internal constructor(private val clientOptions: Clien it.validate() } } - .let { - CardListPageAsync.builder() - .service(CardServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardTokenServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardTokenServiceAsync.kt index 0f575bd74..c6b22c5b5 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardTokenServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardTokenServiceAsync.kt @@ -8,8 +8,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.cardtokens.CardToken import com.increase.api.models.cardtokens.CardTokenCapabilities import com.increase.api.models.cardtokens.CardTokenCapabilitiesParams -import com.increase.api.models.cardtokens.CardTokenListPageAsync import com.increase.api.models.cardtokens.CardTokenListParams +import com.increase.api.models.cardtokens.CardTokenListResponse import com.increase.api.models.cardtokens.CardTokenRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -64,21 +64,21 @@ interface CardTokenServiceAsync { retrieve(cardTokenId, CardTokenRetrieveParams.none(), requestOptions) /** List Card Tokens */ - fun list(): CompletableFuture = list(CardTokenListParams.none()) + fun list(): CompletableFuture = list(CardTokenListParams.none()) /** @see list */ fun list( params: CardTokenListParams = CardTokenListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: CardTokenListParams = CardTokenListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(CardTokenListParams.none(), requestOptions) /** @@ -180,25 +180,25 @@ interface CardTokenServiceAsync { * Returns a raw HTTP response for `get /card_tokens`, but is otherwise the same as * [CardTokenServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(CardTokenListParams.none()) /** @see list */ fun list( params: CardTokenListParams = CardTokenListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: CardTokenListParams = CardTokenListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(CardTokenListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardTokenServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardTokenServiceAsyncImpl.kt index 4d23b37f2..4259a4125 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardTokenServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardTokenServiceAsyncImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.prepareAsync import com.increase.api.models.cardtokens.CardToken import com.increase.api.models.cardtokens.CardTokenCapabilities import com.increase.api.models.cardtokens.CardTokenCapabilitiesParams -import com.increase.api.models.cardtokens.CardTokenListPageAsync -import com.increase.api.models.cardtokens.CardTokenListPageResponse import com.increase.api.models.cardtokens.CardTokenListParams +import com.increase.api.models.cardtokens.CardTokenListResponse import com.increase.api.models.cardtokens.CardTokenRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -48,7 +47,7 @@ class CardTokenServiceAsyncImpl internal constructor(private val clientOptions: override fun list( params: CardTokenListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /card_tokens withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -105,13 +104,13 @@ class CardTokenServiceAsyncImpl internal constructor(private val clientOptions: } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: CardTokenListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -131,14 +130,6 @@ class CardTokenServiceAsyncImpl internal constructor(private val clientOptions: it.validate() } } - .let { - CardTokenListPageAsync.builder() - .service(CardTokenServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardValidationServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardValidationServiceAsync.kt index 5e203d626..eee35d979 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardValidationServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardValidationServiceAsync.kt @@ -7,8 +7,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.cardvalidations.CardValidation import com.increase.api.models.cardvalidations.CardValidationCreateParams -import com.increase.api.models.cardvalidations.CardValidationListPageAsync import com.increase.api.models.cardvalidations.CardValidationListParams +import com.increase.api.models.cardvalidations.CardValidationListResponse import com.increase.api.models.cardvalidations.CardValidationRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -73,22 +73,22 @@ interface CardValidationServiceAsync { retrieve(cardValidationId, CardValidationRetrieveParams.none(), requestOptions) /** List Card Validations */ - fun list(): CompletableFuture = + fun list(): CompletableFuture = list(CardValidationListParams.none()) /** @see list */ fun list( params: CardValidationListParams = CardValidationListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: CardValidationListParams = CardValidationListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(CardValidationListParams.none(), requestOptions) /** @@ -166,25 +166,25 @@ interface CardValidationServiceAsync { * Returns a raw HTTP response for `get /card_validations`, but is otherwise the same as * [CardValidationServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(CardValidationListParams.none()) /** @see list */ fun list( params: CardValidationListParams = CardValidationListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: CardValidationListParams = CardValidationListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(CardValidationListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardValidationServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardValidationServiceAsyncImpl.kt index 2e217097b..16d93d450 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardValidationServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CardValidationServiceAsyncImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync import com.increase.api.models.cardvalidations.CardValidation import com.increase.api.models.cardvalidations.CardValidationCreateParams -import com.increase.api.models.cardvalidations.CardValidationListPageAsync -import com.increase.api.models.cardvalidations.CardValidationListPageResponse import com.increase.api.models.cardvalidations.CardValidationListParams +import com.increase.api.models.cardvalidations.CardValidationListResponse import com.increase.api.models.cardvalidations.CardValidationRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -57,7 +56,7 @@ internal constructor(private val clientOptions: ClientOptions) : CardValidationS override fun list( params: CardValidationListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /card_validations withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -138,13 +137,13 @@ internal constructor(private val clientOptions: ClientOptions) : CardValidationS } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: CardValidationListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -164,14 +163,6 @@ internal constructor(private val clientOptions: ClientOptions) : CardValidationS it.validate() } } - .let { - CardValidationListPageAsync.builder() - .service(CardValidationServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CheckDepositServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CheckDepositServiceAsync.kt index 872a0668f..3ac16705b 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CheckDepositServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CheckDepositServiceAsync.kt @@ -7,8 +7,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.checkdeposits.CheckDeposit import com.increase.api.models.checkdeposits.CheckDepositCreateParams -import com.increase.api.models.checkdeposits.CheckDepositListPageAsync import com.increase.api.models.checkdeposits.CheckDepositListParams +import com.increase.api.models.checkdeposits.CheckDepositListResponse import com.increase.api.models.checkdeposits.CheckDepositRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -73,21 +73,21 @@ interface CheckDepositServiceAsync { retrieve(checkDepositId, CheckDepositRetrieveParams.none(), requestOptions) /** List Check Deposits */ - fun list(): CompletableFuture = list(CheckDepositListParams.none()) + fun list(): CompletableFuture = list(CheckDepositListParams.none()) /** @see list */ fun list( params: CheckDepositListParams = CheckDepositListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: CheckDepositListParams = CheckDepositListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(CheckDepositListParams.none(), requestOptions) /** @@ -164,25 +164,25 @@ interface CheckDepositServiceAsync { * Returns a raw HTTP response for `get /check_deposits`, but is otherwise the same as * [CheckDepositServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(CheckDepositListParams.none()) /** @see list */ fun list( params: CheckDepositListParams = CheckDepositListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: CheckDepositListParams = CheckDepositListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(CheckDepositListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CheckDepositServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CheckDepositServiceAsyncImpl.kt index 7c30a4977..f07f50a6b 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CheckDepositServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CheckDepositServiceAsyncImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync import com.increase.api.models.checkdeposits.CheckDeposit import com.increase.api.models.checkdeposits.CheckDepositCreateParams -import com.increase.api.models.checkdeposits.CheckDepositListPageAsync -import com.increase.api.models.checkdeposits.CheckDepositListPageResponse import com.increase.api.models.checkdeposits.CheckDepositListParams +import com.increase.api.models.checkdeposits.CheckDepositListResponse import com.increase.api.models.checkdeposits.CheckDepositRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -55,7 +54,7 @@ class CheckDepositServiceAsyncImpl internal constructor(private val clientOption override fun list( params: CheckDepositListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /check_deposits withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -136,13 +135,13 @@ class CheckDepositServiceAsyncImpl internal constructor(private val clientOption } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: CheckDepositListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -162,14 +161,6 @@ class CheckDepositServiceAsyncImpl internal constructor(private val clientOption it.validate() } } - .let { - CheckDepositListPageAsync.builder() - .service(CheckDepositServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CheckTransferServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CheckTransferServiceAsync.kt index a5410383f..ace3fa1d5 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CheckTransferServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CheckTransferServiceAsync.kt @@ -9,8 +9,8 @@ import com.increase.api.models.checktransfers.CheckTransfer import com.increase.api.models.checktransfers.CheckTransferApproveParams import com.increase.api.models.checktransfers.CheckTransferCancelParams import com.increase.api.models.checktransfers.CheckTransferCreateParams -import com.increase.api.models.checktransfers.CheckTransferListPageAsync import com.increase.api.models.checktransfers.CheckTransferListParams +import com.increase.api.models.checktransfers.CheckTransferListResponse import com.increase.api.models.checktransfers.CheckTransferRetrieveParams import com.increase.api.models.checktransfers.CheckTransferStopPaymentParams import java.util.concurrent.CompletableFuture @@ -76,21 +76,21 @@ interface CheckTransferServiceAsync { retrieve(checkTransferId, CheckTransferRetrieveParams.none(), requestOptions) /** List Check Transfers */ - fun list(): CompletableFuture = list(CheckTransferListParams.none()) + fun list(): CompletableFuture = list(CheckTransferListParams.none()) /** @see list */ fun list( params: CheckTransferListParams = CheckTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: CheckTransferListParams = CheckTransferListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(CheckTransferListParams.none(), requestOptions) /** Approve a Check Transfer */ @@ -276,25 +276,25 @@ interface CheckTransferServiceAsync { * Returns a raw HTTP response for `get /check_transfers`, but is otherwise the same as * [CheckTransferServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(CheckTransferListParams.none()) /** @see list */ fun list( params: CheckTransferListParams = CheckTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: CheckTransferListParams = CheckTransferListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(CheckTransferListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CheckTransferServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CheckTransferServiceAsyncImpl.kt index dad6fc30e..e075c9b67 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/CheckTransferServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/CheckTransferServiceAsyncImpl.kt @@ -20,9 +20,8 @@ import com.increase.api.models.checktransfers.CheckTransfer import com.increase.api.models.checktransfers.CheckTransferApproveParams import com.increase.api.models.checktransfers.CheckTransferCancelParams import com.increase.api.models.checktransfers.CheckTransferCreateParams -import com.increase.api.models.checktransfers.CheckTransferListPageAsync -import com.increase.api.models.checktransfers.CheckTransferListPageResponse import com.increase.api.models.checktransfers.CheckTransferListParams +import com.increase.api.models.checktransfers.CheckTransferListResponse import com.increase.api.models.checktransfers.CheckTransferRetrieveParams import com.increase.api.models.checktransfers.CheckTransferStopPaymentParams import java.util.concurrent.CompletableFuture @@ -58,7 +57,7 @@ class CheckTransferServiceAsyncImpl internal constructor(private val clientOptio override fun list( params: CheckTransferListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /check_transfers withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -160,13 +159,13 @@ class CheckTransferServiceAsyncImpl internal constructor(private val clientOptio } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: CheckTransferListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -186,14 +185,6 @@ class CheckTransferServiceAsyncImpl internal constructor(private val clientOptio it.validate() } } - .let { - CheckTransferListPageAsync.builder() - .service(CheckTransferServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/DeclinedTransactionServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/DeclinedTransactionServiceAsync.kt index 70c6024a4..2e0c8df12 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/DeclinedTransactionServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/DeclinedTransactionServiceAsync.kt @@ -6,8 +6,8 @@ import com.increase.api.core.ClientOptions import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.declinedtransactions.DeclinedTransaction -import com.increase.api.models.declinedtransactions.DeclinedTransactionListPageAsync import com.increase.api.models.declinedtransactions.DeclinedTransactionListParams +import com.increase.api.models.declinedtransactions.DeclinedTransactionListResponse import com.increase.api.models.declinedtransactions.DeclinedTransactionRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -67,22 +67,22 @@ interface DeclinedTransactionServiceAsync { retrieve(declinedTransactionId, DeclinedTransactionRetrieveParams.none(), requestOptions) /** List Declined Transactions */ - fun list(): CompletableFuture = + fun list(): CompletableFuture = list(DeclinedTransactionListParams.none()) /** @see list */ fun list( params: DeclinedTransactionListParams = DeclinedTransactionListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: DeclinedTransactionListParams = DeclinedTransactionListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(DeclinedTransactionListParams.none(), requestOptions) /** @@ -154,25 +154,25 @@ interface DeclinedTransactionServiceAsync { * Returns a raw HTTP response for `get /declined_transactions`, but is otherwise the same * as [DeclinedTransactionServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(DeclinedTransactionListParams.none()) /** @see list */ fun list( params: DeclinedTransactionListParams = DeclinedTransactionListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: DeclinedTransactionListParams = DeclinedTransactionListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(DeclinedTransactionListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/DeclinedTransactionServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/DeclinedTransactionServiceAsyncImpl.kt index 7c7004f71..7b48e3dfa 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/DeclinedTransactionServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/DeclinedTransactionServiceAsyncImpl.kt @@ -16,9 +16,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync import com.increase.api.models.declinedtransactions.DeclinedTransaction -import com.increase.api.models.declinedtransactions.DeclinedTransactionListPageAsync -import com.increase.api.models.declinedtransactions.DeclinedTransactionListPageResponse import com.increase.api.models.declinedtransactions.DeclinedTransactionListParams +import com.increase.api.models.declinedtransactions.DeclinedTransactionListResponse import com.increase.api.models.declinedtransactions.DeclinedTransactionRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -51,7 +50,7 @@ internal constructor(private val clientOptions: ClientOptions) : DeclinedTransac override fun list( params: DeclinedTransactionListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /declined_transactions withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -101,13 +100,13 @@ internal constructor(private val clientOptions: ClientOptions) : DeclinedTransac } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: DeclinedTransactionListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -127,14 +126,6 @@ internal constructor(private val clientOptions: ClientOptions) : DeclinedTransac it.validate() } } - .let { - DeclinedTransactionListPageAsync.builder() - .service(DeclinedTransactionServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/DigitalCardProfileServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/DigitalCardProfileServiceAsync.kt index 7d6ad0783..6d8d00644 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/DigitalCardProfileServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/DigitalCardProfileServiceAsync.kt @@ -9,8 +9,8 @@ import com.increase.api.models.digitalcardprofiles.DigitalCardProfile import com.increase.api.models.digitalcardprofiles.DigitalCardProfileArchiveParams import com.increase.api.models.digitalcardprofiles.DigitalCardProfileCloneParams import com.increase.api.models.digitalcardprofiles.DigitalCardProfileCreateParams -import com.increase.api.models.digitalcardprofiles.DigitalCardProfileListPageAsync import com.increase.api.models.digitalcardprofiles.DigitalCardProfileListParams +import com.increase.api.models.digitalcardprofiles.DigitalCardProfileListResponse import com.increase.api.models.digitalcardprofiles.DigitalCardProfileRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -79,22 +79,22 @@ interface DigitalCardProfileServiceAsync { retrieve(digitalCardProfileId, DigitalCardProfileRetrieveParams.none(), requestOptions) /** List Card Profiles */ - fun list(): CompletableFuture = + fun list(): CompletableFuture = list(DigitalCardProfileListParams.none()) /** @see list */ fun list( params: DigitalCardProfileListParams = DigitalCardProfileListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: DigitalCardProfileListParams = DigitalCardProfileListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(DigitalCardProfileListParams.none(), requestOptions) /** Archive a Digital Card Profile */ @@ -252,25 +252,25 @@ interface DigitalCardProfileServiceAsync { * Returns a raw HTTP response for `get /digital_card_profiles`, but is otherwise the same * as [DigitalCardProfileServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(DigitalCardProfileListParams.none()) /** @see list */ fun list( params: DigitalCardProfileListParams = DigitalCardProfileListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: DigitalCardProfileListParams = DigitalCardProfileListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(DigitalCardProfileListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/DigitalCardProfileServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/DigitalCardProfileServiceAsyncImpl.kt index d420cc521..5cda95adc 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/DigitalCardProfileServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/DigitalCardProfileServiceAsyncImpl.kt @@ -20,9 +20,8 @@ import com.increase.api.models.digitalcardprofiles.DigitalCardProfile import com.increase.api.models.digitalcardprofiles.DigitalCardProfileArchiveParams import com.increase.api.models.digitalcardprofiles.DigitalCardProfileCloneParams import com.increase.api.models.digitalcardprofiles.DigitalCardProfileCreateParams -import com.increase.api.models.digitalcardprofiles.DigitalCardProfileListPageAsync -import com.increase.api.models.digitalcardprofiles.DigitalCardProfileListPageResponse import com.increase.api.models.digitalcardprofiles.DigitalCardProfileListParams +import com.increase.api.models.digitalcardprofiles.DigitalCardProfileListResponse import com.increase.api.models.digitalcardprofiles.DigitalCardProfileRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -61,7 +60,7 @@ internal constructor(private val clientOptions: ClientOptions) : DigitalCardProf override fun list( params: DigitalCardProfileListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /digital_card_profiles withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -156,13 +155,13 @@ internal constructor(private val clientOptions: ClientOptions) : DigitalCardProf } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: DigitalCardProfileListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -182,14 +181,6 @@ internal constructor(private val clientOptions: ClientOptions) : DigitalCardProf it.validate() } } - .let { - DigitalCardProfileListPageAsync.builder() - .service(DigitalCardProfileServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/DigitalWalletTokenServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/DigitalWalletTokenServiceAsync.kt index b69eee3df..dcb286e77 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/DigitalWalletTokenServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/DigitalWalletTokenServiceAsync.kt @@ -6,8 +6,8 @@ import com.increase.api.core.ClientOptions import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.digitalwallettokens.DigitalWalletToken -import com.increase.api.models.digitalwallettokens.DigitalWalletTokenListPageAsync import com.increase.api.models.digitalwallettokens.DigitalWalletTokenListParams +import com.increase.api.models.digitalwallettokens.DigitalWalletTokenListResponse import com.increase.api.models.digitalwallettokens.DigitalWalletTokenRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -66,22 +66,22 @@ interface DigitalWalletTokenServiceAsync { retrieve(digitalWalletTokenId, DigitalWalletTokenRetrieveParams.none(), requestOptions) /** List Digital Wallet Tokens */ - fun list(): CompletableFuture = + fun list(): CompletableFuture = list(DigitalWalletTokenListParams.none()) /** @see list */ fun list( params: DigitalWalletTokenListParams = DigitalWalletTokenListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: DigitalWalletTokenListParams = DigitalWalletTokenListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(DigitalWalletTokenListParams.none(), requestOptions) /** @@ -149,25 +149,25 @@ interface DigitalWalletTokenServiceAsync { * Returns a raw HTTP response for `get /digital_wallet_tokens`, but is otherwise the same * as [DigitalWalletTokenServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(DigitalWalletTokenListParams.none()) /** @see list */ fun list( params: DigitalWalletTokenListParams = DigitalWalletTokenListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: DigitalWalletTokenListParams = DigitalWalletTokenListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(DigitalWalletTokenListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/DigitalWalletTokenServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/DigitalWalletTokenServiceAsyncImpl.kt index 22a3893fd..41d815e00 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/DigitalWalletTokenServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/DigitalWalletTokenServiceAsyncImpl.kt @@ -16,9 +16,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync import com.increase.api.models.digitalwallettokens.DigitalWalletToken -import com.increase.api.models.digitalwallettokens.DigitalWalletTokenListPageAsync -import com.increase.api.models.digitalwallettokens.DigitalWalletTokenListPageResponse import com.increase.api.models.digitalwallettokens.DigitalWalletTokenListParams +import com.increase.api.models.digitalwallettokens.DigitalWalletTokenListResponse import com.increase.api.models.digitalwallettokens.DigitalWalletTokenRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -50,7 +49,7 @@ internal constructor(private val clientOptions: ClientOptions) : DigitalWalletTo override fun list( params: DigitalWalletTokenListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /digital_wallet_tokens withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -100,13 +99,13 @@ internal constructor(private val clientOptions: ClientOptions) : DigitalWalletTo } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: DigitalWalletTokenListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -126,14 +125,6 @@ internal constructor(private val clientOptions: ClientOptions) : DigitalWalletTo it.validate() } } - .let { - DigitalWalletTokenListPageAsync.builder() - .service(DigitalWalletTokenServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/DocumentServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/DocumentServiceAsync.kt index 7937b5154..c9021a0eb 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/DocumentServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/DocumentServiceAsync.kt @@ -7,8 +7,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.documents.Document import com.increase.api.models.documents.DocumentCreateParams -import com.increase.api.models.documents.DocumentListPageAsync import com.increase.api.models.documents.DocumentListParams +import com.increase.api.models.documents.DocumentListResponse import com.increase.api.models.documents.DocumentRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -70,21 +70,21 @@ interface DocumentServiceAsync { retrieve(documentId, DocumentRetrieveParams.none(), requestOptions) /** List Documents */ - fun list(): CompletableFuture = list(DocumentListParams.none()) + fun list(): CompletableFuture = list(DocumentListParams.none()) /** @see list */ fun list( params: DocumentListParams = DocumentListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: DocumentListParams = DocumentListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(DocumentListParams.none(), requestOptions) /** @@ -157,25 +157,25 @@ interface DocumentServiceAsync { * Returns a raw HTTP response for `get /documents`, but is otherwise the same as * [DocumentServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(DocumentListParams.none()) /** @see list */ fun list( params: DocumentListParams = DocumentListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: DocumentListParams = DocumentListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(DocumentListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/DocumentServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/DocumentServiceAsyncImpl.kt index 52526bde0..ef796649a 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/DocumentServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/DocumentServiceAsyncImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync import com.increase.api.models.documents.Document import com.increase.api.models.documents.DocumentCreateParams -import com.increase.api.models.documents.DocumentListPageAsync -import com.increase.api.models.documents.DocumentListPageResponse import com.increase.api.models.documents.DocumentListParams +import com.increase.api.models.documents.DocumentListResponse import com.increase.api.models.documents.DocumentRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -55,7 +54,7 @@ class DocumentServiceAsyncImpl internal constructor(private val clientOptions: C override fun list( params: DocumentListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /documents withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -136,13 +135,13 @@ class DocumentServiceAsyncImpl internal constructor(private val clientOptions: C } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: DocumentListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -162,14 +161,6 @@ class DocumentServiceAsyncImpl internal constructor(private val clientOptions: C it.validate() } } - .let { - DocumentListPageAsync.builder() - .service(DocumentServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/EntityServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/EntityServiceAsync.kt index 8c250e1c0..6f19e7895 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/EntityServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/EntityServiceAsync.kt @@ -11,8 +11,8 @@ import com.increase.api.models.entities.EntityArchiveParams import com.increase.api.models.entities.EntityConfirmParams import com.increase.api.models.entities.EntityCreateBeneficialOwnerParams import com.increase.api.models.entities.EntityCreateParams -import com.increase.api.models.entities.EntityListPageAsync import com.increase.api.models.entities.EntityListParams +import com.increase.api.models.entities.EntityListResponse import com.increase.api.models.entities.EntityRetrieveParams import com.increase.api.models.entities.EntityUpdateAddressParams import com.increase.api.models.entities.EntityUpdateBeneficialOwnerAddressParams @@ -110,21 +110,21 @@ interface EntityServiceAsync { update(entityId, EntityUpdateParams.none(), requestOptions) /** List Entities */ - fun list(): CompletableFuture = list(EntityListParams.none()) + fun list(): CompletableFuture = list(EntityListParams.none()) /** @see list */ fun list( params: EntityListParams = EntityListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: EntityListParams = EntityListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(EntityListParams.none(), requestOptions) /** Archive an Entity */ @@ -428,25 +428,25 @@ interface EntityServiceAsync { * Returns a raw HTTP response for `get /entities`, but is otherwise the same as * [EntityServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(EntityListParams.none()) /** @see list */ fun list( params: EntityListParams = EntityListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: EntityListParams = EntityListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(EntityListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/EntityServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/EntityServiceAsyncImpl.kt index 3f0ad0bdf..492afcf89 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/EntityServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/EntityServiceAsyncImpl.kt @@ -22,9 +22,8 @@ import com.increase.api.models.entities.EntityArchiveParams import com.increase.api.models.entities.EntityConfirmParams import com.increase.api.models.entities.EntityCreateBeneficialOwnerParams import com.increase.api.models.entities.EntityCreateParams -import com.increase.api.models.entities.EntityListPageAsync -import com.increase.api.models.entities.EntityListPageResponse import com.increase.api.models.entities.EntityListParams +import com.increase.api.models.entities.EntityListResponse import com.increase.api.models.entities.EntityRetrieveParams import com.increase.api.models.entities.EntityUpdateAddressParams import com.increase.api.models.entities.EntityUpdateBeneficialOwnerAddressParams @@ -70,7 +69,7 @@ class EntityServiceAsyncImpl internal constructor(private val clientOptions: Cli override fun list( params: EntityListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /entities withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -233,13 +232,13 @@ class EntityServiceAsyncImpl internal constructor(private val clientOptions: Cli } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: EntityListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -259,14 +258,6 @@ class EntityServiceAsyncImpl internal constructor(private val clientOptions: Cli it.validate() } } - .let { - EntityListPageAsync.builder() - .service(EntityServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/EventServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/EventServiceAsync.kt index 129d1066e..80e1a57c7 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/EventServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/EventServiceAsync.kt @@ -6,8 +6,8 @@ import com.increase.api.core.ClientOptions import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.events.Event -import com.increase.api.models.events.EventListPageAsync import com.increase.api.models.events.EventListParams +import com.increase.api.models.events.EventListResponse import com.increase.api.models.events.EventRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -59,21 +59,21 @@ interface EventServiceAsync { retrieve(eventId, EventRetrieveParams.none(), requestOptions) /** List Events */ - fun list(): CompletableFuture = list(EventListParams.none()) + fun list(): CompletableFuture = list(EventListParams.none()) /** @see list */ fun list( params: EventListParams = EventListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: EventListParams = EventListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(EventListParams.none(), requestOptions) /** A view of [EventServiceAsync] that provides access to raw HTTP responses for each method. */ @@ -131,25 +131,25 @@ interface EventServiceAsync { * Returns a raw HTTP response for `get /events`, but is otherwise the same as * [EventServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(EventListParams.none()) /** @see list */ fun list( params: EventListParams = EventListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: EventListParams = EventListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(EventListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/EventServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/EventServiceAsyncImpl.kt index ab2e1b434..ca53db1d6 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/EventServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/EventServiceAsyncImpl.kt @@ -16,9 +16,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync import com.increase.api.models.events.Event -import com.increase.api.models.events.EventListPageAsync -import com.increase.api.models.events.EventListPageResponse import com.increase.api.models.events.EventListParams +import com.increase.api.models.events.EventListResponse import com.increase.api.models.events.EventRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -46,7 +45,7 @@ class EventServiceAsyncImpl internal constructor(private val clientOptions: Clie override fun list( params: EventListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /events withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -95,13 +94,13 @@ class EventServiceAsyncImpl internal constructor(private val clientOptions: Clie } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: EventListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -121,14 +120,6 @@ class EventServiceAsyncImpl internal constructor(private val clientOptions: Clie it.validate() } } - .let { - EventListPageAsync.builder() - .service(EventServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/EventSubscriptionServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/EventSubscriptionServiceAsync.kt index 7f7d429c0..451e42e62 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/EventSubscriptionServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/EventSubscriptionServiceAsync.kt @@ -7,8 +7,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.eventsubscriptions.EventSubscription import com.increase.api.models.eventsubscriptions.EventSubscriptionCreateParams -import com.increase.api.models.eventsubscriptions.EventSubscriptionListPageAsync import com.increase.api.models.eventsubscriptions.EventSubscriptionListParams +import com.increase.api.models.eventsubscriptions.EventSubscriptionListResponse import com.increase.api.models.eventsubscriptions.EventSubscriptionRetrieveParams import com.increase.api.models.eventsubscriptions.EventSubscriptionUpdateParams import java.util.concurrent.CompletableFuture @@ -114,22 +114,22 @@ interface EventSubscriptionServiceAsync { update(eventSubscriptionId, EventSubscriptionUpdateParams.none(), requestOptions) /** List Event Subscriptions */ - fun list(): CompletableFuture = + fun list(): CompletableFuture = list(EventSubscriptionListParams.none()) /** @see list */ fun list( params: EventSubscriptionListParams = EventSubscriptionListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: EventSubscriptionListParams = EventSubscriptionListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(EventSubscriptionListParams.none(), requestOptions) /** @@ -258,25 +258,25 @@ interface EventSubscriptionServiceAsync { * Returns a raw HTTP response for `get /event_subscriptions`, but is otherwise the same as * [EventSubscriptionServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(EventSubscriptionListParams.none()) /** @see list */ fun list( params: EventSubscriptionListParams = EventSubscriptionListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: EventSubscriptionListParams = EventSubscriptionListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(EventSubscriptionListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/EventSubscriptionServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/EventSubscriptionServiceAsyncImpl.kt index 062b4d1b8..933dd1bf1 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/EventSubscriptionServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/EventSubscriptionServiceAsyncImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync import com.increase.api.models.eventsubscriptions.EventSubscription import com.increase.api.models.eventsubscriptions.EventSubscriptionCreateParams -import com.increase.api.models.eventsubscriptions.EventSubscriptionListPageAsync -import com.increase.api.models.eventsubscriptions.EventSubscriptionListPageResponse import com.increase.api.models.eventsubscriptions.EventSubscriptionListParams +import com.increase.api.models.eventsubscriptions.EventSubscriptionListResponse import com.increase.api.models.eventsubscriptions.EventSubscriptionRetrieveParams import com.increase.api.models.eventsubscriptions.EventSubscriptionUpdateParams import java.util.concurrent.CompletableFuture @@ -65,7 +64,7 @@ internal constructor(private val clientOptions: ClientOptions) : EventSubscripti override fun list( params: EventSubscriptionListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /event_subscriptions withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -180,13 +179,13 @@ internal constructor(private val clientOptions: ClientOptions) : EventSubscripti } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: EventSubscriptionListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -206,14 +205,6 @@ internal constructor(private val clientOptions: ClientOptions) : EventSubscripti it.validate() } } - .let { - EventSubscriptionListPageAsync.builder() - .service(EventSubscriptionServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/ExportServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/ExportServiceAsync.kt index 8a230658a..50978de79 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/ExportServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/ExportServiceAsync.kt @@ -7,8 +7,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.exports.Export import com.increase.api.models.exports.ExportCreateParams -import com.increase.api.models.exports.ExportListPageAsync import com.increase.api.models.exports.ExportListParams +import com.increase.api.models.exports.ExportListResponse import com.increase.api.models.exports.ExportRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -70,21 +70,21 @@ interface ExportServiceAsync { retrieve(exportId, ExportRetrieveParams.none(), requestOptions) /** List Exports */ - fun list(): CompletableFuture = list(ExportListParams.none()) + fun list(): CompletableFuture = list(ExportListParams.none()) /** @see list */ fun list( params: ExportListParams = ExportListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: ExportListParams = ExportListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(ExportListParams.none(), requestOptions) /** @@ -157,25 +157,25 @@ interface ExportServiceAsync { * Returns a raw HTTP response for `get /exports`, but is otherwise the same as * [ExportServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(ExportListParams.none()) /** @see list */ fun list( params: ExportListParams = ExportListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: ExportListParams = ExportListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(ExportListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/ExportServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/ExportServiceAsyncImpl.kt index 2e84caf14..a5b17a119 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/ExportServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/ExportServiceAsyncImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync import com.increase.api.models.exports.Export import com.increase.api.models.exports.ExportCreateParams -import com.increase.api.models.exports.ExportListPageAsync -import com.increase.api.models.exports.ExportListPageResponse import com.increase.api.models.exports.ExportListParams +import com.increase.api.models.exports.ExportListResponse import com.increase.api.models.exports.ExportRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -55,7 +54,7 @@ class ExportServiceAsyncImpl internal constructor(private val clientOptions: Cli override fun list( params: ExportListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /exports withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -134,13 +133,13 @@ class ExportServiceAsyncImpl internal constructor(private val clientOptions: Cli } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: ExportListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -160,14 +159,6 @@ class ExportServiceAsyncImpl internal constructor(private val clientOptions: Cli it.validate() } } - .let { - ExportListPageAsync.builder() - .service(ExportServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/ExternalAccountServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/ExternalAccountServiceAsync.kt index 888dd9063..2ca480383 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/ExternalAccountServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/ExternalAccountServiceAsync.kt @@ -7,8 +7,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.externalaccounts.ExternalAccount import com.increase.api.models.externalaccounts.ExternalAccountCreateParams -import com.increase.api.models.externalaccounts.ExternalAccountListPageAsync import com.increase.api.models.externalaccounts.ExternalAccountListParams +import com.increase.api.models.externalaccounts.ExternalAccountListResponse import com.increase.api.models.externalaccounts.ExternalAccountRetrieveParams import com.increase.api.models.externalaccounts.ExternalAccountUpdateParams import java.util.concurrent.CompletableFuture @@ -110,22 +110,22 @@ interface ExternalAccountServiceAsync { update(externalAccountId, ExternalAccountUpdateParams.none(), requestOptions) /** List External Accounts */ - fun list(): CompletableFuture = + fun list(): CompletableFuture = list(ExternalAccountListParams.none()) /** @see list */ fun list( params: ExternalAccountListParams = ExternalAccountListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: ExternalAccountListParams = ExternalAccountListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(ExternalAccountListParams.none(), requestOptions) /** @@ -249,25 +249,25 @@ interface ExternalAccountServiceAsync { * Returns a raw HTTP response for `get /external_accounts`, but is otherwise the same as * [ExternalAccountServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(ExternalAccountListParams.none()) /** @see list */ fun list( params: ExternalAccountListParams = ExternalAccountListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: ExternalAccountListParams = ExternalAccountListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(ExternalAccountListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/ExternalAccountServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/ExternalAccountServiceAsyncImpl.kt index a5cd30d49..31b0eee19 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/ExternalAccountServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/ExternalAccountServiceAsyncImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync import com.increase.api.models.externalaccounts.ExternalAccount import com.increase.api.models.externalaccounts.ExternalAccountCreateParams -import com.increase.api.models.externalaccounts.ExternalAccountListPageAsync -import com.increase.api.models.externalaccounts.ExternalAccountListPageResponse import com.increase.api.models.externalaccounts.ExternalAccountListParams +import com.increase.api.models.externalaccounts.ExternalAccountListResponse import com.increase.api.models.externalaccounts.ExternalAccountRetrieveParams import com.increase.api.models.externalaccounts.ExternalAccountUpdateParams import java.util.concurrent.CompletableFuture @@ -65,7 +64,7 @@ internal constructor(private val clientOptions: ClientOptions) : ExternalAccount override fun list( params: ExternalAccountListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /external_accounts withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -180,13 +179,13 @@ internal constructor(private val clientOptions: ClientOptions) : ExternalAccount } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: ExternalAccountListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -206,14 +205,6 @@ internal constructor(private val clientOptions: ClientOptions) : ExternalAccount it.validate() } } - .let { - ExternalAccountListPageAsync.builder() - .service(ExternalAccountServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/FednowTransferServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/FednowTransferServiceAsync.kt index 1debb37e7..616a367b4 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/FednowTransferServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/FednowTransferServiceAsync.kt @@ -9,8 +9,8 @@ import com.increase.api.models.fednowtransfers.FednowTransfer import com.increase.api.models.fednowtransfers.FednowTransferApproveParams import com.increase.api.models.fednowtransfers.FednowTransferCancelParams import com.increase.api.models.fednowtransfers.FednowTransferCreateParams -import com.increase.api.models.fednowtransfers.FednowTransferListPageAsync import com.increase.api.models.fednowtransfers.FednowTransferListParams +import com.increase.api.models.fednowtransfers.FednowTransferListResponse import com.increase.api.models.fednowtransfers.FednowTransferRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -75,22 +75,22 @@ interface FednowTransferServiceAsync { retrieve(fednowTransferId, FednowTransferRetrieveParams.none(), requestOptions) /** List FedNow Transfers */ - fun list(): CompletableFuture = + fun list(): CompletableFuture = list(FednowTransferListParams.none()) /** @see list */ fun list( params: FednowTransferListParams = FednowTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: FednowTransferListParams = FednowTransferListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(FednowTransferListParams.none(), requestOptions) /** Approve a FedNow Transfer */ @@ -238,25 +238,25 @@ interface FednowTransferServiceAsync { * Returns a raw HTTP response for `get /fednow_transfers`, but is otherwise the same as * [FednowTransferServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(FednowTransferListParams.none()) /** @see list */ fun list( params: FednowTransferListParams = FednowTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: FednowTransferListParams = FednowTransferListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(FednowTransferListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/FednowTransferServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/FednowTransferServiceAsyncImpl.kt index ea4c3f72e..6e12ba735 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/FednowTransferServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/FednowTransferServiceAsyncImpl.kt @@ -20,9 +20,8 @@ import com.increase.api.models.fednowtransfers.FednowTransfer import com.increase.api.models.fednowtransfers.FednowTransferApproveParams import com.increase.api.models.fednowtransfers.FednowTransferCancelParams import com.increase.api.models.fednowtransfers.FednowTransferCreateParams -import com.increase.api.models.fednowtransfers.FednowTransferListPageAsync -import com.increase.api.models.fednowtransfers.FednowTransferListPageResponse import com.increase.api.models.fednowtransfers.FednowTransferListParams +import com.increase.api.models.fednowtransfers.FednowTransferListResponse import com.increase.api.models.fednowtransfers.FednowTransferRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -59,7 +58,7 @@ internal constructor(private val clientOptions: ClientOptions) : FednowTransferS override fun list( params: FednowTransferListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /fednow_transfers withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -154,13 +153,13 @@ internal constructor(private val clientOptions: ClientOptions) : FednowTransferS } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: FednowTransferListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -180,14 +179,6 @@ internal constructor(private val clientOptions: ClientOptions) : FednowTransferS it.validate() } } - .let { - FednowTransferListPageAsync.builder() - .service(FednowTransferServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/FileServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/FileServiceAsync.kt index 4816f4ac2..7e53c77b2 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/FileServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/FileServiceAsync.kt @@ -7,8 +7,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.files.File import com.increase.api.models.files.FileCreateParams -import com.increase.api.models.files.FileListPageAsync import com.increase.api.models.files.FileListParams +import com.increase.api.models.files.FileListResponse import com.increase.api.models.files.FileRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -73,20 +73,20 @@ interface FileServiceAsync { retrieve(fileId, FileRetrieveParams.none(), requestOptions) /** List Files */ - fun list(): CompletableFuture = list(FileListParams.none()) + fun list(): CompletableFuture = list(FileListParams.none()) /** @see list */ fun list( params: FileListParams = FileListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ - fun list(params: FileListParams = FileListParams.none()): CompletableFuture = + fun list(params: FileListParams = FileListParams.none()): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(FileListParams.none(), requestOptions) /** A view of [FileServiceAsync] that provides access to raw HTTP responses for each method. */ @@ -155,25 +155,25 @@ interface FileServiceAsync { * Returns a raw HTTP response for `get /files`, but is otherwise the same as * [FileServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(FileListParams.none()) /** @see list */ fun list( params: FileListParams = FileListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: FileListParams = FileListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(FileListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/FileServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/FileServiceAsyncImpl.kt index a71d8a3e5..8349d96a3 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/FileServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/FileServiceAsyncImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync import com.increase.api.models.files.File import com.increase.api.models.files.FileCreateParams -import com.increase.api.models.files.FileListPageAsync -import com.increase.api.models.files.FileListPageResponse import com.increase.api.models.files.FileListParams +import com.increase.api.models.files.FileListResponse import com.increase.api.models.files.FileRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -55,7 +54,7 @@ class FileServiceAsyncImpl internal constructor(private val clientOptions: Clien override fun list( params: FileListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /files withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -134,13 +133,13 @@ class FileServiceAsyncImpl internal constructor(private val clientOptions: Clien } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: FileListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -160,14 +159,6 @@ class FileServiceAsyncImpl internal constructor(private val clientOptions: Clien it.validate() } } - .let { - FileListPageAsync.builder() - .service(FileServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundAchTransferServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundAchTransferServiceAsync.kt index 24c657782..ec3c76390 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundAchTransferServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundAchTransferServiceAsync.kt @@ -8,8 +8,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.inboundachtransfers.InboundAchTransfer import com.increase.api.models.inboundachtransfers.InboundAchTransferCreateNotificationOfChangeParams import com.increase.api.models.inboundachtransfers.InboundAchTransferDeclineParams -import com.increase.api.models.inboundachtransfers.InboundAchTransferListPageAsync import com.increase.api.models.inboundachtransfers.InboundAchTransferListParams +import com.increase.api.models.inboundachtransfers.InboundAchTransferListResponse import com.increase.api.models.inboundachtransfers.InboundAchTransferRetrieveParams import com.increase.api.models.inboundachtransfers.InboundAchTransferTransferReturnParams import java.util.concurrent.CompletableFuture @@ -69,22 +69,22 @@ interface InboundAchTransferServiceAsync { retrieve(inboundAchTransferId, InboundAchTransferRetrieveParams.none(), requestOptions) /** List Inbound ACH Transfers */ - fun list(): CompletableFuture = + fun list(): CompletableFuture = list(InboundAchTransferListParams.none()) /** @see list */ fun list( params: InboundAchTransferListParams = InboundAchTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: InboundAchTransferListParams = InboundAchTransferListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(InboundAchTransferListParams.none(), requestOptions) /** Create a notification of change for an Inbound ACH Transfer */ @@ -272,25 +272,25 @@ interface InboundAchTransferServiceAsync { * Returns a raw HTTP response for `get /inbound_ach_transfers`, but is otherwise the same * as [InboundAchTransferServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(InboundAchTransferListParams.none()) /** @see list */ fun list( params: InboundAchTransferListParams = InboundAchTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: InboundAchTransferListParams = InboundAchTransferListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(InboundAchTransferListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundAchTransferServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundAchTransferServiceAsyncImpl.kt index 21832a6f1..831882495 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundAchTransferServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundAchTransferServiceAsyncImpl.kt @@ -19,9 +19,8 @@ import com.increase.api.core.prepareAsync import com.increase.api.models.inboundachtransfers.InboundAchTransfer import com.increase.api.models.inboundachtransfers.InboundAchTransferCreateNotificationOfChangeParams import com.increase.api.models.inboundachtransfers.InboundAchTransferDeclineParams -import com.increase.api.models.inboundachtransfers.InboundAchTransferListPageAsync -import com.increase.api.models.inboundachtransfers.InboundAchTransferListPageResponse import com.increase.api.models.inboundachtransfers.InboundAchTransferListParams +import com.increase.api.models.inboundachtransfers.InboundAchTransferListResponse import com.increase.api.models.inboundachtransfers.InboundAchTransferRetrieveParams import com.increase.api.models.inboundachtransfers.InboundAchTransferTransferReturnParams import java.util.concurrent.CompletableFuture @@ -54,7 +53,7 @@ internal constructor(private val clientOptions: ClientOptions) : InboundAchTrans override fun list( params: InboundAchTransferListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /inbound_ach_transfers withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -127,13 +126,13 @@ internal constructor(private val clientOptions: ClientOptions) : InboundAchTrans } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: InboundAchTransferListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -153,14 +152,6 @@ internal constructor(private val clientOptions: ClientOptions) : InboundAchTrans it.validate() } } - .let { - InboundAchTransferListPageAsync.builder() - .service(InboundAchTransferServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundCheckDepositServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundCheckDepositServiceAsync.kt index d716b2693..56c0c1a50 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundCheckDepositServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundCheckDepositServiceAsync.kt @@ -7,8 +7,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.inboundcheckdeposits.InboundCheckDeposit import com.increase.api.models.inboundcheckdeposits.InboundCheckDepositDeclineParams -import com.increase.api.models.inboundcheckdeposits.InboundCheckDepositListPageAsync import com.increase.api.models.inboundcheckdeposits.InboundCheckDepositListParams +import com.increase.api.models.inboundcheckdeposits.InboundCheckDepositListResponse import com.increase.api.models.inboundcheckdeposits.InboundCheckDepositRetrieveParams import com.increase.api.models.inboundcheckdeposits.InboundCheckDepositReturnParams import java.util.concurrent.CompletableFuture @@ -69,22 +69,22 @@ interface InboundCheckDepositServiceAsync { retrieve(inboundCheckDepositId, InboundCheckDepositRetrieveParams.none(), requestOptions) /** List Inbound Check Deposits */ - fun list(): CompletableFuture = + fun list(): CompletableFuture = list(InboundCheckDepositListParams.none()) /** @see list */ fun list( params: InboundCheckDepositListParams = InboundCheckDepositListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: InboundCheckDepositListParams = InboundCheckDepositListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(InboundCheckDepositListParams.none(), requestOptions) /** Decline an Inbound Check Deposit */ @@ -223,25 +223,25 @@ interface InboundCheckDepositServiceAsync { * Returns a raw HTTP response for `get /inbound_check_deposits`, but is otherwise the same * as [InboundCheckDepositServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(InboundCheckDepositListParams.none()) /** @see list */ fun list( params: InboundCheckDepositListParams = InboundCheckDepositListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: InboundCheckDepositListParams = InboundCheckDepositListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(InboundCheckDepositListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundCheckDepositServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundCheckDepositServiceAsyncImpl.kt index f2010b57e..33b2a9d46 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundCheckDepositServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundCheckDepositServiceAsyncImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync import com.increase.api.models.inboundcheckdeposits.InboundCheckDeposit import com.increase.api.models.inboundcheckdeposits.InboundCheckDepositDeclineParams -import com.increase.api.models.inboundcheckdeposits.InboundCheckDepositListPageAsync -import com.increase.api.models.inboundcheckdeposits.InboundCheckDepositListPageResponse import com.increase.api.models.inboundcheckdeposits.InboundCheckDepositListParams +import com.increase.api.models.inboundcheckdeposits.InboundCheckDepositListResponse import com.increase.api.models.inboundcheckdeposits.InboundCheckDepositRetrieveParams import com.increase.api.models.inboundcheckdeposits.InboundCheckDepositReturnParams import java.util.concurrent.CompletableFuture @@ -54,7 +53,7 @@ internal constructor(private val clientOptions: ClientOptions) : InboundCheckDep override fun list( params: InboundCheckDepositListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /inbound_check_deposits withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -118,13 +117,13 @@ internal constructor(private val clientOptions: ClientOptions) : InboundCheckDep } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: InboundCheckDepositListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -144,14 +143,6 @@ internal constructor(private val clientOptions: ClientOptions) : InboundCheckDep it.validate() } } - .let { - InboundCheckDepositListPageAsync.builder() - .service(InboundCheckDepositServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundFednowTransferServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundFednowTransferServiceAsync.kt index ca737e1bf..7931eb69d 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundFednowTransferServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundFednowTransferServiceAsync.kt @@ -6,8 +6,8 @@ import com.increase.api.core.ClientOptions import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.inboundfednowtransfers.InboundFednowTransfer -import com.increase.api.models.inboundfednowtransfers.InboundFednowTransferListPageAsync import com.increase.api.models.inboundfednowtransfers.InboundFednowTransferListParams +import com.increase.api.models.inboundfednowtransfers.InboundFednowTransferListResponse import com.increase.api.models.inboundfednowtransfers.InboundFednowTransferRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -71,24 +71,22 @@ interface InboundFednowTransferServiceAsync { ) /** List Inbound FedNow Transfers */ - fun list(): CompletableFuture = + fun list(): CompletableFuture = list(InboundFednowTransferListParams.none()) /** @see list */ fun list( params: InboundFednowTransferListParams = InboundFednowTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: InboundFednowTransferListParams = InboundFednowTransferListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list( - requestOptions: RequestOptions - ): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(InboundFednowTransferListParams.none(), requestOptions) /** @@ -162,25 +160,25 @@ interface InboundFednowTransferServiceAsync { * Returns a raw HTTP response for `get /inbound_fednow_transfers`, but is otherwise the * same as [InboundFednowTransferServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(InboundFednowTransferListParams.none()) /** @see list */ fun list( params: InboundFednowTransferListParams = InboundFednowTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: InboundFednowTransferListParams = InboundFednowTransferListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(InboundFednowTransferListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundFednowTransferServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundFednowTransferServiceAsyncImpl.kt index 992a3cf7e..682f55597 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundFednowTransferServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundFednowTransferServiceAsyncImpl.kt @@ -16,9 +16,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync import com.increase.api.models.inboundfednowtransfers.InboundFednowTransfer -import com.increase.api.models.inboundfednowtransfers.InboundFednowTransferListPageAsync -import com.increase.api.models.inboundfednowtransfers.InboundFednowTransferListPageResponse import com.increase.api.models.inboundfednowtransfers.InboundFednowTransferListParams +import com.increase.api.models.inboundfednowtransfers.InboundFednowTransferListResponse import com.increase.api.models.inboundfednowtransfers.InboundFednowTransferRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -51,7 +50,7 @@ internal constructor(private val clientOptions: ClientOptions) : InboundFednowTr override fun list( params: InboundFednowTransferListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /inbound_fednow_transfers withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -101,13 +100,13 @@ internal constructor(private val clientOptions: ClientOptions) : InboundFednowTr } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: InboundFednowTransferListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -127,14 +126,6 @@ internal constructor(private val clientOptions: ClientOptions) : InboundFednowTr it.validate() } } - .let { - InboundFednowTransferListPageAsync.builder() - .service(InboundFednowTransferServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundMailItemServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundMailItemServiceAsync.kt index 77f3f8ba8..10b7ce5ca 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundMailItemServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundMailItemServiceAsync.kt @@ -7,8 +7,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.inboundmailitems.InboundMailItem import com.increase.api.models.inboundmailitems.InboundMailItemActionParams -import com.increase.api.models.inboundmailitems.InboundMailItemListPageAsync import com.increase.api.models.inboundmailitems.InboundMailItemListParams +import com.increase.api.models.inboundmailitems.InboundMailItemListResponse import com.increase.api.models.inboundmailitems.InboundMailItemRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -64,22 +64,22 @@ interface InboundMailItemServiceAsync { retrieve(inboundMailItemId, InboundMailItemRetrieveParams.none(), requestOptions) /** List Inbound Mail Items */ - fun list(): CompletableFuture = + fun list(): CompletableFuture = list(InboundMailItemListParams.none()) /** @see list */ fun list( params: InboundMailItemListParams = InboundMailItemListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: InboundMailItemListParams = InboundMailItemListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(InboundMailItemListParams.none(), requestOptions) /** Action a Inbound Mail Item */ @@ -171,25 +171,25 @@ interface InboundMailItemServiceAsync { * Returns a raw HTTP response for `get /inbound_mail_items`, but is otherwise the same as * [InboundMailItemServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(InboundMailItemListParams.none()) /** @see list */ fun list( params: InboundMailItemListParams = InboundMailItemListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: InboundMailItemListParams = InboundMailItemListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(InboundMailItemListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundMailItemServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundMailItemServiceAsyncImpl.kt index fe75afcc4..9803b2378 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundMailItemServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundMailItemServiceAsyncImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync import com.increase.api.models.inboundmailitems.InboundMailItem import com.increase.api.models.inboundmailitems.InboundMailItemActionParams -import com.increase.api.models.inboundmailitems.InboundMailItemListPageAsync -import com.increase.api.models.inboundmailitems.InboundMailItemListPageResponse import com.increase.api.models.inboundmailitems.InboundMailItemListParams +import com.increase.api.models.inboundmailitems.InboundMailItemListResponse import com.increase.api.models.inboundmailitems.InboundMailItemRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -50,7 +49,7 @@ internal constructor(private val clientOptions: ClientOptions) : InboundMailItem override fun list( params: InboundMailItemListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /inbound_mail_items withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -107,13 +106,13 @@ internal constructor(private val clientOptions: ClientOptions) : InboundMailItem } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: InboundMailItemListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -133,14 +132,6 @@ internal constructor(private val clientOptions: ClientOptions) : InboundMailItem it.validate() } } - .let { - InboundMailItemListPageAsync.builder() - .service(InboundMailItemServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundRealTimePaymentsTransferServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundRealTimePaymentsTransferServiceAsync.kt index a1468191c..c8a472693 100755 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundRealTimePaymentsTransferServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundRealTimePaymentsTransferServiceAsync.kt @@ -6,8 +6,8 @@ import com.increase.api.core.ClientOptions import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.inboundrealtimepaymentstransfers.InboundRealTimePaymentsTransfer -import com.increase.api.models.inboundrealtimepaymentstransfers.InboundRealTimePaymentsTransferListPageAsync import com.increase.api.models.inboundrealtimepaymentstransfers.InboundRealTimePaymentsTransferListParams +import com.increase.api.models.inboundrealtimepaymentstransfers.InboundRealTimePaymentsTransferListResponse import com.increase.api.models.inboundrealtimepaymentstransfers.InboundRealTimePaymentsTransferRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -83,7 +83,7 @@ interface InboundRealTimePaymentsTransferServiceAsync { ) /** List Inbound Real-Time Payments Transfers */ - fun list(): CompletableFuture = + fun list(): CompletableFuture = list(InboundRealTimePaymentsTransferListParams.none()) /** @see list */ @@ -91,19 +91,19 @@ interface InboundRealTimePaymentsTransferServiceAsync { params: InboundRealTimePaymentsTransferListParams = InboundRealTimePaymentsTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: InboundRealTimePaymentsTransferListParams = InboundRealTimePaymentsTransferListParams.none() - ): CompletableFuture = + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture = + ): CompletableFuture = list(InboundRealTimePaymentsTransferListParams.none(), requestOptions) /** @@ -185,7 +185,7 @@ interface InboundRealTimePaymentsTransferServiceAsync { * otherwise the same as [InboundRealTimePaymentsTransferServiceAsync.list]. */ fun list(): - CompletableFuture> = + CompletableFuture> = list(InboundRealTimePaymentsTransferListParams.none()) /** @see list */ @@ -193,19 +193,19 @@ interface InboundRealTimePaymentsTransferServiceAsync { params: InboundRealTimePaymentsTransferListParams = InboundRealTimePaymentsTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: InboundRealTimePaymentsTransferListParams = InboundRealTimePaymentsTransferListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(InboundRealTimePaymentsTransferListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundRealTimePaymentsTransferServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundRealTimePaymentsTransferServiceAsyncImpl.kt index 192058dc8..a381c93bd 100755 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundRealTimePaymentsTransferServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundRealTimePaymentsTransferServiceAsyncImpl.kt @@ -16,9 +16,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync import com.increase.api.models.inboundrealtimepaymentstransfers.InboundRealTimePaymentsTransfer -import com.increase.api.models.inboundrealtimepaymentstransfers.InboundRealTimePaymentsTransferListPageAsync -import com.increase.api.models.inboundrealtimepaymentstransfers.InboundRealTimePaymentsTransferListPageResponse import com.increase.api.models.inboundrealtimepaymentstransfers.InboundRealTimePaymentsTransferListParams +import com.increase.api.models.inboundrealtimepaymentstransfers.InboundRealTimePaymentsTransferListResponse import com.increase.api.models.inboundrealtimepaymentstransfers.InboundRealTimePaymentsTransferRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -53,7 +52,7 @@ internal constructor(private val clientOptions: ClientOptions) : override fun list( params: InboundRealTimePaymentsTransferListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /inbound_real_time_payments_transfers withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -106,13 +105,13 @@ internal constructor(private val clientOptions: ClientOptions) : } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: InboundRealTimePaymentsTransferListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -132,18 +131,6 @@ internal constructor(private val clientOptions: ClientOptions) : it.validate() } } - .let { - InboundRealTimePaymentsTransferListPageAsync.builder() - .service( - InboundRealTimePaymentsTransferServiceAsyncImpl( - clientOptions - ) - ) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundWireDrawdownRequestServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundWireDrawdownRequestServiceAsync.kt index 78f0d33f8..1af06845f 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundWireDrawdownRequestServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundWireDrawdownRequestServiceAsync.kt @@ -6,8 +6,8 @@ import com.increase.api.core.ClientOptions import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.inboundwiredrawdownrequests.InboundWireDrawdownRequest -import com.increase.api.models.inboundwiredrawdownrequests.InboundWireDrawdownRequestListPageAsync import com.increase.api.models.inboundwiredrawdownrequests.InboundWireDrawdownRequestListParams +import com.increase.api.models.inboundwiredrawdownrequests.InboundWireDrawdownRequestListResponse import com.increase.api.models.inboundwiredrawdownrequests.InboundWireDrawdownRequestRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -77,25 +77,25 @@ interface InboundWireDrawdownRequestServiceAsync { ) /** List Inbound Wire Drawdown Requests */ - fun list(): CompletableFuture = + fun list(): CompletableFuture = list(InboundWireDrawdownRequestListParams.none()) /** @see list */ fun list( params: InboundWireDrawdownRequestListParams = InboundWireDrawdownRequestListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: InboundWireDrawdownRequestListParams = InboundWireDrawdownRequestListParams.none() - ): CompletableFuture = + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture = + ): CompletableFuture = list(InboundWireDrawdownRequestListParams.none(), requestOptions) /** @@ -173,7 +173,7 @@ interface InboundWireDrawdownRequestServiceAsync { * Returns a raw HTTP response for `get /inbound_wire_drawdown_requests`, but is otherwise * the same as [InboundWireDrawdownRequestServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(InboundWireDrawdownRequestListParams.none()) /** @see list */ @@ -181,19 +181,19 @@ interface InboundWireDrawdownRequestServiceAsync { params: InboundWireDrawdownRequestListParams = InboundWireDrawdownRequestListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: InboundWireDrawdownRequestListParams = InboundWireDrawdownRequestListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(InboundWireDrawdownRequestListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundWireDrawdownRequestServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundWireDrawdownRequestServiceAsyncImpl.kt index 3b1139387..9d5a8538b 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundWireDrawdownRequestServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundWireDrawdownRequestServiceAsyncImpl.kt @@ -16,9 +16,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync import com.increase.api.models.inboundwiredrawdownrequests.InboundWireDrawdownRequest -import com.increase.api.models.inboundwiredrawdownrequests.InboundWireDrawdownRequestListPageAsync -import com.increase.api.models.inboundwiredrawdownrequests.InboundWireDrawdownRequestListPageResponse import com.increase.api.models.inboundwiredrawdownrequests.InboundWireDrawdownRequestListParams +import com.increase.api.models.inboundwiredrawdownrequests.InboundWireDrawdownRequestListResponse import com.increase.api.models.inboundwiredrawdownrequests.InboundWireDrawdownRequestRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -52,7 +51,7 @@ internal constructor(private val clientOptions: ClientOptions) : override fun list( params: InboundWireDrawdownRequestListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /inbound_wire_drawdown_requests withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -105,13 +104,13 @@ internal constructor(private val clientOptions: ClientOptions) : } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: InboundWireDrawdownRequestListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -131,16 +130,6 @@ internal constructor(private val clientOptions: ClientOptions) : it.validate() } } - .let { - InboundWireDrawdownRequestListPageAsync.builder() - .service( - InboundWireDrawdownRequestServiceAsyncImpl(clientOptions) - ) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundWireTransferServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundWireTransferServiceAsync.kt index 65e4aa4db..ef2793304 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundWireTransferServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundWireTransferServiceAsync.kt @@ -6,8 +6,8 @@ import com.increase.api.core.ClientOptions import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.inboundwiretransfers.InboundWireTransfer -import com.increase.api.models.inboundwiretransfers.InboundWireTransferListPageAsync import com.increase.api.models.inboundwiretransfers.InboundWireTransferListParams +import com.increase.api.models.inboundwiretransfers.InboundWireTransferListResponse import com.increase.api.models.inboundwiretransfers.InboundWireTransferRetrieveParams import com.increase.api.models.inboundwiretransfers.InboundWireTransferReverseParams import java.util.concurrent.CompletableFuture @@ -68,22 +68,22 @@ interface InboundWireTransferServiceAsync { retrieve(inboundWireTransferId, InboundWireTransferRetrieveParams.none(), requestOptions) /** List Inbound Wire Transfers */ - fun list(): CompletableFuture = + fun list(): CompletableFuture = list(InboundWireTransferListParams.none()) /** @see list */ fun list( params: InboundWireTransferListParams = InboundWireTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: InboundWireTransferListParams = InboundWireTransferListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(InboundWireTransferListParams.none(), requestOptions) /** Reverse an Inbound Wire Transfer */ @@ -183,25 +183,25 @@ interface InboundWireTransferServiceAsync { * Returns a raw HTTP response for `get /inbound_wire_transfers`, but is otherwise the same * as [InboundWireTransferServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(InboundWireTransferListParams.none()) /** @see list */ fun list( params: InboundWireTransferListParams = InboundWireTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: InboundWireTransferListParams = InboundWireTransferListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(InboundWireTransferListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundWireTransferServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundWireTransferServiceAsyncImpl.kt index d91283019..70af1b732 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundWireTransferServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/InboundWireTransferServiceAsyncImpl.kt @@ -17,9 +17,8 @@ import com.increase.api.core.http.json import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync import com.increase.api.models.inboundwiretransfers.InboundWireTransfer -import com.increase.api.models.inboundwiretransfers.InboundWireTransferListPageAsync -import com.increase.api.models.inboundwiretransfers.InboundWireTransferListPageResponse import com.increase.api.models.inboundwiretransfers.InboundWireTransferListParams +import com.increase.api.models.inboundwiretransfers.InboundWireTransferListResponse import com.increase.api.models.inboundwiretransfers.InboundWireTransferRetrieveParams import com.increase.api.models.inboundwiretransfers.InboundWireTransferReverseParams import java.util.concurrent.CompletableFuture @@ -53,7 +52,7 @@ internal constructor(private val clientOptions: ClientOptions) : InboundWireTran override fun list( params: InboundWireTransferListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /inbound_wire_transfers withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -110,13 +109,13 @@ internal constructor(private val clientOptions: ClientOptions) : InboundWireTran } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: InboundWireTransferListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -136,14 +135,6 @@ internal constructor(private val clientOptions: ClientOptions) : InboundWireTran it.validate() } } - .let { - InboundWireTransferListPageAsync.builder() - .service(InboundWireTransferServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/IntrafiAccountEnrollmentServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/IntrafiAccountEnrollmentServiceAsync.kt index ef29391f8..de72d0297 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/IntrafiAccountEnrollmentServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/IntrafiAccountEnrollmentServiceAsync.kt @@ -7,8 +7,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.intrafiaccountenrollments.IntrafiAccountEnrollment import com.increase.api.models.intrafiaccountenrollments.IntrafiAccountEnrollmentCreateParams -import com.increase.api.models.intrafiaccountenrollments.IntrafiAccountEnrollmentListPageAsync import com.increase.api.models.intrafiaccountenrollments.IntrafiAccountEnrollmentListParams +import com.increase.api.models.intrafiaccountenrollments.IntrafiAccountEnrollmentListResponse import com.increase.api.models.intrafiaccountenrollments.IntrafiAccountEnrollmentRetrieveParams import com.increase.api.models.intrafiaccountenrollments.IntrafiAccountEnrollmentUnenrollParams import java.util.concurrent.CompletableFuture @@ -86,25 +86,24 @@ interface IntrafiAccountEnrollmentServiceAsync { ) /** List IntraFi Account Enrollments */ - fun list(): CompletableFuture = + fun list(): CompletableFuture = list(IntrafiAccountEnrollmentListParams.none()) /** @see list */ fun list( params: IntrafiAccountEnrollmentListParams = IntrafiAccountEnrollmentListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: IntrafiAccountEnrollmentListParams = IntrafiAccountEnrollmentListParams.none() - ): CompletableFuture = - list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture = + ): CompletableFuture = list(IntrafiAccountEnrollmentListParams.none(), requestOptions) /** Unenroll an account from IntraFi */ @@ -240,25 +239,25 @@ interface IntrafiAccountEnrollmentServiceAsync { * Returns a raw HTTP response for `get /intrafi_account_enrollments`, but is otherwise the * same as [IntrafiAccountEnrollmentServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(IntrafiAccountEnrollmentListParams.none()) /** @see list */ fun list( params: IntrafiAccountEnrollmentListParams = IntrafiAccountEnrollmentListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: IntrafiAccountEnrollmentListParams = IntrafiAccountEnrollmentListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(IntrafiAccountEnrollmentListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/IntrafiAccountEnrollmentServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/IntrafiAccountEnrollmentServiceAsyncImpl.kt index 7b22b5e0d..e34cf1a6e 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/IntrafiAccountEnrollmentServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/IntrafiAccountEnrollmentServiceAsyncImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync import com.increase.api.models.intrafiaccountenrollments.IntrafiAccountEnrollment import com.increase.api.models.intrafiaccountenrollments.IntrafiAccountEnrollmentCreateParams -import com.increase.api.models.intrafiaccountenrollments.IntrafiAccountEnrollmentListPageAsync -import com.increase.api.models.intrafiaccountenrollments.IntrafiAccountEnrollmentListPageResponse import com.increase.api.models.intrafiaccountenrollments.IntrafiAccountEnrollmentListParams +import com.increase.api.models.intrafiaccountenrollments.IntrafiAccountEnrollmentListResponse import com.increase.api.models.intrafiaccountenrollments.IntrafiAccountEnrollmentRetrieveParams import com.increase.api.models.intrafiaccountenrollments.IntrafiAccountEnrollmentUnenrollParams import java.util.concurrent.CompletableFuture @@ -62,7 +61,7 @@ internal constructor(private val clientOptions: ClientOptions) : override fun list( params: IntrafiAccountEnrollmentListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /intrafi_account_enrollments withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -153,13 +152,13 @@ internal constructor(private val clientOptions: ClientOptions) : } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: IntrafiAccountEnrollmentListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -179,16 +178,6 @@ internal constructor(private val clientOptions: ClientOptions) : it.validate() } } - .let { - IntrafiAccountEnrollmentListPageAsync.builder() - .service( - IntrafiAccountEnrollmentServiceAsyncImpl(clientOptions) - ) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/IntrafiExclusionServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/IntrafiExclusionServiceAsync.kt index a058ca05f..1df3a6221 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/IntrafiExclusionServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/IntrafiExclusionServiceAsync.kt @@ -8,8 +8,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.intrafiexclusions.IntrafiExclusion import com.increase.api.models.intrafiexclusions.IntrafiExclusionArchiveParams import com.increase.api.models.intrafiexclusions.IntrafiExclusionCreateParams -import com.increase.api.models.intrafiexclusions.IntrafiExclusionListPageAsync import com.increase.api.models.intrafiexclusions.IntrafiExclusionListParams +import com.increase.api.models.intrafiexclusions.IntrafiExclusionListResponse import com.increase.api.models.intrafiexclusions.IntrafiExclusionRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -75,22 +75,22 @@ interface IntrafiExclusionServiceAsync { retrieve(intrafiExclusionId, IntrafiExclusionRetrieveParams.none(), requestOptions) /** List IntraFi Exclusions */ - fun list(): CompletableFuture = + fun list(): CompletableFuture = list(IntrafiExclusionListParams.none()) /** @see list */ fun list( params: IntrafiExclusionListParams = IntrafiExclusionListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: IntrafiExclusionListParams = IntrafiExclusionListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(IntrafiExclusionListParams.none(), requestOptions) /** Archive an IntraFi Exclusion */ @@ -209,25 +209,25 @@ interface IntrafiExclusionServiceAsync { * Returns a raw HTTP response for `get /intrafi_exclusions`, but is otherwise the same as * [IntrafiExclusionServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(IntrafiExclusionListParams.none()) /** @see list */ fun list( params: IntrafiExclusionListParams = IntrafiExclusionListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: IntrafiExclusionListParams = IntrafiExclusionListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(IntrafiExclusionListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/IntrafiExclusionServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/IntrafiExclusionServiceAsyncImpl.kt index 3a152331a..d59245abc 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/IntrafiExclusionServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/IntrafiExclusionServiceAsyncImpl.kt @@ -19,9 +19,8 @@ import com.increase.api.core.prepareAsync import com.increase.api.models.intrafiexclusions.IntrafiExclusion import com.increase.api.models.intrafiexclusions.IntrafiExclusionArchiveParams import com.increase.api.models.intrafiexclusions.IntrafiExclusionCreateParams -import com.increase.api.models.intrafiexclusions.IntrafiExclusionListPageAsync -import com.increase.api.models.intrafiexclusions.IntrafiExclusionListPageResponse import com.increase.api.models.intrafiexclusions.IntrafiExclusionListParams +import com.increase.api.models.intrafiexclusions.IntrafiExclusionListResponse import com.increase.api.models.intrafiexclusions.IntrafiExclusionRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -58,7 +57,7 @@ internal constructor(private val clientOptions: ClientOptions) : IntrafiExclusio override fun list( params: IntrafiExclusionListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /intrafi_exclusions withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -146,13 +145,13 @@ internal constructor(private val clientOptions: ClientOptions) : IntrafiExclusio } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: IntrafiExclusionListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -172,14 +171,6 @@ internal constructor(private val clientOptions: ClientOptions) : IntrafiExclusio it.validate() } } - .let { - IntrafiExclusionListPageAsync.builder() - .service(IntrafiExclusionServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/LockboxServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/LockboxServiceAsync.kt index 82fee8d70..64fecbc82 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/LockboxServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/LockboxServiceAsync.kt @@ -7,8 +7,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.lockboxes.Lockbox import com.increase.api.models.lockboxes.LockboxCreateParams -import com.increase.api.models.lockboxes.LockboxListPageAsync import com.increase.api.models.lockboxes.LockboxListParams +import com.increase.api.models.lockboxes.LockboxListResponse import com.increase.api.models.lockboxes.LockboxRetrieveParams import com.increase.api.models.lockboxes.LockboxUpdateParams import java.util.concurrent.CompletableFuture @@ -103,21 +103,21 @@ interface LockboxServiceAsync { update(lockboxId, LockboxUpdateParams.none(), requestOptions) /** List Lockboxes */ - fun list(): CompletableFuture = list(LockboxListParams.none()) + fun list(): CompletableFuture = list(LockboxListParams.none()) /** @see list */ fun list( params: LockboxListParams = LockboxListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: LockboxListParams = LockboxListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(LockboxListParams.none(), requestOptions) /** @@ -229,25 +229,25 @@ interface LockboxServiceAsync { * Returns a raw HTTP response for `get /lockboxes`, but is otherwise the same as * [LockboxServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(LockboxListParams.none()) /** @see list */ fun list( params: LockboxListParams = LockboxListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: LockboxListParams = LockboxListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(LockboxListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/LockboxServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/LockboxServiceAsyncImpl.kt index 47eb14424..ef95ff901 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/LockboxServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/LockboxServiceAsyncImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync import com.increase.api.models.lockboxes.Lockbox import com.increase.api.models.lockboxes.LockboxCreateParams -import com.increase.api.models.lockboxes.LockboxListPageAsync -import com.increase.api.models.lockboxes.LockboxListPageResponse import com.increase.api.models.lockboxes.LockboxListParams +import com.increase.api.models.lockboxes.LockboxListResponse import com.increase.api.models.lockboxes.LockboxRetrieveParams import com.increase.api.models.lockboxes.LockboxUpdateParams import java.util.concurrent.CompletableFuture @@ -63,7 +62,7 @@ class LockboxServiceAsyncImpl internal constructor(private val clientOptions: Cl override fun list( params: LockboxListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /lockboxes withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -176,13 +175,13 @@ class LockboxServiceAsyncImpl internal constructor(private val clientOptions: Cl } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: LockboxListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -202,14 +201,6 @@ class LockboxServiceAsyncImpl internal constructor(private val clientOptions: Cl it.validate() } } - .let { - LockboxListPageAsync.builder() - .service(LockboxServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/OAuthApplicationServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/OAuthApplicationServiceAsync.kt index 7855599d9..a5473793f 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/OAuthApplicationServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/OAuthApplicationServiceAsync.kt @@ -6,8 +6,8 @@ import com.increase.api.core.ClientOptions import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.oauthapplications.OAuthApplication -import com.increase.api.models.oauthapplications.OAuthApplicationListPageAsync import com.increase.api.models.oauthapplications.OAuthApplicationListParams +import com.increase.api.models.oauthapplications.OAuthApplicationListResponse import com.increase.api.models.oauthapplications.OAuthApplicationRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -63,22 +63,22 @@ interface OAuthApplicationServiceAsync { retrieve(oauthApplicationId, OAuthApplicationRetrieveParams.none(), requestOptions) /** List OAuth Applications */ - fun list(): CompletableFuture = + fun list(): CompletableFuture = list(OAuthApplicationListParams.none()) /** @see list */ fun list( params: OAuthApplicationListParams = OAuthApplicationListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: OAuthApplicationListParams = OAuthApplicationListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(OAuthApplicationListParams.none(), requestOptions) /** @@ -146,25 +146,25 @@ interface OAuthApplicationServiceAsync { * Returns a raw HTTP response for `get /oauth_applications`, but is otherwise the same as * [OAuthApplicationServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(OAuthApplicationListParams.none()) /** @see list */ fun list( params: OAuthApplicationListParams = OAuthApplicationListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: OAuthApplicationListParams = OAuthApplicationListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(OAuthApplicationListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/OAuthApplicationServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/OAuthApplicationServiceAsyncImpl.kt index 71dd6934e..a64c11a11 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/OAuthApplicationServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/OAuthApplicationServiceAsyncImpl.kt @@ -16,9 +16,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync import com.increase.api.models.oauthapplications.OAuthApplication -import com.increase.api.models.oauthapplications.OAuthApplicationListPageAsync -import com.increase.api.models.oauthapplications.OAuthApplicationListPageResponse import com.increase.api.models.oauthapplications.OAuthApplicationListParams +import com.increase.api.models.oauthapplications.OAuthApplicationListResponse import com.increase.api.models.oauthapplications.OAuthApplicationRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -48,7 +47,7 @@ internal constructor(private val clientOptions: ClientOptions) : OAuthApplicatio override fun list( params: OAuthApplicationListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /oauth_applications withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -98,13 +97,13 @@ internal constructor(private val clientOptions: ClientOptions) : OAuthApplicatio } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: OAuthApplicationListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -124,14 +123,6 @@ internal constructor(private val clientOptions: ClientOptions) : OAuthApplicatio it.validate() } } - .let { - OAuthApplicationListPageAsync.builder() - .service(OAuthApplicationServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/OAuthConnectionServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/OAuthConnectionServiceAsync.kt index d2551c5cc..1b53a258f 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/OAuthConnectionServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/OAuthConnectionServiceAsync.kt @@ -6,8 +6,8 @@ import com.increase.api.core.ClientOptions import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.oauthconnections.OAuthConnection -import com.increase.api.models.oauthconnections.OAuthConnectionListPageAsync import com.increase.api.models.oauthconnections.OAuthConnectionListParams +import com.increase.api.models.oauthconnections.OAuthConnectionListResponse import com.increase.api.models.oauthconnections.OAuthConnectionRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -63,22 +63,22 @@ interface OAuthConnectionServiceAsync { retrieve(oauthConnectionId, OAuthConnectionRetrieveParams.none(), requestOptions) /** List OAuth Connections */ - fun list(): CompletableFuture = + fun list(): CompletableFuture = list(OAuthConnectionListParams.none()) /** @see list */ fun list( params: OAuthConnectionListParams = OAuthConnectionListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: OAuthConnectionListParams = OAuthConnectionListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(OAuthConnectionListParams.none(), requestOptions) /** @@ -146,25 +146,25 @@ interface OAuthConnectionServiceAsync { * Returns a raw HTTP response for `get /oauth_connections`, but is otherwise the same as * [OAuthConnectionServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(OAuthConnectionListParams.none()) /** @see list */ fun list( params: OAuthConnectionListParams = OAuthConnectionListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: OAuthConnectionListParams = OAuthConnectionListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(OAuthConnectionListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/OAuthConnectionServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/OAuthConnectionServiceAsyncImpl.kt index 2583c9b33..d1a1f63d8 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/OAuthConnectionServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/OAuthConnectionServiceAsyncImpl.kt @@ -16,9 +16,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync import com.increase.api.models.oauthconnections.OAuthConnection -import com.increase.api.models.oauthconnections.OAuthConnectionListPageAsync -import com.increase.api.models.oauthconnections.OAuthConnectionListPageResponse import com.increase.api.models.oauthconnections.OAuthConnectionListParams +import com.increase.api.models.oauthconnections.OAuthConnectionListResponse import com.increase.api.models.oauthconnections.OAuthConnectionRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -48,7 +47,7 @@ internal constructor(private val clientOptions: ClientOptions) : OAuthConnection override fun list( params: OAuthConnectionListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /oauth_connections withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -98,13 +97,13 @@ internal constructor(private val clientOptions: ClientOptions) : OAuthConnection } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: OAuthConnectionListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -124,14 +123,6 @@ internal constructor(private val clientOptions: ClientOptions) : OAuthConnection it.validate() } } - .let { - OAuthConnectionListPageAsync.builder() - .service(OAuthConnectionServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/PendingTransactionServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/PendingTransactionServiceAsync.kt index 89147a5a6..1976e0c9c 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/PendingTransactionServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/PendingTransactionServiceAsync.kt @@ -7,8 +7,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.pendingtransactions.PendingTransaction import com.increase.api.models.pendingtransactions.PendingTransactionCreateParams -import com.increase.api.models.pendingtransactions.PendingTransactionListPageAsync import com.increase.api.models.pendingtransactions.PendingTransactionListParams +import com.increase.api.models.pendingtransactions.PendingTransactionListResponse import com.increase.api.models.pendingtransactions.PendingTransactionReleaseParams import com.increase.api.models.pendingtransactions.PendingTransactionRetrieveParams import java.util.concurrent.CompletableFuture @@ -83,22 +83,22 @@ interface PendingTransactionServiceAsync { retrieve(pendingTransactionId, PendingTransactionRetrieveParams.none(), requestOptions) /** List Pending Transactions */ - fun list(): CompletableFuture = + fun list(): CompletableFuture = list(PendingTransactionListParams.none()) /** @see list */ fun list( params: PendingTransactionListParams = PendingTransactionListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: PendingTransactionListParams = PendingTransactionListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(PendingTransactionListParams.none(), requestOptions) /** @@ -224,25 +224,25 @@ interface PendingTransactionServiceAsync { * Returns a raw HTTP response for `get /pending_transactions`, but is otherwise the same as * [PendingTransactionServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(PendingTransactionListParams.none()) /** @see list */ fun list( params: PendingTransactionListParams = PendingTransactionListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: PendingTransactionListParams = PendingTransactionListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(PendingTransactionListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/PendingTransactionServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/PendingTransactionServiceAsyncImpl.kt index 972ee4956..680d591f3 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/PendingTransactionServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/PendingTransactionServiceAsyncImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync import com.increase.api.models.pendingtransactions.PendingTransaction import com.increase.api.models.pendingtransactions.PendingTransactionCreateParams -import com.increase.api.models.pendingtransactions.PendingTransactionListPageAsync -import com.increase.api.models.pendingtransactions.PendingTransactionListPageResponse import com.increase.api.models.pendingtransactions.PendingTransactionListParams +import com.increase.api.models.pendingtransactions.PendingTransactionListResponse import com.increase.api.models.pendingtransactions.PendingTransactionReleaseParams import com.increase.api.models.pendingtransactions.PendingTransactionRetrieveParams import java.util.concurrent.CompletableFuture @@ -60,7 +59,7 @@ internal constructor(private val clientOptions: ClientOptions) : PendingTransact override fun list( params: PendingTransactionListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /pending_transactions withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -148,13 +147,13 @@ internal constructor(private val clientOptions: ClientOptions) : PendingTransact } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: PendingTransactionListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -174,14 +173,6 @@ internal constructor(private val clientOptions: ClientOptions) : PendingTransact it.validate() } } - .let { - PendingTransactionListPageAsync.builder() - .service(PendingTransactionServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/PhysicalCardProfileServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/PhysicalCardProfileServiceAsync.kt index c5fc02f83..db8b6af84 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/PhysicalCardProfileServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/PhysicalCardProfileServiceAsync.kt @@ -9,8 +9,8 @@ import com.increase.api.models.physicalcardprofiles.PhysicalCardProfile import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileArchiveParams import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileCloneParams import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileCreateParams -import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileListPageAsync import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileListParams +import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileListResponse import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -80,22 +80,22 @@ interface PhysicalCardProfileServiceAsync { retrieve(physicalCardProfileId, PhysicalCardProfileRetrieveParams.none(), requestOptions) /** List Physical Card Profiles */ - fun list(): CompletableFuture = + fun list(): CompletableFuture = list(PhysicalCardProfileListParams.none()) /** @see list */ fun list( params: PhysicalCardProfileListParams = PhysicalCardProfileListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: PhysicalCardProfileListParams = PhysicalCardProfileListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(PhysicalCardProfileListParams.none(), requestOptions) /** Archive a Physical Card Profile */ @@ -260,25 +260,25 @@ interface PhysicalCardProfileServiceAsync { * Returns a raw HTTP response for `get /physical_card_profiles`, but is otherwise the same * as [PhysicalCardProfileServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(PhysicalCardProfileListParams.none()) /** @see list */ fun list( params: PhysicalCardProfileListParams = PhysicalCardProfileListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: PhysicalCardProfileListParams = PhysicalCardProfileListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(PhysicalCardProfileListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/PhysicalCardProfileServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/PhysicalCardProfileServiceAsyncImpl.kt index 54481dfe0..dbf58c1ba 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/PhysicalCardProfileServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/PhysicalCardProfileServiceAsyncImpl.kt @@ -20,9 +20,8 @@ import com.increase.api.models.physicalcardprofiles.PhysicalCardProfile import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileArchiveParams import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileCloneParams import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileCreateParams -import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileListPageAsync -import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileListPageResponse import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileListParams +import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileListResponse import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -62,7 +61,7 @@ internal constructor(private val clientOptions: ClientOptions) : PhysicalCardPro override fun list( params: PhysicalCardProfileListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /physical_card_profiles withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -157,13 +156,13 @@ internal constructor(private val clientOptions: ClientOptions) : PhysicalCardPro } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: PhysicalCardProfileListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -183,14 +182,6 @@ internal constructor(private val clientOptions: ClientOptions) : PhysicalCardPro it.validate() } } - .let { - PhysicalCardProfileListPageAsync.builder() - .service(PhysicalCardProfileServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/PhysicalCardServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/PhysicalCardServiceAsync.kt index 5e93df7d5..aa18f3492 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/PhysicalCardServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/PhysicalCardServiceAsync.kt @@ -7,8 +7,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.physicalcards.PhysicalCard import com.increase.api.models.physicalcards.PhysicalCardCreateParams -import com.increase.api.models.physicalcards.PhysicalCardListPageAsync import com.increase.api.models.physicalcards.PhysicalCardListParams +import com.increase.api.models.physicalcards.PhysicalCardListResponse import com.increase.api.models.physicalcards.PhysicalCardRetrieveParams import com.increase.api.models.physicalcards.PhysicalCardUpdateParams import java.util.concurrent.CompletableFuture @@ -98,21 +98,21 @@ interface PhysicalCardServiceAsync { ): CompletableFuture /** List Physical Cards */ - fun list(): CompletableFuture = list(PhysicalCardListParams.none()) + fun list(): CompletableFuture = list(PhysicalCardListParams.none()) /** @see list */ fun list( params: PhysicalCardListParams = PhysicalCardListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: PhysicalCardListParams = PhysicalCardListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(PhysicalCardListParams.none(), requestOptions) /** @@ -218,25 +218,25 @@ interface PhysicalCardServiceAsync { * Returns a raw HTTP response for `get /physical_cards`, but is otherwise the same as * [PhysicalCardServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(PhysicalCardListParams.none()) /** @see list */ fun list( params: PhysicalCardListParams = PhysicalCardListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: PhysicalCardListParams = PhysicalCardListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(PhysicalCardListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/PhysicalCardServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/PhysicalCardServiceAsyncImpl.kt index 9573e1ec7..26dc67506 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/PhysicalCardServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/PhysicalCardServiceAsyncImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync import com.increase.api.models.physicalcards.PhysicalCard import com.increase.api.models.physicalcards.PhysicalCardCreateParams -import com.increase.api.models.physicalcards.PhysicalCardListPageAsync -import com.increase.api.models.physicalcards.PhysicalCardListPageResponse import com.increase.api.models.physicalcards.PhysicalCardListParams +import com.increase.api.models.physicalcards.PhysicalCardListResponse import com.increase.api.models.physicalcards.PhysicalCardRetrieveParams import com.increase.api.models.physicalcards.PhysicalCardUpdateParams import java.util.concurrent.CompletableFuture @@ -63,7 +62,7 @@ class PhysicalCardServiceAsyncImpl internal constructor(private val clientOption override fun list( params: PhysicalCardListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /physical_cards withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -178,13 +177,13 @@ class PhysicalCardServiceAsyncImpl internal constructor(private val clientOption } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: PhysicalCardListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -204,14 +203,6 @@ class PhysicalCardServiceAsyncImpl internal constructor(private val clientOption it.validate() } } - .let { - PhysicalCardListPageAsync.builder() - .service(PhysicalCardServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/ProgramServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/ProgramServiceAsync.kt index 62d5553b6..29fb72997 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/ProgramServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/ProgramServiceAsync.kt @@ -6,8 +6,8 @@ import com.increase.api.core.ClientOptions import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.programs.Program -import com.increase.api.models.programs.ProgramListPageAsync import com.increase.api.models.programs.ProgramListParams +import com.increase.api.models.programs.ProgramListResponse import com.increase.api.models.programs.ProgramRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -59,21 +59,21 @@ interface ProgramServiceAsync { retrieve(programId, ProgramRetrieveParams.none(), requestOptions) /** List Programs */ - fun list(): CompletableFuture = list(ProgramListParams.none()) + fun list(): CompletableFuture = list(ProgramListParams.none()) /** @see list */ fun list( params: ProgramListParams = ProgramListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: ProgramListParams = ProgramListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(ProgramListParams.none(), requestOptions) /** @@ -133,25 +133,25 @@ interface ProgramServiceAsync { * Returns a raw HTTP response for `get /programs`, but is otherwise the same as * [ProgramServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(ProgramListParams.none()) /** @see list */ fun list( params: ProgramListParams = ProgramListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: ProgramListParams = ProgramListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(ProgramListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/ProgramServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/ProgramServiceAsyncImpl.kt index 2d81b6a6b..700cc7818 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/ProgramServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/ProgramServiceAsyncImpl.kt @@ -16,9 +16,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync import com.increase.api.models.programs.Program -import com.increase.api.models.programs.ProgramListPageAsync -import com.increase.api.models.programs.ProgramListPageResponse import com.increase.api.models.programs.ProgramListParams +import com.increase.api.models.programs.ProgramListResponse import com.increase.api.models.programs.ProgramRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -46,7 +45,7 @@ class ProgramServiceAsyncImpl internal constructor(private val clientOptions: Cl override fun list( params: ProgramListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /programs withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -96,13 +95,13 @@ class ProgramServiceAsyncImpl internal constructor(private val clientOptions: Cl } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: ProgramListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -122,14 +121,6 @@ class ProgramServiceAsyncImpl internal constructor(private val clientOptions: Cl it.validate() } } - .let { - ProgramListPageAsync.builder() - .service(ProgramServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/RealTimePaymentsTransferServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/RealTimePaymentsTransferServiceAsync.kt index 0ed14add4..3b11a3b65 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/RealTimePaymentsTransferServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/RealTimePaymentsTransferServiceAsync.kt @@ -9,8 +9,8 @@ import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransfe import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransferApproveParams import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransferCancelParams import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransferCreateParams -import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransferListPageAsync import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransferListParams +import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransferListResponse import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransferRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -87,25 +87,24 @@ interface RealTimePaymentsTransferServiceAsync { ) /** List Real-Time Payments Transfers */ - fun list(): CompletableFuture = + fun list(): CompletableFuture = list(RealTimePaymentsTransferListParams.none()) /** @see list */ fun list( params: RealTimePaymentsTransferListParams = RealTimePaymentsTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: RealTimePaymentsTransferListParams = RealTimePaymentsTransferListParams.none() - ): CompletableFuture = - list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture = + ): CompletableFuture = list(RealTimePaymentsTransferListParams.none(), requestOptions) /** Approves a Real-Time Payments Transfer in a pending_approval state. */ @@ -284,25 +283,25 @@ interface RealTimePaymentsTransferServiceAsync { * Returns a raw HTTP response for `get /real_time_payments_transfers`, but is otherwise the * same as [RealTimePaymentsTransferServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(RealTimePaymentsTransferListParams.none()) /** @see list */ fun list( params: RealTimePaymentsTransferListParams = RealTimePaymentsTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: RealTimePaymentsTransferListParams = RealTimePaymentsTransferListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(RealTimePaymentsTransferListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/RealTimePaymentsTransferServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/RealTimePaymentsTransferServiceAsyncImpl.kt index e5c3dd82e..e2af980cd 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/RealTimePaymentsTransferServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/RealTimePaymentsTransferServiceAsyncImpl.kt @@ -20,9 +20,8 @@ import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransfe import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransferApproveParams import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransferCancelParams import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransferCreateParams -import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransferListPageAsync -import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransferListPageResponse import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransferListParams +import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransferListResponse import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransferRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -63,7 +62,7 @@ internal constructor(private val clientOptions: ClientOptions) : override fun list( params: RealTimePaymentsTransferListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /real_time_payments_transfers withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -161,13 +160,13 @@ internal constructor(private val clientOptions: ClientOptions) : } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: RealTimePaymentsTransferListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -187,16 +186,6 @@ internal constructor(private val clientOptions: ClientOptions) : it.validate() } } - .let { - RealTimePaymentsTransferListPageAsync.builder() - .service( - RealTimePaymentsTransferServiceAsyncImpl(clientOptions) - ) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/RoutingNumberServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/RoutingNumberServiceAsync.kt index 7b3af3587..01af340c4 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/RoutingNumberServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/RoutingNumberServiceAsync.kt @@ -5,8 +5,8 @@ package com.increase.api.services.async import com.increase.api.core.ClientOptions import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor -import com.increase.api.models.routingnumbers.RoutingNumberListPageAsync import com.increase.api.models.routingnumbers.RoutingNumberListParams +import com.increase.api.models.routingnumbers.RoutingNumberListResponse import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -30,14 +30,14 @@ interface RoutingNumberServiceAsync { * will always return 0 or 1 entry. In Sandbox, the only valid routing number for this method * is 110000000. */ - fun list(params: RoutingNumberListParams): CompletableFuture = + fun list(params: RoutingNumberListParams): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ fun list( params: RoutingNumberListParams, requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** * A view of [RoutingNumberServiceAsync] that provides access to raw HTTP responses for each @@ -60,13 +60,13 @@ interface RoutingNumberServiceAsync { */ fun list( params: RoutingNumberListParams - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( params: RoutingNumberListParams, requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/RoutingNumberServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/RoutingNumberServiceAsyncImpl.kt index 9a29e733a..8a08f7b93 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/RoutingNumberServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/RoutingNumberServiceAsyncImpl.kt @@ -14,9 +14,8 @@ import com.increase.api.core.http.HttpResponse.Handler import com.increase.api.core.http.HttpResponseFor import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync -import com.increase.api.models.routingnumbers.RoutingNumberListPageAsync -import com.increase.api.models.routingnumbers.RoutingNumberListPageResponse import com.increase.api.models.routingnumbers.RoutingNumberListParams +import com.increase.api.models.routingnumbers.RoutingNumberListResponse import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -35,7 +34,7 @@ class RoutingNumberServiceAsyncImpl internal constructor(private val clientOptio override fun list( params: RoutingNumberListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /routing_numbers withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -52,13 +51,13 @@ class RoutingNumberServiceAsyncImpl internal constructor(private val clientOptio clientOptions.toBuilder().apply(modifier::accept).build() ) - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: RoutingNumberListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -78,14 +77,6 @@ class RoutingNumberServiceAsyncImpl internal constructor(private val clientOptio it.validate() } } - .let { - RoutingNumberListPageAsync.builder() - .service(RoutingNumberServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/SupplementalDocumentServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/SupplementalDocumentServiceAsync.kt index 9f9a06895..078900cc7 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/SupplementalDocumentServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/SupplementalDocumentServiceAsync.kt @@ -7,8 +7,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.supplementaldocuments.EntitySupplementalDocument import com.increase.api.models.supplementaldocuments.SupplementalDocumentCreateParams -import com.increase.api.models.supplementaldocuments.SupplementalDocumentListPageAsync import com.increase.api.models.supplementaldocuments.SupplementalDocumentListParams +import com.increase.api.models.supplementaldocuments.SupplementalDocumentListResponse import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -40,13 +40,13 @@ interface SupplementalDocumentServiceAsync { /** List Entity Supplemental Document Submissions */ fun list( params: SupplementalDocumentListParams - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ fun list( params: SupplementalDocumentListParams, requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** * A view of [SupplementalDocumentServiceAsync] that provides access to raw HTTP responses for @@ -84,13 +84,13 @@ interface SupplementalDocumentServiceAsync { */ fun list( params: SupplementalDocumentListParams - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( params: SupplementalDocumentListParams, requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/SupplementalDocumentServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/SupplementalDocumentServiceAsyncImpl.kt index cd610944d..29e5d1f85 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/SupplementalDocumentServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/SupplementalDocumentServiceAsyncImpl.kt @@ -17,9 +17,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync import com.increase.api.models.supplementaldocuments.EntitySupplementalDocument import com.increase.api.models.supplementaldocuments.SupplementalDocumentCreateParams -import com.increase.api.models.supplementaldocuments.SupplementalDocumentListPageAsync -import com.increase.api.models.supplementaldocuments.SupplementalDocumentListPageResponse import com.increase.api.models.supplementaldocuments.SupplementalDocumentListParams +import com.increase.api.models.supplementaldocuments.SupplementalDocumentListResponse import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -50,7 +49,7 @@ internal constructor(private val clientOptions: ClientOptions) : SupplementalDoc override fun list( params: SupplementalDocumentListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /entity_supplemental_documents withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -98,13 +97,13 @@ internal constructor(private val clientOptions: ClientOptions) : SupplementalDoc } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: SupplementalDocumentListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -124,14 +123,6 @@ internal constructor(private val clientOptions: ClientOptions) : SupplementalDoc it.validate() } } - .let { - SupplementalDocumentListPageAsync.builder() - .service(SupplementalDocumentServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/TransactionServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/TransactionServiceAsync.kt index 420ce8bd8..82cc24986 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/TransactionServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/TransactionServiceAsync.kt @@ -6,8 +6,8 @@ import com.increase.api.core.ClientOptions import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.transactions.Transaction -import com.increase.api.models.transactions.TransactionListPageAsync import com.increase.api.models.transactions.TransactionListParams +import com.increase.api.models.transactions.TransactionListResponse import com.increase.api.models.transactions.TransactionRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -62,21 +62,21 @@ interface TransactionServiceAsync { retrieve(transactionId, TransactionRetrieveParams.none(), requestOptions) /** List Transactions */ - fun list(): CompletableFuture = list(TransactionListParams.none()) + fun list(): CompletableFuture = list(TransactionListParams.none()) /** @see list */ fun list( params: TransactionListParams = TransactionListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: TransactionListParams = TransactionListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(TransactionListParams.none(), requestOptions) /** @@ -138,25 +138,25 @@ interface TransactionServiceAsync { * Returns a raw HTTP response for `get /transactions`, but is otherwise the same as * [TransactionServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(TransactionListParams.none()) /** @see list */ fun list( params: TransactionListParams = TransactionListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: TransactionListParams = TransactionListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(TransactionListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/TransactionServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/TransactionServiceAsyncImpl.kt index f1b045b1f..1ca067e59 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/TransactionServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/TransactionServiceAsyncImpl.kt @@ -16,9 +16,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync import com.increase.api.models.transactions.Transaction -import com.increase.api.models.transactions.TransactionListPageAsync -import com.increase.api.models.transactions.TransactionListPageResponse import com.increase.api.models.transactions.TransactionListParams +import com.increase.api.models.transactions.TransactionListResponse import com.increase.api.models.transactions.TransactionRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -46,7 +45,7 @@ class TransactionServiceAsyncImpl internal constructor(private val clientOptions override fun list( params: TransactionListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /transactions withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -96,13 +95,13 @@ class TransactionServiceAsyncImpl internal constructor(private val clientOptions } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: TransactionListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -122,14 +121,6 @@ class TransactionServiceAsyncImpl internal constructor(private val clientOptions it.validate() } } - .let { - TransactionListPageAsync.builder() - .service(TransactionServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/WireDrawdownRequestServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/WireDrawdownRequestServiceAsync.kt index 0fcb9d60c..d07988ee3 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/WireDrawdownRequestServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/WireDrawdownRequestServiceAsync.kt @@ -7,8 +7,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.wiredrawdownrequests.WireDrawdownRequest import com.increase.api.models.wiredrawdownrequests.WireDrawdownRequestCreateParams -import com.increase.api.models.wiredrawdownrequests.WireDrawdownRequestListPageAsync import com.increase.api.models.wiredrawdownrequests.WireDrawdownRequestListParams +import com.increase.api.models.wiredrawdownrequests.WireDrawdownRequestListResponse import com.increase.api.models.wiredrawdownrequests.WireDrawdownRequestRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -78,22 +78,22 @@ interface WireDrawdownRequestServiceAsync { retrieve(wireDrawdownRequestId, WireDrawdownRequestRetrieveParams.none(), requestOptions) /** List Wire Drawdown Requests */ - fun list(): CompletableFuture = + fun list(): CompletableFuture = list(WireDrawdownRequestListParams.none()) /** @see list */ fun list( params: WireDrawdownRequestListParams = WireDrawdownRequestListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: WireDrawdownRequestListParams = WireDrawdownRequestListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(WireDrawdownRequestListParams.none(), requestOptions) /** @@ -180,25 +180,25 @@ interface WireDrawdownRequestServiceAsync { * Returns a raw HTTP response for `get /wire_drawdown_requests`, but is otherwise the same * as [WireDrawdownRequestServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(WireDrawdownRequestListParams.none()) /** @see list */ fun list( params: WireDrawdownRequestListParams = WireDrawdownRequestListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: WireDrawdownRequestListParams = WireDrawdownRequestListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(WireDrawdownRequestListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/WireDrawdownRequestServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/WireDrawdownRequestServiceAsyncImpl.kt index 7ba178476..ca162d18a 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/WireDrawdownRequestServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/WireDrawdownRequestServiceAsyncImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepareAsync import com.increase.api.models.wiredrawdownrequests.WireDrawdownRequest import com.increase.api.models.wiredrawdownrequests.WireDrawdownRequestCreateParams -import com.increase.api.models.wiredrawdownrequests.WireDrawdownRequestListPageAsync -import com.increase.api.models.wiredrawdownrequests.WireDrawdownRequestListPageResponse import com.increase.api.models.wiredrawdownrequests.WireDrawdownRequestListParams +import com.increase.api.models.wiredrawdownrequests.WireDrawdownRequestListResponse import com.increase.api.models.wiredrawdownrequests.WireDrawdownRequestRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -60,7 +59,7 @@ internal constructor(private val clientOptions: ClientOptions) : WireDrawdownReq override fun list( params: WireDrawdownRequestListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /wire_drawdown_requests withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -141,13 +140,13 @@ internal constructor(private val clientOptions: ClientOptions) : WireDrawdownReq } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: WireDrawdownRequestListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -167,14 +166,6 @@ internal constructor(private val clientOptions: ClientOptions) : WireDrawdownReq it.validate() } } - .let { - WireDrawdownRequestListPageAsync.builder() - .service(WireDrawdownRequestServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/WireTransferServiceAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/WireTransferServiceAsync.kt index 96a41454c..000dd68e1 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/WireTransferServiceAsync.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/WireTransferServiceAsync.kt @@ -9,8 +9,8 @@ import com.increase.api.models.wiretransfers.WireTransfer import com.increase.api.models.wiretransfers.WireTransferApproveParams import com.increase.api.models.wiretransfers.WireTransferCancelParams import com.increase.api.models.wiretransfers.WireTransferCreateParams -import com.increase.api.models.wiretransfers.WireTransferListPageAsync import com.increase.api.models.wiretransfers.WireTransferListParams +import com.increase.api.models.wiretransfers.WireTransferListResponse import com.increase.api.models.wiretransfers.WireTransferRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -75,21 +75,21 @@ interface WireTransferServiceAsync { retrieve(wireTransferId, WireTransferRetrieveParams.none(), requestOptions) /** List Wire Transfers */ - fun list(): CompletableFuture = list(WireTransferListParams.none()) + fun list(): CompletableFuture = list(WireTransferListParams.none()) /** @see list */ fun list( params: WireTransferListParams = WireTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture + ): CompletableFuture /** @see list */ fun list( params: WireTransferListParams = WireTransferListParams.none() - ): CompletableFuture = list(params, RequestOptions.none()) + ): CompletableFuture = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CompletableFuture = + fun list(requestOptions: RequestOptions): CompletableFuture = list(WireTransferListParams.none(), requestOptions) /** Approve a Wire Transfer */ @@ -236,25 +236,25 @@ interface WireTransferServiceAsync { * Returns a raw HTTP response for `get /wire_transfers`, but is otherwise the same as * [WireTransferServiceAsync.list]. */ - fun list(): CompletableFuture> = + fun list(): CompletableFuture> = list(WireTransferListParams.none()) /** @see list */ fun list( params: WireTransferListParams = WireTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CompletableFuture> + ): CompletableFuture> /** @see list */ fun list( params: WireTransferListParams = WireTransferListParams.none() - ): CompletableFuture> = + ): CompletableFuture> = list(params, RequestOptions.none()) /** @see list */ fun list( requestOptions: RequestOptions - ): CompletableFuture> = + ): CompletableFuture> = list(WireTransferListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/async/WireTransferServiceAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/async/WireTransferServiceAsyncImpl.kt index 351492acd..31e28d3cd 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/async/WireTransferServiceAsyncImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/async/WireTransferServiceAsyncImpl.kt @@ -20,9 +20,8 @@ import com.increase.api.models.wiretransfers.WireTransfer import com.increase.api.models.wiretransfers.WireTransferApproveParams import com.increase.api.models.wiretransfers.WireTransferCancelParams import com.increase.api.models.wiretransfers.WireTransferCreateParams -import com.increase.api.models.wiretransfers.WireTransferListPageAsync -import com.increase.api.models.wiretransfers.WireTransferListPageResponse import com.increase.api.models.wiretransfers.WireTransferListParams +import com.increase.api.models.wiretransfers.WireTransferListResponse import com.increase.api.models.wiretransfers.WireTransferRetrieveParams import java.util.concurrent.CompletableFuture import java.util.function.Consumer @@ -57,7 +56,7 @@ class WireTransferServiceAsyncImpl internal constructor(private val clientOption override fun list( params: WireTransferListParams, requestOptions: RequestOptions, - ): CompletableFuture = + ): CompletableFuture = // get /wire_transfers withRawResponse().list(params, requestOptions).thenApply { it.parse() } @@ -152,13 +151,13 @@ class WireTransferServiceAsyncImpl internal constructor(private val clientOption } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: WireTransferListParams, requestOptions: RequestOptions, - ): CompletableFuture> { + ): CompletableFuture> { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -178,14 +177,6 @@ class WireTransferServiceAsyncImpl internal constructor(private val clientOption it.validate() } } - .let { - WireTransferListPageAsync.builder() - .service(WireTransferServiceAsyncImpl(clientOptions)) - .streamHandlerExecutor(clientOptions.streamHandlerExecutor) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AccountNumberService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AccountNumberService.kt index 74a746c0c..8f2310fca 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AccountNumberService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AccountNumberService.kt @@ -8,8 +8,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.accountnumbers.AccountNumber import com.increase.api.models.accountnumbers.AccountNumberCreateParams -import com.increase.api.models.accountnumbers.AccountNumberListPage import com.increase.api.models.accountnumbers.AccountNumberListParams +import com.increase.api.models.accountnumbers.AccountNumberListResponse import com.increase.api.models.accountnumbers.AccountNumberRetrieveParams import com.increase.api.models.accountnumbers.AccountNumberUpdateParams import java.util.function.Consumer @@ -103,21 +103,21 @@ interface AccountNumberService { update(accountNumberId, AccountNumberUpdateParams.none(), requestOptions) /** List Account Numbers */ - fun list(): AccountNumberListPage = list(AccountNumberListParams.none()) + fun list(): AccountNumberListResponse = list(AccountNumberListParams.none()) /** @see list */ fun list( params: AccountNumberListParams = AccountNumberListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): AccountNumberListPage + ): AccountNumberListResponse /** @see list */ fun list( params: AccountNumberListParams = AccountNumberListParams.none() - ): AccountNumberListPage = list(params, RequestOptions.none()) + ): AccountNumberListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): AccountNumberListPage = + fun list(requestOptions: RequestOptions): AccountNumberListResponse = list(AccountNumberListParams.none(), requestOptions) /** @@ -242,24 +242,25 @@ interface AccountNumberService { * [AccountNumberService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = list(AccountNumberListParams.none()) + fun list(): HttpResponseFor = + list(AccountNumberListParams.none()) /** @see list */ @MustBeClosed fun list( params: AccountNumberListParams = AccountNumberListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: AccountNumberListParams = AccountNumberListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(AccountNumberListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AccountNumberServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AccountNumberServiceImpl.kt index ecae7d25e..277934218 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AccountNumberServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AccountNumberServiceImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepare import com.increase.api.models.accountnumbers.AccountNumber import com.increase.api.models.accountnumbers.AccountNumberCreateParams -import com.increase.api.models.accountnumbers.AccountNumberListPage -import com.increase.api.models.accountnumbers.AccountNumberListPageResponse import com.increase.api.models.accountnumbers.AccountNumberListParams +import com.increase.api.models.accountnumbers.AccountNumberListResponse import com.increase.api.models.accountnumbers.AccountNumberRetrieveParams import com.increase.api.models.accountnumbers.AccountNumberUpdateParams import java.util.function.Consumer @@ -62,7 +61,7 @@ class AccountNumberServiceImpl internal constructor(private val clientOptions: C override fun list( params: AccountNumberListParams, requestOptions: RequestOptions, - ): AccountNumberListPage = + ): AccountNumberListResponse = // get /account_numbers withRawResponse().list(params, requestOptions).parse() @@ -168,13 +167,13 @@ class AccountNumberServiceImpl internal constructor(private val clientOptions: C } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: AccountNumberListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -192,13 +191,6 @@ class AccountNumberServiceImpl internal constructor(private val clientOptions: C it.validate() } } - .let { - AccountNumberListPage.builder() - .service(AccountNumberServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AccountService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AccountService.kt index de9c50d79..d30cbd4b1 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AccountService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AccountService.kt @@ -10,8 +10,8 @@ import com.increase.api.models.accounts.Account import com.increase.api.models.accounts.AccountBalanceParams import com.increase.api.models.accounts.AccountCloseParams import com.increase.api.models.accounts.AccountCreateParams -import com.increase.api.models.accounts.AccountListPage import com.increase.api.models.accounts.AccountListParams +import com.increase.api.models.accounts.AccountListResponse import com.increase.api.models.accounts.AccountRetrieveParams import com.increase.api.models.accounts.AccountUpdateParams import com.increase.api.models.accounts.BalanceLookup @@ -99,20 +99,20 @@ interface AccountService { update(accountId, AccountUpdateParams.none(), requestOptions) /** List Accounts */ - fun list(): AccountListPage = list(AccountListParams.none()) + fun list(): AccountListResponse = list(AccountListParams.none()) /** @see list */ fun list( params: AccountListParams = AccountListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): AccountListPage + ): AccountListResponse /** @see list */ - fun list(params: AccountListParams = AccountListParams.none()): AccountListPage = + fun list(params: AccountListParams = AccountListParams.none()): AccountListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): AccountListPage = + fun list(requestOptions: RequestOptions): AccountListResponse = list(AccountListParams.none(), requestOptions) /** @@ -286,24 +286,25 @@ interface AccountService { * Returns a raw HTTP response for `get /accounts`, but is otherwise the same as * [AccountService.list]. */ - @MustBeClosed fun list(): HttpResponseFor = list(AccountListParams.none()) + @MustBeClosed + fun list(): HttpResponseFor = list(AccountListParams.none()) /** @see list */ @MustBeClosed fun list( params: AccountListParams = AccountListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: AccountListParams = AccountListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(AccountListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AccountServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AccountServiceImpl.kt index d84c42c18..e26325ca6 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AccountServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AccountServiceImpl.kt @@ -20,9 +20,8 @@ import com.increase.api.models.accounts.Account import com.increase.api.models.accounts.AccountBalanceParams import com.increase.api.models.accounts.AccountCloseParams import com.increase.api.models.accounts.AccountCreateParams -import com.increase.api.models.accounts.AccountListPage -import com.increase.api.models.accounts.AccountListPageResponse import com.increase.api.models.accounts.AccountListParams +import com.increase.api.models.accounts.AccountListResponse import com.increase.api.models.accounts.AccountRetrieveParams import com.increase.api.models.accounts.AccountUpdateParams import com.increase.api.models.accounts.BalanceLookup @@ -53,7 +52,10 @@ class AccountServiceImpl internal constructor(private val clientOptions: ClientO // patch /accounts/{account_id} withRawResponse().update(params, requestOptions).parse() - override fun list(params: AccountListParams, requestOptions: RequestOptions): AccountListPage = + override fun list( + params: AccountListParams, + requestOptions: RequestOptions, + ): AccountListResponse = // get /accounts withRawResponse().list(params, requestOptions).parse() @@ -168,13 +170,13 @@ class AccountServiceImpl internal constructor(private val clientOptions: ClientO } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: AccountListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -192,13 +194,6 @@ class AccountServiceImpl internal constructor(private val clientOptions: ClientO it.validate() } } - .let { - AccountListPage.builder() - .service(AccountServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AccountStatementService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AccountStatementService.kt index 6d4a9967d..c0b754877 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AccountStatementService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AccountStatementService.kt @@ -7,8 +7,8 @@ import com.increase.api.core.ClientOptions import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.accountstatements.AccountStatement -import com.increase.api.models.accountstatements.AccountStatementListPage import com.increase.api.models.accountstatements.AccountStatementListParams +import com.increase.api.models.accountstatements.AccountStatementListResponse import com.increase.api.models.accountstatements.AccountStatementRetrieveParams import java.util.function.Consumer @@ -59,21 +59,21 @@ interface AccountStatementService { retrieve(accountStatementId, AccountStatementRetrieveParams.none(), requestOptions) /** List Account Statements */ - fun list(): AccountStatementListPage = list(AccountStatementListParams.none()) + fun list(): AccountStatementListResponse = list(AccountStatementListParams.none()) /** @see list */ fun list( params: AccountStatementListParams = AccountStatementListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): AccountStatementListPage + ): AccountStatementListResponse /** @see list */ fun list( params: AccountStatementListParams = AccountStatementListParams.none() - ): AccountStatementListPage = list(params, RequestOptions.none()) + ): AccountStatementListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): AccountStatementListPage = + fun list(requestOptions: RequestOptions): AccountStatementListResponse = list(AccountStatementListParams.none(), requestOptions) /** @@ -144,7 +144,7 @@ interface AccountStatementService { * [AccountStatementService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = + fun list(): HttpResponseFor = list(AccountStatementListParams.none()) /** @see list */ @@ -152,17 +152,17 @@ interface AccountStatementService { fun list( params: AccountStatementListParams = AccountStatementListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: AccountStatementListParams = AccountStatementListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(AccountStatementListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AccountStatementServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AccountStatementServiceImpl.kt index c8301c019..122f8a953 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AccountStatementServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AccountStatementServiceImpl.kt @@ -16,9 +16,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.core.http.parseable import com.increase.api.core.prepare import com.increase.api.models.accountstatements.AccountStatement -import com.increase.api.models.accountstatements.AccountStatementListPage -import com.increase.api.models.accountstatements.AccountStatementListPageResponse import com.increase.api.models.accountstatements.AccountStatementListParams +import com.increase.api.models.accountstatements.AccountStatementListResponse import com.increase.api.models.accountstatements.AccountStatementRetrieveParams import java.util.function.Consumer import kotlin.jvm.optionals.getOrNull @@ -45,7 +44,7 @@ class AccountStatementServiceImpl internal constructor(private val clientOptions override fun list( params: AccountStatementListParams, requestOptions: RequestOptions, - ): AccountStatementListPage = + ): AccountStatementListResponse = // get /account_statements withRawResponse().list(params, requestOptions).parse() @@ -92,13 +91,13 @@ class AccountStatementServiceImpl internal constructor(private val clientOptions } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: AccountStatementListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -116,13 +115,6 @@ class AccountStatementServiceImpl internal constructor(private val clientOptions it.validate() } } - .let { - AccountStatementListPage.builder() - .service(AccountStatementServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AccountTransferService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AccountTransferService.kt index 8b809fa2d..78c0a8e24 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AccountTransferService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AccountTransferService.kt @@ -10,8 +10,8 @@ import com.increase.api.models.accounttransfers.AccountTransfer import com.increase.api.models.accounttransfers.AccountTransferApproveParams import com.increase.api.models.accounttransfers.AccountTransferCancelParams import com.increase.api.models.accounttransfers.AccountTransferCreateParams -import com.increase.api.models.accounttransfers.AccountTransferListPage import com.increase.api.models.accounttransfers.AccountTransferListParams +import com.increase.api.models.accounttransfers.AccountTransferListResponse import com.increase.api.models.accounttransfers.AccountTransferRetrieveParams import java.util.function.Consumer @@ -72,21 +72,21 @@ interface AccountTransferService { retrieve(accountTransferId, AccountTransferRetrieveParams.none(), requestOptions) /** List Account Transfers */ - fun list(): AccountTransferListPage = list(AccountTransferListParams.none()) + fun list(): AccountTransferListResponse = list(AccountTransferListParams.none()) /** @see list */ fun list( params: AccountTransferListParams = AccountTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): AccountTransferListPage + ): AccountTransferListResponse /** @see list */ fun list( params: AccountTransferListParams = AccountTransferListParams.none() - ): AccountTransferListPage = list(params, RequestOptions.none()) + ): AccountTransferListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): AccountTransferListPage = + fun list(requestOptions: RequestOptions): AccountTransferListResponse = list(AccountTransferListParams.none(), requestOptions) /** Approves an Account Transfer in status `pending_approval`. */ @@ -236,7 +236,7 @@ interface AccountTransferService { * [AccountTransferService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = + fun list(): HttpResponseFor = list(AccountTransferListParams.none()) /** @see list */ @@ -244,17 +244,17 @@ interface AccountTransferService { fun list( params: AccountTransferListParams = AccountTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: AccountTransferListParams = AccountTransferListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(AccountTransferListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AccountTransferServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AccountTransferServiceImpl.kt index 641c4f6ed..2ac103c23 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AccountTransferServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AccountTransferServiceImpl.kt @@ -20,9 +20,8 @@ import com.increase.api.models.accounttransfers.AccountTransfer import com.increase.api.models.accounttransfers.AccountTransferApproveParams import com.increase.api.models.accounttransfers.AccountTransferCancelParams import com.increase.api.models.accounttransfers.AccountTransferCreateParams -import com.increase.api.models.accounttransfers.AccountTransferListPage -import com.increase.api.models.accounttransfers.AccountTransferListPageResponse import com.increase.api.models.accounttransfers.AccountTransferListParams +import com.increase.api.models.accounttransfers.AccountTransferListResponse import com.increase.api.models.accounttransfers.AccountTransferRetrieveParams import java.util.function.Consumer import kotlin.jvm.optionals.getOrNull @@ -56,7 +55,7 @@ class AccountTransferServiceImpl internal constructor(private val clientOptions: override fun list( params: AccountTransferListParams, requestOptions: RequestOptions, - ): AccountTransferListPage = + ): AccountTransferListResponse = // get /account_transfers withRawResponse().list(params, requestOptions).parse() @@ -145,13 +144,13 @@ class AccountTransferServiceImpl internal constructor(private val clientOptions: } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: AccountTransferListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -169,13 +168,6 @@ class AccountTransferServiceImpl internal constructor(private val clientOptions: it.validate() } } - .let { - AccountTransferListPage.builder() - .service(AccountTransferServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AchPrenotificationService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AchPrenotificationService.kt index c0eb5ea78..39ffc0da7 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AchPrenotificationService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AchPrenotificationService.kt @@ -8,8 +8,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.achprenotifications.AchPrenotification import com.increase.api.models.achprenotifications.AchPrenotificationCreateParams -import com.increase.api.models.achprenotifications.AchPrenotificationListPage import com.increase.api.models.achprenotifications.AchPrenotificationListParams +import com.increase.api.models.achprenotifications.AchPrenotificationListResponse import com.increase.api.models.achprenotifications.AchPrenotificationRetrieveParams import java.util.function.Consumer @@ -73,21 +73,21 @@ interface AchPrenotificationService { retrieve(achPrenotificationId, AchPrenotificationRetrieveParams.none(), requestOptions) /** List ACH Prenotifications */ - fun list(): AchPrenotificationListPage = list(AchPrenotificationListParams.none()) + fun list(): AchPrenotificationListResponse = list(AchPrenotificationListParams.none()) /** @see list */ fun list( params: AchPrenotificationListParams = AchPrenotificationListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): AchPrenotificationListPage + ): AchPrenotificationListResponse /** @see list */ fun list( params: AchPrenotificationListParams = AchPrenotificationListParams.none() - ): AchPrenotificationListPage = list(params, RequestOptions.none()) + ): AchPrenotificationListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): AchPrenotificationListPage = + fun list(requestOptions: RequestOptions): AchPrenotificationListResponse = list(AchPrenotificationListParams.none(), requestOptions) /** @@ -174,7 +174,7 @@ interface AchPrenotificationService { * [AchPrenotificationService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = + fun list(): HttpResponseFor = list(AchPrenotificationListParams.none()) /** @see list */ @@ -182,17 +182,17 @@ interface AchPrenotificationService { fun list( params: AchPrenotificationListParams = AchPrenotificationListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: AchPrenotificationListParams = AchPrenotificationListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(AchPrenotificationListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AchPrenotificationServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AchPrenotificationServiceImpl.kt index 7b4dd565b..dbdc8bde9 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AchPrenotificationServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AchPrenotificationServiceImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepare import com.increase.api.models.achprenotifications.AchPrenotification import com.increase.api.models.achprenotifications.AchPrenotificationCreateParams -import com.increase.api.models.achprenotifications.AchPrenotificationListPage -import com.increase.api.models.achprenotifications.AchPrenotificationListPageResponse import com.increase.api.models.achprenotifications.AchPrenotificationListParams +import com.increase.api.models.achprenotifications.AchPrenotificationListResponse import com.increase.api.models.achprenotifications.AchPrenotificationRetrieveParams import java.util.function.Consumer import kotlin.jvm.optionals.getOrNull @@ -54,7 +53,7 @@ class AchPrenotificationServiceImpl internal constructor(private val clientOptio override fun list( params: AchPrenotificationListParams, requestOptions: RequestOptions, - ): AchPrenotificationListPage = + ): AchPrenotificationListResponse = // get /ach_prenotifications withRawResponse().list(params, requestOptions).parse() @@ -129,13 +128,13 @@ class AchPrenotificationServiceImpl internal constructor(private val clientOptio } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: AchPrenotificationListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -153,13 +152,6 @@ class AchPrenotificationServiceImpl internal constructor(private val clientOptio it.validate() } } - .let { - AchPrenotificationListPage.builder() - .service(AchPrenotificationServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AchTransferService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AchTransferService.kt index ae72d27f3..9cbacda02 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AchTransferService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AchTransferService.kt @@ -10,8 +10,8 @@ import com.increase.api.models.achtransfers.AchTransfer import com.increase.api.models.achtransfers.AchTransferApproveParams import com.increase.api.models.achtransfers.AchTransferCancelParams import com.increase.api.models.achtransfers.AchTransferCreateParams -import com.increase.api.models.achtransfers.AchTransferListPage import com.increase.api.models.achtransfers.AchTransferListParams +import com.increase.api.models.achtransfers.AchTransferListResponse import com.increase.api.models.achtransfers.AchTransferRetrieveParams import java.util.function.Consumer @@ -71,20 +71,21 @@ interface AchTransferService { retrieve(achTransferId, AchTransferRetrieveParams.none(), requestOptions) /** List ACH Transfers */ - fun list(): AchTransferListPage = list(AchTransferListParams.none()) + fun list(): AchTransferListResponse = list(AchTransferListParams.none()) /** @see list */ fun list( params: AchTransferListParams = AchTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): AchTransferListPage + ): AchTransferListResponse /** @see list */ - fun list(params: AchTransferListParams = AchTransferListParams.none()): AchTransferListPage = - list(params, RequestOptions.none()) + fun list( + params: AchTransferListParams = AchTransferListParams.none() + ): AchTransferListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): AchTransferListPage = + fun list(requestOptions: RequestOptions): AchTransferListResponse = list(AchTransferListParams.none(), requestOptions) /** Approves an ACH Transfer in a pending_approval state. */ @@ -227,24 +228,24 @@ interface AchTransferService { * [AchTransferService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = list(AchTransferListParams.none()) + fun list(): HttpResponseFor = list(AchTransferListParams.none()) /** @see list */ @MustBeClosed fun list( params: AchTransferListParams = AchTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: AchTransferListParams = AchTransferListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(AchTransferListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AchTransferServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AchTransferServiceImpl.kt index 1edcf5ca1..365f55fc0 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AchTransferServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/AchTransferServiceImpl.kt @@ -20,9 +20,8 @@ import com.increase.api.models.achtransfers.AchTransfer import com.increase.api.models.achtransfers.AchTransferApproveParams import com.increase.api.models.achtransfers.AchTransferCancelParams import com.increase.api.models.achtransfers.AchTransferCreateParams -import com.increase.api.models.achtransfers.AchTransferListPage -import com.increase.api.models.achtransfers.AchTransferListPageResponse import com.increase.api.models.achtransfers.AchTransferListParams +import com.increase.api.models.achtransfers.AchTransferListResponse import com.increase.api.models.achtransfers.AchTransferRetrieveParams import java.util.function.Consumer import kotlin.jvm.optionals.getOrNull @@ -56,7 +55,7 @@ class AchTransferServiceImpl internal constructor(private val clientOptions: Cli override fun list( params: AchTransferListParams, requestOptions: RequestOptions, - ): AchTransferListPage = + ): AchTransferListResponse = // get /ach_transfers withRawResponse().list(params, requestOptions).parse() @@ -145,13 +144,13 @@ class AchTransferServiceImpl internal constructor(private val clientOptions: Cli } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: AchTransferListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -169,13 +168,6 @@ class AchTransferServiceImpl internal constructor(private val clientOptions: Cli it.validate() } } - .let { - AchTransferListPage.builder() - .service(AchTransferServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/BookkeepingAccountService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/BookkeepingAccountService.kt index 4a579385e..bff9dec90 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/BookkeepingAccountService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/BookkeepingAccountService.kt @@ -9,8 +9,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.bookkeepingaccounts.BookkeepingAccount import com.increase.api.models.bookkeepingaccounts.BookkeepingAccountBalanceParams import com.increase.api.models.bookkeepingaccounts.BookkeepingAccountCreateParams -import com.increase.api.models.bookkeepingaccounts.BookkeepingAccountListPage import com.increase.api.models.bookkeepingaccounts.BookkeepingAccountListParams +import com.increase.api.models.bookkeepingaccounts.BookkeepingAccountListResponse import com.increase.api.models.bookkeepingaccounts.BookkeepingAccountUpdateParams import com.increase.api.models.bookkeepingaccounts.BookkeepingBalanceLookup import java.util.function.Consumer @@ -67,21 +67,21 @@ interface BookkeepingAccountService { ): BookkeepingAccount /** List Bookkeeping Accounts */ - fun list(): BookkeepingAccountListPage = list(BookkeepingAccountListParams.none()) + fun list(): BookkeepingAccountListResponse = list(BookkeepingAccountListParams.none()) /** @see list */ fun list( params: BookkeepingAccountListParams = BookkeepingAccountListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): BookkeepingAccountListPage + ): BookkeepingAccountListResponse /** @see list */ fun list( params: BookkeepingAccountListParams = BookkeepingAccountListParams.none() - ): BookkeepingAccountListPage = list(params, RequestOptions.none()) + ): BookkeepingAccountListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): BookkeepingAccountListPage = + fun list(requestOptions: RequestOptions): BookkeepingAccountListResponse = list(BookkeepingAccountListParams.none(), requestOptions) /** Retrieve a Bookkeeping Account Balance */ @@ -192,7 +192,7 @@ interface BookkeepingAccountService { * [BookkeepingAccountService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = + fun list(): HttpResponseFor = list(BookkeepingAccountListParams.none()) /** @see list */ @@ -200,17 +200,17 @@ interface BookkeepingAccountService { fun list( params: BookkeepingAccountListParams = BookkeepingAccountListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: BookkeepingAccountListParams = BookkeepingAccountListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(BookkeepingAccountListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/BookkeepingAccountServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/BookkeepingAccountServiceImpl.kt index 6517520a9..b72140bf9 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/BookkeepingAccountServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/BookkeepingAccountServiceImpl.kt @@ -19,9 +19,8 @@ import com.increase.api.core.prepare import com.increase.api.models.bookkeepingaccounts.BookkeepingAccount import com.increase.api.models.bookkeepingaccounts.BookkeepingAccountBalanceParams import com.increase.api.models.bookkeepingaccounts.BookkeepingAccountCreateParams -import com.increase.api.models.bookkeepingaccounts.BookkeepingAccountListPage -import com.increase.api.models.bookkeepingaccounts.BookkeepingAccountListPageResponse import com.increase.api.models.bookkeepingaccounts.BookkeepingAccountListParams +import com.increase.api.models.bookkeepingaccounts.BookkeepingAccountListResponse import com.increase.api.models.bookkeepingaccounts.BookkeepingAccountUpdateParams import com.increase.api.models.bookkeepingaccounts.BookkeepingBalanceLookup import java.util.function.Consumer @@ -56,7 +55,7 @@ class BookkeepingAccountServiceImpl internal constructor(private val clientOptio override fun list( params: BookkeepingAccountListParams, requestOptions: RequestOptions, - ): BookkeepingAccountListPage = + ): BookkeepingAccountListResponse = // get /bookkeeping_accounts withRawResponse().list(params, requestOptions).parse() @@ -139,13 +138,13 @@ class BookkeepingAccountServiceImpl internal constructor(private val clientOptio } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: BookkeepingAccountListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -163,13 +162,6 @@ class BookkeepingAccountServiceImpl internal constructor(private val clientOptio it.validate() } } - .let { - BookkeepingAccountListPage.builder() - .service(BookkeepingAccountServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/BookkeepingEntryService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/BookkeepingEntryService.kt index c4503f12b..91edc2acc 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/BookkeepingEntryService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/BookkeepingEntryService.kt @@ -7,8 +7,8 @@ import com.increase.api.core.ClientOptions import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.bookkeepingentries.BookkeepingEntry -import com.increase.api.models.bookkeepingentries.BookkeepingEntryListPage import com.increase.api.models.bookkeepingentries.BookkeepingEntryListParams +import com.increase.api.models.bookkeepingentries.BookkeepingEntryListResponse import com.increase.api.models.bookkeepingentries.BookkeepingEntryRetrieveParams import java.util.function.Consumer @@ -59,21 +59,21 @@ interface BookkeepingEntryService { retrieve(bookkeepingEntryId, BookkeepingEntryRetrieveParams.none(), requestOptions) /** List Bookkeeping Entries */ - fun list(): BookkeepingEntryListPage = list(BookkeepingEntryListParams.none()) + fun list(): BookkeepingEntryListResponse = list(BookkeepingEntryListParams.none()) /** @see list */ fun list( params: BookkeepingEntryListParams = BookkeepingEntryListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): BookkeepingEntryListPage + ): BookkeepingEntryListResponse /** @see list */ fun list( params: BookkeepingEntryListParams = BookkeepingEntryListParams.none() - ): BookkeepingEntryListPage = list(params, RequestOptions.none()) + ): BookkeepingEntryListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): BookkeepingEntryListPage = + fun list(requestOptions: RequestOptions): BookkeepingEntryListResponse = list(BookkeepingEntryListParams.none(), requestOptions) /** @@ -144,7 +144,7 @@ interface BookkeepingEntryService { * [BookkeepingEntryService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = + fun list(): HttpResponseFor = list(BookkeepingEntryListParams.none()) /** @see list */ @@ -152,17 +152,17 @@ interface BookkeepingEntryService { fun list( params: BookkeepingEntryListParams = BookkeepingEntryListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: BookkeepingEntryListParams = BookkeepingEntryListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(BookkeepingEntryListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/BookkeepingEntryServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/BookkeepingEntryServiceImpl.kt index 7cfee297e..0ee9474f3 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/BookkeepingEntryServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/BookkeepingEntryServiceImpl.kt @@ -16,9 +16,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.core.http.parseable import com.increase.api.core.prepare import com.increase.api.models.bookkeepingentries.BookkeepingEntry -import com.increase.api.models.bookkeepingentries.BookkeepingEntryListPage -import com.increase.api.models.bookkeepingentries.BookkeepingEntryListPageResponse import com.increase.api.models.bookkeepingentries.BookkeepingEntryListParams +import com.increase.api.models.bookkeepingentries.BookkeepingEntryListResponse import com.increase.api.models.bookkeepingentries.BookkeepingEntryRetrieveParams import java.util.function.Consumer import kotlin.jvm.optionals.getOrNull @@ -45,7 +44,7 @@ class BookkeepingEntryServiceImpl internal constructor(private val clientOptions override fun list( params: BookkeepingEntryListParams, requestOptions: RequestOptions, - ): BookkeepingEntryListPage = + ): BookkeepingEntryListResponse = // get /bookkeeping_entries withRawResponse().list(params, requestOptions).parse() @@ -92,13 +91,13 @@ class BookkeepingEntryServiceImpl internal constructor(private val clientOptions } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: BookkeepingEntryListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -116,13 +115,6 @@ class BookkeepingEntryServiceImpl internal constructor(private val clientOptions it.validate() } } - .let { - BookkeepingEntryListPage.builder() - .service(BookkeepingEntryServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/BookkeepingEntrySetService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/BookkeepingEntrySetService.kt index 04ffd9016..12fadc483 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/BookkeepingEntrySetService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/BookkeepingEntrySetService.kt @@ -8,8 +8,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.bookkeepingentrysets.BookkeepingEntrySet import com.increase.api.models.bookkeepingentrysets.BookkeepingEntrySetCreateParams -import com.increase.api.models.bookkeepingentrysets.BookkeepingEntrySetListPage import com.increase.api.models.bookkeepingentrysets.BookkeepingEntrySetListParams +import com.increase.api.models.bookkeepingentrysets.BookkeepingEntrySetListResponse import com.increase.api.models.bookkeepingentrysets.BookkeepingEntrySetRetrieveParams import java.util.function.Consumer @@ -76,21 +76,21 @@ interface BookkeepingEntrySetService { retrieve(bookkeepingEntrySetId, BookkeepingEntrySetRetrieveParams.none(), requestOptions) /** List Bookkeeping Entry Sets */ - fun list(): BookkeepingEntrySetListPage = list(BookkeepingEntrySetListParams.none()) + fun list(): BookkeepingEntrySetListResponse = list(BookkeepingEntrySetListParams.none()) /** @see list */ fun list( params: BookkeepingEntrySetListParams = BookkeepingEntrySetListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): BookkeepingEntrySetListPage + ): BookkeepingEntrySetListResponse /** @see list */ fun list( params: BookkeepingEntrySetListParams = BookkeepingEntrySetListParams.none() - ): BookkeepingEntrySetListPage = list(params, RequestOptions.none()) + ): BookkeepingEntrySetListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): BookkeepingEntrySetListPage = + fun list(requestOptions: RequestOptions): BookkeepingEntrySetListResponse = list(BookkeepingEntrySetListParams.none(), requestOptions) /** @@ -181,7 +181,7 @@ interface BookkeepingEntrySetService { * as [BookkeepingEntrySetService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = + fun list(): HttpResponseFor = list(BookkeepingEntrySetListParams.none()) /** @see list */ @@ -189,17 +189,17 @@ interface BookkeepingEntrySetService { fun list( params: BookkeepingEntrySetListParams = BookkeepingEntrySetListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: BookkeepingEntrySetListParams = BookkeepingEntrySetListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(BookkeepingEntrySetListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/BookkeepingEntrySetServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/BookkeepingEntrySetServiceImpl.kt index 27ba27ccf..925fa3d80 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/BookkeepingEntrySetServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/BookkeepingEntrySetServiceImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepare import com.increase.api.models.bookkeepingentrysets.BookkeepingEntrySet import com.increase.api.models.bookkeepingentrysets.BookkeepingEntrySetCreateParams -import com.increase.api.models.bookkeepingentrysets.BookkeepingEntrySetListPage -import com.increase.api.models.bookkeepingentrysets.BookkeepingEntrySetListPageResponse import com.increase.api.models.bookkeepingentrysets.BookkeepingEntrySetListParams +import com.increase.api.models.bookkeepingentrysets.BookkeepingEntrySetListResponse import com.increase.api.models.bookkeepingentrysets.BookkeepingEntrySetRetrieveParams import java.util.function.Consumer import kotlin.jvm.optionals.getOrNull @@ -56,7 +55,7 @@ internal constructor(private val clientOptions: ClientOptions) : BookkeepingEntr override fun list( params: BookkeepingEntrySetListParams, requestOptions: RequestOptions, - ): BookkeepingEntrySetListPage = + ): BookkeepingEntrySetListResponse = // get /bookkeeping_entry_sets withRawResponse().list(params, requestOptions).parse() @@ -131,13 +130,13 @@ internal constructor(private val clientOptions: ClientOptions) : BookkeepingEntr } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: BookkeepingEntrySetListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -155,13 +154,6 @@ internal constructor(private val clientOptions: ClientOptions) : BookkeepingEntr it.validate() } } - .let { - BookkeepingEntrySetListPage.builder() - .service(BookkeepingEntrySetServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardDisputeService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardDisputeService.kt index 335bce7f8..5bfb9c9d9 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardDisputeService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardDisputeService.kt @@ -8,8 +8,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.carddisputes.CardDispute import com.increase.api.models.carddisputes.CardDisputeCreateParams -import com.increase.api.models.carddisputes.CardDisputeListPage import com.increase.api.models.carddisputes.CardDisputeListParams +import com.increase.api.models.carddisputes.CardDisputeListResponse import com.increase.api.models.carddisputes.CardDisputeRetrieveParams import com.increase.api.models.carddisputes.CardDisputeSubmitUserSubmissionParams import com.increase.api.models.carddisputes.CardDisputeWithdrawParams @@ -71,20 +71,21 @@ interface CardDisputeService { retrieve(cardDisputeId, CardDisputeRetrieveParams.none(), requestOptions) /** List Card Disputes */ - fun list(): CardDisputeListPage = list(CardDisputeListParams.none()) + fun list(): CardDisputeListResponse = list(CardDisputeListParams.none()) /** @see list */ fun list( params: CardDisputeListParams = CardDisputeListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CardDisputeListPage + ): CardDisputeListResponse /** @see list */ - fun list(params: CardDisputeListParams = CardDisputeListParams.none()): CardDisputeListPage = - list(params, RequestOptions.none()) + fun list( + params: CardDisputeListParams = CardDisputeListParams.none() + ): CardDisputeListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CardDisputeListPage = + fun list(requestOptions: RequestOptions): CardDisputeListResponse = list(CardDisputeListParams.none(), requestOptions) /** Submit a User Submission for a Card Dispute */ @@ -224,24 +225,24 @@ interface CardDisputeService { * [CardDisputeService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = list(CardDisputeListParams.none()) + fun list(): HttpResponseFor = list(CardDisputeListParams.none()) /** @see list */ @MustBeClosed fun list( params: CardDisputeListParams = CardDisputeListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: CardDisputeListParams = CardDisputeListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(CardDisputeListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardDisputeServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardDisputeServiceImpl.kt index d40ef689d..5103f9977 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardDisputeServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardDisputeServiceImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepare import com.increase.api.models.carddisputes.CardDispute import com.increase.api.models.carddisputes.CardDisputeCreateParams -import com.increase.api.models.carddisputes.CardDisputeListPage -import com.increase.api.models.carddisputes.CardDisputeListPageResponse import com.increase.api.models.carddisputes.CardDisputeListParams +import com.increase.api.models.carddisputes.CardDisputeListResponse import com.increase.api.models.carddisputes.CardDisputeRetrieveParams import com.increase.api.models.carddisputes.CardDisputeSubmitUserSubmissionParams import com.increase.api.models.carddisputes.CardDisputeWithdrawParams @@ -56,7 +55,7 @@ class CardDisputeServiceImpl internal constructor(private val clientOptions: Cli override fun list( params: CardDisputeListParams, requestOptions: RequestOptions, - ): CardDisputeListPage = + ): CardDisputeListResponse = // get /card_disputes withRawResponse().list(params, requestOptions).parse() @@ -145,13 +144,13 @@ class CardDisputeServiceImpl internal constructor(private val clientOptions: Cli } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: CardDisputeListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -169,13 +168,6 @@ class CardDisputeServiceImpl internal constructor(private val clientOptions: Cli it.validate() } } - .let { - CardDisputeListPage.builder() - .service(CardDisputeServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardPaymentService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardPaymentService.kt index 6a65fae30..c25892861 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardPaymentService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardPaymentService.kt @@ -7,8 +7,8 @@ import com.increase.api.core.ClientOptions import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.cardpayments.CardPayment -import com.increase.api.models.cardpayments.CardPaymentListPage import com.increase.api.models.cardpayments.CardPaymentListParams +import com.increase.api.models.cardpayments.CardPaymentListResponse import com.increase.api.models.cardpayments.CardPaymentRetrieveParams import java.util.function.Consumer @@ -59,20 +59,21 @@ interface CardPaymentService { retrieve(cardPaymentId, CardPaymentRetrieveParams.none(), requestOptions) /** List Card Payments */ - fun list(): CardPaymentListPage = list(CardPaymentListParams.none()) + fun list(): CardPaymentListResponse = list(CardPaymentListParams.none()) /** @see list */ fun list( params: CardPaymentListParams = CardPaymentListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CardPaymentListPage + ): CardPaymentListResponse /** @see list */ - fun list(params: CardPaymentListParams = CardPaymentListParams.none()): CardPaymentListPage = - list(params, RequestOptions.none()) + fun list( + params: CardPaymentListParams = CardPaymentListParams.none() + ): CardPaymentListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CardPaymentListPage = + fun list(requestOptions: RequestOptions): CardPaymentListResponse = list(CardPaymentListParams.none(), requestOptions) /** @@ -138,24 +139,24 @@ interface CardPaymentService { * [CardPaymentService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = list(CardPaymentListParams.none()) + fun list(): HttpResponseFor = list(CardPaymentListParams.none()) /** @see list */ @MustBeClosed fun list( params: CardPaymentListParams = CardPaymentListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: CardPaymentListParams = CardPaymentListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(CardPaymentListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardPaymentServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardPaymentServiceImpl.kt index dc1b249b3..848eb23b3 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardPaymentServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardPaymentServiceImpl.kt @@ -16,9 +16,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.core.http.parseable import com.increase.api.core.prepare import com.increase.api.models.cardpayments.CardPayment -import com.increase.api.models.cardpayments.CardPaymentListPage -import com.increase.api.models.cardpayments.CardPaymentListPageResponse import com.increase.api.models.cardpayments.CardPaymentListParams +import com.increase.api.models.cardpayments.CardPaymentListResponse import com.increase.api.models.cardpayments.CardPaymentRetrieveParams import java.util.function.Consumer import kotlin.jvm.optionals.getOrNull @@ -45,7 +44,7 @@ class CardPaymentServiceImpl internal constructor(private val clientOptions: Cli override fun list( params: CardPaymentListParams, requestOptions: RequestOptions, - ): CardPaymentListPage = + ): CardPaymentListResponse = // get /card_payments withRawResponse().list(params, requestOptions).parse() @@ -92,13 +91,13 @@ class CardPaymentServiceImpl internal constructor(private val clientOptions: Cli } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: CardPaymentListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -116,13 +115,6 @@ class CardPaymentServiceImpl internal constructor(private val clientOptions: Cli it.validate() } } - .let { - CardPaymentListPage.builder() - .service(CardPaymentServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardPurchaseSupplementService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardPurchaseSupplementService.kt index e3b0e5f4d..89aa97d0d 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardPurchaseSupplementService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardPurchaseSupplementService.kt @@ -7,8 +7,8 @@ import com.increase.api.core.ClientOptions import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.cardpurchasesupplements.CardPurchaseSupplement -import com.increase.api.models.cardpurchasesupplements.CardPurchaseSupplementListPage import com.increase.api.models.cardpurchasesupplements.CardPurchaseSupplementListParams +import com.increase.api.models.cardpurchasesupplements.CardPurchaseSupplementListResponse import com.increase.api.models.cardpurchasesupplements.CardPurchaseSupplementRetrieveParams import java.util.function.Consumer @@ -69,21 +69,21 @@ interface CardPurchaseSupplementService { ) /** List Card Purchase Supplements */ - fun list(): CardPurchaseSupplementListPage = list(CardPurchaseSupplementListParams.none()) + fun list(): CardPurchaseSupplementListResponse = list(CardPurchaseSupplementListParams.none()) /** @see list */ fun list( params: CardPurchaseSupplementListParams = CardPurchaseSupplementListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CardPurchaseSupplementListPage + ): CardPurchaseSupplementListResponse /** @see list */ fun list( params: CardPurchaseSupplementListParams = CardPurchaseSupplementListParams.none() - ): CardPurchaseSupplementListPage = list(params, RequestOptions.none()) + ): CardPurchaseSupplementListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CardPurchaseSupplementListPage = + fun list(requestOptions: RequestOptions): CardPurchaseSupplementListResponse = list(CardPurchaseSupplementListParams.none(), requestOptions) /** @@ -162,7 +162,7 @@ interface CardPurchaseSupplementService { * same as [CardPurchaseSupplementService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = + fun list(): HttpResponseFor = list(CardPurchaseSupplementListParams.none()) /** @see list */ @@ -170,17 +170,19 @@ interface CardPurchaseSupplementService { fun list( params: CardPurchaseSupplementListParams = CardPurchaseSupplementListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: CardPurchaseSupplementListParams = CardPurchaseSupplementListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list( + requestOptions: RequestOptions + ): HttpResponseFor = list(CardPurchaseSupplementListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardPurchaseSupplementServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardPurchaseSupplementServiceImpl.kt index 20e041395..888cec723 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardPurchaseSupplementServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardPurchaseSupplementServiceImpl.kt @@ -16,9 +16,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.core.http.parseable import com.increase.api.core.prepare import com.increase.api.models.cardpurchasesupplements.CardPurchaseSupplement -import com.increase.api.models.cardpurchasesupplements.CardPurchaseSupplementListPage -import com.increase.api.models.cardpurchasesupplements.CardPurchaseSupplementListPageResponse import com.increase.api.models.cardpurchasesupplements.CardPurchaseSupplementListParams +import com.increase.api.models.cardpurchasesupplements.CardPurchaseSupplementListResponse import com.increase.api.models.cardpurchasesupplements.CardPurchaseSupplementRetrieveParams import java.util.function.Consumer import kotlin.jvm.optionals.getOrNull @@ -47,7 +46,7 @@ internal constructor(private val clientOptions: ClientOptions) : CardPurchaseSup override fun list( params: CardPurchaseSupplementListParams, requestOptions: RequestOptions, - ): CardPurchaseSupplementListPage = + ): CardPurchaseSupplementListResponse = // get /card_purchase_supplements withRawResponse().list(params, requestOptions).parse() @@ -94,13 +93,13 @@ internal constructor(private val clientOptions: ClientOptions) : CardPurchaseSup } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: CardPurchaseSupplementListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -118,13 +117,6 @@ internal constructor(private val clientOptions: ClientOptions) : CardPurchaseSup it.validate() } } - .let { - CardPurchaseSupplementListPage.builder() - .service(CardPurchaseSupplementServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardPushTransferService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardPushTransferService.kt index 8f616591d..4338fa995 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardPushTransferService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardPushTransferService.kt @@ -10,8 +10,8 @@ import com.increase.api.models.cardpushtransfers.CardPushTransfer import com.increase.api.models.cardpushtransfers.CardPushTransferApproveParams import com.increase.api.models.cardpushtransfers.CardPushTransferCancelParams import com.increase.api.models.cardpushtransfers.CardPushTransferCreateParams -import com.increase.api.models.cardpushtransfers.CardPushTransferListPage import com.increase.api.models.cardpushtransfers.CardPushTransferListParams +import com.increase.api.models.cardpushtransfers.CardPushTransferListResponse import com.increase.api.models.cardpushtransfers.CardPushTransferRetrieveParams import java.util.function.Consumer @@ -72,21 +72,21 @@ interface CardPushTransferService { retrieve(cardPushTransferId, CardPushTransferRetrieveParams.none(), requestOptions) /** List Card Push Transfers */ - fun list(): CardPushTransferListPage = list(CardPushTransferListParams.none()) + fun list(): CardPushTransferListResponse = list(CardPushTransferListParams.none()) /** @see list */ fun list( params: CardPushTransferListParams = CardPushTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CardPushTransferListPage + ): CardPushTransferListResponse /** @see list */ fun list( params: CardPushTransferListParams = CardPushTransferListParams.none() - ): CardPushTransferListPage = list(params, RequestOptions.none()) + ): CardPushTransferListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CardPushTransferListPage = + fun list(requestOptions: RequestOptions): CardPushTransferListResponse = list(CardPushTransferListParams.none(), requestOptions) /** Approves a Card Push Transfer in a pending_approval state. */ @@ -236,7 +236,7 @@ interface CardPushTransferService { * [CardPushTransferService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = + fun list(): HttpResponseFor = list(CardPushTransferListParams.none()) /** @see list */ @@ -244,17 +244,17 @@ interface CardPushTransferService { fun list( params: CardPushTransferListParams = CardPushTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: CardPushTransferListParams = CardPushTransferListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(CardPushTransferListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardPushTransferServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardPushTransferServiceImpl.kt index ea2025b6a..847d095f4 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardPushTransferServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardPushTransferServiceImpl.kt @@ -20,9 +20,8 @@ import com.increase.api.models.cardpushtransfers.CardPushTransfer import com.increase.api.models.cardpushtransfers.CardPushTransferApproveParams import com.increase.api.models.cardpushtransfers.CardPushTransferCancelParams import com.increase.api.models.cardpushtransfers.CardPushTransferCreateParams -import com.increase.api.models.cardpushtransfers.CardPushTransferListPage -import com.increase.api.models.cardpushtransfers.CardPushTransferListPageResponse import com.increase.api.models.cardpushtransfers.CardPushTransferListParams +import com.increase.api.models.cardpushtransfers.CardPushTransferListResponse import com.increase.api.models.cardpushtransfers.CardPushTransferRetrieveParams import java.util.function.Consumer import kotlin.jvm.optionals.getOrNull @@ -56,7 +55,7 @@ class CardPushTransferServiceImpl internal constructor(private val clientOptions override fun list( params: CardPushTransferListParams, requestOptions: RequestOptions, - ): CardPushTransferListPage = + ): CardPushTransferListResponse = // get /card_push_transfers withRawResponse().list(params, requestOptions).parse() @@ -145,13 +144,13 @@ class CardPushTransferServiceImpl internal constructor(private val clientOptions } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: CardPushTransferListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -169,13 +168,6 @@ class CardPushTransferServiceImpl internal constructor(private val clientOptions it.validate() } } - .let { - CardPushTransferListPage.builder() - .service(CardPushTransferServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardService.kt index 501e3d077..38fa36967 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardService.kt @@ -12,8 +12,8 @@ import com.increase.api.models.cards.CardCreateParams import com.increase.api.models.cards.CardDetails import com.increase.api.models.cards.CardDetailsParams import com.increase.api.models.cards.CardIframeUrl -import com.increase.api.models.cards.CardListPage import com.increase.api.models.cards.CardListParams +import com.increase.api.models.cards.CardListResponse import com.increase.api.models.cards.CardRetrieveParams import com.increase.api.models.cards.CardUpdateParams import com.increase.api.models.cards.CardUpdatePinParams @@ -97,20 +97,20 @@ interface CardService { update(cardId, CardUpdateParams.none(), requestOptions) /** List Cards */ - fun list(): CardListPage = list(CardListParams.none()) + fun list(): CardListResponse = list(CardListParams.none()) /** @see list */ fun list( params: CardListParams = CardListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CardListPage + ): CardListResponse /** @see list */ - fun list(params: CardListParams = CardListParams.none()): CardListPage = + fun list(params: CardListParams = CardListParams.none()): CardListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CardListPage = + fun list(requestOptions: RequestOptions): CardListResponse = list(CardListParams.none(), requestOptions) /** @@ -308,23 +308,24 @@ interface CardService { * Returns a raw HTTP response for `get /cards`, but is otherwise the same as * [CardService.list]. */ - @MustBeClosed fun list(): HttpResponseFor = list(CardListParams.none()) + @MustBeClosed fun list(): HttpResponseFor = list(CardListParams.none()) /** @see list */ @MustBeClosed fun list( params: CardListParams = CardListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed - fun list(params: CardListParams = CardListParams.none()): HttpResponseFor = - list(params, RequestOptions.none()) + fun list( + params: CardListParams = CardListParams.none() + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(CardListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardServiceImpl.kt index 23c39914f..d35f40a9b 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardServiceImpl.kt @@ -22,9 +22,8 @@ import com.increase.api.models.cards.CardCreateParams import com.increase.api.models.cards.CardDetails import com.increase.api.models.cards.CardDetailsParams import com.increase.api.models.cards.CardIframeUrl -import com.increase.api.models.cards.CardListPage -import com.increase.api.models.cards.CardListPageResponse import com.increase.api.models.cards.CardListParams +import com.increase.api.models.cards.CardListResponse import com.increase.api.models.cards.CardRetrieveParams import com.increase.api.models.cards.CardUpdateParams import com.increase.api.models.cards.CardUpdatePinParams @@ -54,7 +53,7 @@ class CardServiceImpl internal constructor(private val clientOptions: ClientOpti // patch /cards/{card_id} withRawResponse().update(params, requestOptions).parse() - override fun list(params: CardListParams, requestOptions: RequestOptions): CardListPage = + override fun list(params: CardListParams, requestOptions: RequestOptions): CardListResponse = // get /cards withRawResponse().list(params, requestOptions).parse() @@ -175,13 +174,13 @@ class CardServiceImpl internal constructor(private val clientOptions: ClientOpti } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: CardListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -199,13 +198,6 @@ class CardServiceImpl internal constructor(private val clientOptions: ClientOpti it.validate() } } - .let { - CardListPage.builder() - .service(CardServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardTokenService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardTokenService.kt index 8ed7df58d..6242cc94a 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardTokenService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardTokenService.kt @@ -9,8 +9,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.cardtokens.CardToken import com.increase.api.models.cardtokens.CardTokenCapabilities import com.increase.api.models.cardtokens.CardTokenCapabilitiesParams -import com.increase.api.models.cardtokens.CardTokenListPage import com.increase.api.models.cardtokens.CardTokenListParams +import com.increase.api.models.cardtokens.CardTokenListResponse import com.increase.api.models.cardtokens.CardTokenRetrieveParams import java.util.function.Consumer @@ -60,20 +60,20 @@ interface CardTokenService { retrieve(cardTokenId, CardTokenRetrieveParams.none(), requestOptions) /** List Card Tokens */ - fun list(): CardTokenListPage = list(CardTokenListParams.none()) + fun list(): CardTokenListResponse = list(CardTokenListParams.none()) /** @see list */ fun list( params: CardTokenListParams = CardTokenListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CardTokenListPage + ): CardTokenListResponse /** @see list */ - fun list(params: CardTokenListParams = CardTokenListParams.none()): CardTokenListPage = + fun list(params: CardTokenListParams = CardTokenListParams.none()): CardTokenListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CardTokenListPage = + fun list(requestOptions: RequestOptions): CardTokenListResponse = list(CardTokenListParams.none(), requestOptions) /** @@ -171,24 +171,24 @@ interface CardTokenService { * [CardTokenService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = list(CardTokenListParams.none()) + fun list(): HttpResponseFor = list(CardTokenListParams.none()) /** @see list */ @MustBeClosed fun list( params: CardTokenListParams = CardTokenListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: CardTokenListParams = CardTokenListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(CardTokenListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardTokenServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardTokenServiceImpl.kt index 09bc5b07f..d27ee202b 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardTokenServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardTokenServiceImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.prepare import com.increase.api.models.cardtokens.CardToken import com.increase.api.models.cardtokens.CardTokenCapabilities import com.increase.api.models.cardtokens.CardTokenCapabilitiesParams -import com.increase.api.models.cardtokens.CardTokenListPage -import com.increase.api.models.cardtokens.CardTokenListPageResponse import com.increase.api.models.cardtokens.CardTokenListParams +import com.increase.api.models.cardtokens.CardTokenListResponse import com.increase.api.models.cardtokens.CardTokenRetrieveParams import java.util.function.Consumer import kotlin.jvm.optionals.getOrNull @@ -47,7 +46,7 @@ class CardTokenServiceImpl internal constructor(private val clientOptions: Clien override fun list( params: CardTokenListParams, requestOptions: RequestOptions, - ): CardTokenListPage = + ): CardTokenListResponse = // get /card_tokens withRawResponse().list(params, requestOptions).parse() @@ -101,13 +100,13 @@ class CardTokenServiceImpl internal constructor(private val clientOptions: Clien } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: CardTokenListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -125,13 +124,6 @@ class CardTokenServiceImpl internal constructor(private val clientOptions: Clien it.validate() } } - .let { - CardTokenListPage.builder() - .service(CardTokenServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardValidationService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardValidationService.kt index 45388c39b..b9cf33fde 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardValidationService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardValidationService.kt @@ -8,8 +8,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.cardvalidations.CardValidation import com.increase.api.models.cardvalidations.CardValidationCreateParams -import com.increase.api.models.cardvalidations.CardValidationListPage import com.increase.api.models.cardvalidations.CardValidationListParams +import com.increase.api.models.cardvalidations.CardValidationListResponse import com.increase.api.models.cardvalidations.CardValidationRetrieveParams import java.util.function.Consumer @@ -70,21 +70,21 @@ interface CardValidationService { retrieve(cardValidationId, CardValidationRetrieveParams.none(), requestOptions) /** List Card Validations */ - fun list(): CardValidationListPage = list(CardValidationListParams.none()) + fun list(): CardValidationListResponse = list(CardValidationListParams.none()) /** @see list */ fun list( params: CardValidationListParams = CardValidationListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CardValidationListPage + ): CardValidationListResponse /** @see list */ fun list( params: CardValidationListParams = CardValidationListParams.none() - ): CardValidationListPage = list(params, RequestOptions.none()) + ): CardValidationListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CardValidationListPage = + fun list(requestOptions: RequestOptions): CardValidationListResponse = list(CardValidationListParams.none(), requestOptions) /** @@ -166,24 +166,25 @@ interface CardValidationService { * [CardValidationService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = list(CardValidationListParams.none()) + fun list(): HttpResponseFor = + list(CardValidationListParams.none()) /** @see list */ @MustBeClosed fun list( params: CardValidationListParams = CardValidationListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: CardValidationListParams = CardValidationListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(CardValidationListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardValidationServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardValidationServiceImpl.kt index 8e60fc198..07686dd02 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardValidationServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CardValidationServiceImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepare import com.increase.api.models.cardvalidations.CardValidation import com.increase.api.models.cardvalidations.CardValidationCreateParams -import com.increase.api.models.cardvalidations.CardValidationListPage -import com.increase.api.models.cardvalidations.CardValidationListPageResponse import com.increase.api.models.cardvalidations.CardValidationListParams +import com.increase.api.models.cardvalidations.CardValidationListResponse import com.increase.api.models.cardvalidations.CardValidationRetrieveParams import java.util.function.Consumer import kotlin.jvm.optionals.getOrNull @@ -54,7 +53,7 @@ class CardValidationServiceImpl internal constructor(private val clientOptions: override fun list( params: CardValidationListParams, requestOptions: RequestOptions, - ): CardValidationListPage = + ): CardValidationListResponse = // get /card_validations withRawResponse().list(params, requestOptions).parse() @@ -129,13 +128,13 @@ class CardValidationServiceImpl internal constructor(private val clientOptions: } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: CardValidationListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -153,13 +152,6 @@ class CardValidationServiceImpl internal constructor(private val clientOptions: it.validate() } } - .let { - CardValidationListPage.builder() - .service(CardValidationServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CheckDepositService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CheckDepositService.kt index 7e6550916..c555fc8cd 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CheckDepositService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CheckDepositService.kt @@ -8,8 +8,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.checkdeposits.CheckDeposit import com.increase.api.models.checkdeposits.CheckDepositCreateParams -import com.increase.api.models.checkdeposits.CheckDepositListPage import com.increase.api.models.checkdeposits.CheckDepositListParams +import com.increase.api.models.checkdeposits.CheckDepositListResponse import com.increase.api.models.checkdeposits.CheckDepositRetrieveParams import java.util.function.Consumer @@ -70,20 +70,21 @@ interface CheckDepositService { retrieve(checkDepositId, CheckDepositRetrieveParams.none(), requestOptions) /** List Check Deposits */ - fun list(): CheckDepositListPage = list(CheckDepositListParams.none()) + fun list(): CheckDepositListResponse = list(CheckDepositListParams.none()) /** @see list */ fun list( params: CheckDepositListParams = CheckDepositListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CheckDepositListPage + ): CheckDepositListResponse /** @see list */ - fun list(params: CheckDepositListParams = CheckDepositListParams.none()): CheckDepositListPage = - list(params, RequestOptions.none()) + fun list( + params: CheckDepositListParams = CheckDepositListParams.none() + ): CheckDepositListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CheckDepositListPage = + fun list(requestOptions: RequestOptions): CheckDepositListResponse = list(CheckDepositListParams.none(), requestOptions) /** @@ -164,24 +165,24 @@ interface CheckDepositService { * [CheckDepositService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = list(CheckDepositListParams.none()) + fun list(): HttpResponseFor = list(CheckDepositListParams.none()) /** @see list */ @MustBeClosed fun list( params: CheckDepositListParams = CheckDepositListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: CheckDepositListParams = CheckDepositListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(CheckDepositListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CheckDepositServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CheckDepositServiceImpl.kt index 543301178..3b0f3135f 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CheckDepositServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CheckDepositServiceImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepare import com.increase.api.models.checkdeposits.CheckDeposit import com.increase.api.models.checkdeposits.CheckDepositCreateParams -import com.increase.api.models.checkdeposits.CheckDepositListPage -import com.increase.api.models.checkdeposits.CheckDepositListPageResponse import com.increase.api.models.checkdeposits.CheckDepositListParams +import com.increase.api.models.checkdeposits.CheckDepositListResponse import com.increase.api.models.checkdeposits.CheckDepositRetrieveParams import java.util.function.Consumer import kotlin.jvm.optionals.getOrNull @@ -54,7 +53,7 @@ class CheckDepositServiceImpl internal constructor(private val clientOptions: Cl override fun list( params: CheckDepositListParams, requestOptions: RequestOptions, - ): CheckDepositListPage = + ): CheckDepositListResponse = // get /check_deposits withRawResponse().list(params, requestOptions).parse() @@ -129,13 +128,13 @@ class CheckDepositServiceImpl internal constructor(private val clientOptions: Cl } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: CheckDepositListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -153,13 +152,6 @@ class CheckDepositServiceImpl internal constructor(private val clientOptions: Cl it.validate() } } - .let { - CheckDepositListPage.builder() - .service(CheckDepositServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CheckTransferService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CheckTransferService.kt index bab9a5d27..96f2908da 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CheckTransferService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CheckTransferService.kt @@ -10,8 +10,8 @@ import com.increase.api.models.checktransfers.CheckTransfer import com.increase.api.models.checktransfers.CheckTransferApproveParams import com.increase.api.models.checktransfers.CheckTransferCancelParams import com.increase.api.models.checktransfers.CheckTransferCreateParams -import com.increase.api.models.checktransfers.CheckTransferListPage import com.increase.api.models.checktransfers.CheckTransferListParams +import com.increase.api.models.checktransfers.CheckTransferListResponse import com.increase.api.models.checktransfers.CheckTransferRetrieveParams import com.increase.api.models.checktransfers.CheckTransferStopPaymentParams import java.util.function.Consumer @@ -73,21 +73,21 @@ interface CheckTransferService { retrieve(checkTransferId, CheckTransferRetrieveParams.none(), requestOptions) /** List Check Transfers */ - fun list(): CheckTransferListPage = list(CheckTransferListParams.none()) + fun list(): CheckTransferListResponse = list(CheckTransferListParams.none()) /** @see list */ fun list( params: CheckTransferListParams = CheckTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): CheckTransferListPage + ): CheckTransferListResponse /** @see list */ fun list( params: CheckTransferListParams = CheckTransferListParams.none() - ): CheckTransferListPage = list(params, RequestOptions.none()) + ): CheckTransferListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): CheckTransferListPage = + fun list(requestOptions: RequestOptions): CheckTransferListResponse = list(CheckTransferListParams.none(), requestOptions) /** Approve a Check Transfer */ @@ -267,24 +267,25 @@ interface CheckTransferService { * [CheckTransferService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = list(CheckTransferListParams.none()) + fun list(): HttpResponseFor = + list(CheckTransferListParams.none()) /** @see list */ @MustBeClosed fun list( params: CheckTransferListParams = CheckTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: CheckTransferListParams = CheckTransferListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(CheckTransferListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CheckTransferServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CheckTransferServiceImpl.kt index 60b714ead..4ad27740a 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CheckTransferServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/CheckTransferServiceImpl.kt @@ -20,9 +20,8 @@ import com.increase.api.models.checktransfers.CheckTransfer import com.increase.api.models.checktransfers.CheckTransferApproveParams import com.increase.api.models.checktransfers.CheckTransferCancelParams import com.increase.api.models.checktransfers.CheckTransferCreateParams -import com.increase.api.models.checktransfers.CheckTransferListPage -import com.increase.api.models.checktransfers.CheckTransferListPageResponse import com.increase.api.models.checktransfers.CheckTransferListParams +import com.increase.api.models.checktransfers.CheckTransferListResponse import com.increase.api.models.checktransfers.CheckTransferRetrieveParams import com.increase.api.models.checktransfers.CheckTransferStopPaymentParams import java.util.function.Consumer @@ -57,7 +56,7 @@ class CheckTransferServiceImpl internal constructor(private val clientOptions: C override fun list( params: CheckTransferListParams, requestOptions: RequestOptions, - ): CheckTransferListPage = + ): CheckTransferListResponse = // get /check_transfers withRawResponse().list(params, requestOptions).parse() @@ -153,13 +152,13 @@ class CheckTransferServiceImpl internal constructor(private val clientOptions: C } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: CheckTransferListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -177,13 +176,6 @@ class CheckTransferServiceImpl internal constructor(private val clientOptions: C it.validate() } } - .let { - CheckTransferListPage.builder() - .service(CheckTransferServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/DeclinedTransactionService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/DeclinedTransactionService.kt index 853594e74..a02acaca5 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/DeclinedTransactionService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/DeclinedTransactionService.kt @@ -7,8 +7,8 @@ import com.increase.api.core.ClientOptions import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.declinedtransactions.DeclinedTransaction -import com.increase.api.models.declinedtransactions.DeclinedTransactionListPage import com.increase.api.models.declinedtransactions.DeclinedTransactionListParams +import com.increase.api.models.declinedtransactions.DeclinedTransactionListResponse import com.increase.api.models.declinedtransactions.DeclinedTransactionRetrieveParams import java.util.function.Consumer @@ -65,21 +65,21 @@ interface DeclinedTransactionService { retrieve(declinedTransactionId, DeclinedTransactionRetrieveParams.none(), requestOptions) /** List Declined Transactions */ - fun list(): DeclinedTransactionListPage = list(DeclinedTransactionListParams.none()) + fun list(): DeclinedTransactionListResponse = list(DeclinedTransactionListParams.none()) /** @see list */ fun list( params: DeclinedTransactionListParams = DeclinedTransactionListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): DeclinedTransactionListPage + ): DeclinedTransactionListResponse /** @see list */ fun list( params: DeclinedTransactionListParams = DeclinedTransactionListParams.none() - ): DeclinedTransactionListPage = list(params, RequestOptions.none()) + ): DeclinedTransactionListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): DeclinedTransactionListPage = + fun list(requestOptions: RequestOptions): DeclinedTransactionListResponse = list(DeclinedTransactionListParams.none(), requestOptions) /** @@ -155,7 +155,7 @@ interface DeclinedTransactionService { * as [DeclinedTransactionService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = + fun list(): HttpResponseFor = list(DeclinedTransactionListParams.none()) /** @see list */ @@ -163,17 +163,17 @@ interface DeclinedTransactionService { fun list( params: DeclinedTransactionListParams = DeclinedTransactionListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: DeclinedTransactionListParams = DeclinedTransactionListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(DeclinedTransactionListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/DeclinedTransactionServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/DeclinedTransactionServiceImpl.kt index 03e13e21a..c6554f074 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/DeclinedTransactionServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/DeclinedTransactionServiceImpl.kt @@ -16,9 +16,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.core.http.parseable import com.increase.api.core.prepare import com.increase.api.models.declinedtransactions.DeclinedTransaction -import com.increase.api.models.declinedtransactions.DeclinedTransactionListPage -import com.increase.api.models.declinedtransactions.DeclinedTransactionListPageResponse import com.increase.api.models.declinedtransactions.DeclinedTransactionListParams +import com.increase.api.models.declinedtransactions.DeclinedTransactionListResponse import com.increase.api.models.declinedtransactions.DeclinedTransactionRetrieveParams import java.util.function.Consumer import kotlin.jvm.optionals.getOrNull @@ -47,7 +46,7 @@ internal constructor(private val clientOptions: ClientOptions) : DeclinedTransac override fun list( params: DeclinedTransactionListParams, requestOptions: RequestOptions, - ): DeclinedTransactionListPage = + ): DeclinedTransactionListResponse = // get /declined_transactions withRawResponse().list(params, requestOptions).parse() @@ -94,13 +93,13 @@ internal constructor(private val clientOptions: ClientOptions) : DeclinedTransac } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: DeclinedTransactionListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -118,13 +117,6 @@ internal constructor(private val clientOptions: ClientOptions) : DeclinedTransac it.validate() } } - .let { - DeclinedTransactionListPage.builder() - .service(DeclinedTransactionServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/DigitalCardProfileService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/DigitalCardProfileService.kt index 04d0e86e9..5c2d183ee 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/DigitalCardProfileService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/DigitalCardProfileService.kt @@ -10,8 +10,8 @@ import com.increase.api.models.digitalcardprofiles.DigitalCardProfile import com.increase.api.models.digitalcardprofiles.DigitalCardProfileArchiveParams import com.increase.api.models.digitalcardprofiles.DigitalCardProfileCloneParams import com.increase.api.models.digitalcardprofiles.DigitalCardProfileCreateParams -import com.increase.api.models.digitalcardprofiles.DigitalCardProfileListPage import com.increase.api.models.digitalcardprofiles.DigitalCardProfileListParams +import com.increase.api.models.digitalcardprofiles.DigitalCardProfileListResponse import com.increase.api.models.digitalcardprofiles.DigitalCardProfileRetrieveParams import java.util.function.Consumer @@ -75,21 +75,21 @@ interface DigitalCardProfileService { retrieve(digitalCardProfileId, DigitalCardProfileRetrieveParams.none(), requestOptions) /** List Card Profiles */ - fun list(): DigitalCardProfileListPage = list(DigitalCardProfileListParams.none()) + fun list(): DigitalCardProfileListResponse = list(DigitalCardProfileListParams.none()) /** @see list */ fun list( params: DigitalCardProfileListParams = DigitalCardProfileListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): DigitalCardProfileListPage + ): DigitalCardProfileListResponse /** @see list */ fun list( params: DigitalCardProfileListParams = DigitalCardProfileListParams.none() - ): DigitalCardProfileListPage = list(params, RequestOptions.none()) + ): DigitalCardProfileListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): DigitalCardProfileListPage = + fun list(requestOptions: RequestOptions): DigitalCardProfileListResponse = list(DigitalCardProfileListParams.none(), requestOptions) /** Archive a Digital Card Profile */ @@ -243,7 +243,7 @@ interface DigitalCardProfileService { * as [DigitalCardProfileService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = + fun list(): HttpResponseFor = list(DigitalCardProfileListParams.none()) /** @see list */ @@ -251,17 +251,17 @@ interface DigitalCardProfileService { fun list( params: DigitalCardProfileListParams = DigitalCardProfileListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: DigitalCardProfileListParams = DigitalCardProfileListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(DigitalCardProfileListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/DigitalCardProfileServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/DigitalCardProfileServiceImpl.kt index 3f8cc55e1..df82a476c 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/DigitalCardProfileServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/DigitalCardProfileServiceImpl.kt @@ -20,9 +20,8 @@ import com.increase.api.models.digitalcardprofiles.DigitalCardProfile import com.increase.api.models.digitalcardprofiles.DigitalCardProfileArchiveParams import com.increase.api.models.digitalcardprofiles.DigitalCardProfileCloneParams import com.increase.api.models.digitalcardprofiles.DigitalCardProfileCreateParams -import com.increase.api.models.digitalcardprofiles.DigitalCardProfileListPage -import com.increase.api.models.digitalcardprofiles.DigitalCardProfileListPageResponse import com.increase.api.models.digitalcardprofiles.DigitalCardProfileListParams +import com.increase.api.models.digitalcardprofiles.DigitalCardProfileListResponse import com.increase.api.models.digitalcardprofiles.DigitalCardProfileRetrieveParams import java.util.function.Consumer import kotlin.jvm.optionals.getOrNull @@ -56,7 +55,7 @@ class DigitalCardProfileServiceImpl internal constructor(private val clientOptio override fun list( params: DigitalCardProfileListParams, requestOptions: RequestOptions, - ): DigitalCardProfileListPage = + ): DigitalCardProfileListResponse = // get /digital_card_profiles withRawResponse().list(params, requestOptions).parse() @@ -145,13 +144,13 @@ class DigitalCardProfileServiceImpl internal constructor(private val clientOptio } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: DigitalCardProfileListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -169,13 +168,6 @@ class DigitalCardProfileServiceImpl internal constructor(private val clientOptio it.validate() } } - .let { - DigitalCardProfileListPage.builder() - .service(DigitalCardProfileServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/DigitalWalletTokenService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/DigitalWalletTokenService.kt index 4279d4569..a109ff98e 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/DigitalWalletTokenService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/DigitalWalletTokenService.kt @@ -7,8 +7,8 @@ import com.increase.api.core.ClientOptions import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.digitalwallettokens.DigitalWalletToken -import com.increase.api.models.digitalwallettokens.DigitalWalletTokenListPage import com.increase.api.models.digitalwallettokens.DigitalWalletTokenListParams +import com.increase.api.models.digitalwallettokens.DigitalWalletTokenListResponse import com.increase.api.models.digitalwallettokens.DigitalWalletTokenRetrieveParams import java.util.function.Consumer @@ -62,21 +62,21 @@ interface DigitalWalletTokenService { retrieve(digitalWalletTokenId, DigitalWalletTokenRetrieveParams.none(), requestOptions) /** List Digital Wallet Tokens */ - fun list(): DigitalWalletTokenListPage = list(DigitalWalletTokenListParams.none()) + fun list(): DigitalWalletTokenListResponse = list(DigitalWalletTokenListParams.none()) /** @see list */ fun list( params: DigitalWalletTokenListParams = DigitalWalletTokenListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): DigitalWalletTokenListPage + ): DigitalWalletTokenListResponse /** @see list */ fun list( params: DigitalWalletTokenListParams = DigitalWalletTokenListParams.none() - ): DigitalWalletTokenListPage = list(params, RequestOptions.none()) + ): DigitalWalletTokenListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): DigitalWalletTokenListPage = + fun list(requestOptions: RequestOptions): DigitalWalletTokenListResponse = list(DigitalWalletTokenListParams.none(), requestOptions) /** @@ -148,7 +148,7 @@ interface DigitalWalletTokenService { * as [DigitalWalletTokenService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = + fun list(): HttpResponseFor = list(DigitalWalletTokenListParams.none()) /** @see list */ @@ -156,17 +156,17 @@ interface DigitalWalletTokenService { fun list( params: DigitalWalletTokenListParams = DigitalWalletTokenListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: DigitalWalletTokenListParams = DigitalWalletTokenListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(DigitalWalletTokenListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/DigitalWalletTokenServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/DigitalWalletTokenServiceImpl.kt index c9015eb00..a730fb3dd 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/DigitalWalletTokenServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/DigitalWalletTokenServiceImpl.kt @@ -16,9 +16,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.core.http.parseable import com.increase.api.core.prepare import com.increase.api.models.digitalwallettokens.DigitalWalletToken -import com.increase.api.models.digitalwallettokens.DigitalWalletTokenListPage -import com.increase.api.models.digitalwallettokens.DigitalWalletTokenListPageResponse import com.increase.api.models.digitalwallettokens.DigitalWalletTokenListParams +import com.increase.api.models.digitalwallettokens.DigitalWalletTokenListResponse import com.increase.api.models.digitalwallettokens.DigitalWalletTokenRetrieveParams import java.util.function.Consumer import kotlin.jvm.optionals.getOrNull @@ -45,7 +44,7 @@ class DigitalWalletTokenServiceImpl internal constructor(private val clientOptio override fun list( params: DigitalWalletTokenListParams, requestOptions: RequestOptions, - ): DigitalWalletTokenListPage = + ): DigitalWalletTokenListResponse = // get /digital_wallet_tokens withRawResponse().list(params, requestOptions).parse() @@ -92,13 +91,13 @@ class DigitalWalletTokenServiceImpl internal constructor(private val clientOptio } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: DigitalWalletTokenListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -116,13 +115,6 @@ class DigitalWalletTokenServiceImpl internal constructor(private val clientOptio it.validate() } } - .let { - DigitalWalletTokenListPage.builder() - .service(DigitalWalletTokenServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/DocumentService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/DocumentService.kt index e605ab8a4..3619d2d68 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/DocumentService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/DocumentService.kt @@ -8,8 +8,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.documents.Document import com.increase.api.models.documents.DocumentCreateParams -import com.increase.api.models.documents.DocumentListPage import com.increase.api.models.documents.DocumentListParams +import com.increase.api.models.documents.DocumentListResponse import com.increase.api.models.documents.DocumentRetrieveParams import java.util.function.Consumer @@ -66,20 +66,20 @@ interface DocumentService { retrieve(documentId, DocumentRetrieveParams.none(), requestOptions) /** List Documents */ - fun list(): DocumentListPage = list(DocumentListParams.none()) + fun list(): DocumentListResponse = list(DocumentListParams.none()) /** @see list */ fun list( params: DocumentListParams = DocumentListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): DocumentListPage + ): DocumentListResponse /** @see list */ - fun list(params: DocumentListParams = DocumentListParams.none()): DocumentListPage = + fun list(params: DocumentListParams = DocumentListParams.none()): DocumentListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): DocumentListPage = + fun list(requestOptions: RequestOptions): DocumentListResponse = list(DocumentListParams.none(), requestOptions) /** A view of [DocumentService] that provides access to raw HTTP responses for each method. */ @@ -156,24 +156,24 @@ interface DocumentService { * [DocumentService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = list(DocumentListParams.none()) + fun list(): HttpResponseFor = list(DocumentListParams.none()) /** @see list */ @MustBeClosed fun list( params: DocumentListParams = DocumentListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: DocumentListParams = DocumentListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(DocumentListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/DocumentServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/DocumentServiceImpl.kt index fb6b1e538..62b94db4b 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/DocumentServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/DocumentServiceImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepare import com.increase.api.models.documents.Document import com.increase.api.models.documents.DocumentCreateParams -import com.increase.api.models.documents.DocumentListPage -import com.increase.api.models.documents.DocumentListPageResponse import com.increase.api.models.documents.DocumentListParams +import com.increase.api.models.documents.DocumentListResponse import com.increase.api.models.documents.DocumentRetrieveParams import java.util.function.Consumer import kotlin.jvm.optionals.getOrNull @@ -51,7 +50,7 @@ class DocumentServiceImpl internal constructor(private val clientOptions: Client override fun list( params: DocumentListParams, requestOptions: RequestOptions, - ): DocumentListPage = + ): DocumentListResponse = // get /documents withRawResponse().list(params, requestOptions).parse() @@ -126,13 +125,13 @@ class DocumentServiceImpl internal constructor(private val clientOptions: Client } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: DocumentListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -150,13 +149,6 @@ class DocumentServiceImpl internal constructor(private val clientOptions: Client it.validate() } } - .let { - DocumentListPage.builder() - .service(DocumentServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/EntityService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/EntityService.kt index 30a409ceb..fb7920372 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/EntityService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/EntityService.kt @@ -12,8 +12,8 @@ import com.increase.api.models.entities.EntityArchiveParams import com.increase.api.models.entities.EntityConfirmParams import com.increase.api.models.entities.EntityCreateBeneficialOwnerParams import com.increase.api.models.entities.EntityCreateParams -import com.increase.api.models.entities.EntityListPage import com.increase.api.models.entities.EntityListParams +import com.increase.api.models.entities.EntityListResponse import com.increase.api.models.entities.EntityRetrieveParams import com.increase.api.models.entities.EntityUpdateAddressParams import com.increase.api.models.entities.EntityUpdateBeneficialOwnerAddressParams @@ -101,20 +101,20 @@ interface EntityService { update(entityId, EntityUpdateParams.none(), requestOptions) /** List Entities */ - fun list(): EntityListPage = list(EntityListParams.none()) + fun list(): EntityListResponse = list(EntityListParams.none()) /** @see list */ fun list( params: EntityListParams = EntityListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): EntityListPage + ): EntityListResponse /** @see list */ - fun list(params: EntityListParams = EntityListParams.none()): EntityListPage = + fun list(params: EntityListParams = EntityListParams.none()): EntityListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): EntityListPage = + fun list(requestOptions: RequestOptions): EntityListResponse = list(EntityListParams.none(), requestOptions) /** Archive an Entity */ @@ -401,24 +401,25 @@ interface EntityService { * Returns a raw HTTP response for `get /entities`, but is otherwise the same as * [EntityService.list]. */ - @MustBeClosed fun list(): HttpResponseFor = list(EntityListParams.none()) + @MustBeClosed + fun list(): HttpResponseFor = list(EntityListParams.none()) /** @see list */ @MustBeClosed fun list( params: EntityListParams = EntityListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: EntityListParams = EntityListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(EntityListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/EntityServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/EntityServiceImpl.kt index efb424b7f..2c21e1ff1 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/EntityServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/EntityServiceImpl.kt @@ -22,9 +22,8 @@ import com.increase.api.models.entities.EntityArchiveParams import com.increase.api.models.entities.EntityConfirmParams import com.increase.api.models.entities.EntityCreateBeneficialOwnerParams import com.increase.api.models.entities.EntityCreateParams -import com.increase.api.models.entities.EntityListPage -import com.increase.api.models.entities.EntityListPageResponse import com.increase.api.models.entities.EntityListParams +import com.increase.api.models.entities.EntityListResponse import com.increase.api.models.entities.EntityRetrieveParams import com.increase.api.models.entities.EntityUpdateAddressParams import com.increase.api.models.entities.EntityUpdateBeneficialOwnerAddressParams @@ -57,7 +56,10 @@ class EntityServiceImpl internal constructor(private val clientOptions: ClientOp // patch /entities/{entity_id} withRawResponse().update(params, requestOptions).parse() - override fun list(params: EntityListParams, requestOptions: RequestOptions): EntityListPage = + override fun list( + params: EntityListParams, + requestOptions: RequestOptions, + ): EntityListResponse = // get /entities withRawResponse().list(params, requestOptions).parse() @@ -203,13 +205,13 @@ class EntityServiceImpl internal constructor(private val clientOptions: ClientOp } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: EntityListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -227,13 +229,6 @@ class EntityServiceImpl internal constructor(private val clientOptions: ClientOp it.validate() } } - .let { - EntityListPage.builder() - .service(EntityServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/EventService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/EventService.kt index b5ef780ae..6801e4fcc 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/EventService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/EventService.kt @@ -7,8 +7,8 @@ import com.increase.api.core.ClientOptions import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.events.Event -import com.increase.api.models.events.EventListPage import com.increase.api.models.events.EventListParams +import com.increase.api.models.events.EventListResponse import com.increase.api.models.events.EventRetrieveParams import java.util.function.Consumer @@ -54,20 +54,20 @@ interface EventService { retrieve(eventId, EventRetrieveParams.none(), requestOptions) /** List Events */ - fun list(): EventListPage = list(EventListParams.none()) + fun list(): EventListResponse = list(EventListParams.none()) /** @see list */ fun list( params: EventListParams = EventListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): EventListPage + ): EventListResponse /** @see list */ - fun list(params: EventListParams = EventListParams.none()): EventListPage = + fun list(params: EventListParams = EventListParams.none()): EventListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): EventListPage = + fun list(requestOptions: RequestOptions): EventListResponse = list(EventListParams.none(), requestOptions) /** A view of [EventService] that provides access to raw HTTP responses for each method. */ @@ -125,23 +125,24 @@ interface EventService { * Returns a raw HTTP response for `get /events`, but is otherwise the same as * [EventService.list]. */ - @MustBeClosed fun list(): HttpResponseFor = list(EventListParams.none()) + @MustBeClosed fun list(): HttpResponseFor = list(EventListParams.none()) /** @see list */ @MustBeClosed fun list( params: EventListParams = EventListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed - fun list(params: EventListParams = EventListParams.none()): HttpResponseFor = - list(params, RequestOptions.none()) + fun list( + params: EventListParams = EventListParams.none() + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(EventListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/EventServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/EventServiceImpl.kt index 1d9737984..6c0e27595 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/EventServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/EventServiceImpl.kt @@ -16,9 +16,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.core.http.parseable import com.increase.api.core.prepare import com.increase.api.models.events.Event -import com.increase.api.models.events.EventListPage -import com.increase.api.models.events.EventListPageResponse import com.increase.api.models.events.EventListParams +import com.increase.api.models.events.EventListResponse import com.increase.api.models.events.EventRetrieveParams import java.util.function.Consumer import kotlin.jvm.optionals.getOrNull @@ -39,7 +38,7 @@ class EventServiceImpl internal constructor(private val clientOptions: ClientOpt // get /events/{event_id} withRawResponse().retrieve(params, requestOptions).parse() - override fun list(params: EventListParams, requestOptions: RequestOptions): EventListPage = + override fun list(params: EventListParams, requestOptions: RequestOptions): EventListResponse = // get /events withRawResponse().list(params, requestOptions).parse() @@ -85,13 +84,13 @@ class EventServiceImpl internal constructor(private val clientOptions: ClientOpt } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: EventListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -109,13 +108,6 @@ class EventServiceImpl internal constructor(private val clientOptions: ClientOpt it.validate() } } - .let { - EventListPage.builder() - .service(EventServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/EventSubscriptionService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/EventSubscriptionService.kt index 7a04d41d7..db6574555 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/EventSubscriptionService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/EventSubscriptionService.kt @@ -8,8 +8,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.eventsubscriptions.EventSubscription import com.increase.api.models.eventsubscriptions.EventSubscriptionCreateParams -import com.increase.api.models.eventsubscriptions.EventSubscriptionListPage import com.increase.api.models.eventsubscriptions.EventSubscriptionListParams +import com.increase.api.models.eventsubscriptions.EventSubscriptionListResponse import com.increase.api.models.eventsubscriptions.EventSubscriptionRetrieveParams import com.increase.api.models.eventsubscriptions.EventSubscriptionUpdateParams import java.util.function.Consumer @@ -106,21 +106,21 @@ interface EventSubscriptionService { update(eventSubscriptionId, EventSubscriptionUpdateParams.none(), requestOptions) /** List Event Subscriptions */ - fun list(): EventSubscriptionListPage = list(EventSubscriptionListParams.none()) + fun list(): EventSubscriptionListResponse = list(EventSubscriptionListParams.none()) /** @see list */ fun list( params: EventSubscriptionListParams = EventSubscriptionListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): EventSubscriptionListPage + ): EventSubscriptionListResponse /** @see list */ fun list( params: EventSubscriptionListParams = EventSubscriptionListParams.none() - ): EventSubscriptionListPage = list(params, RequestOptions.none()) + ): EventSubscriptionListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): EventSubscriptionListPage = + fun list(requestOptions: RequestOptions): EventSubscriptionListResponse = list(EventSubscriptionListParams.none(), requestOptions) /** @@ -254,7 +254,7 @@ interface EventSubscriptionService { * [EventSubscriptionService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = + fun list(): HttpResponseFor = list(EventSubscriptionListParams.none()) /** @see list */ @@ -262,17 +262,17 @@ interface EventSubscriptionService { fun list( params: EventSubscriptionListParams = EventSubscriptionListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: EventSubscriptionListParams = EventSubscriptionListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(EventSubscriptionListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/EventSubscriptionServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/EventSubscriptionServiceImpl.kt index 17c854137..1d8788e22 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/EventSubscriptionServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/EventSubscriptionServiceImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepare import com.increase.api.models.eventsubscriptions.EventSubscription import com.increase.api.models.eventsubscriptions.EventSubscriptionCreateParams -import com.increase.api.models.eventsubscriptions.EventSubscriptionListPage -import com.increase.api.models.eventsubscriptions.EventSubscriptionListPageResponse import com.increase.api.models.eventsubscriptions.EventSubscriptionListParams +import com.increase.api.models.eventsubscriptions.EventSubscriptionListResponse import com.increase.api.models.eventsubscriptions.EventSubscriptionRetrieveParams import com.increase.api.models.eventsubscriptions.EventSubscriptionUpdateParams import java.util.function.Consumer @@ -62,7 +61,7 @@ class EventSubscriptionServiceImpl internal constructor(private val clientOption override fun list( params: EventSubscriptionListParams, requestOptions: RequestOptions, - ): EventSubscriptionListPage = + ): EventSubscriptionListResponse = // get /event_subscriptions withRawResponse().list(params, requestOptions).parse() @@ -168,13 +167,13 @@ class EventSubscriptionServiceImpl internal constructor(private val clientOption } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: EventSubscriptionListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -192,13 +191,6 @@ class EventSubscriptionServiceImpl internal constructor(private val clientOption it.validate() } } - .let { - EventSubscriptionListPage.builder() - .service(EventSubscriptionServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/ExportService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/ExportService.kt index fa1470329..98167e66b 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/ExportService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/ExportService.kt @@ -8,8 +8,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.exports.Export import com.increase.api.models.exports.ExportCreateParams -import com.increase.api.models.exports.ExportListPage import com.increase.api.models.exports.ExportListParams +import com.increase.api.models.exports.ExportListResponse import com.increase.api.models.exports.ExportRetrieveParams import java.util.function.Consumer @@ -66,20 +66,20 @@ interface ExportService { retrieve(exportId, ExportRetrieveParams.none(), requestOptions) /** List Exports */ - fun list(): ExportListPage = list(ExportListParams.none()) + fun list(): ExportListResponse = list(ExportListParams.none()) /** @see list */ fun list( params: ExportListParams = ExportListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): ExportListPage + ): ExportListResponse /** @see list */ - fun list(params: ExportListParams = ExportListParams.none()): ExportListPage = + fun list(params: ExportListParams = ExportListParams.none()): ExportListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): ExportListPage = + fun list(requestOptions: RequestOptions): ExportListResponse = list(ExportListParams.none(), requestOptions) /** A view of [ExportService] that provides access to raw HTTP responses for each method. */ @@ -152,24 +152,25 @@ interface ExportService { * Returns a raw HTTP response for `get /exports`, but is otherwise the same as * [ExportService.list]. */ - @MustBeClosed fun list(): HttpResponseFor = list(ExportListParams.none()) + @MustBeClosed + fun list(): HttpResponseFor = list(ExportListParams.none()) /** @see list */ @MustBeClosed fun list( params: ExportListParams = ExportListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: ExportListParams = ExportListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(ExportListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/ExportServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/ExportServiceImpl.kt index 0b86ca87b..7c1cae2e3 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/ExportServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/ExportServiceImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepare import com.increase.api.models.exports.Export import com.increase.api.models.exports.ExportCreateParams -import com.increase.api.models.exports.ExportListPage -import com.increase.api.models.exports.ExportListPageResponse import com.increase.api.models.exports.ExportListParams +import com.increase.api.models.exports.ExportListResponse import com.increase.api.models.exports.ExportRetrieveParams import java.util.function.Consumer import kotlin.jvm.optionals.getOrNull @@ -45,7 +44,10 @@ class ExportServiceImpl internal constructor(private val clientOptions: ClientOp // get /exports/{export_id} withRawResponse().retrieve(params, requestOptions).parse() - override fun list(params: ExportListParams, requestOptions: RequestOptions): ExportListPage = + override fun list( + params: ExportListParams, + requestOptions: RequestOptions, + ): ExportListResponse = // get /exports withRawResponse().list(params, requestOptions).parse() @@ -118,13 +120,13 @@ class ExportServiceImpl internal constructor(private val clientOptions: ClientOp } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: ExportListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -142,13 +144,6 @@ class ExportServiceImpl internal constructor(private val clientOptions: ClientOp it.validate() } } - .let { - ExportListPage.builder() - .service(ExportServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/ExternalAccountService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/ExternalAccountService.kt index a21bcfece..8409d3593 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/ExternalAccountService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/ExternalAccountService.kt @@ -8,8 +8,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.externalaccounts.ExternalAccount import com.increase.api.models.externalaccounts.ExternalAccountCreateParams -import com.increase.api.models.externalaccounts.ExternalAccountListPage import com.increase.api.models.externalaccounts.ExternalAccountListParams +import com.increase.api.models.externalaccounts.ExternalAccountListResponse import com.increase.api.models.externalaccounts.ExternalAccountRetrieveParams import com.increase.api.models.externalaccounts.ExternalAccountUpdateParams import java.util.function.Consumer @@ -103,21 +103,21 @@ interface ExternalAccountService { update(externalAccountId, ExternalAccountUpdateParams.none(), requestOptions) /** List External Accounts */ - fun list(): ExternalAccountListPage = list(ExternalAccountListParams.none()) + fun list(): ExternalAccountListResponse = list(ExternalAccountListParams.none()) /** @see list */ fun list( params: ExternalAccountListParams = ExternalAccountListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): ExternalAccountListPage + ): ExternalAccountListResponse /** @see list */ fun list( params: ExternalAccountListParams = ExternalAccountListParams.none() - ): ExternalAccountListPage = list(params, RequestOptions.none()) + ): ExternalAccountListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): ExternalAccountListPage = + fun list(requestOptions: RequestOptions): ExternalAccountListResponse = list(ExternalAccountListParams.none(), requestOptions) /** @@ -248,7 +248,7 @@ interface ExternalAccountService { * [ExternalAccountService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = + fun list(): HttpResponseFor = list(ExternalAccountListParams.none()) /** @see list */ @@ -256,17 +256,17 @@ interface ExternalAccountService { fun list( params: ExternalAccountListParams = ExternalAccountListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: ExternalAccountListParams = ExternalAccountListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(ExternalAccountListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/ExternalAccountServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/ExternalAccountServiceImpl.kt index a5fb56fdf..077e5d9b1 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/ExternalAccountServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/ExternalAccountServiceImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepare import com.increase.api.models.externalaccounts.ExternalAccount import com.increase.api.models.externalaccounts.ExternalAccountCreateParams -import com.increase.api.models.externalaccounts.ExternalAccountListPage -import com.increase.api.models.externalaccounts.ExternalAccountListPageResponse import com.increase.api.models.externalaccounts.ExternalAccountListParams +import com.increase.api.models.externalaccounts.ExternalAccountListResponse import com.increase.api.models.externalaccounts.ExternalAccountRetrieveParams import com.increase.api.models.externalaccounts.ExternalAccountUpdateParams import java.util.function.Consumer @@ -62,7 +61,7 @@ class ExternalAccountServiceImpl internal constructor(private val clientOptions: override fun list( params: ExternalAccountListParams, requestOptions: RequestOptions, - ): ExternalAccountListPage = + ): ExternalAccountListResponse = // get /external_accounts withRawResponse().list(params, requestOptions).parse() @@ -168,13 +167,13 @@ class ExternalAccountServiceImpl internal constructor(private val clientOptions: } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: ExternalAccountListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -192,13 +191,6 @@ class ExternalAccountServiceImpl internal constructor(private val clientOptions: it.validate() } } - .let { - ExternalAccountListPage.builder() - .service(ExternalAccountServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/FednowTransferService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/FednowTransferService.kt index f0447c0dd..e14471cca 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/FednowTransferService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/FednowTransferService.kt @@ -10,8 +10,8 @@ import com.increase.api.models.fednowtransfers.FednowTransfer import com.increase.api.models.fednowtransfers.FednowTransferApproveParams import com.increase.api.models.fednowtransfers.FednowTransferCancelParams import com.increase.api.models.fednowtransfers.FednowTransferCreateParams -import com.increase.api.models.fednowtransfers.FednowTransferListPage import com.increase.api.models.fednowtransfers.FednowTransferListParams +import com.increase.api.models.fednowtransfers.FednowTransferListResponse import com.increase.api.models.fednowtransfers.FednowTransferRetrieveParams import java.util.function.Consumer @@ -72,21 +72,21 @@ interface FednowTransferService { retrieve(fednowTransferId, FednowTransferRetrieveParams.none(), requestOptions) /** List FedNow Transfers */ - fun list(): FednowTransferListPage = list(FednowTransferListParams.none()) + fun list(): FednowTransferListResponse = list(FednowTransferListParams.none()) /** @see list */ fun list( params: FednowTransferListParams = FednowTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): FednowTransferListPage + ): FednowTransferListResponse /** @see list */ fun list( params: FednowTransferListParams = FednowTransferListParams.none() - ): FednowTransferListPage = list(params, RequestOptions.none()) + ): FednowTransferListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): FednowTransferListPage = + fun list(requestOptions: RequestOptions): FednowTransferListResponse = list(FednowTransferListParams.none(), requestOptions) /** Approve a FedNow Transfer */ @@ -232,24 +232,25 @@ interface FednowTransferService { * [FednowTransferService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = list(FednowTransferListParams.none()) + fun list(): HttpResponseFor = + list(FednowTransferListParams.none()) /** @see list */ @MustBeClosed fun list( params: FednowTransferListParams = FednowTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: FednowTransferListParams = FednowTransferListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(FednowTransferListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/FednowTransferServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/FednowTransferServiceImpl.kt index 4f4632985..abf97b021 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/FednowTransferServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/FednowTransferServiceImpl.kt @@ -20,9 +20,8 @@ import com.increase.api.models.fednowtransfers.FednowTransfer import com.increase.api.models.fednowtransfers.FednowTransferApproveParams import com.increase.api.models.fednowtransfers.FednowTransferCancelParams import com.increase.api.models.fednowtransfers.FednowTransferCreateParams -import com.increase.api.models.fednowtransfers.FednowTransferListPage -import com.increase.api.models.fednowtransfers.FednowTransferListPageResponse import com.increase.api.models.fednowtransfers.FednowTransferListParams +import com.increase.api.models.fednowtransfers.FednowTransferListResponse import com.increase.api.models.fednowtransfers.FednowTransferRetrieveParams import java.util.function.Consumer import kotlin.jvm.optionals.getOrNull @@ -56,7 +55,7 @@ class FednowTransferServiceImpl internal constructor(private val clientOptions: override fun list( params: FednowTransferListParams, requestOptions: RequestOptions, - ): FednowTransferListPage = + ): FednowTransferListResponse = // get /fednow_transfers withRawResponse().list(params, requestOptions).parse() @@ -145,13 +144,13 @@ class FednowTransferServiceImpl internal constructor(private val clientOptions: } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: FednowTransferListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -169,13 +168,6 @@ class FednowTransferServiceImpl internal constructor(private val clientOptions: it.validate() } } - .let { - FednowTransferListPage.builder() - .service(FednowTransferServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/FileService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/FileService.kt index c061c7d88..8937bcf0d 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/FileService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/FileService.kt @@ -8,8 +8,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.files.File import com.increase.api.models.files.FileCreateParams -import com.increase.api.models.files.FileListPage import com.increase.api.models.files.FileListParams +import com.increase.api.models.files.FileListResponse import com.increase.api.models.files.FileRetrieveParams import java.util.function.Consumer @@ -68,20 +68,20 @@ interface FileService { retrieve(fileId, FileRetrieveParams.none(), requestOptions) /** List Files */ - fun list(): FileListPage = list(FileListParams.none()) + fun list(): FileListResponse = list(FileListParams.none()) /** @see list */ fun list( params: FileListParams = FileListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): FileListPage + ): FileListResponse /** @see list */ - fun list(params: FileListParams = FileListParams.none()): FileListPage = + fun list(params: FileListParams = FileListParams.none()): FileListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): FileListPage = + fun list(requestOptions: RequestOptions): FileListResponse = list(FileListParams.none(), requestOptions) /** A view of [FileService] that provides access to raw HTTP responses for each method. */ @@ -154,23 +154,24 @@ interface FileService { * Returns a raw HTTP response for `get /files`, but is otherwise the same as * [FileService.list]. */ - @MustBeClosed fun list(): HttpResponseFor = list(FileListParams.none()) + @MustBeClosed fun list(): HttpResponseFor = list(FileListParams.none()) /** @see list */ @MustBeClosed fun list( params: FileListParams = FileListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed - fun list(params: FileListParams = FileListParams.none()): HttpResponseFor = - list(params, RequestOptions.none()) + fun list( + params: FileListParams = FileListParams.none() + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(FileListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/FileServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/FileServiceImpl.kt index 00361dd38..cfd74f865 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/FileServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/FileServiceImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepare import com.increase.api.models.files.File import com.increase.api.models.files.FileCreateParams -import com.increase.api.models.files.FileListPage -import com.increase.api.models.files.FileListPageResponse import com.increase.api.models.files.FileListParams +import com.increase.api.models.files.FileListResponse import com.increase.api.models.files.FileRetrieveParams import java.util.function.Consumer import kotlin.jvm.optionals.getOrNull @@ -44,7 +43,7 @@ class FileServiceImpl internal constructor(private val clientOptions: ClientOpti // get /files/{file_id} withRawResponse().retrieve(params, requestOptions).parse() - override fun list(params: FileListParams, requestOptions: RequestOptions): FileListPage = + override fun list(params: FileListParams, requestOptions: RequestOptions): FileListResponse = // get /files withRawResponse().list(params, requestOptions).parse() @@ -117,13 +116,13 @@ class FileServiceImpl internal constructor(private val clientOptions: ClientOpti } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: FileListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -141,13 +140,6 @@ class FileServiceImpl internal constructor(private val clientOptions: ClientOpti it.validate() } } - .let { - FileListPage.builder() - .service(FileServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundAchTransferService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundAchTransferService.kt index 1d43a6187..b623b2490 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundAchTransferService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundAchTransferService.kt @@ -9,8 +9,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.inboundachtransfers.InboundAchTransfer import com.increase.api.models.inboundachtransfers.InboundAchTransferCreateNotificationOfChangeParams import com.increase.api.models.inboundachtransfers.InboundAchTransferDeclineParams -import com.increase.api.models.inboundachtransfers.InboundAchTransferListPage import com.increase.api.models.inboundachtransfers.InboundAchTransferListParams +import com.increase.api.models.inboundachtransfers.InboundAchTransferListResponse import com.increase.api.models.inboundachtransfers.InboundAchTransferRetrieveParams import com.increase.api.models.inboundachtransfers.InboundAchTransferTransferReturnParams import java.util.function.Consumer @@ -65,21 +65,21 @@ interface InboundAchTransferService { retrieve(inboundAchTransferId, InboundAchTransferRetrieveParams.none(), requestOptions) /** List Inbound ACH Transfers */ - fun list(): InboundAchTransferListPage = list(InboundAchTransferListParams.none()) + fun list(): InboundAchTransferListResponse = list(InboundAchTransferListParams.none()) /** @see list */ fun list( params: InboundAchTransferListParams = InboundAchTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): InboundAchTransferListPage + ): InboundAchTransferListResponse /** @see list */ fun list( params: InboundAchTransferListParams = InboundAchTransferListParams.none() - ): InboundAchTransferListPage = list(params, RequestOptions.none()) + ): InboundAchTransferListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): InboundAchTransferListPage = + fun list(requestOptions: RequestOptions): InboundAchTransferListResponse = list(InboundAchTransferListParams.none(), requestOptions) /** Create a notification of change for an Inbound ACH Transfer */ @@ -262,7 +262,7 @@ interface InboundAchTransferService { * as [InboundAchTransferService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = + fun list(): HttpResponseFor = list(InboundAchTransferListParams.none()) /** @see list */ @@ -270,17 +270,17 @@ interface InboundAchTransferService { fun list( params: InboundAchTransferListParams = InboundAchTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: InboundAchTransferListParams = InboundAchTransferListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(InboundAchTransferListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundAchTransferServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundAchTransferServiceImpl.kt index d4ecf5c59..df9a330f5 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundAchTransferServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundAchTransferServiceImpl.kt @@ -19,9 +19,8 @@ import com.increase.api.core.prepare import com.increase.api.models.inboundachtransfers.InboundAchTransfer import com.increase.api.models.inboundachtransfers.InboundAchTransferCreateNotificationOfChangeParams import com.increase.api.models.inboundachtransfers.InboundAchTransferDeclineParams -import com.increase.api.models.inboundachtransfers.InboundAchTransferListPage -import com.increase.api.models.inboundachtransfers.InboundAchTransferListPageResponse import com.increase.api.models.inboundachtransfers.InboundAchTransferListParams +import com.increase.api.models.inboundachtransfers.InboundAchTransferListResponse import com.increase.api.models.inboundachtransfers.InboundAchTransferRetrieveParams import com.increase.api.models.inboundachtransfers.InboundAchTransferTransferReturnParams import java.util.function.Consumer @@ -49,7 +48,7 @@ class InboundAchTransferServiceImpl internal constructor(private val clientOptio override fun list( params: InboundAchTransferListParams, requestOptions: RequestOptions, - ): InboundAchTransferListPage = + ): InboundAchTransferListResponse = // get /inbound_ach_transfers withRawResponse().list(params, requestOptions).parse() @@ -117,13 +116,13 @@ class InboundAchTransferServiceImpl internal constructor(private val clientOptio } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: InboundAchTransferListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -141,13 +140,6 @@ class InboundAchTransferServiceImpl internal constructor(private val clientOptio it.validate() } } - .let { - InboundAchTransferListPage.builder() - .service(InboundAchTransferServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundCheckDepositService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundCheckDepositService.kt index e66602102..9ffe6b015 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundCheckDepositService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundCheckDepositService.kt @@ -8,8 +8,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.inboundcheckdeposits.InboundCheckDeposit import com.increase.api.models.inboundcheckdeposits.InboundCheckDepositDeclineParams -import com.increase.api.models.inboundcheckdeposits.InboundCheckDepositListPage import com.increase.api.models.inboundcheckdeposits.InboundCheckDepositListParams +import com.increase.api.models.inboundcheckdeposits.InboundCheckDepositListResponse import com.increase.api.models.inboundcheckdeposits.InboundCheckDepositRetrieveParams import com.increase.api.models.inboundcheckdeposits.InboundCheckDepositReturnParams import java.util.function.Consumer @@ -67,21 +67,21 @@ interface InboundCheckDepositService { retrieve(inboundCheckDepositId, InboundCheckDepositRetrieveParams.none(), requestOptions) /** List Inbound Check Deposits */ - fun list(): InboundCheckDepositListPage = list(InboundCheckDepositListParams.none()) + fun list(): InboundCheckDepositListResponse = list(InboundCheckDepositListParams.none()) /** @see list */ fun list( params: InboundCheckDepositListParams = InboundCheckDepositListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): InboundCheckDepositListPage + ): InboundCheckDepositListResponse /** @see list */ fun list( params: InboundCheckDepositListParams = InboundCheckDepositListParams.none() - ): InboundCheckDepositListPage = list(params, RequestOptions.none()) + ): InboundCheckDepositListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): InboundCheckDepositListPage = + fun list(requestOptions: RequestOptions): InboundCheckDepositListResponse = list(InboundCheckDepositListParams.none(), requestOptions) /** Decline an Inbound Check Deposit */ @@ -222,7 +222,7 @@ interface InboundCheckDepositService { * as [InboundCheckDepositService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = + fun list(): HttpResponseFor = list(InboundCheckDepositListParams.none()) /** @see list */ @@ -230,17 +230,17 @@ interface InboundCheckDepositService { fun list( params: InboundCheckDepositListParams = InboundCheckDepositListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: InboundCheckDepositListParams = InboundCheckDepositListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(InboundCheckDepositListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundCheckDepositServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundCheckDepositServiceImpl.kt index 34a959466..d90b1019a 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundCheckDepositServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundCheckDepositServiceImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepare import com.increase.api.models.inboundcheckdeposits.InboundCheckDeposit import com.increase.api.models.inboundcheckdeposits.InboundCheckDepositDeclineParams -import com.increase.api.models.inboundcheckdeposits.InboundCheckDepositListPage -import com.increase.api.models.inboundcheckdeposits.InboundCheckDepositListPageResponse import com.increase.api.models.inboundcheckdeposits.InboundCheckDepositListParams +import com.increase.api.models.inboundcheckdeposits.InboundCheckDepositListResponse import com.increase.api.models.inboundcheckdeposits.InboundCheckDepositRetrieveParams import com.increase.api.models.inboundcheckdeposits.InboundCheckDepositReturnParams import java.util.function.Consumer @@ -50,7 +49,7 @@ internal constructor(private val clientOptions: ClientOptions) : InboundCheckDep override fun list( params: InboundCheckDepositListParams, requestOptions: RequestOptions, - ): InboundCheckDepositListPage = + ): InboundCheckDepositListResponse = // get /inbound_check_deposits withRawResponse().list(params, requestOptions).parse() @@ -111,13 +110,13 @@ internal constructor(private val clientOptions: ClientOptions) : InboundCheckDep } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: InboundCheckDepositListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -135,13 +134,6 @@ internal constructor(private val clientOptions: ClientOptions) : InboundCheckDep it.validate() } } - .let { - InboundCheckDepositListPage.builder() - .service(InboundCheckDepositServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundFednowTransferService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundFednowTransferService.kt index c62b7542f..9d6e45d43 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundFednowTransferService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundFednowTransferService.kt @@ -7,8 +7,8 @@ import com.increase.api.core.ClientOptions import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.inboundfednowtransfers.InboundFednowTransfer -import com.increase.api.models.inboundfednowtransfers.InboundFednowTransferListPage import com.increase.api.models.inboundfednowtransfers.InboundFednowTransferListParams +import com.increase.api.models.inboundfednowtransfers.InboundFednowTransferListResponse import com.increase.api.models.inboundfednowtransfers.InboundFednowTransferRetrieveParams import java.util.function.Consumer @@ -69,21 +69,21 @@ interface InboundFednowTransferService { ) /** List Inbound FedNow Transfers */ - fun list(): InboundFednowTransferListPage = list(InboundFednowTransferListParams.none()) + fun list(): InboundFednowTransferListResponse = list(InboundFednowTransferListParams.none()) /** @see list */ fun list( params: InboundFednowTransferListParams = InboundFednowTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): InboundFednowTransferListPage + ): InboundFednowTransferListResponse /** @see list */ fun list( params: InboundFednowTransferListParams = InboundFednowTransferListParams.none() - ): InboundFednowTransferListPage = list(params, RequestOptions.none()) + ): InboundFednowTransferListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): InboundFednowTransferListPage = + fun list(requestOptions: RequestOptions): InboundFednowTransferListResponse = list(InboundFednowTransferListParams.none(), requestOptions) /** @@ -161,7 +161,7 @@ interface InboundFednowTransferService { * same as [InboundFednowTransferService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = + fun list(): HttpResponseFor = list(InboundFednowTransferListParams.none()) /** @see list */ @@ -169,17 +169,19 @@ interface InboundFednowTransferService { fun list( params: InboundFednowTransferListParams = InboundFednowTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: InboundFednowTransferListParams = InboundFednowTransferListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list( + requestOptions: RequestOptions + ): HttpResponseFor = list(InboundFednowTransferListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundFednowTransferServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundFednowTransferServiceImpl.kt index 6df0ed717..f8ce767c1 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundFednowTransferServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundFednowTransferServiceImpl.kt @@ -16,9 +16,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.core.http.parseable import com.increase.api.core.prepare import com.increase.api.models.inboundfednowtransfers.InboundFednowTransfer -import com.increase.api.models.inboundfednowtransfers.InboundFednowTransferListPage -import com.increase.api.models.inboundfednowtransfers.InboundFednowTransferListPageResponse import com.increase.api.models.inboundfednowtransfers.InboundFednowTransferListParams +import com.increase.api.models.inboundfednowtransfers.InboundFednowTransferListResponse import com.increase.api.models.inboundfednowtransfers.InboundFednowTransferRetrieveParams import java.util.function.Consumer import kotlin.jvm.optionals.getOrNull @@ -47,7 +46,7 @@ internal constructor(private val clientOptions: ClientOptions) : InboundFednowTr override fun list( params: InboundFednowTransferListParams, requestOptions: RequestOptions, - ): InboundFednowTransferListPage = + ): InboundFednowTransferListResponse = // get /inbound_fednow_transfers withRawResponse().list(params, requestOptions).parse() @@ -94,13 +93,13 @@ internal constructor(private val clientOptions: ClientOptions) : InboundFednowTr } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: InboundFednowTransferListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -118,13 +117,6 @@ internal constructor(private val clientOptions: ClientOptions) : InboundFednowTr it.validate() } } - .let { - InboundFednowTransferListPage.builder() - .service(InboundFednowTransferServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundMailItemService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundMailItemService.kt index 82e377d95..38571053b 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundMailItemService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundMailItemService.kt @@ -8,8 +8,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.inboundmailitems.InboundMailItem import com.increase.api.models.inboundmailitems.InboundMailItemActionParams -import com.increase.api.models.inboundmailitems.InboundMailItemListPage import com.increase.api.models.inboundmailitems.InboundMailItemListParams +import com.increase.api.models.inboundmailitems.InboundMailItemListResponse import com.increase.api.models.inboundmailitems.InboundMailItemRetrieveParams import java.util.function.Consumer @@ -60,21 +60,21 @@ interface InboundMailItemService { retrieve(inboundMailItemId, InboundMailItemRetrieveParams.none(), requestOptions) /** List Inbound Mail Items */ - fun list(): InboundMailItemListPage = list(InboundMailItemListParams.none()) + fun list(): InboundMailItemListResponse = list(InboundMailItemListParams.none()) /** @see list */ fun list( params: InboundMailItemListParams = InboundMailItemListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): InboundMailItemListPage + ): InboundMailItemListResponse /** @see list */ fun list( params: InboundMailItemListParams = InboundMailItemListParams.none() - ): InboundMailItemListPage = list(params, RequestOptions.none()) + ): InboundMailItemListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): InboundMailItemListPage = + fun list(requestOptions: RequestOptions): InboundMailItemListResponse = list(InboundMailItemListParams.none(), requestOptions) /** Action a Inbound Mail Item */ @@ -167,7 +167,7 @@ interface InboundMailItemService { * [InboundMailItemService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = + fun list(): HttpResponseFor = list(InboundMailItemListParams.none()) /** @see list */ @@ -175,17 +175,17 @@ interface InboundMailItemService { fun list( params: InboundMailItemListParams = InboundMailItemListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: InboundMailItemListParams = InboundMailItemListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(InboundMailItemListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundMailItemServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundMailItemServiceImpl.kt index 31805785e..e57598ff9 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundMailItemServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundMailItemServiceImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepare import com.increase.api.models.inboundmailitems.InboundMailItem import com.increase.api.models.inboundmailitems.InboundMailItemActionParams -import com.increase.api.models.inboundmailitems.InboundMailItemListPage -import com.increase.api.models.inboundmailitems.InboundMailItemListPageResponse import com.increase.api.models.inboundmailitems.InboundMailItemListParams +import com.increase.api.models.inboundmailitems.InboundMailItemListResponse import com.increase.api.models.inboundmailitems.InboundMailItemRetrieveParams import java.util.function.Consumer import kotlin.jvm.optionals.getOrNull @@ -47,7 +46,7 @@ class InboundMailItemServiceImpl internal constructor(private val clientOptions: override fun list( params: InboundMailItemListParams, requestOptions: RequestOptions, - ): InboundMailItemListPage = + ): InboundMailItemListResponse = // get /inbound_mail_items withRawResponse().list(params, requestOptions).parse() @@ -101,13 +100,13 @@ class InboundMailItemServiceImpl internal constructor(private val clientOptions: } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: InboundMailItemListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -125,13 +124,6 @@ class InboundMailItemServiceImpl internal constructor(private val clientOptions: it.validate() } } - .let { - InboundMailItemListPage.builder() - .service(InboundMailItemServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundRealTimePaymentsTransferService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundRealTimePaymentsTransferService.kt index a3bbf8f71..85e2b391c 100755 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundRealTimePaymentsTransferService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundRealTimePaymentsTransferService.kt @@ -7,8 +7,8 @@ import com.increase.api.core.ClientOptions import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.inboundrealtimepaymentstransfers.InboundRealTimePaymentsTransfer -import com.increase.api.models.inboundrealtimepaymentstransfers.InboundRealTimePaymentsTransferListPage import com.increase.api.models.inboundrealtimepaymentstransfers.InboundRealTimePaymentsTransferListParams +import com.increase.api.models.inboundrealtimepaymentstransfers.InboundRealTimePaymentsTransferListResponse import com.increase.api.models.inboundrealtimepaymentstransfers.InboundRealTimePaymentsTransferRetrieveParams import java.util.function.Consumer @@ -81,7 +81,7 @@ interface InboundRealTimePaymentsTransferService { ) /** List Inbound Real-Time Payments Transfers */ - fun list(): InboundRealTimePaymentsTransferListPage = + fun list(): InboundRealTimePaymentsTransferListResponse = list(InboundRealTimePaymentsTransferListParams.none()) /** @see list */ @@ -89,16 +89,16 @@ interface InboundRealTimePaymentsTransferService { params: InboundRealTimePaymentsTransferListParams = InboundRealTimePaymentsTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): InboundRealTimePaymentsTransferListPage + ): InboundRealTimePaymentsTransferListResponse /** @see list */ fun list( params: InboundRealTimePaymentsTransferListParams = InboundRealTimePaymentsTransferListParams.none() - ): InboundRealTimePaymentsTransferListPage = list(params, RequestOptions.none()) + ): InboundRealTimePaymentsTransferListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): InboundRealTimePaymentsTransferListPage = + fun list(requestOptions: RequestOptions): InboundRealTimePaymentsTransferListResponse = list(InboundRealTimePaymentsTransferListParams.none(), requestOptions) /** @@ -186,7 +186,7 @@ interface InboundRealTimePaymentsTransferService { * otherwise the same as [InboundRealTimePaymentsTransferService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = + fun list(): HttpResponseFor = list(InboundRealTimePaymentsTransferListParams.none()) /** @see list */ @@ -195,21 +195,21 @@ interface InboundRealTimePaymentsTransferService { params: InboundRealTimePaymentsTransferListParams = InboundRealTimePaymentsTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: InboundRealTimePaymentsTransferListParams = InboundRealTimePaymentsTransferListParams.none() - ): HttpResponseFor = + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed fun list( requestOptions: RequestOptions - ): HttpResponseFor = + ): HttpResponseFor = list(InboundRealTimePaymentsTransferListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundRealTimePaymentsTransferServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundRealTimePaymentsTransferServiceImpl.kt index 1bac9db55..6ecb20410 100755 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundRealTimePaymentsTransferServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundRealTimePaymentsTransferServiceImpl.kt @@ -16,9 +16,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.core.http.parseable import com.increase.api.core.prepare import com.increase.api.models.inboundrealtimepaymentstransfers.InboundRealTimePaymentsTransfer -import com.increase.api.models.inboundrealtimepaymentstransfers.InboundRealTimePaymentsTransferListPage -import com.increase.api.models.inboundrealtimepaymentstransfers.InboundRealTimePaymentsTransferListPageResponse import com.increase.api.models.inboundrealtimepaymentstransfers.InboundRealTimePaymentsTransferListParams +import com.increase.api.models.inboundrealtimepaymentstransfers.InboundRealTimePaymentsTransferListResponse import com.increase.api.models.inboundrealtimepaymentstransfers.InboundRealTimePaymentsTransferRetrieveParams import java.util.function.Consumer import kotlin.jvm.optionals.getOrNull @@ -51,7 +50,7 @@ internal constructor(private val clientOptions: ClientOptions) : override fun list( params: InboundRealTimePaymentsTransferListParams, requestOptions: RequestOptions, - ): InboundRealTimePaymentsTransferListPage = + ): InboundRealTimePaymentsTransferListResponse = // get /inbound_real_time_payments_transfers withRawResponse().list(params, requestOptions).parse() @@ -101,13 +100,13 @@ internal constructor(private val clientOptions: ClientOptions) : } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: InboundRealTimePaymentsTransferListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -125,13 +124,6 @@ internal constructor(private val clientOptions: ClientOptions) : it.validate() } } - .let { - InboundRealTimePaymentsTransferListPage.builder() - .service(InboundRealTimePaymentsTransferServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundWireDrawdownRequestService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundWireDrawdownRequestService.kt index a7ba2f3fc..2b8e105bc 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundWireDrawdownRequestService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundWireDrawdownRequestService.kt @@ -7,8 +7,8 @@ import com.increase.api.core.ClientOptions import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.inboundwiredrawdownrequests.InboundWireDrawdownRequest -import com.increase.api.models.inboundwiredrawdownrequests.InboundWireDrawdownRequestListPage import com.increase.api.models.inboundwiredrawdownrequests.InboundWireDrawdownRequestListParams +import com.increase.api.models.inboundwiredrawdownrequests.InboundWireDrawdownRequestListResponse import com.increase.api.models.inboundwiredrawdownrequests.InboundWireDrawdownRequestRetrieveParams import java.util.function.Consumer @@ -72,22 +72,22 @@ interface InboundWireDrawdownRequestService { ) /** List Inbound Wire Drawdown Requests */ - fun list(): InboundWireDrawdownRequestListPage = + fun list(): InboundWireDrawdownRequestListResponse = list(InboundWireDrawdownRequestListParams.none()) /** @see list */ fun list( params: InboundWireDrawdownRequestListParams = InboundWireDrawdownRequestListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): InboundWireDrawdownRequestListPage + ): InboundWireDrawdownRequestListResponse /** @see list */ fun list( params: InboundWireDrawdownRequestListParams = InboundWireDrawdownRequestListParams.none() - ): InboundWireDrawdownRequestListPage = list(params, RequestOptions.none()) + ): InboundWireDrawdownRequestListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): InboundWireDrawdownRequestListPage = + fun list(requestOptions: RequestOptions): InboundWireDrawdownRequestListResponse = list(InboundWireDrawdownRequestListParams.none(), requestOptions) /** @@ -171,7 +171,7 @@ interface InboundWireDrawdownRequestService { * the same as [InboundWireDrawdownRequestService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = + fun list(): HttpResponseFor = list(InboundWireDrawdownRequestListParams.none()) /** @see list */ @@ -180,20 +180,21 @@ interface InboundWireDrawdownRequestService { params: InboundWireDrawdownRequestListParams = InboundWireDrawdownRequestListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: InboundWireDrawdownRequestListParams = InboundWireDrawdownRequestListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = + list(params, RequestOptions.none()) /** @see list */ @MustBeClosed fun list( requestOptions: RequestOptions - ): HttpResponseFor = + ): HttpResponseFor = list(InboundWireDrawdownRequestListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundWireDrawdownRequestServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundWireDrawdownRequestServiceImpl.kt index b41c6b587..028e509e2 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundWireDrawdownRequestServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundWireDrawdownRequestServiceImpl.kt @@ -16,9 +16,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.core.http.parseable import com.increase.api.core.prepare import com.increase.api.models.inboundwiredrawdownrequests.InboundWireDrawdownRequest -import com.increase.api.models.inboundwiredrawdownrequests.InboundWireDrawdownRequestListPage -import com.increase.api.models.inboundwiredrawdownrequests.InboundWireDrawdownRequestListPageResponse import com.increase.api.models.inboundwiredrawdownrequests.InboundWireDrawdownRequestListParams +import com.increase.api.models.inboundwiredrawdownrequests.InboundWireDrawdownRequestListResponse import com.increase.api.models.inboundwiredrawdownrequests.InboundWireDrawdownRequestRetrieveParams import java.util.function.Consumer import kotlin.jvm.optionals.getOrNull @@ -50,7 +49,7 @@ internal constructor(private val clientOptions: ClientOptions) : InboundWireDraw override fun list( params: InboundWireDrawdownRequestListParams, requestOptions: RequestOptions, - ): InboundWireDrawdownRequestListPage = + ): InboundWireDrawdownRequestListResponse = // get /inbound_wire_drawdown_requests withRawResponse().list(params, requestOptions).parse() @@ -100,13 +99,13 @@ internal constructor(private val clientOptions: ClientOptions) : InboundWireDraw } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: InboundWireDrawdownRequestListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -124,13 +123,6 @@ internal constructor(private val clientOptions: ClientOptions) : InboundWireDraw it.validate() } } - .let { - InboundWireDrawdownRequestListPage.builder() - .service(InboundWireDrawdownRequestServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundWireTransferService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundWireTransferService.kt index 84cb2ccb2..2dafb48d1 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundWireTransferService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundWireTransferService.kt @@ -7,8 +7,8 @@ import com.increase.api.core.ClientOptions import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.inboundwiretransfers.InboundWireTransfer -import com.increase.api.models.inboundwiretransfers.InboundWireTransferListPage import com.increase.api.models.inboundwiretransfers.InboundWireTransferListParams +import com.increase.api.models.inboundwiretransfers.InboundWireTransferListResponse import com.increase.api.models.inboundwiretransfers.InboundWireTransferRetrieveParams import com.increase.api.models.inboundwiretransfers.InboundWireTransferReverseParams import java.util.function.Consumer @@ -66,21 +66,21 @@ interface InboundWireTransferService { retrieve(inboundWireTransferId, InboundWireTransferRetrieveParams.none(), requestOptions) /** List Inbound Wire Transfers */ - fun list(): InboundWireTransferListPage = list(InboundWireTransferListParams.none()) + fun list(): InboundWireTransferListResponse = list(InboundWireTransferListParams.none()) /** @see list */ fun list( params: InboundWireTransferListParams = InboundWireTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): InboundWireTransferListPage + ): InboundWireTransferListResponse /** @see list */ fun list( params: InboundWireTransferListParams = InboundWireTransferListParams.none() - ): InboundWireTransferListPage = list(params, RequestOptions.none()) + ): InboundWireTransferListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): InboundWireTransferListPage = + fun list(requestOptions: RequestOptions): InboundWireTransferListResponse = list(InboundWireTransferListParams.none(), requestOptions) /** Reverse an Inbound Wire Transfer */ @@ -183,7 +183,7 @@ interface InboundWireTransferService { * as [InboundWireTransferService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = + fun list(): HttpResponseFor = list(InboundWireTransferListParams.none()) /** @see list */ @@ -191,17 +191,17 @@ interface InboundWireTransferService { fun list( params: InboundWireTransferListParams = InboundWireTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: InboundWireTransferListParams = InboundWireTransferListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(InboundWireTransferListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundWireTransferServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundWireTransferServiceImpl.kt index 8a1290124..689a4dccd 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundWireTransferServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/InboundWireTransferServiceImpl.kt @@ -17,9 +17,8 @@ import com.increase.api.core.http.json import com.increase.api.core.http.parseable import com.increase.api.core.prepare import com.increase.api.models.inboundwiretransfers.InboundWireTransfer -import com.increase.api.models.inboundwiretransfers.InboundWireTransferListPage -import com.increase.api.models.inboundwiretransfers.InboundWireTransferListPageResponse import com.increase.api.models.inboundwiretransfers.InboundWireTransferListParams +import com.increase.api.models.inboundwiretransfers.InboundWireTransferListResponse import com.increase.api.models.inboundwiretransfers.InboundWireTransferRetrieveParams import com.increase.api.models.inboundwiretransfers.InboundWireTransferReverseParams import java.util.function.Consumer @@ -49,7 +48,7 @@ internal constructor(private val clientOptions: ClientOptions) : InboundWireTran override fun list( params: InboundWireTransferListParams, requestOptions: RequestOptions, - ): InboundWireTransferListPage = + ): InboundWireTransferListResponse = // get /inbound_wire_transfers withRawResponse().list(params, requestOptions).parse() @@ -103,13 +102,13 @@ internal constructor(private val clientOptions: ClientOptions) : InboundWireTran } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: InboundWireTransferListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -127,13 +126,6 @@ internal constructor(private val clientOptions: ClientOptions) : InboundWireTran it.validate() } } - .let { - InboundWireTransferListPage.builder() - .service(InboundWireTransferServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/IntrafiAccountEnrollmentService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/IntrafiAccountEnrollmentService.kt index 707101542..2e8a32b5d 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/IntrafiAccountEnrollmentService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/IntrafiAccountEnrollmentService.kt @@ -8,8 +8,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.intrafiaccountenrollments.IntrafiAccountEnrollment import com.increase.api.models.intrafiaccountenrollments.IntrafiAccountEnrollmentCreateParams -import com.increase.api.models.intrafiaccountenrollments.IntrafiAccountEnrollmentListPage import com.increase.api.models.intrafiaccountenrollments.IntrafiAccountEnrollmentListParams +import com.increase.api.models.intrafiaccountenrollments.IntrafiAccountEnrollmentListResponse import com.increase.api.models.intrafiaccountenrollments.IntrafiAccountEnrollmentRetrieveParams import com.increase.api.models.intrafiaccountenrollments.IntrafiAccountEnrollmentUnenrollParams import java.util.function.Consumer @@ -84,21 +84,22 @@ interface IntrafiAccountEnrollmentService { ) /** List IntraFi Account Enrollments */ - fun list(): IntrafiAccountEnrollmentListPage = list(IntrafiAccountEnrollmentListParams.none()) + fun list(): IntrafiAccountEnrollmentListResponse = + list(IntrafiAccountEnrollmentListParams.none()) /** @see list */ fun list( params: IntrafiAccountEnrollmentListParams = IntrafiAccountEnrollmentListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): IntrafiAccountEnrollmentListPage + ): IntrafiAccountEnrollmentListResponse /** @see list */ fun list( params: IntrafiAccountEnrollmentListParams = IntrafiAccountEnrollmentListParams.none() - ): IntrafiAccountEnrollmentListPage = list(params, RequestOptions.none()) + ): IntrafiAccountEnrollmentListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): IntrafiAccountEnrollmentListPage = + fun list(requestOptions: RequestOptions): IntrafiAccountEnrollmentListResponse = list(IntrafiAccountEnrollmentListParams.none(), requestOptions) /** Unenroll an account from IntraFi */ @@ -240,7 +241,7 @@ interface IntrafiAccountEnrollmentService { * same as [IntrafiAccountEnrollmentService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = + fun list(): HttpResponseFor = list(IntrafiAccountEnrollmentListParams.none()) /** @see list */ @@ -248,19 +249,20 @@ interface IntrafiAccountEnrollmentService { fun list( params: IntrafiAccountEnrollmentListParams = IntrafiAccountEnrollmentListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: IntrafiAccountEnrollmentListParams = IntrafiAccountEnrollmentListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = + list(params, RequestOptions.none()) /** @see list */ @MustBeClosed fun list( requestOptions: RequestOptions - ): HttpResponseFor = + ): HttpResponseFor = list(IntrafiAccountEnrollmentListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/IntrafiAccountEnrollmentServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/IntrafiAccountEnrollmentServiceImpl.kt index a0a00c40e..183d58caa 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/IntrafiAccountEnrollmentServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/IntrafiAccountEnrollmentServiceImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepare import com.increase.api.models.intrafiaccountenrollments.IntrafiAccountEnrollment import com.increase.api.models.intrafiaccountenrollments.IntrafiAccountEnrollmentCreateParams -import com.increase.api.models.intrafiaccountenrollments.IntrafiAccountEnrollmentListPage -import com.increase.api.models.intrafiaccountenrollments.IntrafiAccountEnrollmentListPageResponse import com.increase.api.models.intrafiaccountenrollments.IntrafiAccountEnrollmentListParams +import com.increase.api.models.intrafiaccountenrollments.IntrafiAccountEnrollmentListResponse import com.increase.api.models.intrafiaccountenrollments.IntrafiAccountEnrollmentRetrieveParams import com.increase.api.models.intrafiaccountenrollments.IntrafiAccountEnrollmentUnenrollParams import java.util.function.Consumer @@ -60,7 +59,7 @@ internal constructor(private val clientOptions: ClientOptions) : IntrafiAccountE override fun list( params: IntrafiAccountEnrollmentListParams, requestOptions: RequestOptions, - ): IntrafiAccountEnrollmentListPage = + ): IntrafiAccountEnrollmentListResponse = // get /intrafi_account_enrollments withRawResponse().list(params, requestOptions).parse() @@ -145,13 +144,13 @@ internal constructor(private val clientOptions: ClientOptions) : IntrafiAccountE } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: IntrafiAccountEnrollmentListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -169,13 +168,6 @@ internal constructor(private val clientOptions: ClientOptions) : IntrafiAccountE it.validate() } } - .let { - IntrafiAccountEnrollmentListPage.builder() - .service(IntrafiAccountEnrollmentServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/IntrafiExclusionService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/IntrafiExclusionService.kt index 96ac5a5a2..c720e6054 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/IntrafiExclusionService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/IntrafiExclusionService.kt @@ -9,8 +9,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.intrafiexclusions.IntrafiExclusion import com.increase.api.models.intrafiexclusions.IntrafiExclusionArchiveParams import com.increase.api.models.intrafiexclusions.IntrafiExclusionCreateParams -import com.increase.api.models.intrafiexclusions.IntrafiExclusionListPage import com.increase.api.models.intrafiexclusions.IntrafiExclusionListParams +import com.increase.api.models.intrafiexclusions.IntrafiExclusionListResponse import com.increase.api.models.intrafiexclusions.IntrafiExclusionRetrieveParams import java.util.function.Consumer @@ -71,21 +71,21 @@ interface IntrafiExclusionService { retrieve(intrafiExclusionId, IntrafiExclusionRetrieveParams.none(), requestOptions) /** List IntraFi Exclusions */ - fun list(): IntrafiExclusionListPage = list(IntrafiExclusionListParams.none()) + fun list(): IntrafiExclusionListResponse = list(IntrafiExclusionListParams.none()) /** @see list */ fun list( params: IntrafiExclusionListParams = IntrafiExclusionListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): IntrafiExclusionListPage + ): IntrafiExclusionListResponse /** @see list */ fun list( params: IntrafiExclusionListParams = IntrafiExclusionListParams.none() - ): IntrafiExclusionListPage = list(params, RequestOptions.none()) + ): IntrafiExclusionListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): IntrafiExclusionListPage = + fun list(requestOptions: RequestOptions): IntrafiExclusionListResponse = list(IntrafiExclusionListParams.none(), requestOptions) /** Archive an IntraFi Exclusion */ @@ -203,7 +203,7 @@ interface IntrafiExclusionService { * [IntrafiExclusionService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = + fun list(): HttpResponseFor = list(IntrafiExclusionListParams.none()) /** @see list */ @@ -211,17 +211,17 @@ interface IntrafiExclusionService { fun list( params: IntrafiExclusionListParams = IntrafiExclusionListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: IntrafiExclusionListParams = IntrafiExclusionListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(IntrafiExclusionListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/IntrafiExclusionServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/IntrafiExclusionServiceImpl.kt index 0baa10a1d..bd1b66aad 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/IntrafiExclusionServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/IntrafiExclusionServiceImpl.kt @@ -19,9 +19,8 @@ import com.increase.api.core.prepare import com.increase.api.models.intrafiexclusions.IntrafiExclusion import com.increase.api.models.intrafiexclusions.IntrafiExclusionArchiveParams import com.increase.api.models.intrafiexclusions.IntrafiExclusionCreateParams -import com.increase.api.models.intrafiexclusions.IntrafiExclusionListPage -import com.increase.api.models.intrafiexclusions.IntrafiExclusionListPageResponse import com.increase.api.models.intrafiexclusions.IntrafiExclusionListParams +import com.increase.api.models.intrafiexclusions.IntrafiExclusionListResponse import com.increase.api.models.intrafiexclusions.IntrafiExclusionRetrieveParams import java.util.function.Consumer import kotlin.jvm.optionals.getOrNull @@ -55,7 +54,7 @@ class IntrafiExclusionServiceImpl internal constructor(private val clientOptions override fun list( params: IntrafiExclusionListParams, requestOptions: RequestOptions, - ): IntrafiExclusionListPage = + ): IntrafiExclusionListResponse = // get /intrafi_exclusions withRawResponse().list(params, requestOptions).parse() @@ -137,13 +136,13 @@ class IntrafiExclusionServiceImpl internal constructor(private val clientOptions } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: IntrafiExclusionListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -161,13 +160,6 @@ class IntrafiExclusionServiceImpl internal constructor(private val clientOptions it.validate() } } - .let { - IntrafiExclusionListPage.builder() - .service(IntrafiExclusionServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/LockboxService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/LockboxService.kt index cde1eb2c6..f0815359a 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/LockboxService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/LockboxService.kt @@ -8,8 +8,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.lockboxes.Lockbox import com.increase.api.models.lockboxes.LockboxCreateParams -import com.increase.api.models.lockboxes.LockboxListPage import com.increase.api.models.lockboxes.LockboxListParams +import com.increase.api.models.lockboxes.LockboxListResponse import com.increase.api.models.lockboxes.LockboxRetrieveParams import com.increase.api.models.lockboxes.LockboxUpdateParams import java.util.function.Consumer @@ -96,20 +96,20 @@ interface LockboxService { update(lockboxId, LockboxUpdateParams.none(), requestOptions) /** List Lockboxes */ - fun list(): LockboxListPage = list(LockboxListParams.none()) + fun list(): LockboxListResponse = list(LockboxListParams.none()) /** @see list */ fun list( params: LockboxListParams = LockboxListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): LockboxListPage + ): LockboxListResponse /** @see list */ - fun list(params: LockboxListParams = LockboxListParams.none()): LockboxListPage = + fun list(params: LockboxListParams = LockboxListParams.none()): LockboxListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): LockboxListPage = + fun list(requestOptions: RequestOptions): LockboxListResponse = list(LockboxListParams.none(), requestOptions) /** A view of [LockboxService] that provides access to raw HTTP responses for each method. */ @@ -223,24 +223,25 @@ interface LockboxService { * Returns a raw HTTP response for `get /lockboxes`, but is otherwise the same as * [LockboxService.list]. */ - @MustBeClosed fun list(): HttpResponseFor = list(LockboxListParams.none()) + @MustBeClosed + fun list(): HttpResponseFor = list(LockboxListParams.none()) /** @see list */ @MustBeClosed fun list( params: LockboxListParams = LockboxListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: LockboxListParams = LockboxListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(LockboxListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/LockboxServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/LockboxServiceImpl.kt index 5bf790592..4f8f7dd21 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/LockboxServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/LockboxServiceImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepare import com.increase.api.models.lockboxes.Lockbox import com.increase.api.models.lockboxes.LockboxCreateParams -import com.increase.api.models.lockboxes.LockboxListPage -import com.increase.api.models.lockboxes.LockboxListPageResponse import com.increase.api.models.lockboxes.LockboxListParams +import com.increase.api.models.lockboxes.LockboxListResponse import com.increase.api.models.lockboxes.LockboxRetrieveParams import com.increase.api.models.lockboxes.LockboxUpdateParams import java.util.function.Consumer @@ -50,7 +49,10 @@ class LockboxServiceImpl internal constructor(private val clientOptions: ClientO // patch /lockboxes/{lockbox_id} withRawResponse().update(params, requestOptions).parse() - override fun list(params: LockboxListParams, requestOptions: RequestOptions): LockboxListPage = + override fun list( + params: LockboxListParams, + requestOptions: RequestOptions, + ): LockboxListResponse = // get /lockboxes withRawResponse().list(params, requestOptions).parse() @@ -154,13 +156,13 @@ class LockboxServiceImpl internal constructor(private val clientOptions: ClientO } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: LockboxListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -178,13 +180,6 @@ class LockboxServiceImpl internal constructor(private val clientOptions: ClientO it.validate() } } - .let { - LockboxListPage.builder() - .service(LockboxServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/OAuthApplicationService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/OAuthApplicationService.kt index f351dc462..987298694 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/OAuthApplicationService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/OAuthApplicationService.kt @@ -7,8 +7,8 @@ import com.increase.api.core.ClientOptions import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.oauthapplications.OAuthApplication -import com.increase.api.models.oauthapplications.OAuthApplicationListPage import com.increase.api.models.oauthapplications.OAuthApplicationListParams +import com.increase.api.models.oauthapplications.OAuthApplicationListResponse import com.increase.api.models.oauthapplications.OAuthApplicationRetrieveParams import java.util.function.Consumer @@ -59,21 +59,21 @@ interface OAuthApplicationService { retrieve(oauthApplicationId, OAuthApplicationRetrieveParams.none(), requestOptions) /** List OAuth Applications */ - fun list(): OAuthApplicationListPage = list(OAuthApplicationListParams.none()) + fun list(): OAuthApplicationListResponse = list(OAuthApplicationListParams.none()) /** @see list */ fun list( params: OAuthApplicationListParams = OAuthApplicationListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): OAuthApplicationListPage + ): OAuthApplicationListResponse /** @see list */ fun list( params: OAuthApplicationListParams = OAuthApplicationListParams.none() - ): OAuthApplicationListPage = list(params, RequestOptions.none()) + ): OAuthApplicationListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): OAuthApplicationListPage = + fun list(requestOptions: RequestOptions): OAuthApplicationListResponse = list(OAuthApplicationListParams.none(), requestOptions) /** @@ -144,7 +144,7 @@ interface OAuthApplicationService { * [OAuthApplicationService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = + fun list(): HttpResponseFor = list(OAuthApplicationListParams.none()) /** @see list */ @@ -152,17 +152,17 @@ interface OAuthApplicationService { fun list( params: OAuthApplicationListParams = OAuthApplicationListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: OAuthApplicationListParams = OAuthApplicationListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(OAuthApplicationListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/OAuthApplicationServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/OAuthApplicationServiceImpl.kt index 7a1bca392..cc3a146f4 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/OAuthApplicationServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/OAuthApplicationServiceImpl.kt @@ -16,9 +16,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.core.http.parseable import com.increase.api.core.prepare import com.increase.api.models.oauthapplications.OAuthApplication -import com.increase.api.models.oauthapplications.OAuthApplicationListPage -import com.increase.api.models.oauthapplications.OAuthApplicationListPageResponse import com.increase.api.models.oauthapplications.OAuthApplicationListParams +import com.increase.api.models.oauthapplications.OAuthApplicationListResponse import com.increase.api.models.oauthapplications.OAuthApplicationRetrieveParams import java.util.function.Consumer import kotlin.jvm.optionals.getOrNull @@ -45,7 +44,7 @@ class OAuthApplicationServiceImpl internal constructor(private val clientOptions override fun list( params: OAuthApplicationListParams, requestOptions: RequestOptions, - ): OAuthApplicationListPage = + ): OAuthApplicationListResponse = // get /oauth_applications withRawResponse().list(params, requestOptions).parse() @@ -92,13 +91,13 @@ class OAuthApplicationServiceImpl internal constructor(private val clientOptions } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: OAuthApplicationListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -116,13 +115,6 @@ class OAuthApplicationServiceImpl internal constructor(private val clientOptions it.validate() } } - .let { - OAuthApplicationListPage.builder() - .service(OAuthApplicationServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/OAuthConnectionService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/OAuthConnectionService.kt index 33213a98b..a5a761fc9 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/OAuthConnectionService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/OAuthConnectionService.kt @@ -7,8 +7,8 @@ import com.increase.api.core.ClientOptions import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.oauthconnections.OAuthConnection -import com.increase.api.models.oauthconnections.OAuthConnectionListPage import com.increase.api.models.oauthconnections.OAuthConnectionListParams +import com.increase.api.models.oauthconnections.OAuthConnectionListResponse import com.increase.api.models.oauthconnections.OAuthConnectionRetrieveParams import java.util.function.Consumer @@ -59,21 +59,21 @@ interface OAuthConnectionService { retrieve(oauthConnectionId, OAuthConnectionRetrieveParams.none(), requestOptions) /** List OAuth Connections */ - fun list(): OAuthConnectionListPage = list(OAuthConnectionListParams.none()) + fun list(): OAuthConnectionListResponse = list(OAuthConnectionListParams.none()) /** @see list */ fun list( params: OAuthConnectionListParams = OAuthConnectionListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): OAuthConnectionListPage + ): OAuthConnectionListResponse /** @see list */ fun list( params: OAuthConnectionListParams = OAuthConnectionListParams.none() - ): OAuthConnectionListPage = list(params, RequestOptions.none()) + ): OAuthConnectionListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): OAuthConnectionListPage = + fun list(requestOptions: RequestOptions): OAuthConnectionListResponse = list(OAuthConnectionListParams.none(), requestOptions) /** @@ -144,7 +144,7 @@ interface OAuthConnectionService { * [OAuthConnectionService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = + fun list(): HttpResponseFor = list(OAuthConnectionListParams.none()) /** @see list */ @@ -152,17 +152,17 @@ interface OAuthConnectionService { fun list( params: OAuthConnectionListParams = OAuthConnectionListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: OAuthConnectionListParams = OAuthConnectionListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(OAuthConnectionListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/OAuthConnectionServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/OAuthConnectionServiceImpl.kt index 5d619edda..9f7690eaa 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/OAuthConnectionServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/OAuthConnectionServiceImpl.kt @@ -16,9 +16,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.core.http.parseable import com.increase.api.core.prepare import com.increase.api.models.oauthconnections.OAuthConnection -import com.increase.api.models.oauthconnections.OAuthConnectionListPage -import com.increase.api.models.oauthconnections.OAuthConnectionListPageResponse import com.increase.api.models.oauthconnections.OAuthConnectionListParams +import com.increase.api.models.oauthconnections.OAuthConnectionListResponse import com.increase.api.models.oauthconnections.OAuthConnectionRetrieveParams import java.util.function.Consumer import kotlin.jvm.optionals.getOrNull @@ -45,7 +44,7 @@ class OAuthConnectionServiceImpl internal constructor(private val clientOptions: override fun list( params: OAuthConnectionListParams, requestOptions: RequestOptions, - ): OAuthConnectionListPage = + ): OAuthConnectionListResponse = // get /oauth_connections withRawResponse().list(params, requestOptions).parse() @@ -92,13 +91,13 @@ class OAuthConnectionServiceImpl internal constructor(private val clientOptions: } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: OAuthConnectionListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -116,13 +115,6 @@ class OAuthConnectionServiceImpl internal constructor(private val clientOptions: it.validate() } } - .let { - OAuthConnectionListPage.builder() - .service(OAuthConnectionServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/PendingTransactionService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/PendingTransactionService.kt index ed95d6335..4f49fe99d 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/PendingTransactionService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/PendingTransactionService.kt @@ -8,8 +8,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.pendingtransactions.PendingTransaction import com.increase.api.models.pendingtransactions.PendingTransactionCreateParams -import com.increase.api.models.pendingtransactions.PendingTransactionListPage import com.increase.api.models.pendingtransactions.PendingTransactionListParams +import com.increase.api.models.pendingtransactions.PendingTransactionListResponse import com.increase.api.models.pendingtransactions.PendingTransactionReleaseParams import com.increase.api.models.pendingtransactions.PendingTransactionRetrieveParams import java.util.function.Consumer @@ -79,21 +79,21 @@ interface PendingTransactionService { retrieve(pendingTransactionId, PendingTransactionRetrieveParams.none(), requestOptions) /** List Pending Transactions */ - fun list(): PendingTransactionListPage = list(PendingTransactionListParams.none()) + fun list(): PendingTransactionListResponse = list(PendingTransactionListParams.none()) /** @see list */ fun list( params: PendingTransactionListParams = PendingTransactionListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): PendingTransactionListPage + ): PendingTransactionListResponse /** @see list */ fun list( params: PendingTransactionListParams = PendingTransactionListParams.none() - ): PendingTransactionListPage = list(params, RequestOptions.none()) + ): PendingTransactionListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): PendingTransactionListPage = + fun list(requestOptions: RequestOptions): PendingTransactionListResponse = list(PendingTransactionListParams.none(), requestOptions) /** @@ -219,7 +219,7 @@ interface PendingTransactionService { * [PendingTransactionService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = + fun list(): HttpResponseFor = list(PendingTransactionListParams.none()) /** @see list */ @@ -227,17 +227,17 @@ interface PendingTransactionService { fun list( params: PendingTransactionListParams = PendingTransactionListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: PendingTransactionListParams = PendingTransactionListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(PendingTransactionListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/PendingTransactionServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/PendingTransactionServiceImpl.kt index cecbf4919..1335feb61 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/PendingTransactionServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/PendingTransactionServiceImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepare import com.increase.api.models.pendingtransactions.PendingTransaction import com.increase.api.models.pendingtransactions.PendingTransactionCreateParams -import com.increase.api.models.pendingtransactions.PendingTransactionListPage -import com.increase.api.models.pendingtransactions.PendingTransactionListPageResponse import com.increase.api.models.pendingtransactions.PendingTransactionListParams +import com.increase.api.models.pendingtransactions.PendingTransactionListResponse import com.increase.api.models.pendingtransactions.PendingTransactionReleaseParams import com.increase.api.models.pendingtransactions.PendingTransactionRetrieveParams import java.util.function.Consumer @@ -55,7 +54,7 @@ class PendingTransactionServiceImpl internal constructor(private val clientOptio override fun list( params: PendingTransactionListParams, requestOptions: RequestOptions, - ): PendingTransactionListPage = + ): PendingTransactionListResponse = // get /pending_transactions withRawResponse().list(params, requestOptions).parse() @@ -137,13 +136,13 @@ class PendingTransactionServiceImpl internal constructor(private val clientOptio } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: PendingTransactionListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -161,13 +160,6 @@ class PendingTransactionServiceImpl internal constructor(private val clientOptio it.validate() } } - .let { - PendingTransactionListPage.builder() - .service(PendingTransactionServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/PhysicalCardProfileService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/PhysicalCardProfileService.kt index ae886f3de..c8470466a 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/PhysicalCardProfileService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/PhysicalCardProfileService.kt @@ -10,8 +10,8 @@ import com.increase.api.models.physicalcardprofiles.PhysicalCardProfile import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileArchiveParams import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileCloneParams import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileCreateParams -import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileListPage import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileListParams +import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileListResponse import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileRetrieveParams import java.util.function.Consumer @@ -78,21 +78,21 @@ interface PhysicalCardProfileService { retrieve(physicalCardProfileId, PhysicalCardProfileRetrieveParams.none(), requestOptions) /** List Physical Card Profiles */ - fun list(): PhysicalCardProfileListPage = list(PhysicalCardProfileListParams.none()) + fun list(): PhysicalCardProfileListResponse = list(PhysicalCardProfileListParams.none()) /** @see list */ fun list( params: PhysicalCardProfileListParams = PhysicalCardProfileListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): PhysicalCardProfileListPage + ): PhysicalCardProfileListResponse /** @see list */ fun list( params: PhysicalCardProfileListParams = PhysicalCardProfileListParams.none() - ): PhysicalCardProfileListPage = list(params, RequestOptions.none()) + ): PhysicalCardProfileListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): PhysicalCardProfileListPage = + fun list(requestOptions: RequestOptions): PhysicalCardProfileListResponse = list(PhysicalCardProfileListParams.none(), requestOptions) /** Archive a Physical Card Profile */ @@ -256,7 +256,7 @@ interface PhysicalCardProfileService { * as [PhysicalCardProfileService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = + fun list(): HttpResponseFor = list(PhysicalCardProfileListParams.none()) /** @see list */ @@ -264,17 +264,17 @@ interface PhysicalCardProfileService { fun list( params: PhysicalCardProfileListParams = PhysicalCardProfileListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: PhysicalCardProfileListParams = PhysicalCardProfileListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(PhysicalCardProfileListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/PhysicalCardProfileServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/PhysicalCardProfileServiceImpl.kt index 40e0ff72d..68fb57be2 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/PhysicalCardProfileServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/PhysicalCardProfileServiceImpl.kt @@ -20,9 +20,8 @@ import com.increase.api.models.physicalcardprofiles.PhysicalCardProfile import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileArchiveParams import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileCloneParams import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileCreateParams -import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileListPage -import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileListPageResponse import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileListParams +import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileListResponse import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileRetrieveParams import java.util.function.Consumer import kotlin.jvm.optionals.getOrNull @@ -58,7 +57,7 @@ internal constructor(private val clientOptions: ClientOptions) : PhysicalCardPro override fun list( params: PhysicalCardProfileListParams, requestOptions: RequestOptions, - ): PhysicalCardProfileListPage = + ): PhysicalCardProfileListResponse = // get /physical_card_profiles withRawResponse().list(params, requestOptions).parse() @@ -147,13 +146,13 @@ internal constructor(private val clientOptions: ClientOptions) : PhysicalCardPro } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: PhysicalCardProfileListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -171,13 +170,6 @@ internal constructor(private val clientOptions: ClientOptions) : PhysicalCardPro it.validate() } } - .let { - PhysicalCardProfileListPage.builder() - .service(PhysicalCardProfileServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/PhysicalCardService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/PhysicalCardService.kt index 29dceaa41..b5451908d 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/PhysicalCardService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/PhysicalCardService.kt @@ -8,8 +8,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.physicalcards.PhysicalCard import com.increase.api.models.physicalcards.PhysicalCardCreateParams -import com.increase.api.models.physicalcards.PhysicalCardListPage import com.increase.api.models.physicalcards.PhysicalCardListParams +import com.increase.api.models.physicalcards.PhysicalCardListResponse import com.increase.api.models.physicalcards.PhysicalCardRetrieveParams import com.increase.api.models.physicalcards.PhysicalCardUpdateParams import java.util.function.Consumer @@ -93,20 +93,21 @@ interface PhysicalCardService { ): PhysicalCard /** List Physical Cards */ - fun list(): PhysicalCardListPage = list(PhysicalCardListParams.none()) + fun list(): PhysicalCardListResponse = list(PhysicalCardListParams.none()) /** @see list */ fun list( params: PhysicalCardListParams = PhysicalCardListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): PhysicalCardListPage + ): PhysicalCardListResponse /** @see list */ - fun list(params: PhysicalCardListParams = PhysicalCardListParams.none()): PhysicalCardListPage = - list(params, RequestOptions.none()) + fun list( + params: PhysicalCardListParams = PhysicalCardListParams.none() + ): PhysicalCardListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): PhysicalCardListPage = + fun list(requestOptions: RequestOptions): PhysicalCardListResponse = list(PhysicalCardListParams.none(), requestOptions) /** @@ -218,24 +219,24 @@ interface PhysicalCardService { * [PhysicalCardService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = list(PhysicalCardListParams.none()) + fun list(): HttpResponseFor = list(PhysicalCardListParams.none()) /** @see list */ @MustBeClosed fun list( params: PhysicalCardListParams = PhysicalCardListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: PhysicalCardListParams = PhysicalCardListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(PhysicalCardListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/PhysicalCardServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/PhysicalCardServiceImpl.kt index 012caa92b..e29a2f5e0 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/PhysicalCardServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/PhysicalCardServiceImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepare import com.increase.api.models.physicalcards.PhysicalCard import com.increase.api.models.physicalcards.PhysicalCardCreateParams -import com.increase.api.models.physicalcards.PhysicalCardListPage -import com.increase.api.models.physicalcards.PhysicalCardListPageResponse import com.increase.api.models.physicalcards.PhysicalCardListParams +import com.increase.api.models.physicalcards.PhysicalCardListResponse import com.increase.api.models.physicalcards.PhysicalCardRetrieveParams import com.increase.api.models.physicalcards.PhysicalCardUpdateParams import java.util.function.Consumer @@ -62,7 +61,7 @@ class PhysicalCardServiceImpl internal constructor(private val clientOptions: Cl override fun list( params: PhysicalCardListParams, requestOptions: RequestOptions, - ): PhysicalCardListPage = + ): PhysicalCardListResponse = // get /physical_cards withRawResponse().list(params, requestOptions).parse() @@ -168,13 +167,13 @@ class PhysicalCardServiceImpl internal constructor(private val clientOptions: Cl } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: PhysicalCardListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -192,13 +191,6 @@ class PhysicalCardServiceImpl internal constructor(private val clientOptions: Cl it.validate() } } - .let { - PhysicalCardListPage.builder() - .service(PhysicalCardServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/ProgramService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/ProgramService.kt index c2397a28e..528cacf55 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/ProgramService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/ProgramService.kt @@ -7,8 +7,8 @@ import com.increase.api.core.ClientOptions import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.programs.Program -import com.increase.api.models.programs.ProgramListPage import com.increase.api.models.programs.ProgramListParams +import com.increase.api.models.programs.ProgramListResponse import com.increase.api.models.programs.ProgramRetrieveParams import java.util.function.Consumer @@ -56,20 +56,20 @@ interface ProgramService { retrieve(programId, ProgramRetrieveParams.none(), requestOptions) /** List Programs */ - fun list(): ProgramListPage = list(ProgramListParams.none()) + fun list(): ProgramListResponse = list(ProgramListParams.none()) /** @see list */ fun list( params: ProgramListParams = ProgramListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): ProgramListPage + ): ProgramListResponse /** @see list */ - fun list(params: ProgramListParams = ProgramListParams.none()): ProgramListPage = + fun list(params: ProgramListParams = ProgramListParams.none()): ProgramListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): ProgramListPage = + fun list(requestOptions: RequestOptions): ProgramListResponse = list(ProgramListParams.none(), requestOptions) /** A view of [ProgramService] that provides access to raw HTTP responses for each method. */ @@ -127,24 +127,25 @@ interface ProgramService { * Returns a raw HTTP response for `get /programs`, but is otherwise the same as * [ProgramService.list]. */ - @MustBeClosed fun list(): HttpResponseFor = list(ProgramListParams.none()) + @MustBeClosed + fun list(): HttpResponseFor = list(ProgramListParams.none()) /** @see list */ @MustBeClosed fun list( params: ProgramListParams = ProgramListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: ProgramListParams = ProgramListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(ProgramListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/ProgramServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/ProgramServiceImpl.kt index 8196bf916..4577609e8 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/ProgramServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/ProgramServiceImpl.kt @@ -16,9 +16,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.core.http.parseable import com.increase.api.core.prepare import com.increase.api.models.programs.Program -import com.increase.api.models.programs.ProgramListPage -import com.increase.api.models.programs.ProgramListPageResponse import com.increase.api.models.programs.ProgramListParams +import com.increase.api.models.programs.ProgramListResponse import com.increase.api.models.programs.ProgramRetrieveParams import java.util.function.Consumer import kotlin.jvm.optionals.getOrNull @@ -39,7 +38,10 @@ class ProgramServiceImpl internal constructor(private val clientOptions: ClientO // get /programs/{program_id} withRawResponse().retrieve(params, requestOptions).parse() - override fun list(params: ProgramListParams, requestOptions: RequestOptions): ProgramListPage = + override fun list( + params: ProgramListParams, + requestOptions: RequestOptions, + ): ProgramListResponse = // get /programs withRawResponse().list(params, requestOptions).parse() @@ -86,13 +88,13 @@ class ProgramServiceImpl internal constructor(private val clientOptions: ClientO } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: ProgramListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -110,13 +112,6 @@ class ProgramServiceImpl internal constructor(private val clientOptions: ClientO it.validate() } } - .let { - ProgramListPage.builder() - .service(ProgramServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/RealTimePaymentsTransferService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/RealTimePaymentsTransferService.kt index 6c94bd631..9be33a5e8 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/RealTimePaymentsTransferService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/RealTimePaymentsTransferService.kt @@ -10,8 +10,8 @@ import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransfe import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransferApproveParams import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransferCancelParams import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransferCreateParams -import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransferListPage import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransferListParams +import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransferListResponse import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransferRetrieveParams import java.util.function.Consumer @@ -85,21 +85,22 @@ interface RealTimePaymentsTransferService { ) /** List Real-Time Payments Transfers */ - fun list(): RealTimePaymentsTransferListPage = list(RealTimePaymentsTransferListParams.none()) + fun list(): RealTimePaymentsTransferListResponse = + list(RealTimePaymentsTransferListParams.none()) /** @see list */ fun list( params: RealTimePaymentsTransferListParams = RealTimePaymentsTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): RealTimePaymentsTransferListPage + ): RealTimePaymentsTransferListResponse /** @see list */ fun list( params: RealTimePaymentsTransferListParams = RealTimePaymentsTransferListParams.none() - ): RealTimePaymentsTransferListPage = list(params, RequestOptions.none()) + ): RealTimePaymentsTransferListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): RealTimePaymentsTransferListPage = + fun list(requestOptions: RequestOptions): RealTimePaymentsTransferListResponse = list(RealTimePaymentsTransferListParams.none(), requestOptions) /** Approves a Real-Time Payments Transfer in a pending_approval state. */ @@ -281,7 +282,7 @@ interface RealTimePaymentsTransferService { * same as [RealTimePaymentsTransferService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = + fun list(): HttpResponseFor = list(RealTimePaymentsTransferListParams.none()) /** @see list */ @@ -289,19 +290,20 @@ interface RealTimePaymentsTransferService { fun list( params: RealTimePaymentsTransferListParams = RealTimePaymentsTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: RealTimePaymentsTransferListParams = RealTimePaymentsTransferListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = + list(params, RequestOptions.none()) /** @see list */ @MustBeClosed fun list( requestOptions: RequestOptions - ): HttpResponseFor = + ): HttpResponseFor = list(RealTimePaymentsTransferListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/RealTimePaymentsTransferServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/RealTimePaymentsTransferServiceImpl.kt index e215aa58e..b3b90d32f 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/RealTimePaymentsTransferServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/RealTimePaymentsTransferServiceImpl.kt @@ -20,9 +20,8 @@ import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransfe import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransferApproveParams import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransferCancelParams import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransferCreateParams -import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransferListPage -import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransferListPageResponse import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransferListParams +import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransferListResponse import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransferRetrieveParams import java.util.function.Consumer import kotlin.jvm.optionals.getOrNull @@ -61,7 +60,7 @@ internal constructor(private val clientOptions: ClientOptions) : RealTimePayment override fun list( params: RealTimePaymentsTransferListParams, requestOptions: RequestOptions, - ): RealTimePaymentsTransferListPage = + ): RealTimePaymentsTransferListResponse = // get /real_time_payments_transfers withRawResponse().list(params, requestOptions).parse() @@ -153,13 +152,13 @@ internal constructor(private val clientOptions: ClientOptions) : RealTimePayment } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: RealTimePaymentsTransferListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -177,13 +176,6 @@ internal constructor(private val clientOptions: ClientOptions) : RealTimePayment it.validate() } } - .let { - RealTimePaymentsTransferListPage.builder() - .service(RealTimePaymentsTransferServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/RoutingNumberService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/RoutingNumberService.kt index 7510b7104..77ad01114 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/RoutingNumberService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/RoutingNumberService.kt @@ -6,8 +6,8 @@ import com.google.errorprone.annotations.MustBeClosed import com.increase.api.core.ClientOptions import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor -import com.increase.api.models.routingnumbers.RoutingNumberListPage import com.increase.api.models.routingnumbers.RoutingNumberListParams +import com.increase.api.models.routingnumbers.RoutingNumberListResponse import java.util.function.Consumer interface RoutingNumberService { @@ -30,14 +30,14 @@ interface RoutingNumberService { * will always return 0 or 1 entry. In Sandbox, the only valid routing number for this method * is 110000000. */ - fun list(params: RoutingNumberListParams): RoutingNumberListPage = + fun list(params: RoutingNumberListParams): RoutingNumberListResponse = list(params, RequestOptions.none()) /** @see list */ fun list( params: RoutingNumberListParams, requestOptions: RequestOptions = RequestOptions.none(), - ): RoutingNumberListPage + ): RoutingNumberListResponse /** * A view of [RoutingNumberService] that provides access to raw HTTP responses for each method. @@ -58,7 +58,7 @@ interface RoutingNumberService { * [RoutingNumberService.list]. */ @MustBeClosed - fun list(params: RoutingNumberListParams): HttpResponseFor = + fun list(params: RoutingNumberListParams): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @@ -66,6 +66,6 @@ interface RoutingNumberService { fun list( params: RoutingNumberListParams, requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/RoutingNumberServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/RoutingNumberServiceImpl.kt index 5dd9da36c..e0aa7eab0 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/RoutingNumberServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/RoutingNumberServiceImpl.kt @@ -14,9 +14,8 @@ import com.increase.api.core.http.HttpResponse.Handler import com.increase.api.core.http.HttpResponseFor import com.increase.api.core.http.parseable import com.increase.api.core.prepare -import com.increase.api.models.routingnumbers.RoutingNumberListPage -import com.increase.api.models.routingnumbers.RoutingNumberListPageResponse import com.increase.api.models.routingnumbers.RoutingNumberListParams +import com.increase.api.models.routingnumbers.RoutingNumberListResponse import java.util.function.Consumer class RoutingNumberServiceImpl internal constructor(private val clientOptions: ClientOptions) : @@ -34,7 +33,7 @@ class RoutingNumberServiceImpl internal constructor(private val clientOptions: C override fun list( params: RoutingNumberListParams, requestOptions: RequestOptions, - ): RoutingNumberListPage = + ): RoutingNumberListResponse = // get /routing_numbers withRawResponse().list(params, requestOptions).parse() @@ -51,13 +50,13 @@ class RoutingNumberServiceImpl internal constructor(private val clientOptions: C clientOptions.toBuilder().apply(modifier::accept).build() ) - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: RoutingNumberListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -75,13 +74,6 @@ class RoutingNumberServiceImpl internal constructor(private val clientOptions: C it.validate() } } - .let { - RoutingNumberListPage.builder() - .service(RoutingNumberServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/SupplementalDocumentService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/SupplementalDocumentService.kt index c1769312b..4f29f367d 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/SupplementalDocumentService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/SupplementalDocumentService.kt @@ -8,8 +8,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.supplementaldocuments.EntitySupplementalDocument import com.increase.api.models.supplementaldocuments.SupplementalDocumentCreateParams -import com.increase.api.models.supplementaldocuments.SupplementalDocumentListPage import com.increase.api.models.supplementaldocuments.SupplementalDocumentListParams +import com.increase.api.models.supplementaldocuments.SupplementalDocumentListResponse import java.util.function.Consumer interface SupplementalDocumentService { @@ -37,14 +37,14 @@ interface SupplementalDocumentService { ): EntitySupplementalDocument /** List Entity Supplemental Document Submissions */ - fun list(params: SupplementalDocumentListParams): SupplementalDocumentListPage = + fun list(params: SupplementalDocumentListParams): SupplementalDocumentListResponse = list(params, RequestOptions.none()) /** @see list */ fun list( params: SupplementalDocumentListParams, requestOptions: RequestOptions = RequestOptions.none(), - ): SupplementalDocumentListPage + ): SupplementalDocumentListResponse /** * A view of [SupplementalDocumentService] that provides access to raw HTTP responses for each @@ -84,13 +84,13 @@ interface SupplementalDocumentService { @MustBeClosed fun list( params: SupplementalDocumentListParams - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed fun list( params: SupplementalDocumentListParams, requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/SupplementalDocumentServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/SupplementalDocumentServiceImpl.kt index c41832bcc..f9c26b017 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/SupplementalDocumentServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/SupplementalDocumentServiceImpl.kt @@ -17,9 +17,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepare import com.increase.api.models.supplementaldocuments.EntitySupplementalDocument import com.increase.api.models.supplementaldocuments.SupplementalDocumentCreateParams -import com.increase.api.models.supplementaldocuments.SupplementalDocumentListPage -import com.increase.api.models.supplementaldocuments.SupplementalDocumentListPageResponse import com.increase.api.models.supplementaldocuments.SupplementalDocumentListParams +import com.increase.api.models.supplementaldocuments.SupplementalDocumentListResponse import java.util.function.Consumer class SupplementalDocumentServiceImpl @@ -46,7 +45,7 @@ internal constructor(private val clientOptions: ClientOptions) : SupplementalDoc override fun list( params: SupplementalDocumentListParams, requestOptions: RequestOptions, - ): SupplementalDocumentListPage = + ): SupplementalDocumentListResponse = // get /entity_supplemental_documents withRawResponse().list(params, requestOptions).parse() @@ -91,13 +90,13 @@ internal constructor(private val clientOptions: ClientOptions) : SupplementalDoc } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: SupplementalDocumentListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -115,13 +114,6 @@ internal constructor(private val clientOptions: ClientOptions) : SupplementalDoc it.validate() } } - .let { - SupplementalDocumentListPage.builder() - .service(SupplementalDocumentServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/TransactionService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/TransactionService.kt index ebb11aa3c..d81286329 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/TransactionService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/TransactionService.kt @@ -7,8 +7,8 @@ import com.increase.api.core.ClientOptions import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.transactions.Transaction -import com.increase.api.models.transactions.TransactionListPage import com.increase.api.models.transactions.TransactionListParams +import com.increase.api.models.transactions.TransactionListResponse import com.increase.api.models.transactions.TransactionRetrieveParams import java.util.function.Consumer @@ -59,20 +59,21 @@ interface TransactionService { retrieve(transactionId, TransactionRetrieveParams.none(), requestOptions) /** List Transactions */ - fun list(): TransactionListPage = list(TransactionListParams.none()) + fun list(): TransactionListResponse = list(TransactionListParams.none()) /** @see list */ fun list( params: TransactionListParams = TransactionListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): TransactionListPage + ): TransactionListResponse /** @see list */ - fun list(params: TransactionListParams = TransactionListParams.none()): TransactionListPage = - list(params, RequestOptions.none()) + fun list( + params: TransactionListParams = TransactionListParams.none() + ): TransactionListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): TransactionListPage = + fun list(requestOptions: RequestOptions): TransactionListResponse = list(TransactionListParams.none(), requestOptions) /** @@ -138,24 +139,24 @@ interface TransactionService { * [TransactionService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = list(TransactionListParams.none()) + fun list(): HttpResponseFor = list(TransactionListParams.none()) /** @see list */ @MustBeClosed fun list( params: TransactionListParams = TransactionListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: TransactionListParams = TransactionListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(TransactionListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/TransactionServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/TransactionServiceImpl.kt index 38782bb61..c62027991 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/TransactionServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/TransactionServiceImpl.kt @@ -16,9 +16,8 @@ import com.increase.api.core.http.HttpResponseFor import com.increase.api.core.http.parseable import com.increase.api.core.prepare import com.increase.api.models.transactions.Transaction -import com.increase.api.models.transactions.TransactionListPage -import com.increase.api.models.transactions.TransactionListPageResponse import com.increase.api.models.transactions.TransactionListParams +import com.increase.api.models.transactions.TransactionListResponse import com.increase.api.models.transactions.TransactionRetrieveParams import java.util.function.Consumer import kotlin.jvm.optionals.getOrNull @@ -45,7 +44,7 @@ class TransactionServiceImpl internal constructor(private val clientOptions: Cli override fun list( params: TransactionListParams, requestOptions: RequestOptions, - ): TransactionListPage = + ): TransactionListResponse = // get /transactions withRawResponse().list(params, requestOptions).parse() @@ -92,13 +91,13 @@ class TransactionServiceImpl internal constructor(private val clientOptions: Cli } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: TransactionListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -116,13 +115,6 @@ class TransactionServiceImpl internal constructor(private val clientOptions: Cli it.validate() } } - .let { - TransactionListPage.builder() - .service(TransactionServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/WireDrawdownRequestService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/WireDrawdownRequestService.kt index bb519359d..8725fbf27 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/WireDrawdownRequestService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/WireDrawdownRequestService.kt @@ -8,8 +8,8 @@ import com.increase.api.core.RequestOptions import com.increase.api.core.http.HttpResponseFor import com.increase.api.models.wiredrawdownrequests.WireDrawdownRequest import com.increase.api.models.wiredrawdownrequests.WireDrawdownRequestCreateParams -import com.increase.api.models.wiredrawdownrequests.WireDrawdownRequestListPage import com.increase.api.models.wiredrawdownrequests.WireDrawdownRequestListParams +import com.increase.api.models.wiredrawdownrequests.WireDrawdownRequestListResponse import com.increase.api.models.wiredrawdownrequests.WireDrawdownRequestRetrieveParams import java.util.function.Consumer @@ -76,21 +76,21 @@ interface WireDrawdownRequestService { retrieve(wireDrawdownRequestId, WireDrawdownRequestRetrieveParams.none(), requestOptions) /** List Wire Drawdown Requests */ - fun list(): WireDrawdownRequestListPage = list(WireDrawdownRequestListParams.none()) + fun list(): WireDrawdownRequestListResponse = list(WireDrawdownRequestListParams.none()) /** @see list */ fun list( params: WireDrawdownRequestListParams = WireDrawdownRequestListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): WireDrawdownRequestListPage + ): WireDrawdownRequestListResponse /** @see list */ fun list( params: WireDrawdownRequestListParams = WireDrawdownRequestListParams.none() - ): WireDrawdownRequestListPage = list(params, RequestOptions.none()) + ): WireDrawdownRequestListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): WireDrawdownRequestListPage = + fun list(requestOptions: RequestOptions): WireDrawdownRequestListResponse = list(WireDrawdownRequestListParams.none(), requestOptions) /** @@ -181,7 +181,7 @@ interface WireDrawdownRequestService { * as [WireDrawdownRequestService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = + fun list(): HttpResponseFor = list(WireDrawdownRequestListParams.none()) /** @see list */ @@ -189,17 +189,17 @@ interface WireDrawdownRequestService { fun list( params: WireDrawdownRequestListParams = WireDrawdownRequestListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: WireDrawdownRequestListParams = WireDrawdownRequestListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(WireDrawdownRequestListParams.none(), requestOptions) } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/WireDrawdownRequestServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/WireDrawdownRequestServiceImpl.kt index 8de84220c..bb4a7573e 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/WireDrawdownRequestServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/WireDrawdownRequestServiceImpl.kt @@ -18,9 +18,8 @@ import com.increase.api.core.http.parseable import com.increase.api.core.prepare import com.increase.api.models.wiredrawdownrequests.WireDrawdownRequest import com.increase.api.models.wiredrawdownrequests.WireDrawdownRequestCreateParams -import com.increase.api.models.wiredrawdownrequests.WireDrawdownRequestListPage -import com.increase.api.models.wiredrawdownrequests.WireDrawdownRequestListPageResponse import com.increase.api.models.wiredrawdownrequests.WireDrawdownRequestListParams +import com.increase.api.models.wiredrawdownrequests.WireDrawdownRequestListResponse import com.increase.api.models.wiredrawdownrequests.WireDrawdownRequestRetrieveParams import java.util.function.Consumer import kotlin.jvm.optionals.getOrNull @@ -56,7 +55,7 @@ internal constructor(private val clientOptions: ClientOptions) : WireDrawdownReq override fun list( params: WireDrawdownRequestListParams, requestOptions: RequestOptions, - ): WireDrawdownRequestListPage = + ): WireDrawdownRequestListResponse = // get /wire_drawdown_requests withRawResponse().list(params, requestOptions).parse() @@ -131,13 +130,13 @@ internal constructor(private val clientOptions: ClientOptions) : WireDrawdownReq } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: WireDrawdownRequestListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -155,13 +154,6 @@ internal constructor(private val clientOptions: ClientOptions) : WireDrawdownReq it.validate() } } - .let { - WireDrawdownRequestListPage.builder() - .service(WireDrawdownRequestServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/WireTransferService.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/WireTransferService.kt index b5be5d880..37b4ff691 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/WireTransferService.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/WireTransferService.kt @@ -10,8 +10,8 @@ import com.increase.api.models.wiretransfers.WireTransfer import com.increase.api.models.wiretransfers.WireTransferApproveParams import com.increase.api.models.wiretransfers.WireTransferCancelParams import com.increase.api.models.wiretransfers.WireTransferCreateParams -import com.increase.api.models.wiretransfers.WireTransferListPage import com.increase.api.models.wiretransfers.WireTransferListParams +import com.increase.api.models.wiretransfers.WireTransferListResponse import com.increase.api.models.wiretransfers.WireTransferRetrieveParams import java.util.function.Consumer @@ -72,20 +72,21 @@ interface WireTransferService { retrieve(wireTransferId, WireTransferRetrieveParams.none(), requestOptions) /** List Wire Transfers */ - fun list(): WireTransferListPage = list(WireTransferListParams.none()) + fun list(): WireTransferListResponse = list(WireTransferListParams.none()) /** @see list */ fun list( params: WireTransferListParams = WireTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): WireTransferListPage + ): WireTransferListResponse /** @see list */ - fun list(params: WireTransferListParams = WireTransferListParams.none()): WireTransferListPage = - list(params, RequestOptions.none()) + fun list( + params: WireTransferListParams = WireTransferListParams.none() + ): WireTransferListResponse = list(params, RequestOptions.none()) /** @see list */ - fun list(requestOptions: RequestOptions): WireTransferListPage = + fun list(requestOptions: RequestOptions): WireTransferListResponse = list(WireTransferListParams.none(), requestOptions) /** Approve a Wire Transfer */ @@ -230,24 +231,24 @@ interface WireTransferService { * [WireTransferService.list]. */ @MustBeClosed - fun list(): HttpResponseFor = list(WireTransferListParams.none()) + fun list(): HttpResponseFor = list(WireTransferListParams.none()) /** @see list */ @MustBeClosed fun list( params: WireTransferListParams = WireTransferListParams.none(), requestOptions: RequestOptions = RequestOptions.none(), - ): HttpResponseFor + ): HttpResponseFor /** @see list */ @MustBeClosed fun list( params: WireTransferListParams = WireTransferListParams.none() - ): HttpResponseFor = list(params, RequestOptions.none()) + ): HttpResponseFor = list(params, RequestOptions.none()) /** @see list */ @MustBeClosed - fun list(requestOptions: RequestOptions): HttpResponseFor = + fun list(requestOptions: RequestOptions): HttpResponseFor = list(WireTransferListParams.none(), requestOptions) /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/WireTransferServiceImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/WireTransferServiceImpl.kt index 6a4ee137a..949bb9097 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/WireTransferServiceImpl.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/services/blocking/WireTransferServiceImpl.kt @@ -20,9 +20,8 @@ import com.increase.api.models.wiretransfers.WireTransfer import com.increase.api.models.wiretransfers.WireTransferApproveParams import com.increase.api.models.wiretransfers.WireTransferCancelParams import com.increase.api.models.wiretransfers.WireTransferCreateParams -import com.increase.api.models.wiretransfers.WireTransferListPage -import com.increase.api.models.wiretransfers.WireTransferListPageResponse import com.increase.api.models.wiretransfers.WireTransferListParams +import com.increase.api.models.wiretransfers.WireTransferListResponse import com.increase.api.models.wiretransfers.WireTransferRetrieveParams import java.util.function.Consumer import kotlin.jvm.optionals.getOrNull @@ -56,7 +55,7 @@ class WireTransferServiceImpl internal constructor(private val clientOptions: Cl override fun list( params: WireTransferListParams, requestOptions: RequestOptions, - ): WireTransferListPage = + ): WireTransferListResponse = // get /wire_transfers withRawResponse().list(params, requestOptions).parse() @@ -145,13 +144,13 @@ class WireTransferServiceImpl internal constructor(private val clientOptions: Cl } } - private val listHandler: Handler = - jsonHandler(clientOptions.jsonMapper) + private val listHandler: Handler = + jsonHandler(clientOptions.jsonMapper) override fun list( params: WireTransferListParams, requestOptions: RequestOptions, - ): HttpResponseFor { + ): HttpResponseFor { val request = HttpRequest.builder() .method(HttpMethod.GET) @@ -169,13 +168,6 @@ class WireTransferServiceImpl internal constructor(private val clientOptions: Cl it.validate() } } - .let { - WireTransferListPage.builder() - .service(WireTransferServiceImpl(clientOptions)) - .params(params) - .response(it) - .build() - } } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/core/AutoPagerAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/core/AutoPagerAsyncTest.kt deleted file mode 100644 index 564e8cb6c..000000000 --- a/increase-java-core/src/test/kotlin/com/increase/api/core/AutoPagerAsyncTest.kt +++ /dev/null @@ -1,182 +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.Executor -import org.assertj.core.api.Assertions.assertThat -import org.assertj.core.api.Assertions.catchThrowable -import org.junit.jupiter.api.Test -import org.junit.jupiter.api.extension.ExtendWith -import org.mockito.junit.jupiter.MockitoExtension -import org.mockito.kotlin.any -import org.mockito.kotlin.clearInvocations -import org.mockito.kotlin.doAnswer -import org.mockito.kotlin.inOrder -import org.mockito.kotlin.mock -import org.mockito.kotlin.never -import org.mockito.kotlin.spy -import org.mockito.kotlin.times -import org.mockito.kotlin.verify -import org.mockito.kotlin.whenever - -@ExtendWith(MockitoExtension::class) -internal class AutoPagerAsyncTest { - - companion object { - - private val ERROR = RuntimeException("ERROR!") - } - - private class PageAsyncImpl( - private val items: List, - private val hasNext: Boolean = true, - ) : PageAsync { - - val nextPageFuture: CompletableFuture> = CompletableFuture() - - override fun hasNextPage(): Boolean = hasNext - - override fun nextPage(): CompletableFuture> = nextPageFuture - - override fun items(): List = items - } - - private val executor = - spy { - doAnswer { invocation -> invocation.getArgument(0).run() } - .whenever(it) - .execute(any()) - } - private val handler = mock>() - - @Test - fun subscribe_whenAlreadySubscribed_throws() { - val autoPagerAsync = AutoPagerAsync.from(PageAsyncImpl(emptyList()), executor) - autoPagerAsync.subscribe {} - clearInvocations(executor) - - val throwable = catchThrowable { autoPagerAsync.subscribe {} } - - assertThat(throwable).isInstanceOf(IllegalStateException::class.java) - assertThat(throwable).hasMessage("Cannot subscribe more than once") - verify(executor, never()).execute(any()) - } - - @Test - fun subscribe_whenClosed_throws() { - val autoPagerAsync = AutoPagerAsync.from(PageAsyncImpl(emptyList()), executor) - autoPagerAsync.close() - - val throwable = catchThrowable { autoPagerAsync.subscribe {} } - - assertThat(throwable).isInstanceOf(IllegalStateException::class.java) - assertThat(throwable).hasMessage("Cannot subscribe after the response is closed") - verify(executor, never()).execute(any()) - } - - @Test - fun subscribe_whenFirstPageNonEmpty_runsHandler() { - val page = PageAsyncImpl(listOf("item1", "item2", "item3"), hasNext = false) - val autoPagerAsync = AutoPagerAsync.from(page, executor) - - autoPagerAsync.subscribe(handler) - - inOrder(executor, handler) { - verify(executor, times(1)).execute(any()) - verify(handler, times(1)).onNext("item1") - verify(handler, times(1)).onNext("item2") - verify(handler, times(1)).onNext("item3") - verify(handler, times(1)).onComplete(Optional.empty()) - } - } - - @Test - fun subscribe_whenFutureCompletesAfterClose_doesNothing() { - val page = PageAsyncImpl(listOf("page1")) - val autoPagerAsync = AutoPagerAsync.from(page, executor) - autoPagerAsync.subscribe(handler) - autoPagerAsync.close() - - page.nextPageFuture.complete(PageAsyncImpl(listOf("page2"))) - - verify(handler, times(1)).onNext("page1") - verify(handler, never()).onNext("page2") - verify(handler, times(1)).onComplete(Optional.empty()) - verify(executor, times(1)).execute(any()) - } - - @Test - fun subscribe_whenFutureErrors_callsOnComplete() { - val page = PageAsyncImpl(emptyList()) - val autoPagerAsync = AutoPagerAsync.from(page, executor) - autoPagerAsync.subscribe(handler) - - page.nextPageFuture.completeExceptionally(ERROR) - - verify(executor, times(1)).execute(any()) - verify(handler, never()).onNext(any()) - verify(handler, times(1)).onComplete(Optional.of(ERROR)) - } - - @Test - fun subscribe_whenFutureCompletes_runsHandler() { - val page = PageAsyncImpl(listOf("chunk1", "chunk2")) - val autoPagerAsync = AutoPagerAsync.from(page, executor) - - autoPagerAsync.subscribe(handler) - - verify(handler, never()).onComplete(any()) - inOrder(executor, handler) { - verify(executor, times(1)).execute(any()) - verify(handler, times(1)).onNext("chunk1") - verify(handler, times(1)).onNext("chunk2") - } - clearInvocations(executor, handler) - - page.nextPageFuture.complete(PageAsyncImpl(listOf("chunk3", "chunk4"), hasNext = false)) - - verify(executor, never()).execute(any()) - inOrder(handler) { - verify(handler, times(1)).onNext("chunk3") - verify(handler, times(1)).onNext("chunk4") - verify(handler, times(1)).onComplete(Optional.empty()) - } - } - - @Test - fun onCompleteFuture_whenNextPageFutureNotCompleted_onCompleteFutureNotCompleted() { - val page = PageAsyncImpl(listOf("chunk1", "chunk2")) - val autoPagerAsync = AutoPagerAsync.from(page, executor) - autoPagerAsync.subscribe {} - - val onCompletableFuture = autoPagerAsync.onCompleteFuture() - - assertThat(onCompletableFuture).isNotCompleted - } - - @Test - fun onCompleteFuture_whenNextPageFutureErrors_onCompleteFutureCompletedExceptionally() { - val page = PageAsyncImpl(listOf("chunk1", "chunk2")) - val autoPagerAsync = AutoPagerAsync.from(page, executor) - autoPagerAsync.subscribe {} - page.nextPageFuture.completeExceptionally(ERROR) - - val onCompletableFuture = autoPagerAsync.onCompleteFuture() - - assertThat(onCompletableFuture).isCompletedExceptionally - } - - @Test - fun onCompleteFuture_whenNoNextPage_onCompleteFutureCompleted() { - val page = PageAsyncImpl(listOf("chunk1", "chunk2"), hasNext = false) - val autoPagerAsync = AutoPagerAsync.from(page, executor) - autoPagerAsync.subscribe {} - - val onCompletableFuture = autoPagerAsync.onCompleteFuture() - - assertThat(onCompletableFuture).isCompleted - } -} diff --git a/increase-java-core/src/test/kotlin/com/increase/api/core/AutoPagerTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/core/AutoPagerTest.kt deleted file mode 100644 index dff7c4091..000000000 --- a/increase-java-core/src/test/kotlin/com/increase/api/core/AutoPagerTest.kt +++ /dev/null @@ -1,41 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.core - -import org.assertj.core.api.Assertions.assertThat -import org.junit.jupiter.api.Test - -internal class AutoPagerTest { - - private class PageImpl( - private val items: List, - private val nextPage: Page? = null, - ) : Page { - - override fun hasNextPage(): Boolean = nextPage != null - - override fun nextPage(): Page = nextPage!! - - override fun items(): List = items - } - - @Test - fun iterator() { - val firstPage = - PageImpl(listOf("chunk1", "chunk2"), nextPage = PageImpl(listOf("chunk3", "chunk4"))) - - val autoPager = AutoPager.from(firstPage) - - assertThat(autoPager).containsExactly("chunk1", "chunk2", "chunk3", "chunk4") - } - - @Test - fun stream() { - val firstPage = - PageImpl(listOf("chunk1", "chunk2"), nextPage = PageImpl(listOf("chunk3", "chunk4"))) - - val autoPager = AutoPager.from(firstPage) - - assertThat(autoPager.stream()).containsExactly("chunk1", "chunk2", "chunk3", "chunk4") - } -} diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/accountnumbers/AccountNumberListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/accountnumbers/AccountNumberListResponseTest.kt similarity index 85% rename from increase-java-core/src/test/kotlin/com/increase/api/models/accountnumbers/AccountNumberListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/accountnumbers/AccountNumberListResponseTest.kt index b01014c83..72b137cfb 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/accountnumbers/AccountNumberListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/accountnumbers/AccountNumberListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class AccountNumberListPageResponseTest { +internal class AccountNumberListResponseTest { @Test fun create() { - val accountNumberListPageResponse = - AccountNumberListPageResponse.builder() + val accountNumberListResponse = + AccountNumberListResponse.builder() .addData( AccountNumber.builder() .id("account_number_v18nkfqm6afpsrvy82b2") @@ -40,7 +40,7 @@ internal class AccountNumberListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(accountNumberListPageResponse.data()) + assertThat(accountNumberListResponse.data()) .containsExactly( AccountNumber.builder() .id("account_number_v18nkfqm6afpsrvy82b2") @@ -64,14 +64,14 @@ internal class AccountNumberListPageResponseTest { .type(AccountNumber.Type.ACCOUNT_NUMBER) .build() ) - assertThat(accountNumberListPageResponse.nextCursor()).contains("v57w5d") + assertThat(accountNumberListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val accountNumberListPageResponse = - AccountNumberListPageResponse.builder() + val accountNumberListResponse = + AccountNumberListResponse.builder() .addData( AccountNumber.builder() .id("account_number_v18nkfqm6afpsrvy82b2") @@ -98,13 +98,12 @@ internal class AccountNumberListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedAccountNumberListPageResponse = + val roundtrippedAccountNumberListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(accountNumberListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(accountNumberListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedAccountNumberListPageResponse) - .isEqualTo(accountNumberListPageResponse) + assertThat(roundtrippedAccountNumberListResponse).isEqualTo(accountNumberListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/accounts/AccountListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/accounts/AccountListResponseTest.kt similarity index 85% rename from increase-java-core/src/test/kotlin/com/increase/api/models/accounts/AccountListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/accounts/AccountListResponseTest.kt index a9a2fab89..49008d3bb 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/accounts/AccountListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/accounts/AccountListResponseTest.kt @@ -9,12 +9,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class AccountListPageResponseTest { +internal class AccountListResponseTest { @Test fun create() { - val accountListPageResponse = - AccountListPageResponse.builder() + val accountListResponse = + AccountListResponse.builder() .addData( Account.builder() .id("account_in71c4amph0vgo2qllky") @@ -38,7 +38,7 @@ internal class AccountListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(accountListPageResponse.data()) + assertThat(accountListResponse.data()) .containsExactly( Account.builder() .id("account_in71c4amph0vgo2qllky") @@ -59,14 +59,14 @@ internal class AccountListPageResponseTest { .type(Account.Type.ACCOUNT) .build() ) - assertThat(accountListPageResponse.nextCursor()).contains("v57w5d") + assertThat(accountListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val accountListPageResponse = - AccountListPageResponse.builder() + val accountListResponse = + AccountListResponse.builder() .addData( Account.builder() .id("account_in71c4amph0vgo2qllky") @@ -90,12 +90,12 @@ internal class AccountListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedAccountListPageResponse = + val roundtrippedAccountListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(accountListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(accountListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedAccountListPageResponse).isEqualTo(accountListPageResponse) + assertThat(roundtrippedAccountListResponse).isEqualTo(accountListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/accountstatements/AccountStatementListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/accountstatements/AccountStatementListResponseTest.kt similarity index 81% rename from increase-java-core/src/test/kotlin/com/increase/api/models/accountstatements/AccountStatementListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/accountstatements/AccountStatementListResponseTest.kt index 0db8780d7..66090c014 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/accountstatements/AccountStatementListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/accountstatements/AccountStatementListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class AccountStatementListPageResponseTest { +internal class AccountStatementListResponseTest { @Test fun create() { - val accountStatementListPageResponse = - AccountStatementListPageResponse.builder() + val accountStatementListResponse = + AccountStatementListResponse.builder() .addData( AccountStatement.builder() .id("account_statement_lkc03a4skm2k7f38vj15") @@ -30,7 +30,7 @@ internal class AccountStatementListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(accountStatementListPageResponse.data()) + assertThat(accountStatementListResponse.data()) .containsExactly( AccountStatement.builder() .id("account_statement_lkc03a4skm2k7f38vj15") @@ -44,14 +44,14 @@ internal class AccountStatementListPageResponseTest { .type(AccountStatement.Type.ACCOUNT_STATEMENT) .build() ) - assertThat(accountStatementListPageResponse.nextCursor()).contains("v57w5d") + assertThat(accountStatementListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val accountStatementListPageResponse = - AccountStatementListPageResponse.builder() + val accountStatementListResponse = + AccountStatementListResponse.builder() .addData( AccountStatement.builder() .id("account_statement_lkc03a4skm2k7f38vj15") @@ -68,13 +68,12 @@ internal class AccountStatementListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedAccountStatementListPageResponse = + val roundtrippedAccountStatementListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(accountStatementListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(accountStatementListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedAccountStatementListPageResponse) - .isEqualTo(accountStatementListPageResponse) + assertThat(roundtrippedAccountStatementListResponse).isEqualTo(accountStatementListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/accounttransfers/AccountTransferListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/accounttransfers/AccountTransferListResponseTest.kt similarity index 92% rename from increase-java-core/src/test/kotlin/com/increase/api/models/accounttransfers/AccountTransferListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/accounttransfers/AccountTransferListResponseTest.kt index 31b8858cf..01c1ea64f 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/accounttransfers/AccountTransferListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/accounttransfers/AccountTransferListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class AccountTransferListPageResponseTest { +internal class AccountTransferListResponseTest { @Test fun create() { - val accountTransferListPageResponse = - AccountTransferListPageResponse.builder() + val accountTransferListResponse = + AccountTransferListResponse.builder() .addData( AccountTransfer.builder() .id("account_transfer_7k9qe1ysdgqztnt63l7n") @@ -66,7 +66,7 @@ internal class AccountTransferListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(accountTransferListPageResponse.data()) + assertThat(accountTransferListResponse.data()) .containsExactly( AccountTransfer.builder() .id("account_transfer_7k9qe1ysdgqztnt63l7n") @@ -116,14 +116,14 @@ internal class AccountTransferListPageResponseTest { .type(AccountTransfer.Type.ACCOUNT_TRANSFER) .build() ) - assertThat(accountTransferListPageResponse.nextCursor()).contains("v57w5d") + assertThat(accountTransferListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val accountTransferListPageResponse = - AccountTransferListPageResponse.builder() + val accountTransferListResponse = + AccountTransferListResponse.builder() .addData( AccountTransfer.builder() .id("account_transfer_7k9qe1ysdgqztnt63l7n") @@ -176,13 +176,12 @@ internal class AccountTransferListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedAccountTransferListPageResponse = + val roundtrippedAccountTransferListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(accountTransferListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(accountTransferListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedAccountTransferListPageResponse) - .isEqualTo(accountTransferListPageResponse) + assertThat(roundtrippedAccountTransferListResponse).isEqualTo(accountTransferListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationListResponseTest.kt similarity index 91% rename from increase-java-core/src/test/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationListResponseTest.kt index 42deb3c4a..f578c9a33 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class AchPrenotificationListPageResponseTest { +internal class AchPrenotificationListResponseTest { @Test fun create() { - val achPrenotificationListPageResponse = - AchPrenotificationListPageResponse.builder() + val achPrenotificationListResponse = + AchPrenotificationListResponse.builder() .addData( AchPrenotification.builder() .id("ach_prenotification_ubjf9qqsxl3obbcn1u34") @@ -58,7 +58,7 @@ internal class AchPrenotificationListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(achPrenotificationListPageResponse.data()) + assertThat(achPrenotificationListResponse.data()) .containsExactly( AchPrenotification.builder() .id("ach_prenotification_ubjf9qqsxl3obbcn1u34") @@ -100,14 +100,14 @@ internal class AchPrenotificationListPageResponseTest { .type(AchPrenotification.Type.ACH_PRENOTIFICATION) .build() ) - assertThat(achPrenotificationListPageResponse.nextCursor()).contains("v57w5d") + assertThat(achPrenotificationListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val achPrenotificationListPageResponse = - AchPrenotificationListPageResponse.builder() + val achPrenotificationListResponse = + AchPrenotificationListResponse.builder() .addData( AchPrenotification.builder() .id("ach_prenotification_ubjf9qqsxl3obbcn1u34") @@ -152,13 +152,13 @@ internal class AchPrenotificationListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedAchPrenotificationListPageResponse = + val roundtrippedAchPrenotificationListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(achPrenotificationListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(achPrenotificationListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedAchPrenotificationListPageResponse) - .isEqualTo(achPrenotificationListPageResponse) + assertThat(roundtrippedAchPrenotificationListResponse) + .isEqualTo(achPrenotificationListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/achtransfers/AchTransferListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/achtransfers/AchTransferListResponseTest.kt similarity index 97% rename from increase-java-core/src/test/kotlin/com/increase/api/models/achtransfers/AchTransferListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/achtransfers/AchTransferListResponseTest.kt index e755df7b5..cca763820 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/achtransfers/AchTransferListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/achtransfers/AchTransferListResponseTest.kt @@ -9,12 +9,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class AchTransferListPageResponseTest { +internal class AchTransferListResponseTest { @Test fun create() { - val achTransferListPageResponse = - AchTransferListPageResponse.builder() + val achTransferListResponse = + AchTransferListResponse.builder() .addData( AchTransfer.builder() .id("ach_transfer_uoxatyh3lt5evrsdvo7q") @@ -177,7 +177,7 @@ internal class AchTransferListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(achTransferListPageResponse.data()) + assertThat(achTransferListResponse.data()) .containsExactly( AchTransfer.builder() .id("ach_transfer_uoxatyh3lt5evrsdvo7q") @@ -331,14 +331,14 @@ internal class AchTransferListPageResponseTest { .type(AchTransfer.Type.ACH_TRANSFER) .build() ) - assertThat(achTransferListPageResponse.nextCursor()).contains("v57w5d") + assertThat(achTransferListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val achTransferListPageResponse = - AchTransferListPageResponse.builder() + val achTransferListResponse = + AchTransferListResponse.builder() .addData( AchTransfer.builder() .id("ach_transfer_uoxatyh3lt5evrsdvo7q") @@ -501,12 +501,12 @@ internal class AchTransferListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedAchTransferListPageResponse = + val roundtrippedAchTransferListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(achTransferListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(achTransferListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedAchTransferListPageResponse).isEqualTo(achTransferListPageResponse) + assertThat(roundtrippedAchTransferListResponse).isEqualTo(achTransferListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/bookkeepingaccounts/BookkeepingAccountListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/bookkeepingaccounts/BookkeepingAccountListResponseTest.kt similarity index 77% rename from increase-java-core/src/test/kotlin/com/increase/api/models/bookkeepingaccounts/BookkeepingAccountListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/bookkeepingaccounts/BookkeepingAccountListResponseTest.kt index c9a4ec90a..65cfc430e 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/bookkeepingaccounts/BookkeepingAccountListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/bookkeepingaccounts/BookkeepingAccountListResponseTest.kt @@ -7,12 +7,12 @@ import com.increase.api.core.jsonMapper import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class BookkeepingAccountListPageResponseTest { +internal class BookkeepingAccountListResponseTest { @Test fun create() { - val bookkeepingAccountListPageResponse = - BookkeepingAccountListPageResponse.builder() + val bookkeepingAccountListResponse = + BookkeepingAccountListResponse.builder() .addData( BookkeepingAccount.builder() .id("bookkeeping_account_e37p1f1iuocw5intf35v") @@ -27,7 +27,7 @@ internal class BookkeepingAccountListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(bookkeepingAccountListPageResponse.data()) + assertThat(bookkeepingAccountListResponse.data()) .containsExactly( BookkeepingAccount.builder() .id("bookkeeping_account_e37p1f1iuocw5intf35v") @@ -39,14 +39,14 @@ internal class BookkeepingAccountListPageResponseTest { .type(BookkeepingAccount.Type.BOOKKEEPING_ACCOUNT) .build() ) - assertThat(bookkeepingAccountListPageResponse.nextCursor()).contains("v57w5d") + assertThat(bookkeepingAccountListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val bookkeepingAccountListPageResponse = - BookkeepingAccountListPageResponse.builder() + val bookkeepingAccountListResponse = + BookkeepingAccountListResponse.builder() .addData( BookkeepingAccount.builder() .id("bookkeeping_account_e37p1f1iuocw5intf35v") @@ -61,13 +61,13 @@ internal class BookkeepingAccountListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedBookkeepingAccountListPageResponse = + val roundtrippedBookkeepingAccountListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(bookkeepingAccountListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(bookkeepingAccountListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedBookkeepingAccountListPageResponse) - .isEqualTo(bookkeepingAccountListPageResponse) + assertThat(roundtrippedBookkeepingAccountListResponse) + .isEqualTo(bookkeepingAccountListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/bookkeepingentries/BookkeepingEntryListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/bookkeepingentries/BookkeepingEntryListResponseTest.kt similarity index 77% rename from increase-java-core/src/test/kotlin/com/increase/api/models/bookkeepingentries/BookkeepingEntryListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/bookkeepingentries/BookkeepingEntryListResponseTest.kt index 78015ad43..a8a9223e7 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/bookkeepingentries/BookkeepingEntryListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/bookkeepingentries/BookkeepingEntryListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class BookkeepingEntryListPageResponseTest { +internal class BookkeepingEntryListResponseTest { @Test fun create() { - val bookkeepingEntryListPageResponse = - BookkeepingEntryListPageResponse.builder() + val bookkeepingEntryListResponse = + BookkeepingEntryListResponse.builder() .addData( BookkeepingEntry.builder() .id("bookkeeping_entry_ctjpajsj3ks2blx10375") @@ -27,7 +27,7 @@ internal class BookkeepingEntryListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(bookkeepingEntryListPageResponse.data()) + assertThat(bookkeepingEntryListResponse.data()) .containsExactly( BookkeepingEntry.builder() .id("bookkeeping_entry_ctjpajsj3ks2blx10375") @@ -38,14 +38,14 @@ internal class BookkeepingEntryListPageResponseTest { .type(BookkeepingEntry.Type.BOOKKEEPING_ENTRY) .build() ) - assertThat(bookkeepingEntryListPageResponse.nextCursor()).contains("v57w5d") + assertThat(bookkeepingEntryListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val bookkeepingEntryListPageResponse = - BookkeepingEntryListPageResponse.builder() + val bookkeepingEntryListResponse = + BookkeepingEntryListResponse.builder() .addData( BookkeepingEntry.builder() .id("bookkeeping_entry_ctjpajsj3ks2blx10375") @@ -59,13 +59,12 @@ internal class BookkeepingEntryListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedBookkeepingEntryListPageResponse = + val roundtrippedBookkeepingEntryListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(bookkeepingEntryListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(bookkeepingEntryListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedBookkeepingEntryListPageResponse) - .isEqualTo(bookkeepingEntryListPageResponse) + assertThat(roundtrippedBookkeepingEntryListResponse).isEqualTo(bookkeepingEntryListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/bookkeepingentrysets/BookkeepingEntrySetListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/bookkeepingentrysets/BookkeepingEntrySetListResponseTest.kt similarity index 86% rename from increase-java-core/src/test/kotlin/com/increase/api/models/bookkeepingentrysets/BookkeepingEntrySetListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/bookkeepingentrysets/BookkeepingEntrySetListResponseTest.kt index 2aab9fd20..bf7d2237c 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/bookkeepingentrysets/BookkeepingEntrySetListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/bookkeepingentrysets/BookkeepingEntrySetListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class BookkeepingEntrySetListPageResponseTest { +internal class BookkeepingEntrySetListResponseTest { @Test fun create() { - val bookkeepingEntrySetListPageResponse = - BookkeepingEntrySetListPageResponse.builder() + val bookkeepingEntrySetListResponse = + BookkeepingEntrySetListResponse.builder() .addData( BookkeepingEntrySet.builder() .id("bookkeeping_entry_set_n80c6wr2p8gtc6p4ingf") @@ -41,7 +41,7 @@ internal class BookkeepingEntrySetListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(bookkeepingEntrySetListPageResponse.data()) + assertThat(bookkeepingEntrySetListResponse.data()) .containsExactly( BookkeepingEntrySet.builder() .id("bookkeeping_entry_set_n80c6wr2p8gtc6p4ingf") @@ -66,14 +66,14 @@ internal class BookkeepingEntrySetListPageResponseTest { .type(BookkeepingEntrySet.Type.BOOKKEEPING_ENTRY_SET) .build() ) - assertThat(bookkeepingEntrySetListPageResponse.nextCursor()).contains("v57w5d") + assertThat(bookkeepingEntrySetListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val bookkeepingEntrySetListPageResponse = - BookkeepingEntrySetListPageResponse.builder() + val bookkeepingEntrySetListResponse = + BookkeepingEntrySetListResponse.builder() .addData( BookkeepingEntrySet.builder() .id("bookkeeping_entry_set_n80c6wr2p8gtc6p4ingf") @@ -101,13 +101,13 @@ internal class BookkeepingEntrySetListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedBookkeepingEntrySetListPageResponse = + val roundtrippedBookkeepingEntrySetListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(bookkeepingEntrySetListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(bookkeepingEntrySetListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedBookkeepingEntrySetListPageResponse) - .isEqualTo(bookkeepingEntrySetListPageResponse) + assertThat(roundtrippedBookkeepingEntrySetListResponse) + .isEqualTo(bookkeepingEntrySetListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/carddisputes/CardDisputeListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/carddisputes/CardDisputeListResponseTest.kt similarity index 99% rename from increase-java-core/src/test/kotlin/com/increase/api/models/carddisputes/CardDisputeListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/carddisputes/CardDisputeListResponseTest.kt index 9b87a2a8c..40bb24081 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/carddisputes/CardDisputeListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/carddisputes/CardDisputeListResponseTest.kt @@ -9,12 +9,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class CardDisputeListPageResponseTest { +internal class CardDisputeListResponseTest { @Test fun create() { - val cardDisputeListPageResponse = - CardDisputeListPageResponse.builder() + val cardDisputeListResponse = + CardDisputeListResponse.builder() .addData( CardDispute.builder() .id("card_dispute_h9sc95nbl1cgltpp7men") @@ -1397,7 +1397,7 @@ internal class CardDisputeListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(cardDisputeListPageResponse.data()) + assertThat(cardDisputeListResponse.data()) .containsExactly( CardDispute.builder() .id("card_dispute_h9sc95nbl1cgltpp7men") @@ -2684,14 +2684,14 @@ internal class CardDisputeListPageResponseTest { ) .build() ) - assertThat(cardDisputeListPageResponse.nextCursor()).contains("v57w5d") + assertThat(cardDisputeListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val cardDisputeListPageResponse = - CardDisputeListPageResponse.builder() + val cardDisputeListResponse = + CardDisputeListResponse.builder() .addData( CardDispute.builder() .id("card_dispute_h9sc95nbl1cgltpp7men") @@ -4074,12 +4074,12 @@ internal class CardDisputeListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedCardDisputeListPageResponse = + val roundtrippedCardDisputeListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(cardDisputeListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(cardDisputeListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedCardDisputeListPageResponse).isEqualTo(cardDisputeListPageResponse) + assertThat(roundtrippedCardDisputeListResponse).isEqualTo(cardDisputeListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentListResponseTest.kt similarity index 99% rename from increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentListResponseTest.kt index 669bb9398..673750c87 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentListResponseTest.kt @@ -9,12 +9,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class CardPaymentListPageResponseTest { +internal class CardPaymentListResponseTest { @Test fun create() { - val cardPaymentListPageResponse = - CardPaymentListPageResponse.builder() + val cardPaymentListResponse = + CardPaymentListResponse.builder() .addData( CardPayment.builder() .id("card_payment_nd3k2kacrqjli8482ave") @@ -7020,7 +7020,7 @@ internal class CardPaymentListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(cardPaymentListPageResponse.data()) + assertThat(cardPaymentListResponse.data()) .containsExactly( CardPayment.builder() .id("card_payment_nd3k2kacrqjli8482ave") @@ -13675,14 +13675,14 @@ internal class CardPaymentListPageResponseTest { .type(CardPayment.Type.CARD_PAYMENT) .build() ) - assertThat(cardPaymentListPageResponse.nextCursor()).contains("v57w5d") + assertThat(cardPaymentListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val cardPaymentListPageResponse = - CardPaymentListPageResponse.builder() + val cardPaymentListResponse = + CardPaymentListResponse.builder() .addData( CardPayment.builder() .id("card_payment_nd3k2kacrqjli8482ave") @@ -20688,12 +20688,12 @@ internal class CardPaymentListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedCardPaymentListPageResponse = + val roundtrippedCardPaymentListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(cardPaymentListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(cardPaymentListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedCardPaymentListPageResponse).isEqualTo(cardPaymentListPageResponse) + assertThat(roundtrippedCardPaymentListResponse).isEqualTo(cardPaymentListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/cardpurchasesupplements/CardPurchaseSupplementListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/cardpurchasesupplements/CardPurchaseSupplementListResponseTest.kt similarity index 92% rename from increase-java-core/src/test/kotlin/com/increase/api/models/cardpurchasesupplements/CardPurchaseSupplementListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/cardpurchasesupplements/CardPurchaseSupplementListResponseTest.kt index cac7459c1..608009b20 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/cardpurchasesupplements/CardPurchaseSupplementListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/cardpurchasesupplements/CardPurchaseSupplementListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.LocalDate import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class CardPurchaseSupplementListPageResponseTest { +internal class CardPurchaseSupplementListResponseTest { @Test fun create() { - val cardPurchaseSupplementListPageResponse = - CardPurchaseSupplementListPageResponse.builder() + val cardPurchaseSupplementListResponse = + CardPurchaseSupplementListResponse.builder() .addData( CardPurchaseSupplement.builder() .id("card_purchase_supplement_ijuc45iym4jchnh2sfk3") @@ -70,7 +70,7 @@ internal class CardPurchaseSupplementListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(cardPurchaseSupplementListPageResponse.data()) + assertThat(cardPurchaseSupplementListResponse.data()) .containsExactly( CardPurchaseSupplement.builder() .id("card_purchase_supplement_ijuc45iym4jchnh2sfk3") @@ -120,14 +120,14 @@ internal class CardPurchaseSupplementListPageResponseTest { .type(CardPurchaseSupplement.Type.CARD_PURCHASE_SUPPLEMENT) .build() ) - assertThat(cardPurchaseSupplementListPageResponse.nextCursor()).contains("v57w5d") + assertThat(cardPurchaseSupplementListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val cardPurchaseSupplementListPageResponse = - CardPurchaseSupplementListPageResponse.builder() + val cardPurchaseSupplementListResponse = + CardPurchaseSupplementListResponse.builder() .addData( CardPurchaseSupplement.builder() .id("card_purchase_supplement_ijuc45iym4jchnh2sfk3") @@ -184,13 +184,13 @@ internal class CardPurchaseSupplementListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedCardPurchaseSupplementListPageResponse = + val roundtrippedCardPurchaseSupplementListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(cardPurchaseSupplementListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(cardPurchaseSupplementListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedCardPurchaseSupplementListPageResponse) - .isEqualTo(cardPurchaseSupplementListPageResponse) + assertThat(roundtrippedCardPurchaseSupplementListResponse) + .isEqualTo(cardPurchaseSupplementListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferListResponseTest.kt similarity index 95% rename from increase-java-core/src/test/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferListResponseTest.kt index 2c9928d63..24f07a4bd 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class CardPushTransferListPageResponseTest { +internal class CardPushTransferListResponseTest { @Test fun create() { - val cardPushTransferListPageResponse = - CardPushTransferListPageResponse.builder() + val cardPushTransferListResponse = + CardPushTransferListResponse.builder() .addData( CardPushTransfer.builder() .id("outbound_card_push_transfer_e0z9rdpamraczh4tvwye") @@ -108,7 +108,7 @@ internal class CardPushTransferListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(cardPushTransferListPageResponse.data()) + assertThat(cardPushTransferListResponse.data()) .containsExactly( CardPushTransfer.builder() .id("outbound_card_push_transfer_e0z9rdpamraczh4tvwye") @@ -200,14 +200,14 @@ internal class CardPushTransferListPageResponseTest { .type(CardPushTransfer.Type.CARD_PUSH_TRANSFER) .build() ) - assertThat(cardPushTransferListPageResponse.nextCursor()).contains("v57w5d") + assertThat(cardPushTransferListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val cardPushTransferListPageResponse = - CardPushTransferListPageResponse.builder() + val cardPushTransferListResponse = + CardPushTransferListResponse.builder() .addData( CardPushTransfer.builder() .id("outbound_card_push_transfer_e0z9rdpamraczh4tvwye") @@ -302,13 +302,12 @@ internal class CardPushTransferListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedCardPushTransferListPageResponse = + val roundtrippedCardPushTransferListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(cardPushTransferListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(cardPushTransferListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedCardPushTransferListPageResponse) - .isEqualTo(cardPushTransferListPageResponse) + assertThat(roundtrippedCardPushTransferListResponse).isEqualTo(cardPushTransferListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/cards/CardListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/cards/CardListResponseTest.kt similarity index 89% rename from increase-java-core/src/test/kotlin/com/increase/api/models/cards/CardListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/cards/CardListResponseTest.kt index 29223dc47..a99466abf 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/cards/CardListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/cards/CardListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class CardListPageResponseTest { +internal class CardListResponseTest { @Test fun create() { - val cardListPageResponse = - CardListPageResponse.builder() + val cardListResponse = + CardListResponse.builder() .addData( Card.builder() .id("card_oubs0hwk5rn6knuecxg2") @@ -48,7 +48,7 @@ internal class CardListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(cardListPageResponse.data()) + assertThat(cardListResponse.data()) .containsExactly( Card.builder() .id("card_oubs0hwk5rn6knuecxg2") @@ -80,14 +80,14 @@ internal class CardListPageResponseTest { .type(Card.Type.CARD) .build() ) - assertThat(cardListPageResponse.nextCursor()).contains("v57w5d") + assertThat(cardListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val cardListPageResponse = - CardListPageResponse.builder() + val cardListResponse = + CardListResponse.builder() .addData( Card.builder() .id("card_oubs0hwk5rn6knuecxg2") @@ -122,12 +122,12 @@ internal class CardListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedCardListPageResponse = + val roundtrippedCardListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(cardListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(cardListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedCardListPageResponse).isEqualTo(cardListPageResponse) + assertThat(roundtrippedCardListResponse).isEqualTo(cardListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/cardtokens/CardTokenListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/cardtokens/CardTokenListResponseTest.kt similarity index 77% rename from increase-java-core/src/test/kotlin/com/increase/api/models/cardtokens/CardTokenListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/cardtokens/CardTokenListResponseTest.kt index c1bfd4133..5f8efe0fc 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/cardtokens/CardTokenListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/cardtokens/CardTokenListResponseTest.kt @@ -9,12 +9,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class CardTokenListPageResponseTest { +internal class CardTokenListResponseTest { @Test fun create() { - val cardTokenListPageResponse = - CardTokenListPageResponse.builder() + val cardTokenListResponse = + CardTokenListResponse.builder() .addData( CardToken.builder() .id("outbound_card_token_zlt0ml6youq3q7vcdlg0") @@ -29,7 +29,7 @@ internal class CardTokenListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(cardTokenListPageResponse.data()) + assertThat(cardTokenListResponse.data()) .containsExactly( CardToken.builder() .id("outbound_card_token_zlt0ml6youq3q7vcdlg0") @@ -41,14 +41,14 @@ internal class CardTokenListPageResponseTest { .type(CardToken.Type.CARD_TOKEN) .build() ) - assertThat(cardTokenListPageResponse.nextCursor()).contains("v57w5d") + assertThat(cardTokenListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val cardTokenListPageResponse = - CardTokenListPageResponse.builder() + val cardTokenListResponse = + CardTokenListResponse.builder() .addData( CardToken.builder() .id("outbound_card_token_zlt0ml6youq3q7vcdlg0") @@ -63,12 +63,12 @@ internal class CardTokenListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedCardTokenListPageResponse = + val roundtrippedCardTokenListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(cardTokenListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(cardTokenListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedCardTokenListPageResponse).isEqualTo(cardTokenListPageResponse) + assertThat(roundtrippedCardTokenListResponse).isEqualTo(cardTokenListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/cardvalidations/CardValidationListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/cardvalidations/CardValidationListResponseTest.kt similarity index 95% rename from increase-java-core/src/test/kotlin/com/increase/api/models/cardvalidations/CardValidationListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/cardvalidations/CardValidationListResponseTest.kt index 7c2f9b5e9..e30c19695 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/cardvalidations/CardValidationListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/cardvalidations/CardValidationListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class CardValidationListPageResponseTest { +internal class CardValidationListResponseTest { @Test fun create() { - val cardValidationListPageResponse = - CardValidationListPageResponse.builder() + val cardValidationListResponse = + CardValidationListResponse.builder() .addData( CardValidation.builder() .id("outbound_card_validation_qqlzagpc6v1x2gcdhe24") @@ -89,7 +89,7 @@ internal class CardValidationListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(cardValidationListPageResponse.data()) + assertThat(cardValidationListResponse.data()) .containsExactly( CardValidation.builder() .id("outbound_card_validation_qqlzagpc6v1x2gcdhe24") @@ -162,14 +162,14 @@ internal class CardValidationListPageResponseTest { .type(CardValidation.Type.CARD_VALIDATION) .build() ) - assertThat(cardValidationListPageResponse.nextCursor()).contains("v57w5d") + assertThat(cardValidationListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val cardValidationListPageResponse = - CardValidationListPageResponse.builder() + val cardValidationListResponse = + CardValidationListResponse.builder() .addData( CardValidation.builder() .id("outbound_card_validation_qqlzagpc6v1x2gcdhe24") @@ -245,13 +245,12 @@ internal class CardValidationListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedCardValidationListPageResponse = + val roundtrippedCardValidationListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(cardValidationListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(cardValidationListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedCardValidationListPageResponse) - .isEqualTo(cardValidationListPageResponse) + assertThat(roundtrippedCardValidationListResponse).isEqualTo(cardValidationListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/checkdeposits/CheckDepositListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/checkdeposits/CheckDepositListResponseTest.kt similarity index 95% rename from increase-java-core/src/test/kotlin/com/increase/api/models/checkdeposits/CheckDepositListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/checkdeposits/CheckDepositListResponseTest.kt index 8c9c45213..1cb9f4cd7 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/checkdeposits/CheckDepositListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/checkdeposits/CheckDepositListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class CheckDepositListPageResponseTest { +internal class CheckDepositListResponseTest { @Test fun create() { - val checkDepositListPageResponse = - CheckDepositListPageResponse.builder() + val checkDepositListResponse = + CheckDepositListResponse.builder() .addData( CheckDeposit.builder() .id("check_deposit_f06n9gpg7sxn8t19lfc1") @@ -89,7 +89,7 @@ internal class CheckDepositListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(checkDepositListPageResponse.data()) + assertThat(checkDepositListResponse.data()) .containsExactly( CheckDeposit.builder() .id("check_deposit_f06n9gpg7sxn8t19lfc1") @@ -160,14 +160,14 @@ internal class CheckDepositListPageResponseTest { .type(CheckDeposit.Type.CHECK_DEPOSIT) .build() ) - assertThat(checkDepositListPageResponse.nextCursor()).contains("v57w5d") + assertThat(checkDepositListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val checkDepositListPageResponse = - CheckDepositListPageResponse.builder() + val checkDepositListResponse = + CheckDepositListResponse.builder() .addData( CheckDeposit.builder() .id("check_deposit_f06n9gpg7sxn8t19lfc1") @@ -243,12 +243,12 @@ internal class CheckDepositListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedCheckDepositListPageResponse = + val roundtrippedCheckDepositListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(checkDepositListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(checkDepositListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedCheckDepositListPageResponse).isEqualTo(checkDepositListPageResponse) + assertThat(roundtrippedCheckDepositListResponse).isEqualTo(checkDepositListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/checktransfers/CheckTransferListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/checktransfers/CheckTransferListResponseTest.kt similarity index 97% rename from increase-java-core/src/test/kotlin/com/increase/api/models/checktransfers/CheckTransferListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/checktransfers/CheckTransferListResponseTest.kt index 12480a8d6..e92e37e86 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/checktransfers/CheckTransferListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/checktransfers/CheckTransferListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class CheckTransferListPageResponseTest { +internal class CheckTransferListResponseTest { @Test fun create() { - val checkTransferListPageResponse = - CheckTransferListPageResponse.builder() + val checkTransferListResponse = + CheckTransferListResponse.builder() .addData( CheckTransfer.builder() .id("check_transfer_30b43acfu9vw8fyc4f5") @@ -168,7 +168,7 @@ internal class CheckTransferListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(checkTransferListPageResponse.data()) + assertThat(checkTransferListResponse.data()) .containsExactly( CheckTransfer.builder() .id("check_transfer_30b43acfu9vw8fyc4f5") @@ -316,14 +316,14 @@ internal class CheckTransferListPageResponseTest { .validUntilDate(null) .build() ) - assertThat(checkTransferListPageResponse.nextCursor()).contains("v57w5d") + assertThat(checkTransferListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val checkTransferListPageResponse = - CheckTransferListPageResponse.builder() + val checkTransferListResponse = + CheckTransferListResponse.builder() .addData( CheckTransfer.builder() .id("check_transfer_30b43acfu9vw8fyc4f5") @@ -478,13 +478,12 @@ internal class CheckTransferListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedCheckTransferListPageResponse = + val roundtrippedCheckTransferListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(checkTransferListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(checkTransferListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedCheckTransferListPageResponse) - .isEqualTo(checkTransferListPageResponse) + assertThat(roundtrippedCheckTransferListResponse).isEqualTo(checkTransferListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/declinedtransactions/DeclinedTransactionListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/declinedtransactions/DeclinedTransactionListResponseTest.kt similarity index 99% rename from increase-java-core/src/test/kotlin/com/increase/api/models/declinedtransactions/DeclinedTransactionListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/declinedtransactions/DeclinedTransactionListResponseTest.kt index e2eaccef2..a0634602b 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/declinedtransactions/DeclinedTransactionListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/declinedtransactions/DeclinedTransactionListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class DeclinedTransactionListPageResponseTest { +internal class DeclinedTransactionListResponseTest { @Test fun create() { - val declinedTransactionListPageResponse = - DeclinedTransactionListPageResponse.builder() + val declinedTransactionListResponse = + DeclinedTransactionListResponse.builder() .addData( DeclinedTransaction.builder() .id("declined_transaction_17jbn0yyhvkt4v4ooym8") @@ -373,7 +373,7 @@ internal class DeclinedTransactionListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(declinedTransactionListPageResponse.data()) + assertThat(declinedTransactionListResponse.data()) .containsExactly( DeclinedTransaction.builder() .id("declined_transaction_17jbn0yyhvkt4v4ooym8") @@ -718,14 +718,14 @@ internal class DeclinedTransactionListPageResponseTest { .type(DeclinedTransaction.Type.DECLINED_TRANSACTION) .build() ) - assertThat(declinedTransactionListPageResponse.nextCursor()).contains("v57w5d") + assertThat(declinedTransactionListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val declinedTransactionListPageResponse = - DeclinedTransactionListPageResponse.builder() + val declinedTransactionListResponse = + DeclinedTransactionListResponse.builder() .addData( DeclinedTransaction.builder() .id("declined_transaction_17jbn0yyhvkt4v4ooym8") @@ -1085,13 +1085,13 @@ internal class DeclinedTransactionListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedDeclinedTransactionListPageResponse = + val roundtrippedDeclinedTransactionListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(declinedTransactionListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(declinedTransactionListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedDeclinedTransactionListPageResponse) - .isEqualTo(declinedTransactionListPageResponse) + assertThat(roundtrippedDeclinedTransactionListResponse) + .isEqualTo(declinedTransactionListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/digitalcardprofiles/DigitalCardProfileListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/digitalcardprofiles/DigitalCardProfileListResponseTest.kt similarity index 86% rename from increase-java-core/src/test/kotlin/com/increase/api/models/digitalcardprofiles/DigitalCardProfileListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/digitalcardprofiles/DigitalCardProfileListResponseTest.kt index 761eaf3ab..2b7cb8620 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/digitalcardprofiles/DigitalCardProfileListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/digitalcardprofiles/DigitalCardProfileListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class DigitalCardProfileListPageResponseTest { +internal class DigitalCardProfileListResponseTest { @Test fun create() { - val digitalCardProfileListPageResponse = - DigitalCardProfileListPageResponse.builder() + val digitalCardProfileListResponse = + DigitalCardProfileListResponse.builder() .addData( DigitalCardProfile.builder() .id("digital_card_profile_s3puplu90f04xhcwkiga") @@ -41,7 +41,7 @@ internal class DigitalCardProfileListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(digitalCardProfileListPageResponse.data()) + assertThat(digitalCardProfileListResponse.data()) .containsExactly( DigitalCardProfile.builder() .id("digital_card_profile_s3puplu90f04xhcwkiga") @@ -66,14 +66,14 @@ internal class DigitalCardProfileListPageResponseTest { .type(DigitalCardProfile.Type.DIGITAL_CARD_PROFILE) .build() ) - assertThat(digitalCardProfileListPageResponse.nextCursor()).contains("v57w5d") + assertThat(digitalCardProfileListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val digitalCardProfileListPageResponse = - DigitalCardProfileListPageResponse.builder() + val digitalCardProfileListResponse = + DigitalCardProfileListResponse.builder() .addData( DigitalCardProfile.builder() .id("digital_card_profile_s3puplu90f04xhcwkiga") @@ -101,13 +101,13 @@ internal class DigitalCardProfileListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedDigitalCardProfileListPageResponse = + val roundtrippedDigitalCardProfileListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(digitalCardProfileListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(digitalCardProfileListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedDigitalCardProfileListPageResponse) - .isEqualTo(digitalCardProfileListPageResponse) + assertThat(roundtrippedDigitalCardProfileListResponse) + .isEqualTo(digitalCardProfileListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/digitalwallettokens/DigitalWalletTokenListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/digitalwallettokens/DigitalWalletTokenListResponseTest.kt similarity index 88% rename from increase-java-core/src/test/kotlin/com/increase/api/models/digitalwallettokens/DigitalWalletTokenListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/digitalwallettokens/DigitalWalletTokenListResponseTest.kt index bc7b67a4a..36fb3d7ce 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/digitalwallettokens/DigitalWalletTokenListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/digitalwallettokens/DigitalWalletTokenListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class DigitalWalletTokenListPageResponseTest { +internal class DigitalWalletTokenListResponseTest { @Test fun create() { - val digitalWalletTokenListPageResponse = - DigitalWalletTokenListPageResponse.builder() + val digitalWalletTokenListResponse = + DigitalWalletTokenListResponse.builder() .addData( DigitalWalletToken.builder() .id("digital_wallet_token_izi62go3h51p369jrie0") @@ -44,7 +44,7 @@ internal class DigitalWalletTokenListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(digitalWalletTokenListPageResponse.data()) + assertThat(digitalWalletTokenListResponse.data()) .containsExactly( DigitalWalletToken.builder() .id("digital_wallet_token_izi62go3h51p369jrie0") @@ -70,14 +70,14 @@ internal class DigitalWalletTokenListPageResponseTest { ) .build() ) - assertThat(digitalWalletTokenListPageResponse.nextCursor()).contains("v57w5d") + assertThat(digitalWalletTokenListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val digitalWalletTokenListPageResponse = - DigitalWalletTokenListPageResponse.builder() + val digitalWalletTokenListResponse = + DigitalWalletTokenListResponse.builder() .addData( DigitalWalletToken.builder() .id("digital_wallet_token_izi62go3h51p369jrie0") @@ -108,13 +108,13 @@ internal class DigitalWalletTokenListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedDigitalWalletTokenListPageResponse = + val roundtrippedDigitalWalletTokenListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(digitalWalletTokenListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(digitalWalletTokenListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedDigitalWalletTokenListPageResponse) - .isEqualTo(digitalWalletTokenListPageResponse) + assertThat(roundtrippedDigitalWalletTokenListResponse) + .isEqualTo(digitalWalletTokenListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/documents/DocumentListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/documents/DocumentListResponseTest.kt similarity index 85% rename from increase-java-core/src/test/kotlin/com/increase/api/models/documents/DocumentListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/documents/DocumentListResponseTest.kt index a70ea25e2..312739cc6 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/documents/DocumentListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/documents/DocumentListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class DocumentListPageResponseTest { +internal class DocumentListResponseTest { @Test fun create() { - val documentListPageResponse = - DocumentListPageResponse.builder() + val documentListResponse = + DocumentListResponse.builder() .addData( Document.builder() .id("document_qjtqc6s4c14ve2q89izm") @@ -38,7 +38,7 @@ internal class DocumentListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(documentListPageResponse.data()) + assertThat(documentListResponse.data()) .containsExactly( Document.builder() .id("document_qjtqc6s4c14ve2q89izm") @@ -60,14 +60,14 @@ internal class DocumentListPageResponseTest { .type(Document.Type.DOCUMENT) .build() ) - assertThat(documentListPageResponse.nextCursor()).contains("v57w5d") + assertThat(documentListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val documentListPageResponse = - DocumentListPageResponse.builder() + val documentListResponse = + DocumentListResponse.builder() .addData( Document.builder() .id("document_qjtqc6s4c14ve2q89izm") @@ -92,12 +92,12 @@ internal class DocumentListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedDocumentListPageResponse = + val roundtrippedDocumentListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(documentListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(documentListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedDocumentListPageResponse).isEqualTo(documentListPageResponse) + assertThat(roundtrippedDocumentListResponse).isEqualTo(documentListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/entities/EntityListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/entities/EntityListResponseTest.kt similarity index 98% rename from increase-java-core/src/test/kotlin/com/increase/api/models/entities/EntityListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/entities/EntityListResponseTest.kt index 7694837e5..d86d1d3bd 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/entities/EntityListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/entities/EntityListResponseTest.kt @@ -10,12 +10,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class EntityListPageResponseTest { +internal class EntityListResponseTest { @Test fun create() { - val entityListPageResponse = - EntityListPageResponse.builder() + val entityListResponse = + EntityListResponse.builder() .addData( Entity.builder() .id("entity_n8y8tnk2p9339ti393yi") @@ -262,7 +262,7 @@ internal class EntityListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(entityListPageResponse.data()) + assertThat(entityListResponse.data()) .containsExactly( Entity.builder() .id("entity_n8y8tnk2p9339ti393yi") @@ -505,14 +505,14 @@ internal class EntityListPageResponseTest { .type(Entity.Type.ENTITY) .build() ) - assertThat(entityListPageResponse.nextCursor()).contains("v57w5d") + assertThat(entityListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val entityListPageResponse = - EntityListPageResponse.builder() + val entityListResponse = + EntityListResponse.builder() .addData( Entity.builder() .id("entity_n8y8tnk2p9339ti393yi") @@ -759,12 +759,12 @@ internal class EntityListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedEntityListPageResponse = + val roundtrippedEntityListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(entityListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(entityListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedEntityListPageResponse).isEqualTo(entityListPageResponse) + assertThat(roundtrippedEntityListResponse).isEqualTo(entityListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/events/EventListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/events/EventListResponseTest.kt similarity index 78% rename from increase-java-core/src/test/kotlin/com/increase/api/models/events/EventListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/events/EventListResponseTest.kt index e74eb2d04..99b14e5f4 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/events/EventListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/events/EventListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class EventListPageResponseTest { +internal class EventListResponseTest { @Test fun create() { - val eventListPageResponse = - EventListPageResponse.builder() + val eventListResponse = + EventListResponse.builder() .addData( Event.builder() .id("event_001dzz0r20rzr4zrhrr1364hy80") @@ -27,7 +27,7 @@ internal class EventListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(eventListPageResponse.data()) + assertThat(eventListResponse.data()) .containsExactly( Event.builder() .id("event_001dzz0r20rzr4zrhrr1364hy80") @@ -38,14 +38,14 @@ internal class EventListPageResponseTest { .type(Event.Type.EVENT) .build() ) - assertThat(eventListPageResponse.nextCursor()).contains("v57w5d") + assertThat(eventListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val eventListPageResponse = - EventListPageResponse.builder() + val eventListResponse = + EventListResponse.builder() .addData( Event.builder() .id("event_001dzz0r20rzr4zrhrr1364hy80") @@ -59,12 +59,12 @@ internal class EventListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedEventListPageResponse = + val roundtrippedEventListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(eventListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(eventListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedEventListPageResponse).isEqualTo(eventListPageResponse) + assertThat(roundtrippedEventListResponse).isEqualTo(eventListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/eventsubscriptions/EventSubscriptionListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/eventsubscriptions/EventSubscriptionListResponseTest.kt similarity index 78% rename from increase-java-core/src/test/kotlin/com/increase/api/models/eventsubscriptions/EventSubscriptionListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/eventsubscriptions/EventSubscriptionListResponseTest.kt index a2dc7a9ae..81ec6d1d5 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/eventsubscriptions/EventSubscriptionListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/eventsubscriptions/EventSubscriptionListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class EventSubscriptionListPageResponseTest { +internal class EventSubscriptionListResponseTest { @Test fun create() { - val eventSubscriptionListPageResponse = - EventSubscriptionListPageResponse.builder() + val eventSubscriptionListResponse = + EventSubscriptionListResponse.builder() .addData( EventSubscription.builder() .id("event_subscription_001dzz0r20rcdxgb013zqb8m04g") @@ -29,7 +29,7 @@ internal class EventSubscriptionListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(eventSubscriptionListPageResponse.data()) + assertThat(eventSubscriptionListResponse.data()) .containsExactly( EventSubscription.builder() .id("event_subscription_001dzz0r20rcdxgb013zqb8m04g") @@ -42,14 +42,14 @@ internal class EventSubscriptionListPageResponseTest { .url("https://website.com/webhooks") .build() ) - assertThat(eventSubscriptionListPageResponse.nextCursor()).contains("v57w5d") + assertThat(eventSubscriptionListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val eventSubscriptionListPageResponse = - EventSubscriptionListPageResponse.builder() + val eventSubscriptionListResponse = + EventSubscriptionListResponse.builder() .addData( EventSubscription.builder() .id("event_subscription_001dzz0r20rcdxgb013zqb8m04g") @@ -65,13 +65,13 @@ internal class EventSubscriptionListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedEventSubscriptionListPageResponse = + val roundtrippedEventSubscriptionListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(eventSubscriptionListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(eventSubscriptionListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedEventSubscriptionListPageResponse) - .isEqualTo(eventSubscriptionListPageResponse) + assertThat(roundtrippedEventSubscriptionListResponse) + .isEqualTo(eventSubscriptionListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/exports/ExportListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/exports/ExportListResponseTest.kt similarity index 79% rename from increase-java-core/src/test/kotlin/com/increase/api/models/exports/ExportListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/exports/ExportListResponseTest.kt index 9499a50d8..1e9570cc2 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/exports/ExportListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/exports/ExportListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class ExportListPageResponseTest { +internal class ExportListResponseTest { @Test fun create() { - val exportListPageResponse = - ExportListPageResponse.builder() + val exportListResponse = + ExportListResponse.builder() .addData( Export.builder() .id("export_8s4m48qz3bclzje0zwh9") @@ -29,7 +29,7 @@ internal class ExportListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(exportListPageResponse.data()) + assertThat(exportListResponse.data()) .containsExactly( Export.builder() .id("export_8s4m48qz3bclzje0zwh9") @@ -42,14 +42,14 @@ internal class ExportListPageResponseTest { .type(Export.Type.EXPORT) .build() ) - assertThat(exportListPageResponse.nextCursor()).contains("v57w5d") + assertThat(exportListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val exportListPageResponse = - ExportListPageResponse.builder() + val exportListResponse = + ExportListResponse.builder() .addData( Export.builder() .id("export_8s4m48qz3bclzje0zwh9") @@ -65,12 +65,12 @@ internal class ExportListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedExportListPageResponse = + val roundtrippedExportListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(exportListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(exportListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedExportListPageResponse).isEqualTo(exportListPageResponse) + assertThat(roundtrippedExportListResponse).isEqualTo(exportListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/externalaccounts/ExternalAccountListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/externalaccounts/ExternalAccountListResponseTest.kt similarity index 81% rename from increase-java-core/src/test/kotlin/com/increase/api/models/externalaccounts/ExternalAccountListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/externalaccounts/ExternalAccountListResponseTest.kt index 1a0aac157..ec719eec6 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/externalaccounts/ExternalAccountListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/externalaccounts/ExternalAccountListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class ExternalAccountListPageResponseTest { +internal class ExternalAccountListResponseTest { @Test fun create() { - val externalAccountListPageResponse = - ExternalAccountListPageResponse.builder() + val externalAccountListResponse = + ExternalAccountListResponse.builder() .addData( ExternalAccount.builder() .id("external_account_ukk55lr923a3ac0pp7iv") @@ -31,7 +31,7 @@ internal class ExternalAccountListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(externalAccountListPageResponse.data()) + assertThat(externalAccountListResponse.data()) .containsExactly( ExternalAccount.builder() .id("external_account_ukk55lr923a3ac0pp7iv") @@ -46,14 +46,14 @@ internal class ExternalAccountListPageResponseTest { .type(ExternalAccount.Type.EXTERNAL_ACCOUNT) .build() ) - assertThat(externalAccountListPageResponse.nextCursor()).contains("v57w5d") + assertThat(externalAccountListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val externalAccountListPageResponse = - ExternalAccountListPageResponse.builder() + val externalAccountListResponse = + ExternalAccountListResponse.builder() .addData( ExternalAccount.builder() .id("external_account_ukk55lr923a3ac0pp7iv") @@ -71,13 +71,12 @@ internal class ExternalAccountListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedExternalAccountListPageResponse = + val roundtrippedExternalAccountListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(externalAccountListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(externalAccountListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedExternalAccountListPageResponse) - .isEqualTo(externalAccountListPageResponse) + assertThat(roundtrippedExternalAccountListResponse).isEqualTo(externalAccountListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/fednowtransfers/FednowTransferListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/fednowtransfers/FednowTransferListResponseTest.kt similarity index 94% rename from increase-java-core/src/test/kotlin/com/increase/api/models/fednowtransfers/FednowTransferListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/fednowtransfers/FednowTransferListResponseTest.kt index 555be5ebb..b37a89dbf 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/fednowtransfers/FednowTransferListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/fednowtransfers/FednowTransferListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class FednowTransferListPageResponseTest { +internal class FednowTransferListResponseTest { @Test fun create() { - val fednowTransferListPageResponse = - FednowTransferListPageResponse.builder() + val fednowTransferListResponse = + FednowTransferListResponse.builder() .addData( FednowTransfer.builder() .id("fednow_transfer_4i0mptrdu1mueg1196bg") @@ -77,7 +77,7 @@ internal class FednowTransferListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(fednowTransferListPageResponse.data()) + assertThat(fednowTransferListResponse.data()) .containsExactly( FednowTransfer.builder() .id("fednow_transfer_4i0mptrdu1mueg1196bg") @@ -138,14 +138,14 @@ internal class FednowTransferListPageResponseTest { .unstructuredRemittanceInformation("Invoice 29582") .build() ) - assertThat(fednowTransferListPageResponse.nextCursor()).contains("v57w5d") + assertThat(fednowTransferListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val fednowTransferListPageResponse = - FednowTransferListPageResponse.builder() + val fednowTransferListResponse = + FednowTransferListResponse.builder() .addData( FednowTransfer.builder() .id("fednow_transfer_4i0mptrdu1mueg1196bg") @@ -209,13 +209,12 @@ internal class FednowTransferListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedFednowTransferListPageResponse = + val roundtrippedFednowTransferListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(fednowTransferListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(fednowTransferListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedFednowTransferListPageResponse) - .isEqualTo(fednowTransferListPageResponse) + assertThat(roundtrippedFednowTransferListResponse).isEqualTo(fednowTransferListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/files/FileListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/files/FileListResponseTest.kt similarity index 81% rename from increase-java-core/src/test/kotlin/com/increase/api/models/files/FileListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/files/FileListResponseTest.kt index d1664c379..6118f1760 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/files/FileListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/files/FileListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class FileListPageResponseTest { +internal class FileListResponseTest { @Test fun create() { - val fileListPageResponse = - FileListPageResponse.builder() + val fileListResponse = + FileListResponse.builder() .addData( File.builder() .id("file_makxrc67oh9l6sg7w9yc") @@ -30,7 +30,7 @@ internal class FileListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(fileListPageResponse.data()) + assertThat(fileListResponse.data()) .containsExactly( File.builder() .id("file_makxrc67oh9l6sg7w9yc") @@ -44,14 +44,14 @@ internal class FileListPageResponseTest { .type(File.Type.FILE) .build() ) - assertThat(fileListPageResponse.nextCursor()).contains("v57w5d") + assertThat(fileListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val fileListPageResponse = - FileListPageResponse.builder() + val fileListResponse = + FileListResponse.builder() .addData( File.builder() .id("file_makxrc67oh9l6sg7w9yc") @@ -68,12 +68,12 @@ internal class FileListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedFileListPageResponse = + val roundtrippedFileListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(fileListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(fileListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedFileListPageResponse).isEqualTo(fileListPageResponse) + assertThat(roundtrippedFileListResponse).isEqualTo(fileListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/inboundachtransfers/InboundAchTransferListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/inboundachtransfers/InboundAchTransferListResponseTest.kt similarity index 97% rename from increase-java-core/src/test/kotlin/com/increase/api/models/inboundachtransfers/InboundAchTransferListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/inboundachtransfers/InboundAchTransferListResponseTest.kt index 187456f3d..b502b65aa 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/inboundachtransfers/InboundAchTransferListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/inboundachtransfers/InboundAchTransferListResponseTest.kt @@ -9,12 +9,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class InboundAchTransferListPageResponseTest { +internal class InboundAchTransferListResponseTest { @Test fun create() { - val inboundAchTransferListPageResponse = - InboundAchTransferListPageResponse.builder() + val inboundAchTransferListResponse = + InboundAchTransferListResponse.builder() .addData( InboundAchTransfer.builder() .id("inbound_ach_transfer_tdrwqr3fq9gnnq49odev") @@ -152,7 +152,7 @@ internal class InboundAchTransferListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(inboundAchTransferListPageResponse.data()) + assertThat(inboundAchTransferListResponse.data()) .containsExactly( InboundAchTransfer.builder() .id("inbound_ach_transfer_tdrwqr3fq9gnnq49odev") @@ -287,14 +287,14 @@ internal class InboundAchTransferListPageResponseTest { .type(InboundAchTransfer.Type.INBOUND_ACH_TRANSFER) .build() ) - assertThat(inboundAchTransferListPageResponse.nextCursor()).contains("v57w5d") + assertThat(inboundAchTransferListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val inboundAchTransferListPageResponse = - InboundAchTransferListPageResponse.builder() + val inboundAchTransferListResponse = + InboundAchTransferListResponse.builder() .addData( InboundAchTransfer.builder() .id("inbound_ach_transfer_tdrwqr3fq9gnnq49odev") @@ -432,13 +432,13 @@ internal class InboundAchTransferListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedInboundAchTransferListPageResponse = + val roundtrippedInboundAchTransferListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(inboundAchTransferListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(inboundAchTransferListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedInboundAchTransferListPageResponse) - .isEqualTo(inboundAchTransferListPageResponse) + assertThat(roundtrippedInboundAchTransferListResponse) + .isEqualTo(inboundAchTransferListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/inboundcheckdeposits/InboundCheckDepositListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/inboundcheckdeposits/InboundCheckDepositListResponseTest.kt similarity index 91% rename from increase-java-core/src/test/kotlin/com/increase/api/models/inboundcheckdeposits/InboundCheckDepositListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/inboundcheckdeposits/InboundCheckDepositListResponseTest.kt index 3bf50d07c..8b76afd9c 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/inboundcheckdeposits/InboundCheckDepositListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/inboundcheckdeposits/InboundCheckDepositListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class InboundCheckDepositListPageResponseTest { +internal class InboundCheckDepositListResponseTest { @Test fun create() { - val inboundCheckDepositListPageResponse = - InboundCheckDepositListPageResponse.builder() + val inboundCheckDepositListResponse = + InboundCheckDepositListResponse.builder() .addData( InboundCheckDeposit.builder() .id("inbound_check_deposit_zoshvqybq0cjjm31mra") @@ -56,7 +56,7 @@ internal class InboundCheckDepositListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(inboundCheckDepositListPageResponse.data()) + assertThat(inboundCheckDepositListResponse.data()) .containsExactly( InboundCheckDeposit.builder() .id("inbound_check_deposit_zoshvqybq0cjjm31mra") @@ -94,14 +94,14 @@ internal class InboundCheckDepositListPageResponseTest { .type(InboundCheckDeposit.Type.INBOUND_CHECK_DEPOSIT) .build() ) - assertThat(inboundCheckDepositListPageResponse.nextCursor()).contains("v57w5d") + assertThat(inboundCheckDepositListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val inboundCheckDepositListPageResponse = - InboundCheckDepositListPageResponse.builder() + val inboundCheckDepositListResponse = + InboundCheckDepositListResponse.builder() .addData( InboundCheckDeposit.builder() .id("inbound_check_deposit_zoshvqybq0cjjm31mra") @@ -144,13 +144,13 @@ internal class InboundCheckDepositListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedInboundCheckDepositListPageResponse = + val roundtrippedInboundCheckDepositListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(inboundCheckDepositListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(inboundCheckDepositListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedInboundCheckDepositListPageResponse) - .isEqualTo(inboundCheckDepositListPageResponse) + assertThat(roundtrippedInboundCheckDepositListResponse) + .isEqualTo(inboundCheckDepositListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/inboundfednowtransfers/InboundFednowTransferListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/inboundfednowtransfers/InboundFednowTransferListResponseTest.kt similarity index 88% rename from increase-java-core/src/test/kotlin/com/increase/api/models/inboundfednowtransfers/InboundFednowTransferListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/inboundfednowtransfers/InboundFednowTransferListResponseTest.kt index 9ad0c3f5d..514d66f86 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/inboundfednowtransfers/InboundFednowTransferListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/inboundfednowtransfers/InboundFednowTransferListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class InboundFednowTransferListPageResponseTest { +internal class InboundFednowTransferListResponseTest { @Test fun create() { - val inboundFednowTransferListPageResponse = - InboundFednowTransferListPageResponse.builder() + val inboundFednowTransferListResponse = + InboundFednowTransferListResponse.builder() .addData( InboundFednowTransfer.builder() .id("inbound_fednow_transfer_ctxxbc07oh5ke5w1hk20") @@ -48,7 +48,7 @@ internal class InboundFednowTransferListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(inboundFednowTransferListPageResponse.data()) + assertThat(inboundFednowTransferListResponse.data()) .containsExactly( InboundFednowTransfer.builder() .id("inbound_fednow_transfer_ctxxbc07oh5ke5w1hk20") @@ -78,14 +78,14 @@ internal class InboundFednowTransferListPageResponseTest { .unstructuredRemittanceInformation("Invoice 29582") .build() ) - assertThat(inboundFednowTransferListPageResponse.nextCursor()).contains("v57w5d") + assertThat(inboundFednowTransferListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val inboundFednowTransferListPageResponse = - InboundFednowTransferListPageResponse.builder() + val inboundFednowTransferListResponse = + InboundFednowTransferListResponse.builder() .addData( InboundFednowTransfer.builder() .id("inbound_fednow_transfer_ctxxbc07oh5ke5w1hk20") @@ -120,13 +120,13 @@ internal class InboundFednowTransferListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedInboundFednowTransferListPageResponse = + val roundtrippedInboundFednowTransferListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(inboundFednowTransferListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(inboundFednowTransferListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedInboundFednowTransferListPageResponse) - .isEqualTo(inboundFednowTransferListPageResponse) + assertThat(roundtrippedInboundFednowTransferListResponse) + .isEqualTo(inboundFednowTransferListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/inboundmailitems/InboundMailItemListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/inboundmailitems/InboundMailItemListResponseTest.kt similarity index 89% rename from increase-java-core/src/test/kotlin/com/increase/api/models/inboundmailitems/InboundMailItemListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/inboundmailitems/InboundMailItemListResponseTest.kt index 768d45eb6..a0d7c4a6c 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/inboundmailitems/InboundMailItemListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/inboundmailitems/InboundMailItemListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class InboundMailItemListPageResponseTest { +internal class InboundMailItemListResponseTest { @Test fun create() { - val inboundMailItemListPageResponse = - InboundMailItemListPageResponse.builder() + val inboundMailItemListResponse = + InboundMailItemListResponse.builder() .addData( InboundMailItem.builder() .id("inbound_mail_item_q6rrg7mmqpplx80zceev") @@ -47,7 +47,7 @@ internal class InboundMailItemListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(inboundMailItemListPageResponse.data()) + assertThat(inboundMailItemListResponse.data()) .containsExactly( InboundMailItem.builder() .id("inbound_mail_item_q6rrg7mmqpplx80zceev") @@ -78,14 +78,14 @@ internal class InboundMailItemListPageResponseTest { .type(InboundMailItem.Type.INBOUND_MAIL_ITEM) .build() ) - assertThat(inboundMailItemListPageResponse.nextCursor()).contains("v57w5d") + assertThat(inboundMailItemListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val inboundMailItemListPageResponse = - InboundMailItemListPageResponse.builder() + val inboundMailItemListResponse = + InboundMailItemListResponse.builder() .addData( InboundMailItem.builder() .id("inbound_mail_item_q6rrg7mmqpplx80zceev") @@ -119,13 +119,12 @@ internal class InboundMailItemListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedInboundMailItemListPageResponse = + val roundtrippedInboundMailItemListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(inboundMailItemListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(inboundMailItemListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedInboundMailItemListPageResponse) - .isEqualTo(inboundMailItemListPageResponse) + assertThat(roundtrippedInboundMailItemListResponse).isEqualTo(inboundMailItemListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransferListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransferListResponseTest.kt similarity index 90% rename from increase-java-core/src/test/kotlin/com/increase/api/models/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransferListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransferListResponseTest.kt index 4e9a0a751..f181feede 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransferListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransferListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class InboundRealTimePaymentsTransferListPageResponseTest { +internal class InboundRealTimePaymentsTransferListResponseTest { @Test fun create() { - val inboundRealTimePaymentsTransferListPageResponse = - InboundRealTimePaymentsTransferListPageResponse.builder() + val inboundRealTimePaymentsTransferListResponse = + InboundRealTimePaymentsTransferListResponse.builder() .addData( InboundRealTimePaymentsTransfer.builder() .id("inbound_real_time_payments_transfer_63hlz498vcxg644hcrzr") @@ -53,7 +53,7 @@ internal class InboundRealTimePaymentsTransferListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(inboundRealTimePaymentsTransferListPageResponse.data()) + assertThat(inboundRealTimePaymentsTransferListResponse.data()) .containsExactly( InboundRealTimePaymentsTransfer.builder() .id("inbound_real_time_payments_transfer_63hlz498vcxg644hcrzr") @@ -88,14 +88,14 @@ internal class InboundRealTimePaymentsTransferListPageResponseTest { .type(InboundRealTimePaymentsTransfer.Type.INBOUND_REAL_TIME_PAYMENTS_TRANSFER) .build() ) - assertThat(inboundRealTimePaymentsTransferListPageResponse.nextCursor()).contains("v57w5d") + assertThat(inboundRealTimePaymentsTransferListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val inboundRealTimePaymentsTransferListPageResponse = - InboundRealTimePaymentsTransferListPageResponse.builder() + val inboundRealTimePaymentsTransferListResponse = + InboundRealTimePaymentsTransferListResponse.builder() .addData( InboundRealTimePaymentsTransfer.builder() .id("inbound_real_time_payments_transfer_63hlz498vcxg644hcrzr") @@ -135,13 +135,13 @@ internal class InboundRealTimePaymentsTransferListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedInboundRealTimePaymentsTransferListPageResponse = + val roundtrippedInboundRealTimePaymentsTransferListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(inboundRealTimePaymentsTransferListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(inboundRealTimePaymentsTransferListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedInboundRealTimePaymentsTransferListPageResponse) - .isEqualTo(inboundRealTimePaymentsTransferListPageResponse) + assertThat(roundtrippedInboundRealTimePaymentsTransferListResponse) + .isEqualTo(inboundRealTimePaymentsTransferListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/inboundwiredrawdownrequests/InboundWireDrawdownRequestListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/inboundwiredrawdownrequests/InboundWireDrawdownRequestListResponseTest.kt similarity index 86% rename from increase-java-core/src/test/kotlin/com/increase/api/models/inboundwiredrawdownrequests/InboundWireDrawdownRequestListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/inboundwiredrawdownrequests/InboundWireDrawdownRequestListResponseTest.kt index 6a00d99a5..95ee8a8b7 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/inboundwiredrawdownrequests/InboundWireDrawdownRequestListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/inboundwiredrawdownrequests/InboundWireDrawdownRequestListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class InboundWireDrawdownRequestListPageResponseTest { +internal class InboundWireDrawdownRequestListResponseTest { @Test fun create() { - val inboundWireDrawdownRequestListPageResponse = - InboundWireDrawdownRequestListPageResponse.builder() + val inboundWireDrawdownRequestListResponse = + InboundWireDrawdownRequestListResponse.builder() .addData( InboundWireDrawdownRequest.builder() .id("inbound_wire_drawdown_request_u5a92ikqhz1ytphn799e") @@ -42,7 +42,7 @@ internal class InboundWireDrawdownRequestListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(inboundWireDrawdownRequestListPageResponse.data()) + assertThat(inboundWireDrawdownRequestListResponse.data()) .containsExactly( InboundWireDrawdownRequest.builder() .id("inbound_wire_drawdown_request_u5a92ikqhz1ytphn799e") @@ -68,14 +68,14 @@ internal class InboundWireDrawdownRequestListPageResponseTest { .unstructuredRemittanceInformation(null) .build() ) - assertThat(inboundWireDrawdownRequestListPageResponse.nextCursor()).contains("v57w5d") + assertThat(inboundWireDrawdownRequestListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val inboundWireDrawdownRequestListPageResponse = - InboundWireDrawdownRequestListPageResponse.builder() + val inboundWireDrawdownRequestListResponse = + InboundWireDrawdownRequestListResponse.builder() .addData( InboundWireDrawdownRequest.builder() .id("inbound_wire_drawdown_request_u5a92ikqhz1ytphn799e") @@ -104,13 +104,13 @@ internal class InboundWireDrawdownRequestListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedInboundWireDrawdownRequestListPageResponse = + val roundtrippedInboundWireDrawdownRequestListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(inboundWireDrawdownRequestListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(inboundWireDrawdownRequestListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedInboundWireDrawdownRequestListPageResponse) - .isEqualTo(inboundWireDrawdownRequestListPageResponse) + assertThat(roundtrippedInboundWireDrawdownRequestListResponse) + .isEqualTo(inboundWireDrawdownRequestListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/inboundwiretransfers/InboundWireTransferListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/inboundwiretransfers/InboundWireTransferListResponseTest.kt similarity index 89% rename from increase-java-core/src/test/kotlin/com/increase/api/models/inboundwiretransfers/InboundWireTransferListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/inboundwiretransfers/InboundWireTransferListResponseTest.kt index 384936e4e..83986ab46 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/inboundwiretransfers/InboundWireTransferListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/inboundwiretransfers/InboundWireTransferListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class InboundWireTransferListPageResponseTest { +internal class InboundWireTransferListResponseTest { @Test fun create() { - val inboundWireTransferListPageResponse = - InboundWireTransferListPageResponse.builder() + val inboundWireTransferListResponse = + InboundWireTransferListResponse.builder() .addData( InboundWireTransfer.builder() .id("inbound_wire_transfer_f228m6bmhtcxjco9pwp0") @@ -50,7 +50,7 @@ internal class InboundWireTransferListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(inboundWireTransferListPageResponse.data()) + assertThat(inboundWireTransferListResponse.data()) .containsExactly( InboundWireTransfer.builder() .id("inbound_wire_transfer_f228m6bmhtcxjco9pwp0") @@ -84,14 +84,14 @@ internal class InboundWireTransferListPageResponseTest { .wireDrawdownRequestId(null) .build() ) - assertThat(inboundWireTransferListPageResponse.nextCursor()).contains("v57w5d") + assertThat(inboundWireTransferListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val inboundWireTransferListPageResponse = - InboundWireTransferListPageResponse.builder() + val inboundWireTransferListResponse = + InboundWireTransferListResponse.builder() .addData( InboundWireTransfer.builder() .id("inbound_wire_transfer_f228m6bmhtcxjco9pwp0") @@ -128,13 +128,13 @@ internal class InboundWireTransferListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedInboundWireTransferListPageResponse = + val roundtrippedInboundWireTransferListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(inboundWireTransferListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(inboundWireTransferListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedInboundWireTransferListPageResponse) - .isEqualTo(inboundWireTransferListPageResponse) + assertThat(roundtrippedInboundWireTransferListResponse) + .isEqualTo(inboundWireTransferListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/intrafiaccountenrollments/IntrafiAccountEnrollmentListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/intrafiaccountenrollments/IntrafiAccountEnrollmentListResponseTest.kt similarity index 77% rename from increase-java-core/src/test/kotlin/com/increase/api/models/intrafiaccountenrollments/IntrafiAccountEnrollmentListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/intrafiaccountenrollments/IntrafiAccountEnrollmentListResponseTest.kt index 0f1859214..cd2a5e71f 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/intrafiaccountenrollments/IntrafiAccountEnrollmentListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/intrafiaccountenrollments/IntrafiAccountEnrollmentListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class IntrafiAccountEnrollmentListPageResponseTest { +internal class IntrafiAccountEnrollmentListResponseTest { @Test fun create() { - val intrafiAccountEnrollmentListPageResponse = - IntrafiAccountEnrollmentListPageResponse.builder() + val intrafiAccountEnrollmentListResponse = + IntrafiAccountEnrollmentListResponse.builder() .addData( IntrafiAccountEnrollment.builder() .id("intrafi_account_enrollment_w8l97znzreopkwf2tg75") @@ -29,7 +29,7 @@ internal class IntrafiAccountEnrollmentListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(intrafiAccountEnrollmentListPageResponse.data()) + assertThat(intrafiAccountEnrollmentListResponse.data()) .containsExactly( IntrafiAccountEnrollment.builder() .id("intrafi_account_enrollment_w8l97znzreopkwf2tg75") @@ -42,14 +42,14 @@ internal class IntrafiAccountEnrollmentListPageResponseTest { .type(IntrafiAccountEnrollment.Type.INTRAFI_ACCOUNT_ENROLLMENT) .build() ) - assertThat(intrafiAccountEnrollmentListPageResponse.nextCursor()).contains("v57w5d") + assertThat(intrafiAccountEnrollmentListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val intrafiAccountEnrollmentListPageResponse = - IntrafiAccountEnrollmentListPageResponse.builder() + val intrafiAccountEnrollmentListResponse = + IntrafiAccountEnrollmentListResponse.builder() .addData( IntrafiAccountEnrollment.builder() .id("intrafi_account_enrollment_w8l97znzreopkwf2tg75") @@ -65,13 +65,13 @@ internal class IntrafiAccountEnrollmentListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedIntrafiAccountEnrollmentListPageResponse = + val roundtrippedIntrafiAccountEnrollmentListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(intrafiAccountEnrollmentListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(intrafiAccountEnrollmentListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedIntrafiAccountEnrollmentListPageResponse) - .isEqualTo(intrafiAccountEnrollmentListPageResponse) + assertThat(roundtrippedIntrafiAccountEnrollmentListResponse) + .isEqualTo(intrafiAccountEnrollmentListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/intrafiexclusions/IntrafiExclusionListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/intrafiexclusions/IntrafiExclusionListResponseTest.kt similarity index 81% rename from increase-java-core/src/test/kotlin/com/increase/api/models/intrafiexclusions/IntrafiExclusionListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/intrafiexclusions/IntrafiExclusionListResponseTest.kt index abd005a92..58d41a986 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/intrafiexclusions/IntrafiExclusionListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/intrafiexclusions/IntrafiExclusionListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class IntrafiExclusionListPageResponseTest { +internal class IntrafiExclusionListResponseTest { @Test fun create() { - val intrafiExclusionListPageResponse = - IntrafiExclusionListPageResponse.builder() + val intrafiExclusionListResponse = + IntrafiExclusionListResponse.builder() .addData( IntrafiExclusion.builder() .id("intrafi_exclusion_ygfqduuzpau3jqof6jyh") @@ -31,7 +31,7 @@ internal class IntrafiExclusionListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(intrafiExclusionListPageResponse.data()) + assertThat(intrafiExclusionListResponse.data()) .containsExactly( IntrafiExclusion.builder() .id("intrafi_exclusion_ygfqduuzpau3jqof6jyh") @@ -46,14 +46,14 @@ internal class IntrafiExclusionListPageResponseTest { .type(IntrafiExclusion.Type.INTRAFI_EXCLUSION) .build() ) - assertThat(intrafiExclusionListPageResponse.nextCursor()).contains("v57w5d") + assertThat(intrafiExclusionListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val intrafiExclusionListPageResponse = - IntrafiExclusionListPageResponse.builder() + val intrafiExclusionListResponse = + IntrafiExclusionListResponse.builder() .addData( IntrafiExclusion.builder() .id("intrafi_exclusion_ygfqduuzpau3jqof6jyh") @@ -71,13 +71,12 @@ internal class IntrafiExclusionListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedIntrafiExclusionListPageResponse = + val roundtrippedIntrafiExclusionListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(intrafiExclusionListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(intrafiExclusionListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedIntrafiExclusionListPageResponse) - .isEqualTo(intrafiExclusionListPageResponse) + assertThat(roundtrippedIntrafiExclusionListResponse).isEqualTo(intrafiExclusionListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/lockboxes/LockboxListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/lockboxes/LockboxListResponseTest.kt similarity index 86% rename from increase-java-core/src/test/kotlin/com/increase/api/models/lockboxes/LockboxListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/lockboxes/LockboxListResponseTest.kt index 10f673ed9..36a82346f 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/lockboxes/LockboxListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/lockboxes/LockboxListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class LockboxListPageResponseTest { +internal class LockboxListResponseTest { @Test fun create() { - val lockboxListPageResponse = - LockboxListPageResponse.builder() + val lockboxListResponse = + LockboxListResponse.builder() .addData( Lockbox.builder() .id("lockbox_3xt21ok13q19advds4t5") @@ -39,7 +39,7 @@ internal class LockboxListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(lockboxListPageResponse.data()) + assertThat(lockboxListResponse.data()) .containsExactly( Lockbox.builder() .id("lockbox_3xt21ok13q19advds4t5") @@ -62,14 +62,14 @@ internal class LockboxListPageResponseTest { .type(Lockbox.Type.LOCKBOX) .build() ) - assertThat(lockboxListPageResponse.nextCursor()).contains("v57w5d") + assertThat(lockboxListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val lockboxListPageResponse = - LockboxListPageResponse.builder() + val lockboxListResponse = + LockboxListResponse.builder() .addData( Lockbox.builder() .id("lockbox_3xt21ok13q19advds4t5") @@ -95,12 +95,12 @@ internal class LockboxListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedLockboxListPageResponse = + val roundtrippedLockboxListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(lockboxListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(lockboxListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedLockboxListPageResponse).isEqualTo(lockboxListPageResponse) + assertThat(roundtrippedLockboxListResponse).isEqualTo(lockboxListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/oauthapplications/OAuthApplicationListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/oauthapplications/OAuthApplicationListResponseTest.kt similarity index 77% rename from increase-java-core/src/test/kotlin/com/increase/api/models/oauthapplications/OAuthApplicationListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/oauthapplications/OAuthApplicationListResponseTest.kt index c58fadad5..6c184f57f 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/oauthapplications/OAuthApplicationListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/oauthapplications/OAuthApplicationListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class OAuthApplicationListPageResponseTest { +internal class OAuthApplicationListResponseTest { @Test fun create() { - val oauthApplicationListPageResponse = - OAuthApplicationListPageResponse.builder() + val oauthApplicationListResponse = + OAuthApplicationListResponse.builder() .addData( OAuthApplication.builder() .id("application_gj9ufmpgh5i56k4vyriy") @@ -28,7 +28,7 @@ internal class OAuthApplicationListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(oauthApplicationListPageResponse.data()) + assertThat(oauthApplicationListResponse.data()) .containsExactly( OAuthApplication.builder() .id("application_gj9ufmpgh5i56k4vyriy") @@ -40,14 +40,14 @@ internal class OAuthApplicationListPageResponseTest { .type(OAuthApplication.Type.OAUTH_APPLICATION) .build() ) - assertThat(oauthApplicationListPageResponse.nextCursor()).contains("v57w5d") + assertThat(oauthApplicationListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val oauthApplicationListPageResponse = - OAuthApplicationListPageResponse.builder() + val oauthApplicationListResponse = + OAuthApplicationListResponse.builder() .addData( OAuthApplication.builder() .id("application_gj9ufmpgh5i56k4vyriy") @@ -62,13 +62,12 @@ internal class OAuthApplicationListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedOAuthApplicationListPageResponse = + val roundtrippedOAuthApplicationListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(oauthApplicationListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(oauthApplicationListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedOAuthApplicationListPageResponse) - .isEqualTo(oauthApplicationListPageResponse) + assertThat(roundtrippedOAuthApplicationListResponse).isEqualTo(oauthApplicationListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/oauthconnections/OAuthConnectionListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/oauthconnections/OAuthConnectionListResponseTest.kt similarity index 78% rename from increase-java-core/src/test/kotlin/com/increase/api/models/oauthconnections/OAuthConnectionListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/oauthconnections/OAuthConnectionListResponseTest.kt index 7d2363491..3c7a23816 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/oauthconnections/OAuthConnectionListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/oauthconnections/OAuthConnectionListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class OAuthConnectionListPageResponseTest { +internal class OAuthConnectionListResponseTest { @Test fun create() { - val oauthConnectionListPageResponse = - OAuthConnectionListPageResponse.builder() + val oauthConnectionListResponse = + OAuthConnectionListResponse.builder() .addData( OAuthConnection.builder() .id("connection_dauknoksyr4wilz4e6my") @@ -28,7 +28,7 @@ internal class OAuthConnectionListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(oauthConnectionListPageResponse.data()) + assertThat(oauthConnectionListResponse.data()) .containsExactly( OAuthConnection.builder() .id("connection_dauknoksyr4wilz4e6my") @@ -40,14 +40,14 @@ internal class OAuthConnectionListPageResponseTest { .type(OAuthConnection.Type.OAUTH_CONNECTION) .build() ) - assertThat(oauthConnectionListPageResponse.nextCursor()).contains("v57w5d") + assertThat(oauthConnectionListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val oauthConnectionListPageResponse = - OAuthConnectionListPageResponse.builder() + val oauthConnectionListResponse = + OAuthConnectionListResponse.builder() .addData( OAuthConnection.builder() .id("connection_dauknoksyr4wilz4e6my") @@ -62,13 +62,12 @@ internal class OAuthConnectionListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedOAuthConnectionListPageResponse = + val roundtrippedOAuthConnectionListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(oauthConnectionListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(oauthConnectionListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedOAuthConnectionListPageResponse) - .isEqualTo(oauthConnectionListPageResponse) + assertThat(roundtrippedOAuthConnectionListResponse).isEqualTo(oauthConnectionListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/pendingtransactions/PendingTransactionListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/pendingtransactions/PendingTransactionListResponseTest.kt similarity index 99% rename from increase-java-core/src/test/kotlin/com/increase/api/models/pendingtransactions/PendingTransactionListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/pendingtransactions/PendingTransactionListResponseTest.kt index 3cdb94983..7dd05bbff 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/pendingtransactions/PendingTransactionListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/pendingtransactions/PendingTransactionListResponseTest.kt @@ -9,12 +9,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class PendingTransactionListPageResponseTest { +internal class PendingTransactionListResponseTest { @Test fun create() { - val pendingTransactionListPageResponse = - PendingTransactionListPageResponse.builder() + val pendingTransactionListResponse = + PendingTransactionListResponse.builder() .addData( PendingTransaction.builder() .id("pending_transaction_k1sfetcau2qbvjbzgju4") @@ -386,7 +386,7 @@ internal class PendingTransactionListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(pendingTransactionListPageResponse.data()) + assertThat(pendingTransactionListResponse.data()) .containsExactly( PendingTransaction.builder() .id("pending_transaction_k1sfetcau2qbvjbzgju4") @@ -740,14 +740,14 @@ internal class PendingTransactionListPageResponseTest { .type(PendingTransaction.Type.PENDING_TRANSACTION) .build() ) - assertThat(pendingTransactionListPageResponse.nextCursor()).contains("v57w5d") + assertThat(pendingTransactionListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val pendingTransactionListPageResponse = - PendingTransactionListPageResponse.builder() + val pendingTransactionListResponse = + PendingTransactionListResponse.builder() .addData( PendingTransaction.builder() .id("pending_transaction_k1sfetcau2qbvjbzgju4") @@ -1119,13 +1119,13 @@ internal class PendingTransactionListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedPendingTransactionListPageResponse = + val roundtrippedPendingTransactionListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(pendingTransactionListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(pendingTransactionListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedPendingTransactionListPageResponse) - .isEqualTo(pendingTransactionListPageResponse) + assertThat(roundtrippedPendingTransactionListResponse) + .isEqualTo(pendingTransactionListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/physicalcardprofiles/PhysicalCardProfileListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/physicalcardprofiles/PhysicalCardProfileListResponseTest.kt similarity index 83% rename from increase-java-core/src/test/kotlin/com/increase/api/models/physicalcardprofiles/PhysicalCardProfileListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/physicalcardprofiles/PhysicalCardProfileListResponseTest.kt index 9d22f9d7b..a8b6d77c7 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/physicalcardprofiles/PhysicalCardProfileListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/physicalcardprofiles/PhysicalCardProfileListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class PhysicalCardProfileListPageResponseTest { +internal class PhysicalCardProfileListResponseTest { @Test fun create() { - val physicalCardProfileListPageResponse = - PhysicalCardProfileListPageResponse.builder() + val physicalCardProfileListResponse = + PhysicalCardProfileListResponse.builder() .addData( PhysicalCardProfile.builder() .id("physical_card_profile_m534d5rn9qyy9ufqxoec") @@ -34,7 +34,7 @@ internal class PhysicalCardProfileListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(physicalCardProfileListPageResponse.data()) + assertThat(physicalCardProfileListResponse.data()) .containsExactly( PhysicalCardProfile.builder() .id("physical_card_profile_m534d5rn9qyy9ufqxoec") @@ -52,14 +52,14 @@ internal class PhysicalCardProfileListPageResponseTest { .type(PhysicalCardProfile.Type.PHYSICAL_CARD_PROFILE) .build() ) - assertThat(physicalCardProfileListPageResponse.nextCursor()).contains("v57w5d") + assertThat(physicalCardProfileListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val physicalCardProfileListPageResponse = - PhysicalCardProfileListPageResponse.builder() + val physicalCardProfileListResponse = + PhysicalCardProfileListResponse.builder() .addData( PhysicalCardProfile.builder() .id("physical_card_profile_m534d5rn9qyy9ufqxoec") @@ -80,13 +80,13 @@ internal class PhysicalCardProfileListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedPhysicalCardProfileListPageResponse = + val roundtrippedPhysicalCardProfileListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(physicalCardProfileListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(physicalCardProfileListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedPhysicalCardProfileListPageResponse) - .isEqualTo(physicalCardProfileListPageResponse) + assertThat(roundtrippedPhysicalCardProfileListResponse) + .isEqualTo(physicalCardProfileListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/physicalcards/PhysicalCardListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/physicalcards/PhysicalCardListResponseTest.kt similarity index 93% rename from increase-java-core/src/test/kotlin/com/increase/api/models/physicalcards/PhysicalCardListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/physicalcards/PhysicalCardListResponseTest.kt index 4724449d3..6aba81d17 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/physicalcards/PhysicalCardListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/physicalcards/PhysicalCardListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class PhysicalCardListPageResponseTest { +internal class PhysicalCardListResponseTest { @Test fun create() { - val physicalCardListPageResponse = - PhysicalCardListPageResponse.builder() + val physicalCardListResponse = + PhysicalCardListResponse.builder() .addData( PhysicalCard.builder() .id("physical_card_ode8duyq5v2ynhjoharl") @@ -76,7 +76,7 @@ internal class PhysicalCardListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(physicalCardListPageResponse.data()) + assertThat(physicalCardListResponse.data()) .containsExactly( PhysicalCard.builder() .id("physical_card_ode8duyq5v2ynhjoharl") @@ -134,14 +134,14 @@ internal class PhysicalCardListPageResponseTest { .type(PhysicalCard.Type.PHYSICAL_CARD) .build() ) - assertThat(physicalCardListPageResponse.nextCursor()).contains("v57w5d") + assertThat(physicalCardListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val physicalCardListPageResponse = - PhysicalCardListPageResponse.builder() + val physicalCardListResponse = + PhysicalCardListResponse.builder() .addData( PhysicalCard.builder() .id("physical_card_ode8duyq5v2ynhjoharl") @@ -204,12 +204,12 @@ internal class PhysicalCardListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedPhysicalCardListPageResponse = + val roundtrippedPhysicalCardListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(physicalCardListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(physicalCardListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedPhysicalCardListPageResponse).isEqualTo(physicalCardListPageResponse) + assertThat(roundtrippedPhysicalCardListResponse).isEqualTo(physicalCardListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/programs/ProgramListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/programs/ProgramListResponseTest.kt similarity index 80% rename from increase-java-core/src/test/kotlin/com/increase/api/models/programs/ProgramListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/programs/ProgramListResponseTest.kt index 6f1391854..2536d3eb6 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/programs/ProgramListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/programs/ProgramListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class ProgramListPageResponseTest { +internal class ProgramListResponseTest { @Test fun create() { - val programListPageResponse = - ProgramListPageResponse.builder() + val programListResponse = + ProgramListResponse.builder() .addData( Program.builder() .id("program_i2v2os4mwza1oetokh9i") @@ -30,7 +30,7 @@ internal class ProgramListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(programListPageResponse.data()) + assertThat(programListResponse.data()) .containsExactly( Program.builder() .id("program_i2v2os4mwza1oetokh9i") @@ -44,14 +44,14 @@ internal class ProgramListPageResponseTest { .updatedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .build() ) - assertThat(programListPageResponse.nextCursor()).contains("v57w5d") + assertThat(programListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val programListPageResponse = - ProgramListPageResponse.builder() + val programListResponse = + ProgramListResponse.builder() .addData( Program.builder() .id("program_i2v2os4mwza1oetokh9i") @@ -68,12 +68,12 @@ internal class ProgramListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedProgramListPageResponse = + val roundtrippedProgramListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(programListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(programListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedProgramListPageResponse).isEqualTo(programListPageResponse) + assertThat(roundtrippedProgramListResponse).isEqualTo(programListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransferListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransferListResponseTest.kt similarity index 94% rename from increase-java-core/src/test/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransferListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransferListResponseTest.kt index ceea65faf..a4481e58c 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransferListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransferListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class RealTimePaymentsTransferListPageResponseTest { +internal class RealTimePaymentsTransferListResponseTest { @Test fun create() { - val realTimePaymentsTransferListPageResponse = - RealTimePaymentsTransferListPageResponse.builder() + val realTimePaymentsTransferListResponse = + RealTimePaymentsTransferListResponse.builder() .addData( RealTimePaymentsTransfer.builder() .id("real_time_payments_transfer_iyuhl5kdn7ssmup83mvq") @@ -93,7 +93,7 @@ internal class RealTimePaymentsTransferListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(realTimePaymentsTransferListPageResponse.data()) + assertThat(realTimePaymentsTransferListResponse.data()) .containsExactly( RealTimePaymentsTransfer.builder() .id("real_time_payments_transfer_iyuhl5kdn7ssmup83mvq") @@ -169,14 +169,14 @@ internal class RealTimePaymentsTransferListPageResponseTest { .ultimateDebtorName(null) .build() ) - assertThat(realTimePaymentsTransferListPageResponse.nextCursor()).contains("v57w5d") + assertThat(realTimePaymentsTransferListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val realTimePaymentsTransferListPageResponse = - RealTimePaymentsTransferListPageResponse.builder() + val realTimePaymentsTransferListResponse = + RealTimePaymentsTransferListResponse.builder() .addData( RealTimePaymentsTransfer.builder() .id("real_time_payments_transfer_iyuhl5kdn7ssmup83mvq") @@ -256,13 +256,13 @@ internal class RealTimePaymentsTransferListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedRealTimePaymentsTransferListPageResponse = + val roundtrippedRealTimePaymentsTransferListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(realTimePaymentsTransferListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(realTimePaymentsTransferListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedRealTimePaymentsTransferListPageResponse) - .isEqualTo(realTimePaymentsTransferListPageResponse) + assertThat(roundtrippedRealTimePaymentsTransferListResponse) + .isEqualTo(realTimePaymentsTransferListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/routingnumbers/RoutingNumberListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/routingnumbers/RoutingNumberListPageResponseTest.kt deleted file mode 100644 index 22f3d3bd3..000000000 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/routingnumbers/RoutingNumberListPageResponseTest.kt +++ /dev/null @@ -1,79 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. - -package com.increase.api.models.routingnumbers - -import com.fasterxml.jackson.module.kotlin.jacksonTypeRef -import com.increase.api.core.jsonMapper -import org.assertj.core.api.Assertions.assertThat -import org.junit.jupiter.api.Test - -internal class RoutingNumberListPageResponseTest { - - @Test - fun create() { - val routingNumberListPageResponse = - RoutingNumberListPageResponse.builder() - .addData( - RoutingNumberListResponse.builder() - .achTransfers(RoutingNumberListResponse.AchTransfers.SUPPORTED) - .fednowTransfers(RoutingNumberListResponse.FednowTransfers.SUPPORTED) - .name("First Bank of the United States") - .realTimePaymentsTransfers( - RoutingNumberListResponse.RealTimePaymentsTransfers.SUPPORTED - ) - .routingNumber("021000021") - .type(RoutingNumberListResponse.Type.ROUTING_NUMBER) - .wireTransfers(RoutingNumberListResponse.WireTransfers.SUPPORTED) - .build() - ) - .nextCursor("v57w5d") - .build() - - assertThat(routingNumberListPageResponse.data()) - .containsExactly( - RoutingNumberListResponse.builder() - .achTransfers(RoutingNumberListResponse.AchTransfers.SUPPORTED) - .fednowTransfers(RoutingNumberListResponse.FednowTransfers.SUPPORTED) - .name("First Bank of the United States") - .realTimePaymentsTransfers( - RoutingNumberListResponse.RealTimePaymentsTransfers.SUPPORTED - ) - .routingNumber("021000021") - .type(RoutingNumberListResponse.Type.ROUTING_NUMBER) - .wireTransfers(RoutingNumberListResponse.WireTransfers.SUPPORTED) - .build() - ) - assertThat(routingNumberListPageResponse.nextCursor()).contains("v57w5d") - } - - @Test - fun roundtrip() { - val jsonMapper = jsonMapper() - val routingNumberListPageResponse = - RoutingNumberListPageResponse.builder() - .addData( - RoutingNumberListResponse.builder() - .achTransfers(RoutingNumberListResponse.AchTransfers.SUPPORTED) - .fednowTransfers(RoutingNumberListResponse.FednowTransfers.SUPPORTED) - .name("First Bank of the United States") - .realTimePaymentsTransfers( - RoutingNumberListResponse.RealTimePaymentsTransfers.SUPPORTED - ) - .routingNumber("021000021") - .type(RoutingNumberListResponse.Type.ROUTING_NUMBER) - .wireTransfers(RoutingNumberListResponse.WireTransfers.SUPPORTED) - .build() - ) - .nextCursor("v57w5d") - .build() - - val roundtrippedRoutingNumberListPageResponse = - jsonMapper.readValue( - jsonMapper.writeValueAsString(routingNumberListPageResponse), - jacksonTypeRef(), - ) - - assertThat(roundtrippedRoutingNumberListPageResponse) - .isEqualTo(routingNumberListPageResponse) - } -} diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/routingnumbers/RoutingNumberListResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/routingnumbers/RoutingNumberListResponseTest.kt index 154ff33ff..1bf3a2b88 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/routingnumbers/RoutingNumberListResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/routingnumbers/RoutingNumberListResponseTest.kt @@ -13,29 +13,37 @@ internal class RoutingNumberListResponseTest { fun create() { val routingNumberListResponse = RoutingNumberListResponse.builder() - .achTransfers(RoutingNumberListResponse.AchTransfers.SUPPORTED) - .fednowTransfers(RoutingNumberListResponse.FednowTransfers.SUPPORTED) - .name("First Bank of the United States") - .realTimePaymentsTransfers( - RoutingNumberListResponse.RealTimePaymentsTransfers.SUPPORTED + .addData( + RoutingNumberListResponse.Data.builder() + .achTransfers(RoutingNumberListResponse.Data.AchTransfers.SUPPORTED) + .fednowTransfers(RoutingNumberListResponse.Data.FednowTransfers.SUPPORTED) + .name("First Bank of the United States") + .realTimePaymentsTransfers( + RoutingNumberListResponse.Data.RealTimePaymentsTransfers.SUPPORTED + ) + .routingNumber("021000021") + .type(RoutingNumberListResponse.Data.Type.ROUTING_NUMBER) + .wireTransfers(RoutingNumberListResponse.Data.WireTransfers.SUPPORTED) + .build() ) - .routingNumber("021000021") - .type(RoutingNumberListResponse.Type.ROUTING_NUMBER) - .wireTransfers(RoutingNumberListResponse.WireTransfers.SUPPORTED) + .nextCursor("v57w5d") .build() - assertThat(routingNumberListResponse.achTransfers()) - .isEqualTo(RoutingNumberListResponse.AchTransfers.SUPPORTED) - assertThat(routingNumberListResponse.fednowTransfers()) - .isEqualTo(RoutingNumberListResponse.FednowTransfers.SUPPORTED) - assertThat(routingNumberListResponse.name()).isEqualTo("First Bank of the United States") - assertThat(routingNumberListResponse.realTimePaymentsTransfers()) - .isEqualTo(RoutingNumberListResponse.RealTimePaymentsTransfers.SUPPORTED) - assertThat(routingNumberListResponse.routingNumber()).isEqualTo("021000021") - assertThat(routingNumberListResponse.type()) - .isEqualTo(RoutingNumberListResponse.Type.ROUTING_NUMBER) - assertThat(routingNumberListResponse.wireTransfers()) - .isEqualTo(RoutingNumberListResponse.WireTransfers.SUPPORTED) + assertThat(routingNumberListResponse.data()) + .containsExactly( + RoutingNumberListResponse.Data.builder() + .achTransfers(RoutingNumberListResponse.Data.AchTransfers.SUPPORTED) + .fednowTransfers(RoutingNumberListResponse.Data.FednowTransfers.SUPPORTED) + .name("First Bank of the United States") + .realTimePaymentsTransfers( + RoutingNumberListResponse.Data.RealTimePaymentsTransfers.SUPPORTED + ) + .routingNumber("021000021") + .type(RoutingNumberListResponse.Data.Type.ROUTING_NUMBER) + .wireTransfers(RoutingNumberListResponse.Data.WireTransfers.SUPPORTED) + .build() + ) + assertThat(routingNumberListResponse.nextCursor()).contains("v57w5d") } @Test @@ -43,15 +51,20 @@ internal class RoutingNumberListResponseTest { val jsonMapper = jsonMapper() val routingNumberListResponse = RoutingNumberListResponse.builder() - .achTransfers(RoutingNumberListResponse.AchTransfers.SUPPORTED) - .fednowTransfers(RoutingNumberListResponse.FednowTransfers.SUPPORTED) - .name("First Bank of the United States") - .realTimePaymentsTransfers( - RoutingNumberListResponse.RealTimePaymentsTransfers.SUPPORTED + .addData( + RoutingNumberListResponse.Data.builder() + .achTransfers(RoutingNumberListResponse.Data.AchTransfers.SUPPORTED) + .fednowTransfers(RoutingNumberListResponse.Data.FednowTransfers.SUPPORTED) + .name("First Bank of the United States") + .realTimePaymentsTransfers( + RoutingNumberListResponse.Data.RealTimePaymentsTransfers.SUPPORTED + ) + .routingNumber("021000021") + .type(RoutingNumberListResponse.Data.Type.ROUTING_NUMBER) + .wireTransfers(RoutingNumberListResponse.Data.WireTransfers.SUPPORTED) + .build() ) - .routingNumber("021000021") - .type(RoutingNumberListResponse.Type.ROUTING_NUMBER) - .wireTransfers(RoutingNumberListResponse.WireTransfers.SUPPORTED) + .nextCursor("v57w5d") .build() val roundtrippedRoutingNumberListResponse = diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/supplementaldocuments/SupplementalDocumentListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/supplementaldocuments/SupplementalDocumentListResponseTest.kt similarity index 74% rename from increase-java-core/src/test/kotlin/com/increase/api/models/supplementaldocuments/SupplementalDocumentListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/supplementaldocuments/SupplementalDocumentListResponseTest.kt index dd24c41aa..fef9f3dbb 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/supplementaldocuments/SupplementalDocumentListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/supplementaldocuments/SupplementalDocumentListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class SupplementalDocumentListPageResponseTest { +internal class SupplementalDocumentListResponseTest { @Test fun create() { - val supplementalDocumentListPageResponse = - SupplementalDocumentListPageResponse.builder() + val supplementalDocumentListResponse = + SupplementalDocumentListResponse.builder() .addData( EntitySupplementalDocument.builder() .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) @@ -26,7 +26,7 @@ internal class SupplementalDocumentListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(supplementalDocumentListPageResponse.data()) + assertThat(supplementalDocumentListResponse.data()) .containsExactly( EntitySupplementalDocument.builder() .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) @@ -36,14 +36,14 @@ internal class SupplementalDocumentListPageResponseTest { .type(EntitySupplementalDocument.Type.ENTITY_SUPPLEMENTAL_DOCUMENT) .build() ) - assertThat(supplementalDocumentListPageResponse.nextCursor()).contains("v57w5d") + assertThat(supplementalDocumentListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val supplementalDocumentListPageResponse = - SupplementalDocumentListPageResponse.builder() + val supplementalDocumentListResponse = + SupplementalDocumentListResponse.builder() .addData( EntitySupplementalDocument.builder() .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) @@ -56,13 +56,13 @@ internal class SupplementalDocumentListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedSupplementalDocumentListPageResponse = + val roundtrippedSupplementalDocumentListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(supplementalDocumentListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(supplementalDocumentListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedSupplementalDocumentListPageResponse) - .isEqualTo(supplementalDocumentListPageResponse) + assertThat(roundtrippedSupplementalDocumentListResponse) + .isEqualTo(supplementalDocumentListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/transactions/TransactionListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/transactions/TransactionListResponseTest.kt similarity index 99% rename from increase-java-core/src/test/kotlin/com/increase/api/models/transactions/TransactionListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/transactions/TransactionListResponseTest.kt index 24860bbc4..a9f93690a 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/transactions/TransactionListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/transactions/TransactionListResponseTest.kt @@ -9,12 +9,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class TransactionListPageResponseTest { +internal class TransactionListResponseTest { @Test fun create() { - val transactionListPageResponse = - TransactionListPageResponse.builder() + val transactionListResponse = + TransactionListResponse.builder() .addData( Transaction.builder() .id("transaction_uyrp7fld2ium70oa7oi") @@ -1136,7 +1136,7 @@ internal class TransactionListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(transactionListPageResponse.data()) + assertThat(transactionListResponse.data()) .containsExactly( Transaction.builder() .id("transaction_uyrp7fld2ium70oa7oi") @@ -2186,14 +2186,14 @@ internal class TransactionListPageResponseTest { .type(Transaction.Type.TRANSACTION) .build() ) - assertThat(transactionListPageResponse.nextCursor()).contains("v57w5d") + assertThat(transactionListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val transactionListPageResponse = - TransactionListPageResponse.builder() + val transactionListResponse = + TransactionListResponse.builder() .addData( Transaction.builder() .id("transaction_uyrp7fld2ium70oa7oi") @@ -3315,12 +3315,12 @@ internal class TransactionListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedTransactionListPageResponse = + val roundtrippedTransactionListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(transactionListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(transactionListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedTransactionListPageResponse).isEqualTo(transactionListPageResponse) + assertThat(roundtrippedTransactionListResponse).isEqualTo(transactionListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequestListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequestListResponseTest.kt similarity index 91% rename from increase-java-core/src/test/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequestListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequestListResponseTest.kt index 3d542a228..23a3825a0 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequestListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/wiredrawdownrequests/WireDrawdownRequestListResponseTest.kt @@ -8,12 +8,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class WireDrawdownRequestListPageResponseTest { +internal class WireDrawdownRequestListResponseTest { @Test fun create() { - val wireDrawdownRequestListPageResponse = - WireDrawdownRequestListPageResponse.builder() + val wireDrawdownRequestListResponse = + WireDrawdownRequestListResponse.builder() .addData( WireDrawdownRequest.builder() .id("wire_drawdown_request_q6lmocus3glo0lr2bfv3") @@ -63,7 +63,7 @@ internal class WireDrawdownRequestListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(wireDrawdownRequestListPageResponse.data()) + assertThat(wireDrawdownRequestListResponse.data()) .containsExactly( WireDrawdownRequest.builder() .id("wire_drawdown_request_q6lmocus3glo0lr2bfv3") @@ -108,14 +108,14 @@ internal class WireDrawdownRequestListPageResponseTest { .unstructuredRemittanceInformation("Invoice 29582") .build() ) - assertThat(wireDrawdownRequestListPageResponse.nextCursor()).contains("v57w5d") + assertThat(wireDrawdownRequestListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val wireDrawdownRequestListPageResponse = - WireDrawdownRequestListPageResponse.builder() + val wireDrawdownRequestListResponse = + WireDrawdownRequestListResponse.builder() .addData( WireDrawdownRequest.builder() .id("wire_drawdown_request_q6lmocus3glo0lr2bfv3") @@ -165,13 +165,13 @@ internal class WireDrawdownRequestListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedWireDrawdownRequestListPageResponse = + val roundtrippedWireDrawdownRequestListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(wireDrawdownRequestListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(wireDrawdownRequestListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedWireDrawdownRequestListPageResponse) - .isEqualTo(wireDrawdownRequestListPageResponse) + assertThat(roundtrippedWireDrawdownRequestListResponse) + .isEqualTo(wireDrawdownRequestListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/wiretransfers/WireTransferListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/wiretransfers/WireTransferListResponseTest.kt similarity index 96% rename from increase-java-core/src/test/kotlin/com/increase/api/models/wiretransfers/WireTransferListPageResponseTest.kt rename to increase-java-core/src/test/kotlin/com/increase/api/models/wiretransfers/WireTransferListResponseTest.kt index 25e92a0da..8b32d4494 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/wiretransfers/WireTransferListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/wiretransfers/WireTransferListResponseTest.kt @@ -9,12 +9,12 @@ import java.time.OffsetDateTime import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test -internal class WireTransferListPageResponseTest { +internal class WireTransferListResponseTest { @Test fun create() { - val wireTransferListPageResponse = - WireTransferListPageResponse.builder() + val wireTransferListResponse = + WireTransferListResponse.builder() .addData( WireTransfer.builder() .id("wire_transfer_5akynk7dqsq25qwk9q2u") @@ -143,7 +143,7 @@ internal class WireTransferListPageResponseTest { .nextCursor("v57w5d") .build() - assertThat(wireTransferListPageResponse.data()) + assertThat(wireTransferListResponse.data()) .containsExactly( WireTransfer.builder() .id("wire_transfer_5akynk7dqsq25qwk9q2u") @@ -269,14 +269,14 @@ internal class WireTransferListPageResponseTest { .type(WireTransfer.Type.WIRE_TRANSFER) .build() ) - assertThat(wireTransferListPageResponse.nextCursor()).contains("v57w5d") + assertThat(wireTransferListResponse.nextCursor()).contains("v57w5d") } @Test fun roundtrip() { val jsonMapper = jsonMapper() - val wireTransferListPageResponse = - WireTransferListPageResponse.builder() + val wireTransferListResponse = + WireTransferListResponse.builder() .addData( WireTransfer.builder() .id("wire_transfer_5akynk7dqsq25qwk9q2u") @@ -405,12 +405,12 @@ internal class WireTransferListPageResponseTest { .nextCursor("v57w5d") .build() - val roundtrippedWireTransferListPageResponse = + val roundtrippedWireTransferListResponse = jsonMapper.readValue( - jsonMapper.writeValueAsString(wireTransferListPageResponse), - jacksonTypeRef(), + jsonMapper.writeValueAsString(wireTransferListResponse), + jacksonTypeRef(), ) - assertThat(roundtrippedWireTransferListPageResponse).isEqualTo(wireTransferListPageResponse) + assertThat(roundtrippedWireTransferListResponse).isEqualTo(wireTransferListResponse) } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/AccountNumberServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/AccountNumberServiceAsyncTest.kt index 500c4ca2c..59ae52bd6 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/AccountNumberServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/AccountNumberServiceAsyncTest.kt @@ -5,7 +5,9 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync import com.increase.api.models.accountnumbers.AccountNumberCreateParams +import com.increase.api.models.accountnumbers.AccountNumberListParams import com.increase.api.models.accountnumbers.AccountNumberUpdateParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -100,9 +102,35 @@ internal class AccountNumberServiceAsyncTest { .build() val accountNumberServiceAsync = client.accountNumbers() - val pageFuture = accountNumberServiceAsync.list() + val accountNumbersFuture = + accountNumberServiceAsync.list( + AccountNumberListParams.builder() + .accountId("account_id") + .achDebitStatus( + AccountNumberListParams.AchDebitStatus.builder() + .addIn(AccountNumberListParams.AchDebitStatus.In.ALLOWED) + .build() + ) + .createdAt( + AccountNumberListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .status( + AccountNumberListParams.Status.builder() + .addIn(AccountNumberListParams.Status.In.ACTIVE) + .build() + ) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val accountNumbers = accountNumbersFuture.get() + accountNumbers.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/AccountServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/AccountServiceAsyncTest.kt index 0483ee5a1..95d4fb12d 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/AccountServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/AccountServiceAsyncTest.kt @@ -6,6 +6,7 @@ import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync import com.increase.api.models.accounts.AccountBalanceParams import com.increase.api.models.accounts.AccountCreateParams +import com.increase.api.models.accounts.AccountListParams import com.increase.api.models.accounts.AccountUpdateParams import java.time.OffsetDateTime import org.junit.jupiter.api.Test @@ -83,10 +84,33 @@ internal class AccountServiceAsyncTest { .build() val accountServiceAsync = client.accounts() - val pageFuture = accountServiceAsync.list() + val accountsFuture = + accountServiceAsync.list( + AccountListParams.builder() + .createdAt( + AccountListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .entityId("entity_id") + .idempotencyKey("x") + .informationalEntityId("informational_entity_id") + .limit(1L) + .programId("program_id") + .status( + AccountListParams.Status.builder() + .addIn(AccountListParams.Status.In.CLOSED) + .build() + ) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val accounts = accountsFuture.get() + accounts.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/AccountStatementServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/AccountStatementServiceAsyncTest.kt index 07dcdfe06..27e985ff7 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/AccountStatementServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/AccountStatementServiceAsyncTest.kt @@ -4,6 +4,8 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync +import com.increase.api.models.accountstatements.AccountStatementListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -35,9 +37,24 @@ internal class AccountStatementServiceAsyncTest { .build() val accountStatementServiceAsync = client.accountStatements() - val pageFuture = accountStatementServiceAsync.list() - - val page = pageFuture.get() - page.response().validate() + val accountStatementsFuture = + accountStatementServiceAsync.list( + AccountStatementListParams.builder() + .accountId("account_id") + .cursor("cursor") + .limit(1L) + .statementPeriodStart( + AccountStatementListParams.StatementPeriodStart.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .build() + ) + + val accountStatements = accountStatementsFuture.get() + accountStatements.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/AccountTransferServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/AccountTransferServiceAsyncTest.kt index f7dee8bb3..bed94fc2d 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/AccountTransferServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/AccountTransferServiceAsyncTest.kt @@ -5,6 +5,8 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync import com.increase.api.models.accounttransfers.AccountTransferCreateParams +import com.increase.api.models.accounttransfers.AccountTransferListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -60,10 +62,26 @@ internal class AccountTransferServiceAsyncTest { .build() val accountTransferServiceAsync = client.accountTransfers() - val pageFuture = accountTransferServiceAsync.list() + val accountTransfersFuture = + accountTransferServiceAsync.list( + AccountTransferListParams.builder() + .accountId("account_id") + .createdAt( + AccountTransferListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val accountTransfers = accountTransfersFuture.get() + accountTransfers.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/AchPrenotificationServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/AchPrenotificationServiceAsyncTest.kt index 304a98efd..72273a8c4 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/AchPrenotificationServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/AchPrenotificationServiceAsyncTest.kt @@ -5,7 +5,9 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync import com.increase.api.models.achprenotifications.AchPrenotificationCreateParams +import com.increase.api.models.achprenotifications.AchPrenotificationListParams import java.time.LocalDate +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -74,9 +76,24 @@ internal class AchPrenotificationServiceAsyncTest { .build() val achPrenotificationServiceAsync = client.achPrenotifications() - val pageFuture = achPrenotificationServiceAsync.list() + val achPrenotificationsFuture = + achPrenotificationServiceAsync.list( + AchPrenotificationListParams.builder() + .createdAt( + AchPrenotificationListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val achPrenotifications = achPrenotificationsFuture.get() + achPrenotifications.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/AchTransferServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/AchTransferServiceAsyncTest.kt index 565f8c48d..3f946b737 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/AchTransferServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/AchTransferServiceAsyncTest.kt @@ -5,7 +5,9 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync import com.increase.api.models.achtransfers.AchTransferCreateParams +import com.increase.api.models.achtransfers.AchTransferListParams import java.time.LocalDate +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -113,10 +115,32 @@ internal class AchTransferServiceAsyncTest { .build() val achTransferServiceAsync = client.achTransfers() - val pageFuture = achTransferServiceAsync.list() + val achTransfersFuture = + achTransferServiceAsync.list( + AchTransferListParams.builder() + .accountId("account_id") + .createdAt( + AchTransferListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .externalAccountId("external_account_id") + .idempotencyKey("x") + .limit(1L) + .status( + AchTransferListParams.Status.builder() + .addIn(AchTransferListParams.Status.In.PENDING_APPROVAL) + .build() + ) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val achTransfers = achTransfersFuture.get() + achTransfers.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/BookkeepingAccountServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/BookkeepingAccountServiceAsyncTest.kt index e3a495c5e..34440875e 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/BookkeepingAccountServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/BookkeepingAccountServiceAsyncTest.kt @@ -6,6 +6,7 @@ import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync import com.increase.api.models.bookkeepingaccounts.BookkeepingAccountBalanceParams import com.increase.api.models.bookkeepingaccounts.BookkeepingAccountCreateParams +import com.increase.api.models.bookkeepingaccounts.BookkeepingAccountListParams import com.increase.api.models.bookkeepingaccounts.BookkeepingAccountUpdateParams import java.time.OffsetDateTime import org.junit.jupiter.api.Test @@ -69,10 +70,17 @@ internal class BookkeepingAccountServiceAsyncTest { .build() val bookkeepingAccountServiceAsync = client.bookkeepingAccounts() - val pageFuture = bookkeepingAccountServiceAsync.list() + val bookkeepingAccountsFuture = + bookkeepingAccountServiceAsync.list( + BookkeepingAccountListParams.builder() + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val bookkeepingAccounts = bookkeepingAccountsFuture.get() + bookkeepingAccounts.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/BookkeepingEntryServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/BookkeepingEntryServiceAsyncTest.kt index c87285aa0..be458654a 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/BookkeepingEntryServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/BookkeepingEntryServiceAsyncTest.kt @@ -4,6 +4,7 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync +import com.increase.api.models.bookkeepingentries.BookkeepingEntryListParams import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -35,9 +36,16 @@ internal class BookkeepingEntryServiceAsyncTest { .build() val bookkeepingEntryServiceAsync = client.bookkeepingEntries() - val pageFuture = bookkeepingEntryServiceAsync.list() - - val page = pageFuture.get() - page.response().validate() + val bookkeepingEntriesFuture = + bookkeepingEntryServiceAsync.list( + BookkeepingEntryListParams.builder() + .accountId("account_id") + .cursor("cursor") + .limit(1L) + .build() + ) + + val bookkeepingEntries = bookkeepingEntriesFuture.get() + bookkeepingEntries.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/BookkeepingEntrySetServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/BookkeepingEntrySetServiceAsyncTest.kt index 488598ab1..be19c5a21 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/BookkeepingEntrySetServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/BookkeepingEntrySetServiceAsyncTest.kt @@ -5,6 +5,7 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync import com.increase.api.models.bookkeepingentrysets.BookkeepingEntrySetCreateParams +import com.increase.api.models.bookkeepingentrysets.BookkeepingEntrySetListParams import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -70,9 +71,17 @@ internal class BookkeepingEntrySetServiceAsyncTest { .build() val bookkeepingEntrySetServiceAsync = client.bookkeepingEntrySets() - val pageFuture = bookkeepingEntrySetServiceAsync.list() + val bookkeepingEntrySetsFuture = + bookkeepingEntrySetServiceAsync.list( + BookkeepingEntrySetListParams.builder() + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .transactionId("transaction_id") + .build() + ) - val page = pageFuture.get() - page.response().validate() + val bookkeepingEntrySets = bookkeepingEntrySetsFuture.get() + bookkeepingEntrySets.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/CardDisputeServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/CardDisputeServiceAsyncTest.kt index 274501834..93a9cb2a0 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/CardDisputeServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/CardDisputeServiceAsyncTest.kt @@ -5,8 +5,10 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync import com.increase.api.models.carddisputes.CardDisputeCreateParams +import com.increase.api.models.carddisputes.CardDisputeListParams import com.increase.api.models.carddisputes.CardDisputeSubmitUserSubmissionParams import java.time.LocalDate +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -784,10 +786,30 @@ internal class CardDisputeServiceAsyncTest { .build() val cardDisputeServiceAsync = client.cardDisputes() - val pageFuture = cardDisputeServiceAsync.list() + val cardDisputesFuture = + cardDisputeServiceAsync.list( + CardDisputeListParams.builder() + .createdAt( + CardDisputeListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .status( + CardDisputeListParams.Status.builder() + .addIn(CardDisputeListParams.Status.In.USER_SUBMISSION_REQUIRED) + .build() + ) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val cardDisputes = cardDisputesFuture.get() + cardDisputes.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/CardPaymentServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/CardPaymentServiceAsyncTest.kt index b247d9aae..194490300 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/CardPaymentServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/CardPaymentServiceAsyncTest.kt @@ -4,6 +4,8 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync +import com.increase.api.models.cardpayments.CardPaymentListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -35,9 +37,25 @@ internal class CardPaymentServiceAsyncTest { .build() val cardPaymentServiceAsync = client.cardPayments() - val pageFuture = cardPaymentServiceAsync.list() - - val page = pageFuture.get() - page.response().validate() + val cardPaymentsFuture = + cardPaymentServiceAsync.list( + CardPaymentListParams.builder() + .accountId("account_id") + .cardId("card_id") + .createdAt( + CardPaymentListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .limit(1L) + .build() + ) + + val cardPayments = cardPaymentsFuture.get() + cardPayments.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/CardPurchaseSupplementServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/CardPurchaseSupplementServiceAsyncTest.kt index 86721e6e5..d79385d9a 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/CardPurchaseSupplementServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/CardPurchaseSupplementServiceAsyncTest.kt @@ -4,6 +4,8 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync +import com.increase.api.models.cardpurchasesupplements.CardPurchaseSupplementListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -37,9 +39,24 @@ internal class CardPurchaseSupplementServiceAsyncTest { .build() val cardPurchaseSupplementServiceAsync = client.cardPurchaseSupplements() - val pageFuture = cardPurchaseSupplementServiceAsync.list() + val cardPurchaseSupplementsFuture = + cardPurchaseSupplementServiceAsync.list( + CardPurchaseSupplementListParams.builder() + .cardPaymentId("card_payment_id") + .createdAt( + CardPurchaseSupplementListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .limit(1L) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val cardPurchaseSupplements = cardPurchaseSupplementsFuture.get() + cardPurchaseSupplements.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/CardPushTransferServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/CardPushTransferServiceAsyncTest.kt index 376a27cf9..383c97f47 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/CardPushTransferServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/CardPushTransferServiceAsyncTest.kt @@ -5,6 +5,8 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync import com.increase.api.models.cardpushtransfers.CardPushTransferCreateParams +import com.increase.api.models.cardpushtransfers.CardPushTransferListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -82,10 +84,31 @@ internal class CardPushTransferServiceAsyncTest { .build() val cardPushTransferServiceAsync = client.cardPushTransfers() - val pageFuture = cardPushTransferServiceAsync.list() + val cardPushTransfersFuture = + cardPushTransferServiceAsync.list( + CardPushTransferListParams.builder() + .accountId("account_id") + .createdAt( + CardPushTransferListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .status( + CardPushTransferListParams.Status.builder() + .addIn(CardPushTransferListParams.Status.In.PENDING_APPROVAL) + .build() + ) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val cardPushTransfers = cardPushTransfersFuture.get() + cardPushTransfers.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/CardServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/CardServiceAsyncTest.kt index e781b600b..670a9797e 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/CardServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/CardServiceAsyncTest.kt @@ -6,8 +6,10 @@ import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync import com.increase.api.models.cards.CardCreateDetailsIframeParams import com.increase.api.models.cards.CardCreateParams +import com.increase.api.models.cards.CardListParams import com.increase.api.models.cards.CardUpdateParams import com.increase.api.models.cards.CardUpdatePinParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -115,10 +117,31 @@ internal class CardServiceAsyncTest { .build() val cardServiceAsync = client.cards() - val pageFuture = cardServiceAsync.list() + val cardsFuture = + cardServiceAsync.list( + CardListParams.builder() + .accountId("account_id") + .createdAt( + CardListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .status( + CardListParams.Status.builder() + .addIn(CardListParams.Status.In.ACTIVE) + .build() + ) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val cards = cardsFuture.get() + cards.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/CardTokenServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/CardTokenServiceAsyncTest.kt index 63f41f4f6..6e9a525a7 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/CardTokenServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/CardTokenServiceAsyncTest.kt @@ -4,6 +4,8 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync +import com.increase.api.models.cardtokens.CardTokenListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -35,10 +37,24 @@ internal class CardTokenServiceAsyncTest { .build() val cardTokenServiceAsync = client.cardTokens() - val pageFuture = cardTokenServiceAsync.list() + val cardTokensFuture = + cardTokenServiceAsync.list( + CardTokenListParams.builder() + .createdAt( + CardTokenListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .limit(1L) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val cardTokens = cardTokensFuture.get() + cardTokens.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/CardValidationServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/CardValidationServiceAsyncTest.kt index 0d70a2259..6ff5922d9 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/CardValidationServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/CardValidationServiceAsyncTest.kt @@ -5,6 +5,8 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync import com.increase.api.models.cardvalidations.CardValidationCreateParams +import com.increase.api.models.cardvalidations.CardValidationListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -67,9 +69,30 @@ internal class CardValidationServiceAsyncTest { .build() val cardValidationServiceAsync = client.cardValidations() - val pageFuture = cardValidationServiceAsync.list() + val cardValidationsFuture = + cardValidationServiceAsync.list( + CardValidationListParams.builder() + .accountId("account_id") + .createdAt( + CardValidationListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .status( + CardValidationListParams.Status.builder() + .addIn(CardValidationListParams.Status.In.REQUIRES_ATTENTION) + .build() + ) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val cardValidations = cardValidationsFuture.get() + cardValidations.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/CheckDepositServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/CheckDepositServiceAsyncTest.kt index 1ab7eb281..00b401890 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/CheckDepositServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/CheckDepositServiceAsyncTest.kt @@ -5,6 +5,8 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync import com.increase.api.models.checkdeposits.CheckDepositCreateParams +import com.increase.api.models.checkdeposits.CheckDepositListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -60,9 +62,25 @@ internal class CheckDepositServiceAsyncTest { .build() val checkDepositServiceAsync = client.checkDeposits() - val pageFuture = checkDepositServiceAsync.list() + val checkDepositsFuture = + checkDepositServiceAsync.list( + CheckDepositListParams.builder() + .accountId("account_id") + .createdAt( + CheckDepositListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val checkDeposits = checkDepositsFuture.get() + checkDeposits.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/CheckTransferServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/CheckTransferServiceAsyncTest.kt index fc4c2180d..917c9ccce 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/CheckTransferServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/CheckTransferServiceAsyncTest.kt @@ -5,8 +5,10 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync import com.increase.api.models.checktransfers.CheckTransferCreateParams +import com.increase.api.models.checktransfers.CheckTransferListParams import com.increase.api.models.checktransfers.CheckTransferStopPaymentParams import java.time.LocalDate +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -108,10 +110,31 @@ internal class CheckTransferServiceAsyncTest { .build() val checkTransferServiceAsync = client.checkTransfers() - val pageFuture = checkTransferServiceAsync.list() + val checkTransfersFuture = + checkTransferServiceAsync.list( + CheckTransferListParams.builder() + .accountId("account_id") + .createdAt( + CheckTransferListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .status( + CheckTransferListParams.Status.builder() + .addIn(CheckTransferListParams.Status.In.PENDING_APPROVAL) + .build() + ) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val checkTransfers = checkTransfersFuture.get() + checkTransfers.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/DeclinedTransactionServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/DeclinedTransactionServiceAsyncTest.kt index 46bf8a54f..6e89de026 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/DeclinedTransactionServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/DeclinedTransactionServiceAsyncTest.kt @@ -4,6 +4,8 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync +import com.increase.api.models.declinedtransactions.DeclinedTransactionListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -35,9 +37,30 @@ internal class DeclinedTransactionServiceAsyncTest { .build() val declinedTransactionServiceAsync = client.declinedTransactions() - val pageFuture = declinedTransactionServiceAsync.list() + val declinedTransactionsFuture = + declinedTransactionServiceAsync.list( + DeclinedTransactionListParams.builder() + .accountId("account_id") + .category( + DeclinedTransactionListParams.Category.builder() + .addIn(DeclinedTransactionListParams.Category.In.ACH_DECLINE) + .build() + ) + .createdAt( + DeclinedTransactionListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .limit(1L) + .routeId("route_id") + .build() + ) - val page = pageFuture.get() - page.response().validate() + val declinedTransactions = declinedTransactionsFuture.get() + declinedTransactions.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/DigitalCardProfileServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/DigitalCardProfileServiceAsyncTest.kt index d3c0b122b..33e5d8936 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/DigitalCardProfileServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/DigitalCardProfileServiceAsyncTest.kt @@ -6,6 +6,7 @@ import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync import com.increase.api.models.digitalcardprofiles.DigitalCardProfileCloneParams import com.increase.api.models.digitalcardprofiles.DigitalCardProfileCreateParams +import com.increase.api.models.digitalcardprofiles.DigitalCardProfileListParams import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -71,10 +72,22 @@ internal class DigitalCardProfileServiceAsyncTest { .build() val digitalCardProfileServiceAsync = client.digitalCardProfiles() - val pageFuture = digitalCardProfileServiceAsync.list() + val digitalCardProfilesFuture = + digitalCardProfileServiceAsync.list( + DigitalCardProfileListParams.builder() + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .status( + DigitalCardProfileListParams.Status.builder() + .addIn(DigitalCardProfileListParams.Status.In.PENDING) + .build() + ) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val digitalCardProfiles = digitalCardProfilesFuture.get() + digitalCardProfiles.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/DigitalWalletTokenServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/DigitalWalletTokenServiceAsyncTest.kt index 2e37edb84..243318985 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/DigitalWalletTokenServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/DigitalWalletTokenServiceAsyncTest.kt @@ -4,6 +4,8 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync +import com.increase.api.models.digitalwallettokens.DigitalWalletTokenListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -35,9 +37,24 @@ internal class DigitalWalletTokenServiceAsyncTest { .build() val digitalWalletTokenServiceAsync = client.digitalWalletTokens() - val pageFuture = digitalWalletTokenServiceAsync.list() - - val page = pageFuture.get() - page.response().validate() + val digitalWalletTokensFuture = + digitalWalletTokenServiceAsync.list( + DigitalWalletTokenListParams.builder() + .cardId("card_id") + .createdAt( + DigitalWalletTokenListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .limit(1L) + .build() + ) + + val digitalWalletTokens = digitalWalletTokensFuture.get() + digitalWalletTokens.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/DocumentServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/DocumentServiceAsyncTest.kt index fe7058967..c54d40d97 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/DocumentServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/DocumentServiceAsyncTest.kt @@ -5,7 +5,9 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync import com.increase.api.models.documents.DocumentCreateParams +import com.increase.api.models.documents.DocumentListParams import java.time.LocalDate +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -67,9 +69,30 @@ internal class DocumentServiceAsyncTest { .build() val documentServiceAsync = client.documents() - val pageFuture = documentServiceAsync.list() + val documentsFuture = + documentServiceAsync.list( + DocumentListParams.builder() + .category( + DocumentListParams.Category.builder() + .addIn(DocumentListParams.Category.In.FORM_1099_INT) + .build() + ) + .createdAt( + DocumentListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .entityId("entity_id") + .idempotencyKey("x") + .limit(1L) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val documents = documentsFuture.get() + documents.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/EntityServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/EntityServiceAsyncTest.kt index 516c84c32..5c9796919 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/EntityServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/EntityServiceAsyncTest.kt @@ -8,6 +8,7 @@ import com.increase.api.models.entities.EntityArchiveBeneficialOwnerParams import com.increase.api.models.entities.EntityConfirmParams import com.increase.api.models.entities.EntityCreateBeneficialOwnerParams import com.increase.api.models.entities.EntityCreateParams +import com.increase.api.models.entities.EntityListParams import com.increase.api.models.entities.EntityUpdateAddressParams import com.increase.api.models.entities.EntityUpdateBeneficialOwnerAddressParams import com.increase.api.models.entities.EntityUpdateIndustryCodeParams @@ -569,10 +570,30 @@ internal class EntityServiceAsyncTest { .build() val entityServiceAsync = client.entities() - val pageFuture = entityServiceAsync.list() + val entitiesFuture = + entityServiceAsync.list( + EntityListParams.builder() + .createdAt( + EntityListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .status( + EntityListParams.Status.builder() + .addIn(EntityListParams.Status.In.ACTIVE) + .build() + ) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val entities = entitiesFuture.get() + entities.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/EventServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/EventServiceAsyncTest.kt index 8cb73f7e3..3b06fa2f5 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/EventServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/EventServiceAsyncTest.kt @@ -4,6 +4,8 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync +import com.increase.api.models.events.EventListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -34,9 +36,29 @@ internal class EventServiceAsyncTest { .build() val eventServiceAsync = client.events() - val pageFuture = eventServiceAsync.list() + val eventsFuture = + eventServiceAsync.list( + EventListParams.builder() + .associatedObjectId("associated_object_id") + .category( + EventListParams.Category.builder() + .addIn(EventListParams.Category.In.ACCOUNT_CREATED) + .build() + ) + .createdAt( + EventListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .limit(1L) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val events = eventsFuture.get() + events.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/EventSubscriptionServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/EventSubscriptionServiceAsyncTest.kt index 93b9bd618..1dc00522b 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/EventSubscriptionServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/EventSubscriptionServiceAsyncTest.kt @@ -5,6 +5,7 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync import com.increase.api.models.eventsubscriptions.EventSubscriptionCreateParams +import com.increase.api.models.eventsubscriptions.EventSubscriptionListParams import com.increase.api.models.eventsubscriptions.EventSubscriptionUpdateParams import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -84,9 +85,16 @@ internal class EventSubscriptionServiceAsyncTest { .build() val eventSubscriptionServiceAsync = client.eventSubscriptions() - val pageFuture = eventSubscriptionServiceAsync.list() + val eventSubscriptionsFuture = + eventSubscriptionServiceAsync.list( + EventSubscriptionListParams.builder() + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val eventSubscriptions = eventSubscriptionsFuture.get() + eventSubscriptions.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/ExportServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/ExportServiceAsyncTest.kt index b044e39d9..67d850247 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/ExportServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/ExportServiceAsyncTest.kt @@ -5,6 +5,7 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync import com.increase.api.models.exports.ExportCreateParams +import com.increase.api.models.exports.ExportListParams import java.time.LocalDate import java.time.OffsetDateTime import org.junit.jupiter.api.Test @@ -128,9 +129,34 @@ internal class ExportServiceAsyncTest { .build() val exportServiceAsync = client.exports() - val pageFuture = exportServiceAsync.list() + val exportsFuture = + exportServiceAsync.list( + ExportListParams.builder() + .category( + ExportListParams.Category.builder() + .addIn(ExportListParams.Category.In.ACCOUNT_STATEMENT_OFX) + .build() + ) + .createdAt( + ExportListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .status( + ExportListParams.Status.builder() + .addIn(ExportListParams.Status.In.PENDING) + .build() + ) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val exports = exportsFuture.get() + exports.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/ExternalAccountServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/ExternalAccountServiceAsyncTest.kt index dab270e8d..34393cae2 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/ExternalAccountServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/ExternalAccountServiceAsyncTest.kt @@ -5,6 +5,7 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync import com.increase.api.models.externalaccounts.ExternalAccountCreateParams +import com.increase.api.models.externalaccounts.ExternalAccountListParams import com.increase.api.models.externalaccounts.ExternalAccountUpdateParams import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -85,9 +86,22 @@ internal class ExternalAccountServiceAsyncTest { .build() val externalAccountServiceAsync = client.externalAccounts() - val pageFuture = externalAccountServiceAsync.list() + val externalAccountsFuture = + externalAccountServiceAsync.list( + ExternalAccountListParams.builder() + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .routingNumber("xxxxxxxxx") + .status( + ExternalAccountListParams.Status.builder() + .addIn(ExternalAccountListParams.Status.In.ACTIVE) + .build() + ) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val externalAccounts = externalAccountsFuture.get() + externalAccounts.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/FednowTransferServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/FednowTransferServiceAsyncTest.kt index 129774f41..1db2dbf9c 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/FednowTransferServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/FednowTransferServiceAsyncTest.kt @@ -5,6 +5,8 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync import com.increase.api.models.fednowtransfers.FednowTransferCreateParams +import com.increase.api.models.fednowtransfers.FednowTransferListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -81,10 +83,32 @@ internal class FednowTransferServiceAsyncTest { .build() val fednowTransferServiceAsync = client.fednowTransfers() - val pageFuture = fednowTransferServiceAsync.list() + val fednowTransfersFuture = + fednowTransferServiceAsync.list( + FednowTransferListParams.builder() + .accountId("account_id") + .createdAt( + FednowTransferListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .externalAccountId("external_account_id") + .idempotencyKey("x") + .limit(1L) + .status( + FednowTransferListParams.Status.builder() + .addIn(FednowTransferListParams.Status.In.PENDING_REVIEWING) + .build() + ) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val fednowTransfers = fednowTransfersFuture.get() + fednowTransfers.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/FileServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/FileServiceAsyncTest.kt index e5a99c8d9..98e3e6217 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/FileServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/FileServiceAsyncTest.kt @@ -5,6 +5,8 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync import com.increase.api.models.files.FileCreateParams +import com.increase.api.models.files.FileListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -57,9 +59,29 @@ internal class FileServiceAsyncTest { .build() val fileServiceAsync = client.files() - val pageFuture = fileServiceAsync.list() + val filesFuture = + fileServiceAsync.list( + FileListParams.builder() + .createdAt( + FileListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .purpose( + FileListParams.Purpose.builder() + .addIn(FileListParams.Purpose.In.CARD_DISPUTE_ATTACHMENT) + .build() + ) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val files = filesFuture.get() + files.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/InboundAchTransferServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/InboundAchTransferServiceAsyncTest.kt index 85e52412b..433b0806e 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/InboundAchTransferServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/InboundAchTransferServiceAsyncTest.kt @@ -6,7 +6,9 @@ import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync import com.increase.api.models.inboundachtransfers.InboundAchTransferCreateNotificationOfChangeParams import com.increase.api.models.inboundachtransfers.InboundAchTransferDeclineParams +import com.increase.api.models.inboundachtransfers.InboundAchTransferListParams import com.increase.api.models.inboundachtransfers.InboundAchTransferTransferReturnParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -38,10 +40,31 @@ internal class InboundAchTransferServiceAsyncTest { .build() val inboundAchTransferServiceAsync = client.inboundAchTransfers() - val pageFuture = inboundAchTransferServiceAsync.list() + val inboundAchTransfersFuture = + inboundAchTransferServiceAsync.list( + InboundAchTransferListParams.builder() + .accountId("account_id") + .accountNumberId("account_number_id") + .createdAt( + InboundAchTransferListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .limit(1L) + .status( + InboundAchTransferListParams.Status.builder() + .addIn(InboundAchTransferListParams.Status.In.PENDING) + .build() + ) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val inboundAchTransfers = inboundAchTransfersFuture.get() + inboundAchTransfers.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/InboundCheckDepositServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/InboundCheckDepositServiceAsyncTest.kt index 65772d285..e577d1215 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/InboundCheckDepositServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/InboundCheckDepositServiceAsyncTest.kt @@ -4,7 +4,9 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync +import com.increase.api.models.inboundcheckdeposits.InboundCheckDepositListParams import com.increase.api.models.inboundcheckdeposits.InboundCheckDepositReturnParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -36,10 +38,26 @@ internal class InboundCheckDepositServiceAsyncTest { .build() val inboundCheckDepositServiceAsync = client.inboundCheckDeposits() - val pageFuture = inboundCheckDepositServiceAsync.list() + val inboundCheckDepositsFuture = + inboundCheckDepositServiceAsync.list( + InboundCheckDepositListParams.builder() + .accountId("account_id") + .checkTransferId("check_transfer_id") + .createdAt( + InboundCheckDepositListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .limit(1L) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val inboundCheckDeposits = inboundCheckDepositsFuture.get() + inboundCheckDeposits.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/InboundFednowTransferServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/InboundFednowTransferServiceAsyncTest.kt index 71b6d422b..a6a38e2df 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/InboundFednowTransferServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/InboundFednowTransferServiceAsyncTest.kt @@ -4,6 +4,8 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync +import com.increase.api.models.inboundfednowtransfers.InboundFednowTransferListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -37,9 +39,25 @@ internal class InboundFednowTransferServiceAsyncTest { .build() val inboundFednowTransferServiceAsync = client.inboundFednowTransfers() - val pageFuture = inboundFednowTransferServiceAsync.list() + val inboundFednowTransfersFuture = + inboundFednowTransferServiceAsync.list( + InboundFednowTransferListParams.builder() + .accountId("account_id") + .accountNumberId("account_number_id") + .createdAt( + InboundFednowTransferListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .limit(1L) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val inboundFednowTransfers = inboundFednowTransfersFuture.get() + inboundFednowTransfers.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/InboundMailItemServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/InboundMailItemServiceAsyncTest.kt index 908d760e7..019ba3aa8 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/InboundMailItemServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/InboundMailItemServiceAsyncTest.kt @@ -5,6 +5,8 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync import com.increase.api.models.inboundmailitems.InboundMailItemActionParams +import com.increase.api.models.inboundmailitems.InboundMailItemListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -36,10 +38,25 @@ internal class InboundMailItemServiceAsyncTest { .build() val inboundMailItemServiceAsync = client.inboundMailItems() - val pageFuture = inboundMailItemServiceAsync.list() + val inboundMailItemsFuture = + inboundMailItemServiceAsync.list( + InboundMailItemListParams.builder() + .createdAt( + InboundMailItemListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .limit(1L) + .lockboxId("lockbox_id") + .build() + ) - val page = pageFuture.get() - page.response().validate() + val inboundMailItems = inboundMailItemsFuture.get() + inboundMailItems.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/InboundRealTimePaymentsTransferServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/InboundRealTimePaymentsTransferServiceAsyncTest.kt index 49a0fb5f0..c3213cd5d 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/InboundRealTimePaymentsTransferServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/InboundRealTimePaymentsTransferServiceAsyncTest.kt @@ -4,6 +4,8 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync +import com.increase.api.models.inboundrealtimepaymentstransfers.InboundRealTimePaymentsTransferListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -37,9 +39,25 @@ internal class InboundRealTimePaymentsTransferServiceAsyncTest { .build() val inboundRealTimePaymentsTransferServiceAsync = client.inboundRealTimePaymentsTransfers() - val pageFuture = inboundRealTimePaymentsTransferServiceAsync.list() + val inboundRealTimePaymentsTransfersFuture = + inboundRealTimePaymentsTransferServiceAsync.list( + InboundRealTimePaymentsTransferListParams.builder() + .accountId("account_id") + .accountNumberId("account_number_id") + .createdAt( + InboundRealTimePaymentsTransferListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .limit(1L) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val inboundRealTimePaymentsTransfers = inboundRealTimePaymentsTransfersFuture.get() + inboundRealTimePaymentsTransfers.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/InboundWireDrawdownRequestServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/InboundWireDrawdownRequestServiceAsyncTest.kt index cf4e55311..0bed6a342 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/InboundWireDrawdownRequestServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/InboundWireDrawdownRequestServiceAsyncTest.kt @@ -4,6 +4,7 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync +import com.increase.api.models.inboundwiredrawdownrequests.InboundWireDrawdownRequestListParams import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -37,9 +38,12 @@ internal class InboundWireDrawdownRequestServiceAsyncTest { .build() val inboundWireDrawdownRequestServiceAsync = client.inboundWireDrawdownRequests() - val pageFuture = inboundWireDrawdownRequestServiceAsync.list() + val inboundWireDrawdownRequestsFuture = + inboundWireDrawdownRequestServiceAsync.list( + InboundWireDrawdownRequestListParams.builder().cursor("cursor").limit(1L).build() + ) - val page = pageFuture.get() - page.response().validate() + val inboundWireDrawdownRequests = inboundWireDrawdownRequestsFuture.get() + inboundWireDrawdownRequests.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/InboundWireTransferServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/InboundWireTransferServiceAsyncTest.kt index f9eff3102..3d07f80e2 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/InboundWireTransferServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/InboundWireTransferServiceAsyncTest.kt @@ -4,7 +4,9 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync +import com.increase.api.models.inboundwiretransfers.InboundWireTransferListParams import com.increase.api.models.inboundwiretransfers.InboundWireTransferReverseParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -36,10 +38,32 @@ internal class InboundWireTransferServiceAsyncTest { .build() val inboundWireTransferServiceAsync = client.inboundWireTransfers() - val pageFuture = inboundWireTransferServiceAsync.list() + val inboundWireTransfersFuture = + inboundWireTransferServiceAsync.list( + InboundWireTransferListParams.builder() + .accountId("account_id") + .accountNumberId("account_number_id") + .createdAt( + InboundWireTransferListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .limit(1L) + .status( + InboundWireTransferListParams.Status.builder() + .addIn(InboundWireTransferListParams.Status.In.PENDING) + .build() + ) + .wireDrawdownRequestId("wire_drawdown_request_id") + .build() + ) - val page = pageFuture.get() - page.response().validate() + val inboundWireTransfers = inboundWireTransfersFuture.get() + inboundWireTransfers.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/IntrafiAccountEnrollmentServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/IntrafiAccountEnrollmentServiceAsyncTest.kt index 4165318ed..a0b282259 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/IntrafiAccountEnrollmentServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/IntrafiAccountEnrollmentServiceAsyncTest.kt @@ -5,6 +5,7 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync import com.increase.api.models.intrafiaccountenrollments.IntrafiAccountEnrollmentCreateParams +import com.increase.api.models.intrafiaccountenrollments.IntrafiAccountEnrollmentListParams import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -59,10 +60,23 @@ internal class IntrafiAccountEnrollmentServiceAsyncTest { .build() val intrafiAccountEnrollmentServiceAsync = client.intrafiAccountEnrollments() - val pageFuture = intrafiAccountEnrollmentServiceAsync.list() + val intrafiAccountEnrollmentsFuture = + intrafiAccountEnrollmentServiceAsync.list( + IntrafiAccountEnrollmentListParams.builder() + .accountId("account_id") + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .status( + IntrafiAccountEnrollmentListParams.Status.builder() + .addIn(IntrafiAccountEnrollmentListParams.Status.In.PENDING_ENROLLING) + .build() + ) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val intrafiAccountEnrollments = intrafiAccountEnrollmentsFuture.get() + intrafiAccountEnrollments.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/IntrafiExclusionServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/IntrafiExclusionServiceAsyncTest.kt index cc112e5a1..05d06ec2a 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/IntrafiExclusionServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/IntrafiExclusionServiceAsyncTest.kt @@ -5,6 +5,7 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync import com.increase.api.models.intrafiexclusions.IntrafiExclusionCreateParams +import com.increase.api.models.intrafiexclusions.IntrafiExclusionListParams import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -57,10 +58,18 @@ internal class IntrafiExclusionServiceAsyncTest { .build() val intrafiExclusionServiceAsync = client.intrafiExclusions() - val pageFuture = intrafiExclusionServiceAsync.list() + val intrafiExclusionsFuture = + intrafiExclusionServiceAsync.list( + IntrafiExclusionListParams.builder() + .cursor("cursor") + .entityId("entity_id") + .idempotencyKey("x") + .limit(1L) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val intrafiExclusions = intrafiExclusionsFuture.get() + intrafiExclusions.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/LockboxServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/LockboxServiceAsyncTest.kt index 722e1d4a9..470eb2ab9 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/LockboxServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/LockboxServiceAsyncTest.kt @@ -5,7 +5,9 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync import com.increase.api.models.lockboxes.LockboxCreateParams +import com.increase.api.models.lockboxes.LockboxListParams import com.increase.api.models.lockboxes.LockboxUpdateParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -81,9 +83,25 @@ internal class LockboxServiceAsyncTest { .build() val lockboxServiceAsync = client.lockboxes() - val pageFuture = lockboxServiceAsync.list() + val lockboxesFuture = + lockboxServiceAsync.list( + LockboxListParams.builder() + .accountId("account_id") + .createdAt( + LockboxListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val lockboxes = lockboxesFuture.get() + lockboxes.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/OAuthApplicationServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/OAuthApplicationServiceAsyncTest.kt index 6bf584883..43a1af63b 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/OAuthApplicationServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/OAuthApplicationServiceAsyncTest.kt @@ -4,6 +4,8 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync +import com.increase.api.models.oauthapplications.OAuthApplicationListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -35,9 +37,28 @@ internal class OAuthApplicationServiceAsyncTest { .build() val oauthApplicationServiceAsync = client.oauthApplications() - val pageFuture = oauthApplicationServiceAsync.list() + val oauthApplicationsFuture = + oauthApplicationServiceAsync.list( + OAuthApplicationListParams.builder() + .createdAt( + OAuthApplicationListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .limit(1L) + .status( + OAuthApplicationListParams.Status.builder() + .addIn(OAuthApplicationListParams.Status.In.ACTIVE) + .build() + ) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val oauthApplications = oauthApplicationsFuture.get() + oauthApplications.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/OAuthConnectionServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/OAuthConnectionServiceAsyncTest.kt index 7e4c12812..0ac421f30 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/OAuthConnectionServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/OAuthConnectionServiceAsyncTest.kt @@ -4,6 +4,7 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync +import com.increase.api.models.oauthconnections.OAuthConnectionListParams import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -35,9 +36,21 @@ internal class OAuthConnectionServiceAsyncTest { .build() val oauthConnectionServiceAsync = client.oauthConnections() - val pageFuture = oauthConnectionServiceAsync.list() - - val page = pageFuture.get() - page.response().validate() + val oauthConnectionsFuture = + oauthConnectionServiceAsync.list( + OAuthConnectionListParams.builder() + .cursor("cursor") + .limit(1L) + .oauthApplicationId("oauth_application_id") + .status( + OAuthConnectionListParams.Status.builder() + .addIn(OAuthConnectionListParams.Status.In.ACTIVE) + .build() + ) + .build() + ) + + val oauthConnections = oauthConnectionsFuture.get() + oauthConnections.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/PendingTransactionServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/PendingTransactionServiceAsyncTest.kt index 4bdf755e8..3cbc1575b 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/PendingTransactionServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/PendingTransactionServiceAsyncTest.kt @@ -5,6 +5,8 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync import com.increase.api.models.pendingtransactions.PendingTransactionCreateParams +import com.increase.api.models.pendingtransactions.PendingTransactionListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -58,10 +60,39 @@ internal class PendingTransactionServiceAsyncTest { .build() val pendingTransactionServiceAsync = client.pendingTransactions() - val pageFuture = pendingTransactionServiceAsync.list() + val pendingTransactionsFuture = + pendingTransactionServiceAsync.list( + PendingTransactionListParams.builder() + .accountId("account_id") + .category( + PendingTransactionListParams.Category.builder() + .addIn( + PendingTransactionListParams.Category.In + .ACCOUNT_TRANSFER_INSTRUCTION + ) + .build() + ) + .createdAt( + PendingTransactionListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .limit(1L) + .routeId("route_id") + .status( + PendingTransactionListParams.Status.builder() + .addIn(PendingTransactionListParams.Status.In.PENDING) + .build() + ) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val pendingTransactions = pendingTransactionsFuture.get() + pendingTransactions.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/PhysicalCardProfileServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/PhysicalCardProfileServiceAsyncTest.kt index 56233a018..a9737d30c 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/PhysicalCardProfileServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/PhysicalCardProfileServiceAsyncTest.kt @@ -6,6 +6,7 @@ import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileCloneParams import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileCreateParams +import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileListParams import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -67,10 +68,22 @@ internal class PhysicalCardProfileServiceAsyncTest { .build() val physicalCardProfileServiceAsync = client.physicalCardProfiles() - val pageFuture = physicalCardProfileServiceAsync.list() + val physicalCardProfilesFuture = + physicalCardProfileServiceAsync.list( + PhysicalCardProfileListParams.builder() + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .status( + PhysicalCardProfileListParams.Status.builder() + .addIn(PhysicalCardProfileListParams.Status.In.PENDING_CREATING) + .build() + ) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val physicalCardProfiles = physicalCardProfilesFuture.get() + physicalCardProfiles.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/PhysicalCardServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/PhysicalCardServiceAsyncTest.kt index 985e64f1c..4f88f5687 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/PhysicalCardServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/PhysicalCardServiceAsyncTest.kt @@ -5,7 +5,9 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync import com.increase.api.models.physicalcards.PhysicalCardCreateParams +import com.increase.api.models.physicalcards.PhysicalCardListParams import com.increase.api.models.physicalcards.PhysicalCardUpdateParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -104,9 +106,25 @@ internal class PhysicalCardServiceAsyncTest { .build() val physicalCardServiceAsync = client.physicalCards() - val pageFuture = physicalCardServiceAsync.list() + val physicalCardsFuture = + physicalCardServiceAsync.list( + PhysicalCardListParams.builder() + .cardId("card_id") + .createdAt( + PhysicalCardListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val physicalCards = physicalCardsFuture.get() + physicalCards.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/ProgramServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/ProgramServiceAsyncTest.kt index f3c6c953e..564ae3557 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/ProgramServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/ProgramServiceAsyncTest.kt @@ -4,6 +4,7 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync +import com.increase.api.models.programs.ProgramListParams import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -34,9 +35,10 @@ internal class ProgramServiceAsyncTest { .build() val programServiceAsync = client.programs() - val pageFuture = programServiceAsync.list() + val programsFuture = + programServiceAsync.list(ProgramListParams.builder().cursor("cursor").limit(1L).build()) - val page = pageFuture.get() - page.response().validate() + val programs = programsFuture.get() + programs.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/RealTimePaymentsTransferServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/RealTimePaymentsTransferServiceAsyncTest.kt index 5ee858f6b..1d17d2e17 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/RealTimePaymentsTransferServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/RealTimePaymentsTransferServiceAsyncTest.kt @@ -5,6 +5,8 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransferCreateParams +import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransferListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -68,10 +70,32 @@ internal class RealTimePaymentsTransferServiceAsyncTest { .build() val realTimePaymentsTransferServiceAsync = client.realTimePaymentsTransfers() - val pageFuture = realTimePaymentsTransferServiceAsync.list() + val realTimePaymentsTransfersFuture = + realTimePaymentsTransferServiceAsync.list( + RealTimePaymentsTransferListParams.builder() + .accountId("account_id") + .createdAt( + RealTimePaymentsTransferListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .externalAccountId("external_account_id") + .idempotencyKey("x") + .limit(1L) + .status( + RealTimePaymentsTransferListParams.Status.builder() + .addIn(RealTimePaymentsTransferListParams.Status.In.PENDING_APPROVAL) + .build() + ) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val realTimePaymentsTransfers = realTimePaymentsTransfersFuture.get() + realTimePaymentsTransfers.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/RoutingNumberServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/RoutingNumberServiceAsyncTest.kt index d6e89a104..e2643a0df 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/RoutingNumberServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/RoutingNumberServiceAsyncTest.kt @@ -20,12 +20,16 @@ internal class RoutingNumberServiceAsyncTest { .build() val routingNumberServiceAsync = client.routingNumbers() - val pageFuture = + val routingNumbersFuture = routingNumberServiceAsync.list( - RoutingNumberListParams.builder().routingNumber("xxxxxxxxx").build() + RoutingNumberListParams.builder() + .routingNumber("xxxxxxxxx") + .cursor("cursor") + .limit(1L) + .build() ) - val page = pageFuture.get() - page.response().validate() + val routingNumbers = routingNumbersFuture.get() + routingNumbers.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/SupplementalDocumentServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/SupplementalDocumentServiceAsyncTest.kt index 26ae90a18..e80616159 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/SupplementalDocumentServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/SupplementalDocumentServiceAsyncTest.kt @@ -42,12 +42,17 @@ internal class SupplementalDocumentServiceAsyncTest { .build() val supplementalDocumentServiceAsync = client.supplementalDocuments() - val pageFuture = + val supplementalDocumentsFuture = supplementalDocumentServiceAsync.list( - SupplementalDocumentListParams.builder().entityId("entity_id").build() + SupplementalDocumentListParams.builder() + .entityId("entity_id") + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .build() ) - val page = pageFuture.get() - page.response().validate() + val supplementalDocuments = supplementalDocumentsFuture.get() + supplementalDocuments.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/TransactionServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/TransactionServiceAsyncTest.kt index bc7caa32f..735da9639 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/TransactionServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/TransactionServiceAsyncTest.kt @@ -4,6 +4,8 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync +import com.increase.api.models.transactions.TransactionListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -34,9 +36,30 @@ internal class TransactionServiceAsyncTest { .build() val transactionServiceAsync = client.transactions() - val pageFuture = transactionServiceAsync.list() + val transactionsFuture = + transactionServiceAsync.list( + TransactionListParams.builder() + .accountId("account_id") + .category( + TransactionListParams.Category.builder() + .addIn(TransactionListParams.Category.In.ACCOUNT_TRANSFER_INTENTION) + .build() + ) + .createdAt( + TransactionListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .limit(1L) + .routeId("route_id") + .build() + ) - val page = pageFuture.get() - page.response().validate() + val transactions = transactionsFuture.get() + transactions.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/WireDrawdownRequestServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/WireDrawdownRequestServiceAsyncTest.kt index 68f966318..75127067f 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/WireDrawdownRequestServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/WireDrawdownRequestServiceAsyncTest.kt @@ -5,6 +5,7 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync import com.increase.api.models.wiredrawdownrequests.WireDrawdownRequestCreateParams +import com.increase.api.models.wiredrawdownrequests.WireDrawdownRequestListParams import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -83,9 +84,21 @@ internal class WireDrawdownRequestServiceAsyncTest { .build() val wireDrawdownRequestServiceAsync = client.wireDrawdownRequests() - val pageFuture = wireDrawdownRequestServiceAsync.list() + val wireDrawdownRequestsFuture = + wireDrawdownRequestServiceAsync.list( + WireDrawdownRequestListParams.builder() + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .status( + WireDrawdownRequestListParams.Status.builder() + .addIn(WireDrawdownRequestListParams.Status.In.PENDING_SUBMISSION) + .build() + ) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val wireDrawdownRequests = wireDrawdownRequestsFuture.get() + wireDrawdownRequests.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/WireTransferServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/WireTransferServiceAsyncTest.kt index 29516b117..2d82882ce 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/WireTransferServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/WireTransferServiceAsyncTest.kt @@ -5,7 +5,9 @@ package com.increase.api.services.async import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync import com.increase.api.models.wiretransfers.WireTransferCreateParams +import com.increase.api.models.wiretransfers.WireTransferListParams import java.time.LocalDate +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -115,10 +117,27 @@ internal class WireTransferServiceAsyncTest { .build() val wireTransferServiceAsync = client.wireTransfers() - val pageFuture = wireTransferServiceAsync.list() + val wireTransfersFuture = + wireTransferServiceAsync.list( + WireTransferListParams.builder() + .accountId("account_id") + .createdAt( + WireTransferListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .externalAccountId("external_account_id") + .idempotencyKey("x") + .limit(1L) + .build() + ) - val page = pageFuture.get() - page.response().validate() + val wireTransfers = wireTransfersFuture.get() + wireTransfers.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/AccountNumberServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/AccountNumberServiceTest.kt index 8bdbe6689..c89da7f0d 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/AccountNumberServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/AccountNumberServiceTest.kt @@ -5,7 +5,9 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient import com.increase.api.models.accountnumbers.AccountNumberCreateParams +import com.increase.api.models.accountnumbers.AccountNumberListParams import com.increase.api.models.accountnumbers.AccountNumberUpdateParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -96,8 +98,34 @@ internal class AccountNumberServiceTest { .build() val accountNumberService = client.accountNumbers() - val page = accountNumberService.list() + val accountNumbers = + accountNumberService.list( + AccountNumberListParams.builder() + .accountId("account_id") + .achDebitStatus( + AccountNumberListParams.AchDebitStatus.builder() + .addIn(AccountNumberListParams.AchDebitStatus.In.ALLOWED) + .build() + ) + .createdAt( + AccountNumberListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .status( + AccountNumberListParams.Status.builder() + .addIn(AccountNumberListParams.Status.In.ACTIVE) + .build() + ) + .build() + ) - page.response().validate() + accountNumbers.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/AccountServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/AccountServiceTest.kt index 299f3c373..4d8324157 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/AccountServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/AccountServiceTest.kt @@ -6,6 +6,7 @@ import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient import com.increase.api.models.accounts.AccountBalanceParams import com.increase.api.models.accounts.AccountCreateParams +import com.increase.api.models.accounts.AccountListParams import com.increase.api.models.accounts.AccountUpdateParams import java.time.OffsetDateTime import org.junit.jupiter.api.Test @@ -80,9 +81,32 @@ internal class AccountServiceTest { .build() val accountService = client.accounts() - val page = accountService.list() + val accounts = + accountService.list( + AccountListParams.builder() + .createdAt( + AccountListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .entityId("entity_id") + .idempotencyKey("x") + .informationalEntityId("informational_entity_id") + .limit(1L) + .programId("program_id") + .status( + AccountListParams.Status.builder() + .addIn(AccountListParams.Status.In.CLOSED) + .build() + ) + .build() + ) - page.response().validate() + accounts.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/AccountStatementServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/AccountStatementServiceTest.kt index c0c7b3e53..03c4c29e1 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/AccountStatementServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/AccountStatementServiceTest.kt @@ -4,6 +4,8 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient +import com.increase.api.models.accountstatements.AccountStatementListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -34,8 +36,23 @@ internal class AccountStatementServiceTest { .build() val accountStatementService = client.accountStatements() - val page = accountStatementService.list() - - page.response().validate() + val accountStatements = + accountStatementService.list( + AccountStatementListParams.builder() + .accountId("account_id") + .cursor("cursor") + .limit(1L) + .statementPeriodStart( + AccountStatementListParams.StatementPeriodStart.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .build() + ) + + accountStatements.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/AccountTransferServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/AccountTransferServiceTest.kt index cf35b517d..6cb5b1a24 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/AccountTransferServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/AccountTransferServiceTest.kt @@ -5,6 +5,8 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient import com.increase.api.models.accounttransfers.AccountTransferCreateParams +import com.increase.api.models.accounttransfers.AccountTransferListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -58,9 +60,25 @@ internal class AccountTransferServiceTest { .build() val accountTransferService = client.accountTransfers() - val page = accountTransferService.list() + val accountTransfers = + accountTransferService.list( + AccountTransferListParams.builder() + .accountId("account_id") + .createdAt( + AccountTransferListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .build() + ) - page.response().validate() + accountTransfers.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/AchPrenotificationServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/AchPrenotificationServiceTest.kt index 32e48cdef..fd7f72451 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/AchPrenotificationServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/AchPrenotificationServiceTest.kt @@ -5,7 +5,9 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient import com.increase.api.models.achprenotifications.AchPrenotificationCreateParams +import com.increase.api.models.achprenotifications.AchPrenotificationListParams import java.time.LocalDate +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -72,8 +74,23 @@ internal class AchPrenotificationServiceTest { .build() val achPrenotificationService = client.achPrenotifications() - val page = achPrenotificationService.list() + val achPrenotifications = + achPrenotificationService.list( + AchPrenotificationListParams.builder() + .createdAt( + AchPrenotificationListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .build() + ) - page.response().validate() + achPrenotifications.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/AchTransferServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/AchTransferServiceTest.kt index 93b7cb6a4..b98938162 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/AchTransferServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/AchTransferServiceTest.kt @@ -5,7 +5,9 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient import com.increase.api.models.achtransfers.AchTransferCreateParams +import com.increase.api.models.achtransfers.AchTransferListParams import java.time.LocalDate +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -110,9 +112,31 @@ internal class AchTransferServiceTest { .build() val achTransferService = client.achTransfers() - val page = achTransferService.list() + val achTransfers = + achTransferService.list( + AchTransferListParams.builder() + .accountId("account_id") + .createdAt( + AchTransferListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .externalAccountId("external_account_id") + .idempotencyKey("x") + .limit(1L) + .status( + AchTransferListParams.Status.builder() + .addIn(AchTransferListParams.Status.In.PENDING_APPROVAL) + .build() + ) + .build() + ) - page.response().validate() + achTransfers.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/BookkeepingAccountServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/BookkeepingAccountServiceTest.kt index aa25ea295..4f1f97061 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/BookkeepingAccountServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/BookkeepingAccountServiceTest.kt @@ -6,6 +6,7 @@ import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient import com.increase.api.models.bookkeepingaccounts.BookkeepingAccountBalanceParams import com.increase.api.models.bookkeepingaccounts.BookkeepingAccountCreateParams +import com.increase.api.models.bookkeepingaccounts.BookkeepingAccountListParams import com.increase.api.models.bookkeepingaccounts.BookkeepingAccountUpdateParams import java.time.OffsetDateTime import org.junit.jupiter.api.Test @@ -67,9 +68,16 @@ internal class BookkeepingAccountServiceTest { .build() val bookkeepingAccountService = client.bookkeepingAccounts() - val page = bookkeepingAccountService.list() + val bookkeepingAccounts = + bookkeepingAccountService.list( + BookkeepingAccountListParams.builder() + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .build() + ) - page.response().validate() + bookkeepingAccounts.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/BookkeepingEntryServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/BookkeepingEntryServiceTest.kt index 04a415582..d81727782 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/BookkeepingEntryServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/BookkeepingEntryServiceTest.kt @@ -4,6 +4,7 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient +import com.increase.api.models.bookkeepingentries.BookkeepingEntryListParams import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -34,8 +35,15 @@ internal class BookkeepingEntryServiceTest { .build() val bookkeepingEntryService = client.bookkeepingEntries() - val page = bookkeepingEntryService.list() + val bookkeepingEntries = + bookkeepingEntryService.list( + BookkeepingEntryListParams.builder() + .accountId("account_id") + .cursor("cursor") + .limit(1L) + .build() + ) - page.response().validate() + bookkeepingEntries.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/BookkeepingEntrySetServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/BookkeepingEntrySetServiceTest.kt index 4e5db7b7e..68a3bccc2 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/BookkeepingEntrySetServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/BookkeepingEntrySetServiceTest.kt @@ -5,6 +5,7 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient import com.increase.api.models.bookkeepingentrysets.BookkeepingEntrySetCreateParams +import com.increase.api.models.bookkeepingentrysets.BookkeepingEntrySetListParams import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -68,8 +69,16 @@ internal class BookkeepingEntrySetServiceTest { .build() val bookkeepingEntrySetService = client.bookkeepingEntrySets() - val page = bookkeepingEntrySetService.list() + val bookkeepingEntrySets = + bookkeepingEntrySetService.list( + BookkeepingEntrySetListParams.builder() + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .transactionId("transaction_id") + .build() + ) - page.response().validate() + bookkeepingEntrySets.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CardDisputeServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CardDisputeServiceTest.kt index e4296d8d5..ae412181b 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CardDisputeServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CardDisputeServiceTest.kt @@ -5,8 +5,10 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient import com.increase.api.models.carddisputes.CardDisputeCreateParams +import com.increase.api.models.carddisputes.CardDisputeListParams import com.increase.api.models.carddisputes.CardDisputeSubmitUserSubmissionParams import java.time.LocalDate +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -781,9 +783,29 @@ internal class CardDisputeServiceTest { .build() val cardDisputeService = client.cardDisputes() - val page = cardDisputeService.list() + val cardDisputes = + cardDisputeService.list( + CardDisputeListParams.builder() + .createdAt( + CardDisputeListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .status( + CardDisputeListParams.Status.builder() + .addIn(CardDisputeListParams.Status.In.USER_SUBMISSION_REQUIRED) + .build() + ) + .build() + ) - page.response().validate() + cardDisputes.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CardPaymentServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CardPaymentServiceTest.kt index 1d83492f6..99559ac9f 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CardPaymentServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CardPaymentServiceTest.kt @@ -4,6 +4,8 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient +import com.increase.api.models.cardpayments.CardPaymentListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -33,8 +35,24 @@ internal class CardPaymentServiceTest { .build() val cardPaymentService = client.cardPayments() - val page = cardPaymentService.list() - - page.response().validate() + val cardPayments = + cardPaymentService.list( + CardPaymentListParams.builder() + .accountId("account_id") + .cardId("card_id") + .createdAt( + CardPaymentListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .limit(1L) + .build() + ) + + cardPayments.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CardPurchaseSupplementServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CardPurchaseSupplementServiceTest.kt index 146639d98..d2947ede5 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CardPurchaseSupplementServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CardPurchaseSupplementServiceTest.kt @@ -4,6 +4,8 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient +import com.increase.api.models.cardpurchasesupplements.CardPurchaseSupplementListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -34,8 +36,23 @@ internal class CardPurchaseSupplementServiceTest { .build() val cardPurchaseSupplementService = client.cardPurchaseSupplements() - val page = cardPurchaseSupplementService.list() - - page.response().validate() + val cardPurchaseSupplements = + cardPurchaseSupplementService.list( + CardPurchaseSupplementListParams.builder() + .cardPaymentId("card_payment_id") + .createdAt( + CardPurchaseSupplementListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .limit(1L) + .build() + ) + + cardPurchaseSupplements.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CardPushTransferServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CardPushTransferServiceTest.kt index a406c3052..ab50f370d 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CardPushTransferServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CardPushTransferServiceTest.kt @@ -5,6 +5,8 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient import com.increase.api.models.cardpushtransfers.CardPushTransferCreateParams +import com.increase.api.models.cardpushtransfers.CardPushTransferListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -78,9 +80,30 @@ internal class CardPushTransferServiceTest { .build() val cardPushTransferService = client.cardPushTransfers() - val page = cardPushTransferService.list() + val cardPushTransfers = + cardPushTransferService.list( + CardPushTransferListParams.builder() + .accountId("account_id") + .createdAt( + CardPushTransferListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .status( + CardPushTransferListParams.Status.builder() + .addIn(CardPushTransferListParams.Status.In.PENDING_APPROVAL) + .build() + ) + .build() + ) - page.response().validate() + cardPushTransfers.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CardServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CardServiceTest.kt index ecab06e8f..454876590 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CardServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CardServiceTest.kt @@ -6,8 +6,10 @@ import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient import com.increase.api.models.cards.CardCreateDetailsIframeParams import com.increase.api.models.cards.CardCreateParams +import com.increase.api.models.cards.CardListParams import com.increase.api.models.cards.CardUpdateParams import com.increase.api.models.cards.CardUpdatePinParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -112,9 +114,30 @@ internal class CardServiceTest { .build() val cardService = client.cards() - val page = cardService.list() + val cards = + cardService.list( + CardListParams.builder() + .accountId("account_id") + .createdAt( + CardListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .status( + CardListParams.Status.builder() + .addIn(CardListParams.Status.In.ACTIVE) + .build() + ) + .build() + ) - page.response().validate() + cards.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CardTokenServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CardTokenServiceTest.kt index 636c60786..8180ea47f 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CardTokenServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CardTokenServiceTest.kt @@ -4,6 +4,8 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient +import com.increase.api.models.cardtokens.CardTokenListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -33,9 +35,23 @@ internal class CardTokenServiceTest { .build() val cardTokenService = client.cardTokens() - val page = cardTokenService.list() + val cardTokens = + cardTokenService.list( + CardTokenListParams.builder() + .createdAt( + CardTokenListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .limit(1L) + .build() + ) - page.response().validate() + cardTokens.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CardValidationServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CardValidationServiceTest.kt index c17f21ca5..32a77a349 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CardValidationServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CardValidationServiceTest.kt @@ -5,6 +5,8 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient import com.increase.api.models.cardvalidations.CardValidationCreateParams +import com.increase.api.models.cardvalidations.CardValidationListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -65,8 +67,29 @@ internal class CardValidationServiceTest { .build() val cardValidationService = client.cardValidations() - val page = cardValidationService.list() + val cardValidations = + cardValidationService.list( + CardValidationListParams.builder() + .accountId("account_id") + .createdAt( + CardValidationListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .status( + CardValidationListParams.Status.builder() + .addIn(CardValidationListParams.Status.In.REQUIRES_ATTENTION) + .build() + ) + .build() + ) - page.response().validate() + cardValidations.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CheckDepositServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CheckDepositServiceTest.kt index fcad45c52..fe9b1661a 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CheckDepositServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CheckDepositServiceTest.kt @@ -5,6 +5,8 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient import com.increase.api.models.checkdeposits.CheckDepositCreateParams +import com.increase.api.models.checkdeposits.CheckDepositListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -57,8 +59,24 @@ internal class CheckDepositServiceTest { .build() val checkDepositService = client.checkDeposits() - val page = checkDepositService.list() + val checkDeposits = + checkDepositService.list( + CheckDepositListParams.builder() + .accountId("account_id") + .createdAt( + CheckDepositListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .build() + ) - page.response().validate() + checkDeposits.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CheckTransferServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CheckTransferServiceTest.kt index d1755c695..9fe7297d7 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CheckTransferServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CheckTransferServiceTest.kt @@ -5,8 +5,10 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient import com.increase.api.models.checktransfers.CheckTransferCreateParams +import com.increase.api.models.checktransfers.CheckTransferListParams import com.increase.api.models.checktransfers.CheckTransferStopPaymentParams import java.time.LocalDate +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -105,9 +107,30 @@ internal class CheckTransferServiceTest { .build() val checkTransferService = client.checkTransfers() - val page = checkTransferService.list() + val checkTransfers = + checkTransferService.list( + CheckTransferListParams.builder() + .accountId("account_id") + .createdAt( + CheckTransferListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .status( + CheckTransferListParams.Status.builder() + .addIn(CheckTransferListParams.Status.In.PENDING_APPROVAL) + .build() + ) + .build() + ) - page.response().validate() + checkTransfers.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/DeclinedTransactionServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/DeclinedTransactionServiceTest.kt index efa38cff9..b59590254 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/DeclinedTransactionServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/DeclinedTransactionServiceTest.kt @@ -4,6 +4,8 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient +import com.increase.api.models.declinedtransactions.DeclinedTransactionListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -34,8 +36,29 @@ internal class DeclinedTransactionServiceTest { .build() val declinedTransactionService = client.declinedTransactions() - val page = declinedTransactionService.list() + val declinedTransactions = + declinedTransactionService.list( + DeclinedTransactionListParams.builder() + .accountId("account_id") + .category( + DeclinedTransactionListParams.Category.builder() + .addIn(DeclinedTransactionListParams.Category.In.ACH_DECLINE) + .build() + ) + .createdAt( + DeclinedTransactionListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .limit(1L) + .routeId("route_id") + .build() + ) - page.response().validate() + declinedTransactions.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/DigitalCardProfileServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/DigitalCardProfileServiceTest.kt index ac93dd20c..4a405c7c1 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/DigitalCardProfileServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/DigitalCardProfileServiceTest.kt @@ -6,6 +6,7 @@ import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient import com.increase.api.models.digitalcardprofiles.DigitalCardProfileCloneParams import com.increase.api.models.digitalcardprofiles.DigitalCardProfileCreateParams +import com.increase.api.models.digitalcardprofiles.DigitalCardProfileListParams import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -69,9 +70,21 @@ internal class DigitalCardProfileServiceTest { .build() val digitalCardProfileService = client.digitalCardProfiles() - val page = digitalCardProfileService.list() + val digitalCardProfiles = + digitalCardProfileService.list( + DigitalCardProfileListParams.builder() + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .status( + DigitalCardProfileListParams.Status.builder() + .addIn(DigitalCardProfileListParams.Status.In.PENDING) + .build() + ) + .build() + ) - page.response().validate() + digitalCardProfiles.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/DigitalWalletTokenServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/DigitalWalletTokenServiceTest.kt index 7f151f7f1..8c231b500 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/DigitalWalletTokenServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/DigitalWalletTokenServiceTest.kt @@ -4,6 +4,8 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient +import com.increase.api.models.digitalwallettokens.DigitalWalletTokenListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -34,8 +36,23 @@ internal class DigitalWalletTokenServiceTest { .build() val digitalWalletTokenService = client.digitalWalletTokens() - val page = digitalWalletTokenService.list() - - page.response().validate() + val digitalWalletTokens = + digitalWalletTokenService.list( + DigitalWalletTokenListParams.builder() + .cardId("card_id") + .createdAt( + DigitalWalletTokenListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .limit(1L) + .build() + ) + + digitalWalletTokens.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/DocumentServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/DocumentServiceTest.kt index e64bfb09d..ec049380f 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/DocumentServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/DocumentServiceTest.kt @@ -5,7 +5,9 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient import com.increase.api.models.documents.DocumentCreateParams +import com.increase.api.models.documents.DocumentListParams import java.time.LocalDate +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -65,8 +67,29 @@ internal class DocumentServiceTest { .build() val documentService = client.documents() - val page = documentService.list() + val documents = + documentService.list( + DocumentListParams.builder() + .category( + DocumentListParams.Category.builder() + .addIn(DocumentListParams.Category.In.FORM_1099_INT) + .build() + ) + .createdAt( + DocumentListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .entityId("entity_id") + .idempotencyKey("x") + .limit(1L) + .build() + ) - page.response().validate() + documents.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/EntityServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/EntityServiceTest.kt index fb0a01cf1..3e265ad30 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/EntityServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/EntityServiceTest.kt @@ -8,6 +8,7 @@ import com.increase.api.models.entities.EntityArchiveBeneficialOwnerParams import com.increase.api.models.entities.EntityConfirmParams import com.increase.api.models.entities.EntityCreateBeneficialOwnerParams import com.increase.api.models.entities.EntityCreateParams +import com.increase.api.models.entities.EntityListParams import com.increase.api.models.entities.EntityUpdateAddressParams import com.increase.api.models.entities.EntityUpdateBeneficialOwnerAddressParams import com.increase.api.models.entities.EntityUpdateIndustryCodeParams @@ -566,9 +567,29 @@ internal class EntityServiceTest { .build() val entityService = client.entities() - val page = entityService.list() + val entities = + entityService.list( + EntityListParams.builder() + .createdAt( + EntityListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .status( + EntityListParams.Status.builder() + .addIn(EntityListParams.Status.In.ACTIVE) + .build() + ) + .build() + ) - page.response().validate() + entities.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/EventServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/EventServiceTest.kt index b3cabcbbb..6cc860848 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/EventServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/EventServiceTest.kt @@ -4,6 +4,8 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient +import com.increase.api.models.events.EventListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -33,8 +35,28 @@ internal class EventServiceTest { .build() val eventService = client.events() - val page = eventService.list() - - page.response().validate() + val events = + eventService.list( + EventListParams.builder() + .associatedObjectId("associated_object_id") + .category( + EventListParams.Category.builder() + .addIn(EventListParams.Category.In.ACCOUNT_CREATED) + .build() + ) + .createdAt( + EventListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .limit(1L) + .build() + ) + + events.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/EventSubscriptionServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/EventSubscriptionServiceTest.kt index 6f1e4eb22..db58b42be 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/EventSubscriptionServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/EventSubscriptionServiceTest.kt @@ -5,6 +5,7 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient import com.increase.api.models.eventsubscriptions.EventSubscriptionCreateParams +import com.increase.api.models.eventsubscriptions.EventSubscriptionListParams import com.increase.api.models.eventsubscriptions.EventSubscriptionUpdateParams import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -81,8 +82,15 @@ internal class EventSubscriptionServiceTest { .build() val eventSubscriptionService = client.eventSubscriptions() - val page = eventSubscriptionService.list() + val eventSubscriptions = + eventSubscriptionService.list( + EventSubscriptionListParams.builder() + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .build() + ) - page.response().validate() + eventSubscriptions.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/ExportServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/ExportServiceTest.kt index c98cd80d1..4edcd4412 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/ExportServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/ExportServiceTest.kt @@ -5,6 +5,7 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient import com.increase.api.models.exports.ExportCreateParams +import com.increase.api.models.exports.ExportListParams import java.time.LocalDate import java.time.OffsetDateTime import org.junit.jupiter.api.Test @@ -126,8 +127,33 @@ internal class ExportServiceTest { .build() val exportService = client.exports() - val page = exportService.list() + val exports = + exportService.list( + ExportListParams.builder() + .category( + ExportListParams.Category.builder() + .addIn(ExportListParams.Category.In.ACCOUNT_STATEMENT_OFX) + .build() + ) + .createdAt( + ExportListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .status( + ExportListParams.Status.builder() + .addIn(ExportListParams.Status.In.PENDING) + .build() + ) + .build() + ) - page.response().validate() + exports.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/ExternalAccountServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/ExternalAccountServiceTest.kt index 922721cb3..61327f607 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/ExternalAccountServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/ExternalAccountServiceTest.kt @@ -5,6 +5,7 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient import com.increase.api.models.externalaccounts.ExternalAccountCreateParams +import com.increase.api.models.externalaccounts.ExternalAccountListParams import com.increase.api.models.externalaccounts.ExternalAccountUpdateParams import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -82,8 +83,21 @@ internal class ExternalAccountServiceTest { .build() val externalAccountService = client.externalAccounts() - val page = externalAccountService.list() + val externalAccounts = + externalAccountService.list( + ExternalAccountListParams.builder() + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .routingNumber("xxxxxxxxx") + .status( + ExternalAccountListParams.Status.builder() + .addIn(ExternalAccountListParams.Status.In.ACTIVE) + .build() + ) + .build() + ) - page.response().validate() + externalAccounts.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/FednowTransferServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/FednowTransferServiceTest.kt index 7dcad0dc8..5086c7316 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/FednowTransferServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/FednowTransferServiceTest.kt @@ -5,6 +5,8 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient import com.increase.api.models.fednowtransfers.FednowTransferCreateParams +import com.increase.api.models.fednowtransfers.FednowTransferListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -78,9 +80,31 @@ internal class FednowTransferServiceTest { .build() val fednowTransferService = client.fednowTransfers() - val page = fednowTransferService.list() + val fednowTransfers = + fednowTransferService.list( + FednowTransferListParams.builder() + .accountId("account_id") + .createdAt( + FednowTransferListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .externalAccountId("external_account_id") + .idempotencyKey("x") + .limit(1L) + .status( + FednowTransferListParams.Status.builder() + .addIn(FednowTransferListParams.Status.In.PENDING_REVIEWING) + .build() + ) + .build() + ) - page.response().validate() + fednowTransfers.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/FileServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/FileServiceTest.kt index cb3570b2a..d60564adf 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/FileServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/FileServiceTest.kt @@ -5,6 +5,8 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient import com.increase.api.models.files.FileCreateParams +import com.increase.api.models.files.FileListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -55,8 +57,28 @@ internal class FileServiceTest { .build() val fileService = client.files() - val page = fileService.list() + val files = + fileService.list( + FileListParams.builder() + .createdAt( + FileListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .purpose( + FileListParams.Purpose.builder() + .addIn(FileListParams.Purpose.In.CARD_DISPUTE_ATTACHMENT) + .build() + ) + .build() + ) - page.response().validate() + files.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/InboundAchTransferServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/InboundAchTransferServiceTest.kt index fa3ed19de..82090363c 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/InboundAchTransferServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/InboundAchTransferServiceTest.kt @@ -6,7 +6,9 @@ import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient import com.increase.api.models.inboundachtransfers.InboundAchTransferCreateNotificationOfChangeParams import com.increase.api.models.inboundachtransfers.InboundAchTransferDeclineParams +import com.increase.api.models.inboundachtransfers.InboundAchTransferListParams import com.increase.api.models.inboundachtransfers.InboundAchTransferTransferReturnParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -37,9 +39,30 @@ internal class InboundAchTransferServiceTest { .build() val inboundAchTransferService = client.inboundAchTransfers() - val page = inboundAchTransferService.list() + val inboundAchTransfers = + inboundAchTransferService.list( + InboundAchTransferListParams.builder() + .accountId("account_id") + .accountNumberId("account_number_id") + .createdAt( + InboundAchTransferListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .limit(1L) + .status( + InboundAchTransferListParams.Status.builder() + .addIn(InboundAchTransferListParams.Status.In.PENDING) + .build() + ) + .build() + ) - page.response().validate() + inboundAchTransfers.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/InboundCheckDepositServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/InboundCheckDepositServiceTest.kt index 9b66d2269..2d5bb62e3 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/InboundCheckDepositServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/InboundCheckDepositServiceTest.kt @@ -4,7 +4,9 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient +import com.increase.api.models.inboundcheckdeposits.InboundCheckDepositListParams import com.increase.api.models.inboundcheckdeposits.InboundCheckDepositReturnParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -35,9 +37,25 @@ internal class InboundCheckDepositServiceTest { .build() val inboundCheckDepositService = client.inboundCheckDeposits() - val page = inboundCheckDepositService.list() + val inboundCheckDeposits = + inboundCheckDepositService.list( + InboundCheckDepositListParams.builder() + .accountId("account_id") + .checkTransferId("check_transfer_id") + .createdAt( + InboundCheckDepositListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .limit(1L) + .build() + ) - page.response().validate() + inboundCheckDeposits.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/InboundFednowTransferServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/InboundFednowTransferServiceTest.kt index 52147b35f..32750eb86 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/InboundFednowTransferServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/InboundFednowTransferServiceTest.kt @@ -4,6 +4,8 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient +import com.increase.api.models.inboundfednowtransfers.InboundFednowTransferListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -34,8 +36,24 @@ internal class InboundFednowTransferServiceTest { .build() val inboundFednowTransferService = client.inboundFednowTransfers() - val page = inboundFednowTransferService.list() - - page.response().validate() + val inboundFednowTransfers = + inboundFednowTransferService.list( + InboundFednowTransferListParams.builder() + .accountId("account_id") + .accountNumberId("account_number_id") + .createdAt( + InboundFednowTransferListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .limit(1L) + .build() + ) + + inboundFednowTransfers.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/InboundMailItemServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/InboundMailItemServiceTest.kt index df84998b1..3f4037b01 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/InboundMailItemServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/InboundMailItemServiceTest.kt @@ -5,6 +5,8 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient import com.increase.api.models.inboundmailitems.InboundMailItemActionParams +import com.increase.api.models.inboundmailitems.InboundMailItemListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -35,9 +37,24 @@ internal class InboundMailItemServiceTest { .build() val inboundMailItemService = client.inboundMailItems() - val page = inboundMailItemService.list() + val inboundMailItems = + inboundMailItemService.list( + InboundMailItemListParams.builder() + .createdAt( + InboundMailItemListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .limit(1L) + .lockboxId("lockbox_id") + .build() + ) - page.response().validate() + inboundMailItems.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/InboundRealTimePaymentsTransferServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/InboundRealTimePaymentsTransferServiceTest.kt index ba010e944..06e7c8f9d 100755 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/InboundRealTimePaymentsTransferServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/InboundRealTimePaymentsTransferServiceTest.kt @@ -4,6 +4,8 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient +import com.increase.api.models.inboundrealtimepaymentstransfers.InboundRealTimePaymentsTransferListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -36,8 +38,24 @@ internal class InboundRealTimePaymentsTransferServiceTest { .build() val inboundRealTimePaymentsTransferService = client.inboundRealTimePaymentsTransfers() - val page = inboundRealTimePaymentsTransferService.list() + val inboundRealTimePaymentsTransfers = + inboundRealTimePaymentsTransferService.list( + InboundRealTimePaymentsTransferListParams.builder() + .accountId("account_id") + .accountNumberId("account_number_id") + .createdAt( + InboundRealTimePaymentsTransferListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .limit(1L) + .build() + ) - page.response().validate() + inboundRealTimePaymentsTransfers.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/InboundWireDrawdownRequestServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/InboundWireDrawdownRequestServiceTest.kt index 0533025bd..42a19a1b6 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/InboundWireDrawdownRequestServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/InboundWireDrawdownRequestServiceTest.kt @@ -4,6 +4,7 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient +import com.increase.api.models.inboundwiredrawdownrequests.InboundWireDrawdownRequestListParams import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -36,8 +37,11 @@ internal class InboundWireDrawdownRequestServiceTest { .build() val inboundWireDrawdownRequestService = client.inboundWireDrawdownRequests() - val page = inboundWireDrawdownRequestService.list() + val inboundWireDrawdownRequests = + inboundWireDrawdownRequestService.list( + InboundWireDrawdownRequestListParams.builder().cursor("cursor").limit(1L).build() + ) - page.response().validate() + inboundWireDrawdownRequests.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/InboundWireTransferServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/InboundWireTransferServiceTest.kt index 7f1070aa5..1b5b0648f 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/InboundWireTransferServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/InboundWireTransferServiceTest.kt @@ -4,7 +4,9 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient +import com.increase.api.models.inboundwiretransfers.InboundWireTransferListParams import com.increase.api.models.inboundwiretransfers.InboundWireTransferReverseParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -35,9 +37,31 @@ internal class InboundWireTransferServiceTest { .build() val inboundWireTransferService = client.inboundWireTransfers() - val page = inboundWireTransferService.list() + val inboundWireTransfers = + inboundWireTransferService.list( + InboundWireTransferListParams.builder() + .accountId("account_id") + .accountNumberId("account_number_id") + .createdAt( + InboundWireTransferListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .limit(1L) + .status( + InboundWireTransferListParams.Status.builder() + .addIn(InboundWireTransferListParams.Status.In.PENDING) + .build() + ) + .wireDrawdownRequestId("wire_drawdown_request_id") + .build() + ) - page.response().validate() + inboundWireTransfers.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/IntrafiAccountEnrollmentServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/IntrafiAccountEnrollmentServiceTest.kt index 05254a947..1fee4201b 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/IntrafiAccountEnrollmentServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/IntrafiAccountEnrollmentServiceTest.kt @@ -5,6 +5,7 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient import com.increase.api.models.intrafiaccountenrollments.IntrafiAccountEnrollmentCreateParams +import com.increase.api.models.intrafiaccountenrollments.IntrafiAccountEnrollmentListParams import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -57,9 +58,22 @@ internal class IntrafiAccountEnrollmentServiceTest { .build() val intrafiAccountEnrollmentService = client.intrafiAccountEnrollments() - val page = intrafiAccountEnrollmentService.list() + val intrafiAccountEnrollments = + intrafiAccountEnrollmentService.list( + IntrafiAccountEnrollmentListParams.builder() + .accountId("account_id") + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .status( + IntrafiAccountEnrollmentListParams.Status.builder() + .addIn(IntrafiAccountEnrollmentListParams.Status.In.PENDING_ENROLLING) + .build() + ) + .build() + ) - page.response().validate() + intrafiAccountEnrollments.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/IntrafiExclusionServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/IntrafiExclusionServiceTest.kt index 7317db982..c70728895 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/IntrafiExclusionServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/IntrafiExclusionServiceTest.kt @@ -5,6 +5,7 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient import com.increase.api.models.intrafiexclusions.IntrafiExclusionCreateParams +import com.increase.api.models.intrafiexclusions.IntrafiExclusionListParams import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -54,9 +55,17 @@ internal class IntrafiExclusionServiceTest { .build() val intrafiExclusionService = client.intrafiExclusions() - val page = intrafiExclusionService.list() + val intrafiExclusions = + intrafiExclusionService.list( + IntrafiExclusionListParams.builder() + .cursor("cursor") + .entityId("entity_id") + .idempotencyKey("x") + .limit(1L) + .build() + ) - page.response().validate() + intrafiExclusions.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/LockboxServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/LockboxServiceTest.kt index 41da8d7e3..ef0877e7f 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/LockboxServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/LockboxServiceTest.kt @@ -5,7 +5,9 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient import com.increase.api.models.lockboxes.LockboxCreateParams +import com.increase.api.models.lockboxes.LockboxListParams import com.increase.api.models.lockboxes.LockboxUpdateParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -78,8 +80,24 @@ internal class LockboxServiceTest { .build() val lockboxService = client.lockboxes() - val page = lockboxService.list() + val lockboxes = + lockboxService.list( + LockboxListParams.builder() + .accountId("account_id") + .createdAt( + LockboxListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .build() + ) - page.response().validate() + lockboxes.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/OAuthApplicationServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/OAuthApplicationServiceTest.kt index 5fc05d30a..389bf81dc 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/OAuthApplicationServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/OAuthApplicationServiceTest.kt @@ -4,6 +4,8 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient +import com.increase.api.models.oauthapplications.OAuthApplicationListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -33,8 +35,27 @@ internal class OAuthApplicationServiceTest { .build() val oauthApplicationService = client.oauthApplications() - val page = oauthApplicationService.list() - - page.response().validate() + val oauthApplications = + oauthApplicationService.list( + OAuthApplicationListParams.builder() + .createdAt( + OAuthApplicationListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .limit(1L) + .status( + OAuthApplicationListParams.Status.builder() + .addIn(OAuthApplicationListParams.Status.In.ACTIVE) + .build() + ) + .build() + ) + + oauthApplications.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/OAuthConnectionServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/OAuthConnectionServiceTest.kt index ab97186fc..ecfdca91e 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/OAuthConnectionServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/OAuthConnectionServiceTest.kt @@ -4,6 +4,7 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient +import com.increase.api.models.oauthconnections.OAuthConnectionListParams import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -33,8 +34,20 @@ internal class OAuthConnectionServiceTest { .build() val oauthConnectionService = client.oauthConnections() - val page = oauthConnectionService.list() - - page.response().validate() + val oauthConnections = + oauthConnectionService.list( + OAuthConnectionListParams.builder() + .cursor("cursor") + .limit(1L) + .oauthApplicationId("oauth_application_id") + .status( + OAuthConnectionListParams.Status.builder() + .addIn(OAuthConnectionListParams.Status.In.ACTIVE) + .build() + ) + .build() + ) + + oauthConnections.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/PendingTransactionServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/PendingTransactionServiceTest.kt index 4584faf2d..a9176b799 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/PendingTransactionServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/PendingTransactionServiceTest.kt @@ -5,6 +5,8 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient import com.increase.api.models.pendingtransactions.PendingTransactionCreateParams +import com.increase.api.models.pendingtransactions.PendingTransactionListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -56,9 +58,38 @@ internal class PendingTransactionServiceTest { .build() val pendingTransactionService = client.pendingTransactions() - val page = pendingTransactionService.list() + val pendingTransactions = + pendingTransactionService.list( + PendingTransactionListParams.builder() + .accountId("account_id") + .category( + PendingTransactionListParams.Category.builder() + .addIn( + PendingTransactionListParams.Category.In + .ACCOUNT_TRANSFER_INSTRUCTION + ) + .build() + ) + .createdAt( + PendingTransactionListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .limit(1L) + .routeId("route_id") + .status( + PendingTransactionListParams.Status.builder() + .addIn(PendingTransactionListParams.Status.In.PENDING) + .build() + ) + .build() + ) - page.response().validate() + pendingTransactions.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/PhysicalCardProfileServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/PhysicalCardProfileServiceTest.kt index 318ef8435..2cf01991a 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/PhysicalCardProfileServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/PhysicalCardProfileServiceTest.kt @@ -6,6 +6,7 @@ import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileCloneParams import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileCreateParams +import com.increase.api.models.physicalcardprofiles.PhysicalCardProfileListParams import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -65,9 +66,21 @@ internal class PhysicalCardProfileServiceTest { .build() val physicalCardProfileService = client.physicalCardProfiles() - val page = physicalCardProfileService.list() + val physicalCardProfiles = + physicalCardProfileService.list( + PhysicalCardProfileListParams.builder() + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .status( + PhysicalCardProfileListParams.Status.builder() + .addIn(PhysicalCardProfileListParams.Status.In.PENDING_CREATING) + .build() + ) + .build() + ) - page.response().validate() + physicalCardProfiles.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/PhysicalCardServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/PhysicalCardServiceTest.kt index d91ddec90..89c82b618 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/PhysicalCardServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/PhysicalCardServiceTest.kt @@ -5,7 +5,9 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient import com.increase.api.models.physicalcards.PhysicalCardCreateParams +import com.increase.api.models.physicalcards.PhysicalCardListParams import com.increase.api.models.physicalcards.PhysicalCardUpdateParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -100,8 +102,24 @@ internal class PhysicalCardServiceTest { .build() val physicalCardService = client.physicalCards() - val page = physicalCardService.list() + val physicalCards = + physicalCardService.list( + PhysicalCardListParams.builder() + .cardId("card_id") + .createdAt( + PhysicalCardListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .build() + ) - page.response().validate() + physicalCards.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/ProgramServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/ProgramServiceTest.kt index edd825c71..af50efdcf 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/ProgramServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/ProgramServiceTest.kt @@ -4,6 +4,7 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient +import com.increase.api.models.programs.ProgramListParams import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -33,8 +34,9 @@ internal class ProgramServiceTest { .build() val programService = client.programs() - val page = programService.list() + val programs = + programService.list(ProgramListParams.builder().cursor("cursor").limit(1L).build()) - page.response().validate() + programs.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/RealTimePaymentsTransferServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/RealTimePaymentsTransferServiceTest.kt index c084cc8ea..216fcacd1 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/RealTimePaymentsTransferServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/RealTimePaymentsTransferServiceTest.kt @@ -5,6 +5,8 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransferCreateParams +import com.increase.api.models.realtimepaymentstransfers.RealTimePaymentsTransferListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -66,9 +68,31 @@ internal class RealTimePaymentsTransferServiceTest { .build() val realTimePaymentsTransferService = client.realTimePaymentsTransfers() - val page = realTimePaymentsTransferService.list() + val realTimePaymentsTransfers = + realTimePaymentsTransferService.list( + RealTimePaymentsTransferListParams.builder() + .accountId("account_id") + .createdAt( + RealTimePaymentsTransferListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .externalAccountId("external_account_id") + .idempotencyKey("x") + .limit(1L) + .status( + RealTimePaymentsTransferListParams.Status.builder() + .addIn(RealTimePaymentsTransferListParams.Status.In.PENDING_APPROVAL) + .build() + ) + .build() + ) - page.response().validate() + realTimePaymentsTransfers.validate() } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/RoutingNumberServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/RoutingNumberServiceTest.kt index 2228f5d44..a55dd5f68 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/RoutingNumberServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/RoutingNumberServiceTest.kt @@ -20,11 +20,15 @@ internal class RoutingNumberServiceTest { .build() val routingNumberService = client.routingNumbers() - val page = + val routingNumbers = routingNumberService.list( - RoutingNumberListParams.builder().routingNumber("xxxxxxxxx").build() + RoutingNumberListParams.builder() + .routingNumber("xxxxxxxxx") + .cursor("cursor") + .limit(1L) + .build() ) - page.response().validate() + routingNumbers.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/SupplementalDocumentServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/SupplementalDocumentServiceTest.kt index 80b3ebe25..0f3f8a263 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/SupplementalDocumentServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/SupplementalDocumentServiceTest.kt @@ -41,11 +41,16 @@ internal class SupplementalDocumentServiceTest { .build() val supplementalDocumentService = client.supplementalDocuments() - val page = + val supplementalDocuments = supplementalDocumentService.list( - SupplementalDocumentListParams.builder().entityId("entity_id").build() + SupplementalDocumentListParams.builder() + .entityId("entity_id") + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .build() ) - page.response().validate() + supplementalDocuments.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/TransactionServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/TransactionServiceTest.kt index b981b3091..7805b01f4 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/TransactionServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/TransactionServiceTest.kt @@ -4,6 +4,8 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient +import com.increase.api.models.transactions.TransactionListParams +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -33,8 +35,29 @@ internal class TransactionServiceTest { .build() val transactionService = client.transactions() - val page = transactionService.list() - - page.response().validate() + val transactions = + transactionService.list( + TransactionListParams.builder() + .accountId("account_id") + .category( + TransactionListParams.Category.builder() + .addIn(TransactionListParams.Category.In.ACCOUNT_TRANSFER_INTENTION) + .build() + ) + .createdAt( + TransactionListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .limit(1L) + .routeId("route_id") + .build() + ) + + transactions.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/WireDrawdownRequestServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/WireDrawdownRequestServiceTest.kt index 2b12197e8..7094ad6b8 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/WireDrawdownRequestServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/WireDrawdownRequestServiceTest.kt @@ -5,6 +5,7 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient import com.increase.api.models.wiredrawdownrequests.WireDrawdownRequestCreateParams +import com.increase.api.models.wiredrawdownrequests.WireDrawdownRequestListParams import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -81,8 +82,20 @@ internal class WireDrawdownRequestServiceTest { .build() val wireDrawdownRequestService = client.wireDrawdownRequests() - val page = wireDrawdownRequestService.list() + val wireDrawdownRequests = + wireDrawdownRequestService.list( + WireDrawdownRequestListParams.builder() + .cursor("cursor") + .idempotencyKey("x") + .limit(1L) + .status( + WireDrawdownRequestListParams.Status.builder() + .addIn(WireDrawdownRequestListParams.Status.In.PENDING_SUBMISSION) + .build() + ) + .build() + ) - page.response().validate() + wireDrawdownRequests.validate() } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/WireTransferServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/WireTransferServiceTest.kt index 1b446956d..d0b134b61 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/WireTransferServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/WireTransferServiceTest.kt @@ -5,7 +5,9 @@ package com.increase.api.services.blocking import com.increase.api.TestServerExtension import com.increase.api.client.okhttp.IncreaseOkHttpClient import com.increase.api.models.wiretransfers.WireTransferCreateParams +import com.increase.api.models.wiretransfers.WireTransferListParams import java.time.LocalDate +import java.time.OffsetDateTime import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -112,9 +114,26 @@ internal class WireTransferServiceTest { .build() val wireTransferService = client.wireTransfers() - val page = wireTransferService.list() + val wireTransfers = + wireTransferService.list( + WireTransferListParams.builder() + .accountId("account_id") + .createdAt( + WireTransferListParams.CreatedAt.builder() + .after(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .before(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrAfter(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .onOrBefore(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .build() + ) + .cursor("cursor") + .externalAccountId("external_account_id") + .idempotencyKey("x") + .limit(1L) + .build() + ) - page.response().validate() + wireTransfers.validate() } @Test