diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 59acac47..0ac3c2a5 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.27.0" + ".": "0.27.1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 06678905..426d0a0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # Changelog +## 0.27.1 (2025-02-05) + +Full Changelog: [v0.27.0...v0.27.1](https://github.com/orbcorp/orb-java/compare/v0.27.0...v0.27.1) + +### Bug Fixes + +* **api:** add missing `@MustBeClosed` annotations ([#231](https://github.com/orbcorp/orb-java/issues/231)) ([bc11828](https://github.com/orbcorp/orb-java/commit/bc11828c79268b321e6940c2f894af5a7c306cc4)) +* **api:** switch `CompletableFuture<Void>` to `CompletableFuture` ([bc11828](https://github.com/orbcorp/orb-java/commit/bc11828c79268b321e6940c2f894af5a7c306cc4)) +* **client:** add missing validation calls on response ([bc11828](https://github.com/orbcorp/orb-java/commit/bc11828c79268b321e6940c2f894af5a7c306cc4)) +* **client:** always provide a body for `PATCH` methods ([bc11828](https://github.com/orbcorp/orb-java/commit/bc11828c79268b321e6940c2f894af5a7c306cc4)) + + +### Chores + +* **internal:** minor formatting/style changes ([bc11828](https://github.com/orbcorp/orb-java/commit/bc11828c79268b321e6940c2f894af5a7c306cc4)) +* **internal:** rename some tests ([bc11828](https://github.com/orbcorp/orb-java/commit/bc11828c79268b321e6940c2f894af5a7c306cc4)) + ## 0.27.0 (2025-02-04) Full Changelog: [v0.26.0...v0.27.0](https://github.com/orbcorp/orb-java/compare/v0.26.0...v0.27.0) diff --git a/README.md b/README.md index ba590f44..c6290860 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ -[![Maven Central](https://img.shields.io/maven-central/v/com.withorb.api/orb-java)](https://central.sonatype.com/artifact/com.withorb.api/orb-java/0.27.0) +[![Maven Central](https://img.shields.io/maven-central/v/com.withorb.api/orb-java)](https://central.sonatype.com/artifact/com.withorb.api/orb-java/0.27.1) @@ -19,7 +19,7 @@ The REST API documentation can be found on [docs.withorb.com](https://docs.witho ### Gradle ```kotlin -implementation("com.withorb.api:orb-java:0.27.0") +implementation("com.withorb.api:orb-java:0.27.1") ``` ### Maven @@ -28,7 +28,7 @@ implementation("com.withorb.api:orb-java:0.27.0") com.withorb.api orb-java - 0.27.0 + 0.27.1 ``` diff --git a/build.gradle.kts b/build.gradle.kts index bdcbace5..6a4a4990 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,4 +1,4 @@ allprojects { group = "com.withorb.api" - version = "0.27.0" // x-release-please-version + version = "0.27.1" // x-release-please-version } diff --git a/orb-java-client-okhttp/src/main/kotlin/com/withorb/api/client/okhttp/OkHttpClient.kt b/orb-java-client-okhttp/src/main/kotlin/com/withorb/api/client/okhttp/OkHttpClient.kt index 74283f2f..e1b18a40 100644 --- a/orb-java-client-okhttp/src/main/kotlin/com/withorb/api/client/okhttp/OkHttpClient.kt +++ b/orb-java-client-okhttp/src/main/kotlin/com/withorb/api/client/okhttp/OkHttpClient.kt @@ -106,8 +106,7 @@ private constructor(private val okHttpClient: okhttp3.OkHttpClient, private val private fun HttpRequest.toRequest(client: okhttp3.OkHttpClient): Request { var body: RequestBody? = body?.toRequestBody() - // OkHttpClient always requires a request body for PUT and POST methods. - if (body == null && (method == HttpMethod.PUT || method == HttpMethod.POST)) { + if (body == null && requiresBody(method)) { body = "".toRequestBody() } @@ -134,6 +133,15 @@ private constructor(private val okHttpClient: okhttp3.OkHttpClient, private val return builder.build() } + /** `OkHttpClient` always requires a request body for some methods. */ + private fun requiresBody(method: HttpMethod): Boolean = + when (method) { + HttpMethod.POST, + HttpMethod.PUT, + HttpMethod.PATCH -> true + else -> false + } + private fun HttpRequest.toUrl(): String { url?.let { return it diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/AlertServiceAsyncImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/AlertServiceAsyncImpl.kt index b797a3a8..b4d8f1e5 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/AlertServiceAsyncImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/AlertServiceAsyncImpl.kt @@ -51,9 +51,9 @@ internal constructor( .thenApply { response -> response .use { retrieveHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -79,9 +79,9 @@ internal constructor( .thenApply { response -> response .use { updateHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -117,9 +117,9 @@ internal constructor( .thenApply { response -> response .use { listHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } .let { AlertListPageAsync.of(this, params, it) } @@ -153,9 +153,9 @@ internal constructor( .thenApply { response -> response .use { createForCustomerHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -188,9 +188,9 @@ internal constructor( .thenApply { response -> response .use { createForExternalCustomerHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -227,9 +227,9 @@ internal constructor( .thenApply { response -> response .use { createForSubscriptionHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -259,9 +259,9 @@ internal constructor( .thenApply { response -> response .use { disableHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -291,9 +291,9 @@ internal constructor( .thenApply { response -> response .use { enableHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/CouponServiceAsyncImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/CouponServiceAsyncImpl.kt index 6dede981..03cbcecd 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/CouponServiceAsyncImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/CouponServiceAsyncImpl.kt @@ -59,9 +59,9 @@ internal constructor( .thenApply { response -> response .use { createHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -94,9 +94,9 @@ internal constructor( .thenApply { response -> response .use { listHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } .let { CouponListPageAsync.of(this, params, it) } @@ -127,9 +127,9 @@ internal constructor( .thenApply { response -> response .use { archiveHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -157,9 +157,9 @@ internal constructor( .thenApply { response -> response .use { fetchHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/CreditNoteServiceAsyncImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/CreditNoteServiceAsyncImpl.kt index 08709d35..7a8ca52b 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/CreditNoteServiceAsyncImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/CreditNoteServiceAsyncImpl.kt @@ -47,9 +47,9 @@ internal constructor( .thenApply { response -> response .use { createHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -79,9 +79,9 @@ internal constructor( .thenApply { response -> response .use { listHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } .let { CreditNoteListPageAsync.of(this, params, it) } @@ -110,9 +110,9 @@ internal constructor( .thenApply { response -> response .use { fetchHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/CustomerServiceAsync.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/CustomerServiceAsync.kt index cc72ccf7..d9d8cdd9 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/CustomerServiceAsync.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/CustomerServiceAsync.kt @@ -92,7 +92,7 @@ interface CustomerServiceAsync { fun delete( params: CustomerDeleteParams, requestOptions: RequestOptions = RequestOptions.none() - ): CompletableFuture + ): CompletableFuture /** * This endpoint is used to fetch customer details given an identifier. If the `Customer` is in @@ -132,7 +132,7 @@ interface CustomerServiceAsync { fun syncPaymentMethodsFromGateway( params: CustomerSyncPaymentMethodsFromGatewayParams, requestOptions: RequestOptions = RequestOptions.none() - ): CompletableFuture + ): CompletableFuture /** * Sync Orb's payment methods for the customer with their gateway. @@ -146,7 +146,7 @@ interface CustomerServiceAsync { fun syncPaymentMethodsFromGatewayByExternalCustomerId( params: CustomerSyncPaymentMethodsFromGatewayByExternalCustomerIdParams, requestOptions: RequestOptions = RequestOptions.none() - ): CompletableFuture + ): CompletableFuture /** * This endpoint is used to update customer details given an `external_customer_id` (see diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/CustomerServiceAsyncImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/CustomerServiceAsyncImpl.kt index 6b3ca294..4bf874ac 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/CustomerServiceAsyncImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/CustomerServiceAsyncImpl.kt @@ -86,9 +86,9 @@ internal constructor( .thenApply { response -> response .use { createHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -119,9 +119,9 @@ internal constructor( .thenApply { response -> response .use { updateHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -153,9 +153,9 @@ internal constructor( .thenApply { response -> response .use { listHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } .let { CustomerListPageAsync.of(this, params, it) } @@ -182,7 +182,7 @@ internal constructor( override fun delete( params: CustomerDeleteParams, requestOptions: RequestOptions - ): CompletableFuture { + ): CompletableFuture { val request = HttpRequest.builder() .method(HttpMethod.DELETE) @@ -220,9 +220,9 @@ internal constructor( .thenApply { response -> response .use { fetchHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -253,9 +253,9 @@ internal constructor( .thenApply { response -> response .use { fetchByExternalIdHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -275,7 +275,7 @@ internal constructor( override fun syncPaymentMethodsFromGateway( params: CustomerSyncPaymentMethodsFromGatewayParams, requestOptions: RequestOptions - ): CompletableFuture { + ): CompletableFuture { val request = HttpRequest.builder() .method(HttpMethod.POST) @@ -309,7 +309,7 @@ internal constructor( override fun syncPaymentMethodsFromGatewayByExternalCustomerId( params: CustomerSyncPaymentMethodsFromGatewayByExternalCustomerIdParams, requestOptions: RequestOptions - ): CompletableFuture { + ): CompletableFuture { val request = HttpRequest.builder() .method(HttpMethod.POST) @@ -352,9 +352,9 @@ internal constructor( .thenApply { response -> response .use { updateByExternalIdHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/DimensionalPriceGroupServiceAsyncImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/DimensionalPriceGroupServiceAsyncImpl.kt index ef73d818..7cdb58bc 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/DimensionalPriceGroupServiceAsyncImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/DimensionalPriceGroupServiceAsyncImpl.kt @@ -65,9 +65,9 @@ internal constructor( .thenApply { response -> response .use { createHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -92,9 +92,9 @@ internal constructor( .thenApply { response -> response .use { retrieveHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -120,9 +120,9 @@ internal constructor( .thenApply { response -> response .use { listHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } .let { DimensionalPriceGroupListPageAsync.of(this, params, it) } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/EventServiceAsyncImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/EventServiceAsyncImpl.kt index 35ca0e20..34d9e506 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/EventServiceAsyncImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/EventServiceAsyncImpl.kt @@ -102,9 +102,9 @@ internal constructor( .thenApply { response -> response .use { updateHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -165,9 +165,9 @@ internal constructor( .thenApply { response -> response .use { deprecateHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -381,9 +381,9 @@ internal constructor( .thenApply { response -> response .use { ingestHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -424,9 +424,9 @@ internal constructor( .thenApply { response -> response .use { searchHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/InvoiceLineItemServiceAsyncImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/InvoiceLineItemServiceAsyncImpl.kt index f1e7c2ec..964ae2df 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/InvoiceLineItemServiceAsyncImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/InvoiceLineItemServiceAsyncImpl.kt @@ -48,9 +48,9 @@ internal constructor( .thenApply { response -> response .use { createHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/InvoiceServiceAsyncImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/InvoiceServiceAsyncImpl.kt index 3c2319d5..32c2540a 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/InvoiceServiceAsyncImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/InvoiceServiceAsyncImpl.kt @@ -54,9 +54,9 @@ internal constructor( .thenApply { response -> response .use { createHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -87,9 +87,9 @@ internal constructor( .thenApply { response -> response .use { updateHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -128,9 +128,9 @@ internal constructor( .thenApply { response -> response .use { listHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } .let { InvoiceListPageAsync.of(this, params, it) } @@ -158,9 +158,9 @@ internal constructor( .thenApply { response -> response .use { fetchHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -189,9 +189,9 @@ internal constructor( .thenApply { response -> response .use { fetchUpcomingHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -223,9 +223,9 @@ internal constructor( .thenApply { response -> response .use { issueHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -254,9 +254,9 @@ internal constructor( .thenApply { response -> response .use { markPaidHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -285,9 +285,9 @@ internal constructor( .thenApply { response -> response .use { payHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -320,9 +320,9 @@ internal constructor( .thenApply { response -> response .use { voidInvoiceHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/ItemServiceAsyncImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/ItemServiceAsyncImpl.kt index 076b70ee..47ec5f4c 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/ItemServiceAsyncImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/ItemServiceAsyncImpl.kt @@ -48,9 +48,9 @@ internal constructor( .thenApply { response -> response .use { createHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -76,9 +76,9 @@ internal constructor( .thenApply { response -> response .use { updateHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -104,9 +104,9 @@ internal constructor( .thenApply { response -> response .use { listHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } .let { ItemListPageAsync.of(this, params, it) } @@ -132,9 +132,9 @@ internal constructor( .thenApply { response -> response .use { fetchHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/MetricServiceAsyncImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/MetricServiceAsyncImpl.kt index 8d37fd7e..5cfd632d 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/MetricServiceAsyncImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/MetricServiceAsyncImpl.kt @@ -52,9 +52,9 @@ internal constructor( .thenApply { response -> response .use { createHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -83,9 +83,9 @@ internal constructor( .thenApply { response -> response .use { updateHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -115,9 +115,9 @@ internal constructor( .thenApply { response -> response .use { listHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } .let { MetricListPageAsync.of(this, params, it) } @@ -146,9 +146,9 @@ internal constructor( .thenApply { response -> response .use { fetchHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/PlanServiceAsyncImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/PlanServiceAsyncImpl.kt index 5fc6fb45..f9c9b341 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/PlanServiceAsyncImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/PlanServiceAsyncImpl.kt @@ -56,9 +56,9 @@ internal constructor( .thenApply { response -> response .use { createHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -89,9 +89,9 @@ internal constructor( .thenApply { response -> response .use { updateHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -122,9 +122,9 @@ internal constructor( .thenApply { response -> response .use { listHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } .let { PlanListPageAsync.of(this, params, it) } @@ -167,9 +167,9 @@ internal constructor( .thenApply { response -> response .use { fetchHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/PriceServiceAsyncImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/PriceServiceAsyncImpl.kt index f111ad35..13f13a1d 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/PriceServiceAsyncImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/PriceServiceAsyncImpl.kt @@ -69,9 +69,9 @@ internal constructor( .thenApply { response -> response .use { createHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -100,9 +100,9 @@ internal constructor( .thenApply { response -> response .use { updateHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -131,9 +131,9 @@ internal constructor( .thenApply { response -> response .use { listHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } .let { PriceListPageAsync.of(this, params, it) } @@ -178,9 +178,9 @@ internal constructor( .thenApply { response -> response .use { evaluateHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -205,9 +205,9 @@ internal constructor( .thenApply { response -> response .use { fetchHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/SubscriptionServiceAsyncImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/SubscriptionServiceAsyncImpl.kt index 0ea96467..8d84b666 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/SubscriptionServiceAsyncImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/SubscriptionServiceAsyncImpl.kt @@ -311,9 +311,9 @@ internal constructor( .thenApply { response -> response .use { createHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -342,9 +342,9 @@ internal constructor( .thenApply { response -> response .use { updateHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -379,9 +379,9 @@ internal constructor( .thenApply { response -> response .use { listHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } .let { SubscriptionListPageAsync.of(this, params, it) } @@ -461,9 +461,9 @@ internal constructor( .thenApply { response -> response .use { cancelHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -491,9 +491,9 @@ internal constructor( .thenApply { response -> response .use { fetchHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -529,9 +529,9 @@ internal constructor( .thenApply { response -> response .use { fetchCostsHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -561,9 +561,9 @@ internal constructor( .thenApply { response -> response .use { fetchScheduleHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } .let { SubscriptionFetchSchedulePageAsync.of(this, params, it) } @@ -765,9 +765,9 @@ internal constructor( .thenApply { response -> response .use { fetchUsageHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -860,9 +860,9 @@ internal constructor( .thenApply { response -> response .use { priceIntervalsHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -1054,9 +1054,9 @@ internal constructor( .thenApply { response -> response .use { schedulePlanChangeHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -1085,9 +1085,9 @@ internal constructor( .thenApply { response -> response .use { triggerPhaseHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -1120,9 +1120,9 @@ internal constructor( .thenApply { response -> response .use { unscheduleCancellationHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -1159,9 +1159,9 @@ internal constructor( .thenApply { response -> response .use { unscheduleFixedFeeQuantityUpdatesHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -1195,9 +1195,9 @@ internal constructor( .thenApply { response -> response .use { unschedulePendingPlanChangesHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -1241,9 +1241,9 @@ internal constructor( .thenApply { response -> response .use { updateFixedFeeQuantityHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -1287,9 +1287,9 @@ internal constructor( .thenApply { response -> response .use { updateTrialHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/TopLevelServiceAsyncImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/TopLevelServiceAsyncImpl.kt index 5b8863da..b67034b3 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/TopLevelServiceAsyncImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/TopLevelServiceAsyncImpl.kt @@ -49,9 +49,9 @@ internal constructor( .thenApply { response -> response .use { pingHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/coupons/SubscriptionServiceAsyncImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/coupons/SubscriptionServiceAsyncImpl.kt index 3b925ede..5c115e01 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/coupons/SubscriptionServiceAsyncImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/coupons/SubscriptionServiceAsyncImpl.kt @@ -48,9 +48,9 @@ internal constructor( .thenApply { response -> response .use { listHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } .let { CouponSubscriptionListPageAsync.of(this, params, it) } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/customers/BalanceTransactionServiceAsyncImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/customers/BalanceTransactionServiceAsyncImpl.kt index 989ffd6f..6030bd66 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/customers/BalanceTransactionServiceAsyncImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/customers/BalanceTransactionServiceAsyncImpl.kt @@ -50,9 +50,9 @@ internal constructor( .thenApply { response -> response .use { createHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -104,9 +104,9 @@ internal constructor( .thenApply { response -> response .use { listHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } .let { CustomerBalanceTransactionListPageAsync.of(this, params, it) } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/customers/CostServiceAsyncImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/customers/CostServiceAsyncImpl.kt index 09e00b30..a0491360 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/customers/CostServiceAsyncImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/customers/CostServiceAsyncImpl.kt @@ -154,9 +154,9 @@ internal constructor( .thenApply { response -> response .use { listHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -296,9 +296,9 @@ internal constructor( .thenApply { response -> response .use { listByExternalIdHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/customers/CreditServiceAsyncImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/customers/CreditServiceAsyncImpl.kt index b967b959..4fb0e2b4 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/customers/CreditServiceAsyncImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/customers/CreditServiceAsyncImpl.kt @@ -65,9 +65,9 @@ internal constructor( .thenApply { response -> response .use { listHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } .let { CustomerCreditListPageAsync.of(this, params, it) } @@ -107,9 +107,9 @@ internal constructor( .thenApply { response -> response .use { listByExternalIdHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } .let { CustomerCreditListByExternalIdPageAsync.of(this, params, it) } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/customers/credits/LedgerServiceAsyncImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/customers/credits/LedgerServiceAsyncImpl.kt index 97222e27..329657cc 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/customers/credits/LedgerServiceAsyncImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/customers/credits/LedgerServiceAsyncImpl.kt @@ -128,9 +128,9 @@ internal constructor( .thenApply { response -> response .use { listHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } .let { CustomerCreditLedgerListPageAsync.of(this, params, it) } @@ -260,9 +260,9 @@ internal constructor( .thenApply { response -> response .use { createEntryHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -398,9 +398,9 @@ internal constructor( .thenApply { response -> response .use { createEntryByExternalIdHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -513,9 +513,9 @@ internal constructor( .thenApply { response -> response .use { listByExternalIdHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } .let { CustomerCreditLedgerListByExternalIdPageAsync.of(this, params, it) } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/customers/credits/TopUpServiceAsync.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/customers/credits/TopUpServiceAsync.kt index b29f5de0..3479ca07 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/customers/credits/TopUpServiceAsync.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/customers/credits/TopUpServiceAsync.kt @@ -45,7 +45,7 @@ interface TopUpServiceAsync { fun delete( params: CustomerCreditTopUpDeleteParams, requestOptions: RequestOptions = RequestOptions.none() - ): CompletableFuture + ): CompletableFuture /** * This endpoint allows you to create a new top-up for a specified customer's balance. While @@ -66,7 +66,7 @@ interface TopUpServiceAsync { fun deleteByExternalId( params: CustomerCreditTopUpDeleteByExternalIdParams, requestOptions: RequestOptions = RequestOptions.none() - ): CompletableFuture + ): CompletableFuture /** List top-ups by external ID */ @JvmOverloads diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/customers/credits/TopUpServiceAsyncImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/customers/credits/TopUpServiceAsyncImpl.kt index 3ddbe05e..cd4d4e1d 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/customers/credits/TopUpServiceAsyncImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/customers/credits/TopUpServiceAsyncImpl.kt @@ -61,9 +61,9 @@ internal constructor( .thenApply { response -> response .use { createHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -89,9 +89,9 @@ internal constructor( .thenApply { response -> response .use { listHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } .let { CustomerCreditTopUpListPageAsync.of(this, params, it) } @@ -104,7 +104,7 @@ internal constructor( override fun delete( params: CustomerCreditTopUpDeleteParams, requestOptions: RequestOptions - ): CompletableFuture { + ): CompletableFuture { val request = HttpRequest.builder() .method(HttpMethod.DELETE) @@ -157,9 +157,9 @@ internal constructor( .thenApply { response -> response .use { createByExternalIdHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -172,7 +172,7 @@ internal constructor( override fun deleteByExternalId( params: CustomerCreditTopUpDeleteByExternalIdParams, requestOptions: RequestOptions - ): CompletableFuture { + ): CompletableFuture { val request = HttpRequest.builder() .method(HttpMethod.DELETE) @@ -219,9 +219,9 @@ internal constructor( .thenApply { response -> response .use { listByExternalIdHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } .let { CustomerCreditTopUpListByExternalIdPageAsync.of(this, params, it) } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/dimensionalPriceGroups/ExternalDimensionalPriceGroupIdServiceAsyncImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/dimensionalPriceGroups/ExternalDimensionalPriceGroupIdServiceAsyncImpl.kt index e294b316..9c5e6e9d 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/dimensionalPriceGroups/ExternalDimensionalPriceGroupIdServiceAsyncImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/dimensionalPriceGroups/ExternalDimensionalPriceGroupIdServiceAsyncImpl.kt @@ -46,9 +46,9 @@ internal constructor( .thenApply { response -> response .use { retrieveHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/events/BackfillServiceAsyncImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/events/BackfillServiceAsyncImpl.kt index 9807a4ca..cdfb8755 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/events/BackfillServiceAsyncImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/events/BackfillServiceAsyncImpl.kt @@ -82,9 +82,9 @@ internal constructor( .thenApply { response -> response .use { createHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -117,9 +117,9 @@ internal constructor( .thenApply { response -> response .use { listHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } .let { EventBackfillListPageAsync.of(this, params, it) } @@ -151,9 +151,9 @@ internal constructor( .thenApply { response -> response .use { closeHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -179,9 +179,9 @@ internal constructor( .thenApply { response -> response .use { fetchHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -215,9 +215,9 @@ internal constructor( .thenApply { response -> response .use { revertHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/events/VolumeServiceAsyncImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/events/VolumeServiceAsyncImpl.kt index 2d22a44d..69349f66 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/events/VolumeServiceAsyncImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/events/VolumeServiceAsyncImpl.kt @@ -54,9 +54,9 @@ internal constructor( .thenApply { response -> response .use { listHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/plans/ExternalPlanIdServiceAsyncImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/plans/ExternalPlanIdServiceAsyncImpl.kt index 3f2968b9..0befd73f 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/plans/ExternalPlanIdServiceAsyncImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/plans/ExternalPlanIdServiceAsyncImpl.kt @@ -50,9 +50,9 @@ internal constructor( .thenApply { response -> response .use { updateHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -93,9 +93,9 @@ internal constructor( .thenApply { response -> response .use { fetchHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/prices/ExternalPriceIdServiceAsyncImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/prices/ExternalPriceIdServiceAsyncImpl.kt index b7c50457..77919d9e 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/async/prices/ExternalPriceIdServiceAsyncImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/async/prices/ExternalPriceIdServiceAsyncImpl.kt @@ -48,9 +48,9 @@ internal constructor( .thenApply { response -> response .use { updateHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } @@ -79,9 +79,9 @@ internal constructor( .thenApply { response -> response .use { fetchHandler.handle(it) } - .apply { + .also { if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() + it.validate() } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/AlertServiceImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/AlertServiceImpl.kt index 5db7719b..a8d09f66 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/AlertServiceImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/AlertServiceImpl.kt @@ -42,15 +42,14 @@ internal constructor( .addPathSegments("alerts", params.getPathParam(0)) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { retrieveHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { retrieveHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val updateHandler: Handler = @@ -65,15 +64,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { updateHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { updateHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val listHandler: Handler = @@ -97,16 +95,15 @@ internal constructor( .addPathSegments("alerts") .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { listHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { listHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - .let { AlertListPage.of(this, params, it) } - } + } + .let { AlertListPage.of(this, params, it) } } private val createForCustomerHandler: Handler = @@ -131,15 +128,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { createForCustomerHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { createForCustomerHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val createForExternalCustomerHandler: Handler = @@ -164,15 +160,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { createForExternalCustomerHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { createForExternalCustomerHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val createForSubscriptionHandler: Handler = @@ -201,15 +196,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { createForSubscriptionHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { createForSubscriptionHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val disableHandler: Handler = @@ -228,15 +222,14 @@ internal constructor( .apply { params._body().ifPresent { body(json(clientOptions.jsonMapper, it)) } } .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { disableHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { disableHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val enableHandler: Handler = @@ -255,14 +248,13 @@ internal constructor( .apply { params._body().ifPresent { body(json(clientOptions.jsonMapper, it)) } } .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { enableHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { enableHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/CouponServiceImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/CouponServiceImpl.kt index e7b9b6db..cf34895b 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/CouponServiceImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/CouponServiceImpl.kt @@ -50,15 +50,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { createHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { createHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val listHandler: Handler = @@ -80,16 +79,15 @@ internal constructor( .addPathSegments("coupons") .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { listHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { listHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - .let { CouponListPage.of(this, params, it) } - } + } + .let { CouponListPage.of(this, params, it) } } private val archiveHandler: Handler = @@ -108,15 +106,14 @@ internal constructor( .apply { params._body().ifPresent { body(json(clientOptions.jsonMapper, it)) } } .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { archiveHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { archiveHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val fetchHandler: Handler = @@ -133,14 +130,13 @@ internal constructor( .addPathSegments("coupons", params.getPathParam(0)) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { fetchHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { fetchHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/CreditNoteServiceImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/CreditNoteServiceImpl.kt index 514ba039..81cdfd05 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/CreditNoteServiceImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/CreditNoteServiceImpl.kt @@ -41,15 +41,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { createHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { createHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val listHandler: Handler = @@ -71,16 +70,15 @@ internal constructor( .addPathSegments("credit_notes") .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { listHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { listHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - .let { CreditNoteListPage.of(this, params, it) } - } + } + .let { CreditNoteListPage.of(this, params, it) } } private val fetchHandler: Handler = @@ -97,14 +95,13 @@ internal constructor( .addPathSegments("credit_notes", params.getPathParam(0)) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { fetchHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { fetchHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/CustomerServiceImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/CustomerServiceImpl.kt index a3d76a13..9133a4e6 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/CustomerServiceImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/CustomerServiceImpl.kt @@ -77,15 +77,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { createHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { createHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val updateHandler: Handler = @@ -105,15 +104,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { updateHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { updateHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val listHandler: Handler = @@ -137,16 +135,15 @@ internal constructor( .addPathSegments("customers") .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { listHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { listHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - .let { CustomerListPage.of(this, params, it) } - } + } + .let { CustomerListPage.of(this, params, it) } } private val deleteHandler: Handler = emptyHandler().withErrorHandler(errorHandler) @@ -174,9 +171,8 @@ internal constructor( .apply { params._body().ifPresent { body(json(clientOptions.jsonMapper, it)) } } .build() .prepare(clientOptions, params) - clientOptions.httpClient.execute(request, requestOptions).let { response -> - response.use { deleteHandler.handle(it) } - } + val response = clientOptions.httpClient.execute(request, requestOptions) + response.use { deleteHandler.handle(it) } } private val fetchHandler: Handler = @@ -196,15 +192,14 @@ internal constructor( .addPathSegments("customers", params.getPathParam(0)) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { fetchHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { fetchHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val fetchByExternalIdHandler: Handler = @@ -227,15 +222,14 @@ internal constructor( .addPathSegments("customers", "external_customer_id", params.getPathParam(0)) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { fetchByExternalIdHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { fetchByExternalIdHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val syncPaymentMethodsFromGatewayHandler: Handler = @@ -265,9 +259,8 @@ internal constructor( .apply { params._body().ifPresent { body(json(clientOptions.jsonMapper, it)) } } .build() .prepare(clientOptions, params) - clientOptions.httpClient.execute(request, requestOptions).let { response -> - response.use { syncPaymentMethodsFromGatewayHandler.handle(it) } - } + val response = clientOptions.httpClient.execute(request, requestOptions) + response.use { syncPaymentMethodsFromGatewayHandler.handle(it) } } private val syncPaymentMethodsFromGatewayByExternalCustomerIdHandler: Handler = @@ -296,9 +289,8 @@ internal constructor( .apply { params._body().ifPresent { body(json(clientOptions.jsonMapper, it)) } } .build() .prepare(clientOptions, params) - clientOptions.httpClient.execute(request, requestOptions).let { response -> - response.use { syncPaymentMethodsFromGatewayByExternalCustomerIdHandler.handle(it) } - } + val response = clientOptions.httpClient.execute(request, requestOptions) + response.use { syncPaymentMethodsFromGatewayByExternalCustomerIdHandler.handle(it) } } private val updateByExternalIdHandler: Handler = @@ -320,14 +312,13 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { updateByExternalIdHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { updateByExternalIdHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/DimensionalPriceGroupServiceImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/DimensionalPriceGroupServiceImpl.kt index 5ac1deb2..44ba4dfb 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/DimensionalPriceGroupServiceImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/DimensionalPriceGroupServiceImpl.kt @@ -58,15 +58,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { createHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { createHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val retrieveHandler: Handler = @@ -83,15 +82,14 @@ internal constructor( .addPathSegments("dimensional_price_groups", params.getPathParam(0)) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { retrieveHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { retrieveHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val listHandler: Handler = @@ -109,15 +107,14 @@ internal constructor( .addPathSegments("dimensional_price_groups") .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { listHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { listHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - .let { DimensionalPriceGroupListPage.of(this, params, it) } - } + } + .let { DimensionalPriceGroupListPage.of(this, params, it) } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/EventServiceImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/EventServiceImpl.kt index 10ba429a..a64b872f 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/EventServiceImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/EventServiceImpl.kt @@ -96,15 +96,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { updateHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { updateHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val deprecateHandler: Handler = @@ -157,15 +156,14 @@ internal constructor( .apply { params._body().ifPresent { body(json(clientOptions.jsonMapper, it)) } } .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { deprecateHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { deprecateHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val ingestHandler: Handler = @@ -371,15 +369,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { ingestHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { ingestHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val searchHandler: Handler = @@ -412,14 +409,13 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { searchHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { searchHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/InvoiceLineItemServiceImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/InvoiceLineItemServiceImpl.kt index 327eda85..84a622f4 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/InvoiceLineItemServiceImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/InvoiceLineItemServiceImpl.kt @@ -42,14 +42,13 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { createHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { createHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/InvoiceServiceImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/InvoiceServiceImpl.kt index 7f616ac7..5787b7da 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/InvoiceServiceImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/InvoiceServiceImpl.kt @@ -45,15 +45,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { createHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { createHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val updateHandler: Handler = @@ -73,15 +72,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { updateHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { updateHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val listHandler: Handler = @@ -109,16 +107,15 @@ internal constructor( .addPathSegments("invoices") .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { listHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { listHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - .let { InvoiceListPage.of(this, params, it) } - } + } + .let { InvoiceListPage.of(this, params, it) } } private val fetchHandler: Handler = @@ -134,15 +131,14 @@ internal constructor( .addPathSegments("invoices", params.getPathParam(0)) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { fetchHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { fetchHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val fetchUpcomingHandler: Handler = @@ -163,15 +159,14 @@ internal constructor( .addPathSegments("invoices", "upcoming") .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { fetchUpcomingHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { fetchUpcomingHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val issueHandler: Handler = @@ -192,15 +187,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { issueHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { issueHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val markPaidHandler: Handler = @@ -218,15 +212,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { markPaidHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { markPaidHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val payHandler: Handler = @@ -244,15 +237,14 @@ internal constructor( .apply { params._body().ifPresent { body(json(clientOptions.jsonMapper, it)) } } .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { payHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { payHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val voidInvoiceHandler: Handler = @@ -277,14 +269,13 @@ internal constructor( .apply { params._body().ifPresent { body(json(clientOptions.jsonMapper, it)) } } .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { voidInvoiceHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { voidInvoiceHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/ItemServiceImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/ItemServiceImpl.kt index 1693683a..212287b2 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/ItemServiceImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/ItemServiceImpl.kt @@ -39,15 +39,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { createHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { createHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val updateHandler: Handler = @@ -62,15 +61,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { updateHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { updateHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val listHandler: Handler = @@ -84,16 +82,15 @@ internal constructor( .addPathSegments("items") .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { listHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { listHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - .let { ItemListPage.of(this, params, it) } - } + } + .let { ItemListPage.of(this, params, it) } } private val fetchHandler: Handler = @@ -107,14 +104,13 @@ internal constructor( .addPathSegments("items", params.getPathParam(0)) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { fetchHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { fetchHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/MetricServiceImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/MetricServiceImpl.kt index 32ae47c5..6a34472b 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/MetricServiceImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/MetricServiceImpl.kt @@ -46,15 +46,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { createHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { createHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val updateHandler: Handler = @@ -75,15 +74,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { updateHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { updateHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val listHandler: Handler = @@ -102,16 +100,15 @@ internal constructor( .addPathSegments("metrics") .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { listHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { listHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - .let { MetricListPage.of(this, params, it) } - } + } + .let { MetricListPage.of(this, params, it) } } private val fetchHandler: Handler = @@ -128,14 +125,13 @@ internal constructor( .addPathSegments("metrics", params.getPathParam(0)) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { fetchHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { fetchHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/PlanServiceImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/PlanServiceImpl.kt index ade04bc0..4cce89a5 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/PlanServiceImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/PlanServiceImpl.kt @@ -47,15 +47,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { createHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { createHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val updateHandler: Handler = @@ -75,15 +74,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { updateHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { updateHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val listHandler: Handler = @@ -102,16 +100,15 @@ internal constructor( .addPathSegments("plans") .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { listHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { listHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - .let { PlanListPage.of(this, params, it) } - } + } + .let { PlanListPage.of(this, params, it) } } private val fetchHandler: Handler = @@ -142,14 +139,13 @@ internal constructor( .addPathSegments("plans", params.getPathParam(0)) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { fetchHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { fetchHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/PriceServiceImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/PriceServiceImpl.kt index ffbe5f3c..3197f34a 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/PriceServiceImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/PriceServiceImpl.kt @@ -60,15 +60,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { createHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { createHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val updateHandler: Handler = @@ -86,15 +85,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { updateHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { updateHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val listHandler: Handler = @@ -111,16 +109,15 @@ internal constructor( .addPathSegments("prices") .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { listHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { listHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - .let { PriceListPage.of(this, params, it) } - } + } + .let { PriceListPage.of(this, params, it) } } private val evaluateHandler: Handler = @@ -156,15 +153,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { evaluateHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { evaluateHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val fetchHandler: Handler = @@ -178,14 +174,13 @@ internal constructor( .addPathSegments("prices", params.getPathParam(0)) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { fetchHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { fetchHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/SubscriptionServiceImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/SubscriptionServiceImpl.kt index ea75383d..292db5b1 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/SubscriptionServiceImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/SubscriptionServiceImpl.kt @@ -305,15 +305,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { createHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { createHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val updateHandler: Handler = @@ -334,15 +333,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { updateHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { updateHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val listHandler: Handler = @@ -369,16 +367,15 @@ internal constructor( .addPathSegments("subscriptions") .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { listHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { listHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - .let { SubscriptionListPage.of(this, params, it) } - } + } + .let { SubscriptionListPage.of(this, params, it) } } private val cancelHandler: Handler = @@ -449,15 +446,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { cancelHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { cancelHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val fetchHandler: Handler = @@ -477,15 +473,14 @@ internal constructor( .addPathSegments("subscriptions", params.getPathParam(0)) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { fetchHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { fetchHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val fetchCostsHandler: Handler = @@ -513,15 +508,14 @@ internal constructor( .addPathSegments("subscriptions", params.getPathParam(0), "costs") .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { fetchCostsHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { fetchCostsHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val fetchScheduleHandler: Handler = @@ -543,16 +537,15 @@ internal constructor( .addPathSegments("subscriptions", params.getPathParam(0), "schedule") .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { fetchScheduleHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { fetchScheduleHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - .let { SubscriptionFetchSchedulePage.of(this, params, it) } - } + } + .let { SubscriptionFetchSchedulePage.of(this, params, it) } } private val fetchUsageHandler: Handler = @@ -745,15 +738,14 @@ internal constructor( .addPathSegments("subscriptions", params.getPathParam(0), "usage") .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { fetchUsageHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { fetchUsageHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val priceIntervalsHandler: Handler = @@ -838,15 +830,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { priceIntervalsHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { priceIntervalsHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val schedulePlanChangeHandler: Handler = @@ -1030,15 +1021,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { schedulePlanChangeHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { schedulePlanChangeHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val triggerPhaseHandler: Handler = @@ -1059,15 +1049,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { triggerPhaseHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { triggerPhaseHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val unscheduleCancellationHandler: Handler = @@ -1092,15 +1081,14 @@ internal constructor( .apply { params._body().ifPresent { body(json(clientOptions.jsonMapper, it)) } } .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { unscheduleCancellationHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { unscheduleCancellationHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val unscheduleFixedFeeQuantityUpdatesHandler: @@ -1129,15 +1117,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { unscheduleFixedFeeQuantityUpdatesHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { unscheduleFixedFeeQuantityUpdatesHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val unschedulePendingPlanChangesHandler: @@ -1163,15 +1150,14 @@ internal constructor( .apply { params._body().ifPresent { body(json(clientOptions.jsonMapper, it)) } } .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { unschedulePendingPlanChangesHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { unschedulePendingPlanChangesHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val updateFixedFeeQuantityHandler: Handler = @@ -1207,15 +1193,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { updateFixedFeeQuantityHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { updateFixedFeeQuantityHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val updateTrialHandler: Handler = @@ -1251,14 +1236,13 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { updateTrialHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { updateTrialHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/TopLevelServiceImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/TopLevelServiceImpl.kt index 040f415b..0868239c 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/TopLevelServiceImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/TopLevelServiceImpl.kt @@ -43,14 +43,13 @@ internal constructor( .addPathSegments("ping") .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { pingHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { pingHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/coupons/SubscriptionServiceImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/coupons/SubscriptionServiceImpl.kt index 263a03fa..b4997b99 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/coupons/SubscriptionServiceImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/coupons/SubscriptionServiceImpl.kt @@ -42,15 +42,14 @@ internal constructor( .addPathSegments("coupons", params.getPathParam(0), "subscriptions") .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { listHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { listHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - .let { CouponSubscriptionListPage.of(this, params, it) } - } + } + .let { CouponSubscriptionListPage.of(this, params, it) } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/customers/BalanceTransactionServiceImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/customers/BalanceTransactionServiceImpl.kt index c81887d9..5376d34f 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/customers/BalanceTransactionServiceImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/customers/BalanceTransactionServiceImpl.kt @@ -44,15 +44,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { createHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { createHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val listHandler: Handler = @@ -96,15 +95,14 @@ internal constructor( .addPathSegments("customers", params.getPathParam(0), "balance_transactions") .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { listHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { listHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - .let { CustomerBalanceTransactionListPage.of(this, params, it) } - } + } + .let { CustomerBalanceTransactionListPage.of(this, params, it) } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/customers/CostServiceImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/customers/CostServiceImpl.kt index c5f05b48..f8f8a2d1 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/customers/CostServiceImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/customers/CostServiceImpl.kt @@ -148,15 +148,14 @@ internal constructor( .addPathSegments("customers", params.getPathParam(0), "costs") .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { listHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { listHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val listByExternalIdHandler: Handler = @@ -288,14 +287,13 @@ internal constructor( ) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { listByExternalIdHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { listByExternalIdHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/customers/CreditServiceImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/customers/CreditServiceImpl.kt index 2b75935d..69e19d3d 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/customers/CreditServiceImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/customers/CreditServiceImpl.kt @@ -59,16 +59,15 @@ internal constructor( .addPathSegments("customers", params.getPathParam(0), "credits") .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { listHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { listHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - .let { CustomerCreditListPage.of(this, params, it) } - } + } + .let { CustomerCreditListPage.of(this, params, it) } } private val listByExternalIdHandler: Handler = @@ -99,15 +98,14 @@ internal constructor( ) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { listByExternalIdHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { listByExternalIdHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - .let { CustomerCreditListByExternalIdPage.of(this, params, it) } - } + } + .let { CustomerCreditListByExternalIdPage.of(this, params, it) } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/customers/credits/LedgerServiceImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/customers/credits/LedgerServiceImpl.kt index 8ec58bd8..ddd25729 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/customers/credits/LedgerServiceImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/customers/credits/LedgerServiceImpl.kt @@ -122,16 +122,15 @@ internal constructor( .addPathSegments("customers", params.getPathParam(0), "credits", "ledger") .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { listHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { listHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - .let { CustomerCreditLedgerListPage.of(this, params, it) } - } + } + .let { CustomerCreditLedgerListPage.of(this, params, it) } } private val createEntryHandler: Handler = @@ -252,15 +251,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { createEntryHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { createEntryHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val createEntryByExternalIdHandler: @@ -388,15 +386,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { createEntryByExternalIdHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { createEntryByExternalIdHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val listByExternalIdHandler: @@ -499,15 +496,14 @@ internal constructor( ) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { listByExternalIdHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { listByExternalIdHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - .let { CustomerCreditLedgerListByExternalIdPage.of(this, params, it) } - } + } + .let { CustomerCreditLedgerListByExternalIdPage.of(this, params, it) } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/customers/credits/TopUpServiceImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/customers/credits/TopUpServiceImpl.kt index dc07a056..ef5c5ca8 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/customers/credits/TopUpServiceImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/customers/credits/TopUpServiceImpl.kt @@ -55,15 +55,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { createHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { createHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val listHandler: Handler = @@ -81,16 +80,15 @@ internal constructor( .addPathSegments("customers", params.getPathParam(0), "credits", "top_ups") .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { listHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { listHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - .let { CustomerCreditTopUpListPage.of(this, params, it) } - } + } + .let { CustomerCreditTopUpListPage.of(this, params, it) } } private val deleteHandler: Handler = emptyHandler().withErrorHandler(errorHandler) @@ -110,9 +108,8 @@ internal constructor( .apply { params._body().ifPresent { body(json(clientOptions.jsonMapper, it)) } } .build() .prepare(clientOptions, params) - clientOptions.httpClient.execute(request, requestOptions).let { response -> - response.use { deleteHandler.handle(it) } - } + val response = clientOptions.httpClient.execute(request, requestOptions) + response.use { deleteHandler.handle(it) } } private val createByExternalIdHandler: Handler = @@ -144,15 +141,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { createByExternalIdHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { createByExternalIdHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val deleteByExternalIdHandler: Handler = @@ -177,9 +173,8 @@ internal constructor( .apply { params._body().ifPresent { body(json(clientOptions.jsonMapper, it)) } } .build() .prepare(clientOptions, params) - clientOptions.httpClient.execute(request, requestOptions).let { response -> - response.use { deleteByExternalIdHandler.handle(it) } - } + val response = clientOptions.httpClient.execute(request, requestOptions) + response.use { deleteByExternalIdHandler.handle(it) } } private val listByExternalIdHandler: Handler = @@ -203,15 +198,14 @@ internal constructor( ) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { listByExternalIdHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { listByExternalIdHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - .let { CustomerCreditTopUpListByExternalIdPage.of(this, params, it) } - } + } + .let { CustomerCreditTopUpListByExternalIdPage.of(this, params, it) } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/dimensionalPriceGroups/ExternalDimensionalPriceGroupIdServiceImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/dimensionalPriceGroups/ExternalDimensionalPriceGroupIdServiceImpl.kt index d65c0267..4bc9de52 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/dimensionalPriceGroups/ExternalDimensionalPriceGroupIdServiceImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/dimensionalPriceGroups/ExternalDimensionalPriceGroupIdServiceImpl.kt @@ -40,14 +40,13 @@ internal constructor( ) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { retrieveHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { retrieveHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/events/BackfillServiceImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/events/BackfillServiceImpl.kt index e398df82..047d7623 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/events/BackfillServiceImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/events/BackfillServiceImpl.kt @@ -76,15 +76,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { createHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { createHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val listHandler: Handler = @@ -109,16 +108,15 @@ internal constructor( .addPathSegments("events", "backfills") .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { listHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { listHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - .let { EventBackfillListPage.of(this, params, it) } - } + } + .let { EventBackfillListPage.of(this, params, it) } } private val closeHandler: Handler = @@ -141,15 +139,14 @@ internal constructor( .apply { params._body().ifPresent { body(json(clientOptions.jsonMapper, it)) } } .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { closeHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { closeHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val fetchHandler: Handler = @@ -167,15 +164,14 @@ internal constructor( .addPathSegments("events", "backfills", params.getPathParam(0)) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { fetchHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { fetchHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val revertHandler: Handler = @@ -201,14 +197,13 @@ internal constructor( .apply { params._body().ifPresent { body(json(clientOptions.jsonMapper, it)) } } .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { revertHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { revertHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/events/VolumeServiceImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/events/VolumeServiceImpl.kt index 458f7efe..eaaaa459 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/events/VolumeServiceImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/events/VolumeServiceImpl.kt @@ -45,14 +45,13 @@ internal constructor( .addPathSegments("events", "volume") .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { listHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { listHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/plans/ExternalPlanIdServiceImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/plans/ExternalPlanIdServiceImpl.kt index 7fe6f784..c83b5076 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/plans/ExternalPlanIdServiceImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/plans/ExternalPlanIdServiceImpl.kt @@ -44,15 +44,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { updateHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { updateHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val fetchHandler: Handler = @@ -85,14 +84,13 @@ internal constructor( .addPathSegments("plans", "external_plan_id", params.getPathParam(0)) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { fetchHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { fetchHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } } diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/prices/ExternalPriceIdServiceImpl.kt b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/prices/ExternalPriceIdServiceImpl.kt index 866dd260..c199e14d 100644 --- a/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/prices/ExternalPriceIdServiceImpl.kt +++ b/orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/prices/ExternalPriceIdServiceImpl.kt @@ -42,15 +42,14 @@ internal constructor( .body(json(clientOptions.jsonMapper, params._body())) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { updateHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { updateHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } private val fetchHandler: Handler = @@ -71,14 +70,13 @@ internal constructor( .addPathSegments("prices", "external_price_id", params.getPathParam(0)) .build() .prepare(clientOptions, params) - return clientOptions.httpClient.execute(request, requestOptions).let { response -> - response - .use { fetchHandler.handle(it) } - .apply { - if (requestOptions.responseValidation ?: clientOptions.responseValidation) { - validate() - } + val response = clientOptions.httpClient.execute(request, requestOptions) + return response + .use { fetchHandler.handle(it) } + .also { + if (requestOptions.responseValidation ?: clientOptions.responseValidation) { + it.validate() } - } + } } } diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/AlertCreateForCustomerParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/AlertCreateForCustomerParamsTest.kt index cff65af2..c6937b5d 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/AlertCreateForCustomerParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/AlertCreateForCustomerParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class AlertCreateForCustomerParamsTest { @Test - fun createAlertCreateForCustomerParams() { + fun create() { AlertCreateForCustomerParams.builder() .customerId("customer_id") .currency("currency") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/AlertCreateForExternalCustomerParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/AlertCreateForExternalCustomerParamsTest.kt index 272c086e..41bd6f48 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/AlertCreateForExternalCustomerParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/AlertCreateForExternalCustomerParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class AlertCreateForExternalCustomerParamsTest { @Test - fun createAlertCreateForExternalCustomerParams() { + fun create() { AlertCreateForExternalCustomerParams.builder() .externalCustomerId("external_customer_id") .currency("currency") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/AlertCreateForSubscriptionParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/AlertCreateForSubscriptionParamsTest.kt index 7e9f1fdd..1ab8b416 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/AlertCreateForSubscriptionParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/AlertCreateForSubscriptionParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class AlertCreateForSubscriptionParamsTest { @Test - fun createAlertCreateForSubscriptionParams() { + fun create() { AlertCreateForSubscriptionParams.builder() .subscriptionId("subscription_id") .addThreshold(AlertCreateForSubscriptionParams.Threshold.builder().value(0.0).build()) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/AlertDisableParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/AlertDisableParamsTest.kt index c841dea5..7c735acf 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/AlertDisableParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/AlertDisableParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class AlertDisableParamsTest { @Test - fun createAlertDisableParams() { + fun create() { AlertDisableParams.builder() .alertConfigurationId("alert_configuration_id") .subscriptionId("subscription_id") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/AlertEnableParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/AlertEnableParamsTest.kt index 6ee1865b..40c3a998 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/AlertEnableParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/AlertEnableParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class AlertEnableParamsTest { @Test - fun createAlertEnableParams() { + fun create() { AlertEnableParams.builder() .alertConfigurationId("alert_configuration_id") .subscriptionId("subscription_id") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/AlertListParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/AlertListParamsTest.kt index 62e2ab8c..d22afdc0 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/AlertListParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/AlertListParamsTest.kt @@ -10,7 +10,7 @@ import org.junit.jupiter.api.Test class AlertListParamsTest { @Test - fun createAlertListParams() { + fun create() { AlertListParams.builder() .createdAtGt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .createdAtGte(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/AlertRetrieveParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/AlertRetrieveParamsTest.kt index 294dceb4..6c5ecf39 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/AlertRetrieveParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/AlertRetrieveParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class AlertRetrieveParamsTest { @Test - fun createAlertRetrieveParams() { + fun create() { AlertRetrieveParams.builder().alertId("alert_id").build() } diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/AlertUpdateParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/AlertUpdateParamsTest.kt index 1e02e5b9..04a32c10 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/AlertUpdateParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/AlertUpdateParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class AlertUpdateParamsTest { @Test - fun createAlertUpdateParams() { + fun create() { AlertUpdateParams.builder() .alertConfigurationId("alert_configuration_id") .addThreshold(AlertUpdateParams.Threshold.builder().value(0.0).build()) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CouponArchiveParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CouponArchiveParamsTest.kt index 463880eb..c369fa12 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CouponArchiveParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CouponArchiveParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class CouponArchiveParamsTest { @Test - fun createCouponArchiveParams() { + fun create() { CouponArchiveParams.builder().couponId("coupon_id").build() } diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CouponCreateParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CouponCreateParamsTest.kt index e4854a24..5db42633 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CouponCreateParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CouponCreateParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class CouponCreateParamsTest { @Test - fun createCouponCreateParams() { + fun create() { CouponCreateParams.builder() .newCouponPercentageDiscount(0.0) .redemptionCode("HALFOFF") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CouponFetchParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CouponFetchParamsTest.kt index c694c8be..c61723a1 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CouponFetchParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CouponFetchParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class CouponFetchParamsTest { @Test - fun createCouponFetchParams() { + fun create() { CouponFetchParams.builder().couponId("coupon_id").build() } diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CouponListParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CouponListParamsTest.kt index af4bf209..cb6575e1 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CouponListParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CouponListParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class CouponListParamsTest { @Test - fun createCouponListParams() { + fun create() { CouponListParams.builder() .cursor("cursor") .limit(1L) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CouponSubscriptionListParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CouponSubscriptionListParamsTest.kt index 75ef5c63..65fde102 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CouponSubscriptionListParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CouponSubscriptionListParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class CouponSubscriptionListParamsTest { @Test - fun createCouponSubscriptionListParams() { + fun create() { CouponSubscriptionListParams.builder() .couponId("coupon_id") .cursor("cursor") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CreditNoteCreateParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CreditNoteCreateParamsTest.kt index a9c36cfb..58bd4270 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CreditNoteCreateParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CreditNoteCreateParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class CreditNoteCreateParamsTest { @Test - fun createCreditNoteCreateParams() { + fun create() { CreditNoteCreateParams.builder() .addLineItem( CreditNoteCreateParams.LineItem.builder() diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CreditNoteFetchParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CreditNoteFetchParamsTest.kt index 2e4ac5c9..a973a0be 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CreditNoteFetchParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CreditNoteFetchParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class CreditNoteFetchParamsTest { @Test - fun createCreditNoteFetchParams() { + fun create() { CreditNoteFetchParams.builder().creditNoteId("credit_note_id").build() } diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CreditNoteListParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CreditNoteListParamsTest.kt index af928ead..b17b3314 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CreditNoteListParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CreditNoteListParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class CreditNoteListParamsTest { @Test - fun createCreditNoteListParams() { + fun create() { CreditNoteListParams.builder().cursor("cursor").limit(1L).build() } diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerBalanceTransactionCreateParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerBalanceTransactionCreateParamsTest.kt index c2789e27..4caaee3c 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerBalanceTransactionCreateParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerBalanceTransactionCreateParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class CustomerBalanceTransactionCreateParamsTest { @Test - fun createCustomerBalanceTransactionCreateParams() { + fun create() { CustomerBalanceTransactionCreateParams.builder() .customerId("customer_id") .amount("amount") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerBalanceTransactionListParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerBalanceTransactionListParamsTest.kt index 0e9c02b9..fbba489c 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerBalanceTransactionListParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerBalanceTransactionListParamsTest.kt @@ -10,7 +10,7 @@ import org.junit.jupiter.api.Test class CustomerBalanceTransactionListParamsTest { @Test - fun createCustomerBalanceTransactionListParams() { + fun create() { CustomerBalanceTransactionListParams.builder() .customerId("customer_id") .cursor("cursor") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCostListByExternalIdParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCostListByExternalIdParamsTest.kt index be43658a..97815bfd 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCostListByExternalIdParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCostListByExternalIdParamsTest.kt @@ -10,7 +10,7 @@ import org.junit.jupiter.api.Test class CustomerCostListByExternalIdParamsTest { @Test - fun createCustomerCostListByExternalIdParams() { + fun create() { CustomerCostListByExternalIdParams.builder() .externalCustomerId("external_customer_id") .currency("currency") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCostListParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCostListParamsTest.kt index dda488dd..c97fbab8 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCostListParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCostListParamsTest.kt @@ -10,7 +10,7 @@ import org.junit.jupiter.api.Test class CustomerCostListParamsTest { @Test - fun createCustomerCostListParams() { + fun create() { CustomerCostListParams.builder() .customerId("customer_id") .currency("currency") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreateParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreateParamsTest.kt index 56a4f5e5..6c0ba976 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreateParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreateParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class CustomerCreateParamsTest { @Test - fun createCustomerCreateParams() { + fun create() { CustomerCreateParams.builder() .email("dev@stainlessapi.com") .name("x") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditLedgerCreateEntryByExternalIdParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditLedgerCreateEntryByExternalIdParamsTest.kt index 2cc0919e..46544ad5 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditLedgerCreateEntryByExternalIdParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditLedgerCreateEntryByExternalIdParamsTest.kt @@ -10,7 +10,7 @@ import org.junit.jupiter.api.Test class CustomerCreditLedgerCreateEntryByExternalIdParamsTest { @Test - fun createCustomerCreditLedgerCreateEntryByExternalIdParams() { + fun create() { CustomerCreditLedgerCreateEntryByExternalIdParams.builder() .forAddIncrementCreditLedgerEntryRequestParams( CustomerCreditLedgerCreateEntryByExternalIdParams diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditLedgerCreateEntryParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditLedgerCreateEntryParamsTest.kt index a19620ff..d765fce5 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditLedgerCreateEntryParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditLedgerCreateEntryParamsTest.kt @@ -10,7 +10,7 @@ import org.junit.jupiter.api.Test class CustomerCreditLedgerCreateEntryParamsTest { @Test - fun createCustomerCreditLedgerCreateEntryParams() { + fun create() { CustomerCreditLedgerCreateEntryParams.builder() .forAddIncrementCreditLedgerEntryRequestParams( CustomerCreditLedgerCreateEntryParams.AddIncrementCreditLedgerEntryRequestParams diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditLedgerListByExternalIdParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditLedgerListByExternalIdParamsTest.kt index 26d582db..ee91b1e2 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditLedgerListByExternalIdParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditLedgerListByExternalIdParamsTest.kt @@ -10,7 +10,7 @@ import org.junit.jupiter.api.Test class CustomerCreditLedgerListByExternalIdParamsTest { @Test - fun createCustomerCreditLedgerListByExternalIdParams() { + fun create() { CustomerCreditLedgerListByExternalIdParams.builder() .externalCustomerId("external_customer_id") .createdAtGt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditLedgerListParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditLedgerListParamsTest.kt index 8a9f6612..e9e33483 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditLedgerListParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditLedgerListParamsTest.kt @@ -10,7 +10,7 @@ import org.junit.jupiter.api.Test class CustomerCreditLedgerListParamsTest { @Test - fun createCustomerCreditLedgerListParams() { + fun create() { CustomerCreditLedgerListParams.builder() .customerId("customer_id") .createdAtGt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditListByExternalIdParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditListByExternalIdParamsTest.kt index 7e280759..94846efd 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditListByExternalIdParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditListByExternalIdParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class CustomerCreditListByExternalIdParamsTest { @Test - fun createCustomerCreditListByExternalIdParams() { + fun create() { CustomerCreditListByExternalIdParams.builder() .externalCustomerId("external_customer_id") .currency("currency") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditListParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditListParamsTest.kt index ab1b94af..0fa22183 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditListParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditListParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class CustomerCreditListParamsTest { @Test - fun createCustomerCreditListParams() { + fun create() { CustomerCreditListParams.builder() .customerId("customer_id") .currency("currency") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditTopUpCreateByExternalIdParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditTopUpCreateByExternalIdParamsTest.kt index caa670f4..212fef57 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditTopUpCreateByExternalIdParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditTopUpCreateByExternalIdParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class CustomerCreditTopUpCreateByExternalIdParamsTest { @Test - fun createCustomerCreditTopUpCreateByExternalIdParams() { + fun create() { CustomerCreditTopUpCreateByExternalIdParams.builder() .externalCustomerId("external_customer_id") .amount("amount") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditTopUpCreateParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditTopUpCreateParamsTest.kt index 9a6ad03d..eadfb5e5 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditTopUpCreateParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditTopUpCreateParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class CustomerCreditTopUpCreateParamsTest { @Test - fun createCustomerCreditTopUpCreateParams() { + fun create() { CustomerCreditTopUpCreateParams.builder() .customerId("customer_id") .amount("amount") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditTopUpDeleteByExternalIdParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditTopUpDeleteByExternalIdParamsTest.kt index 807dbfed..4e255b06 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditTopUpDeleteByExternalIdParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditTopUpDeleteByExternalIdParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class CustomerCreditTopUpDeleteByExternalIdParamsTest { @Test - fun createCustomerCreditTopUpDeleteByExternalIdParams() { + fun create() { CustomerCreditTopUpDeleteByExternalIdParams.builder() .externalCustomerId("external_customer_id") .topUpId("top_up_id") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditTopUpDeleteParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditTopUpDeleteParamsTest.kt index 39582af8..927b6e67 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditTopUpDeleteParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditTopUpDeleteParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class CustomerCreditTopUpDeleteParamsTest { @Test - fun createCustomerCreditTopUpDeleteParams() { + fun create() { CustomerCreditTopUpDeleteParams.builder() .customerId("customer_id") .topUpId("top_up_id") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditTopUpListByExternalIdParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditTopUpListByExternalIdParamsTest.kt index d0dc9212..e2b33c45 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditTopUpListByExternalIdParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditTopUpListByExternalIdParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class CustomerCreditTopUpListByExternalIdParamsTest { @Test - fun createCustomerCreditTopUpListByExternalIdParams() { + fun create() { CustomerCreditTopUpListByExternalIdParams.builder() .externalCustomerId("external_customer_id") .cursor("cursor") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditTopUpListParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditTopUpListParamsTest.kt index 059a5467..36c8863c 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditTopUpListParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerCreditTopUpListParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class CustomerCreditTopUpListParamsTest { @Test - fun createCustomerCreditTopUpListParams() { + fun create() { CustomerCreditTopUpListParams.builder() .customerId("customer_id") .cursor("cursor") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerDeleteParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerDeleteParamsTest.kt index 4865ccf8..8866b1e6 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerDeleteParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerDeleteParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class CustomerDeleteParamsTest { @Test - fun createCustomerDeleteParams() { + fun create() { CustomerDeleteParams.builder().customerId("customer_id").build() } diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerFetchByExternalIdParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerFetchByExternalIdParamsTest.kt index 5207baa3..5ce1adaf 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerFetchByExternalIdParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerFetchByExternalIdParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class CustomerFetchByExternalIdParamsTest { @Test - fun createCustomerFetchByExternalIdParams() { + fun create() { CustomerFetchByExternalIdParams.builder().externalCustomerId("external_customer_id").build() } diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerFetchParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerFetchParamsTest.kt index 3a02f7de..efe2ece3 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerFetchParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerFetchParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class CustomerFetchParamsTest { @Test - fun createCustomerFetchParams() { + fun create() { CustomerFetchParams.builder().customerId("customer_id").build() } diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerListParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerListParamsTest.kt index 80d2fc25..dc955deb 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerListParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerListParamsTest.kt @@ -10,7 +10,7 @@ import org.junit.jupiter.api.Test class CustomerListParamsTest { @Test - fun createCustomerListParams() { + fun create() { CustomerListParams.builder() .createdAtGt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .createdAtGte(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerSyncPaymentMethodsFromGatewayByExternalCustomerIdParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerSyncPaymentMethodsFromGatewayByExternalCustomerIdParamsTest.kt index e771840c..1b9f8840 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerSyncPaymentMethodsFromGatewayByExternalCustomerIdParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerSyncPaymentMethodsFromGatewayByExternalCustomerIdParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class CustomerSyncPaymentMethodsFromGatewayByExternalCustomerIdParamsTest { @Test - fun createCustomerSyncPaymentMethodsFromGatewayByExternalCustomerIdParams() { + fun create() { CustomerSyncPaymentMethodsFromGatewayByExternalCustomerIdParams.builder() .customerId("customer_id") .build() diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerSyncPaymentMethodsFromGatewayParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerSyncPaymentMethodsFromGatewayParamsTest.kt index e61b853d..3c8ff01a 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerSyncPaymentMethodsFromGatewayParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerSyncPaymentMethodsFromGatewayParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class CustomerSyncPaymentMethodsFromGatewayParamsTest { @Test - fun createCustomerSyncPaymentMethodsFromGatewayParams() { + fun create() { CustomerSyncPaymentMethodsFromGatewayParams.builder() .externalCustomerId("external_customer_id") .build() diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerUpdateByExternalIdParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerUpdateByExternalIdParamsTest.kt index 43b1b283..8994933b 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerUpdateByExternalIdParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerUpdateByExternalIdParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class CustomerUpdateByExternalIdParamsTest { @Test - fun createCustomerUpdateByExternalIdParams() { + fun create() { CustomerUpdateByExternalIdParams.builder() .id("external_customer_id") .accountingSyncConfiguration( diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerUpdateParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerUpdateParamsTest.kt index 2756de2c..17ea8661 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerUpdateParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/CustomerUpdateParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class CustomerUpdateParamsTest { @Test - fun createCustomerUpdateParams() { + fun create() { CustomerUpdateParams.builder() .customerId("customer_id") .accountingSyncConfiguration( diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/DimensionalPriceGroupCreateParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/DimensionalPriceGroupCreateParamsTest.kt index 93728ac3..56ff0efb 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/DimensionalPriceGroupCreateParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/DimensionalPriceGroupCreateParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class DimensionalPriceGroupCreateParamsTest { @Test - fun createDimensionalPriceGroupCreateParams() { + fun create() { DimensionalPriceGroupCreateParams.builder() .billableMetricId("billable_metric_id") .addDimension("region") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/DimensionalPriceGroupExternalDimensionalPriceGroupIdRetrieveParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/DimensionalPriceGroupExternalDimensionalPriceGroupIdRetrieveParamsTest.kt index 2553926c..0fa88091 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/DimensionalPriceGroupExternalDimensionalPriceGroupIdRetrieveParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/DimensionalPriceGroupExternalDimensionalPriceGroupIdRetrieveParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class DimensionalPriceGroupExternalDimensionalPriceGroupIdRetrieveParamsTest { @Test - fun createDimensionalPriceGroupExternalDimensionalPriceGroupIdRetrieveParams() { + fun create() { DimensionalPriceGroupExternalDimensionalPriceGroupIdRetrieveParams.builder() .externalDimensionalPriceGroupId("external_dimensional_price_group_id") .build() diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/DimensionalPriceGroupListParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/DimensionalPriceGroupListParamsTest.kt index b617fa4d..2c1194a8 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/DimensionalPriceGroupListParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/DimensionalPriceGroupListParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class DimensionalPriceGroupListParamsTest { @Test - fun createDimensionalPriceGroupListParams() { + fun create() { DimensionalPriceGroupListParams.builder().cursor("cursor").limit(1L).build() } diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/DimensionalPriceGroupRetrieveParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/DimensionalPriceGroupRetrieveParamsTest.kt index 7ca5645c..8f80bb45 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/DimensionalPriceGroupRetrieveParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/DimensionalPriceGroupRetrieveParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class DimensionalPriceGroupRetrieveParamsTest { @Test - fun createDimensionalPriceGroupRetrieveParams() { + fun create() { DimensionalPriceGroupRetrieveParams.builder() .dimensionalPriceGroupId("dimensional_price_group_id") .build() diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/EventBackfillCloseParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/EventBackfillCloseParamsTest.kt index 7322f0d2..81926faf 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/EventBackfillCloseParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/EventBackfillCloseParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class EventBackfillCloseParamsTest { @Test - fun createEventBackfillCloseParams() { + fun create() { EventBackfillCloseParams.builder().backfillId("backfill_id").build() } diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/EventBackfillCreateParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/EventBackfillCreateParamsTest.kt index c2285bff..63e53b41 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/EventBackfillCreateParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/EventBackfillCreateParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class EventBackfillCreateParamsTest { @Test - fun createEventBackfillCreateParams() { + fun create() { EventBackfillCreateParams.builder() .timeframeEnd(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .timeframeStart(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/EventBackfillFetchParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/EventBackfillFetchParamsTest.kt index 2a7ed7d4..a3659a7e 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/EventBackfillFetchParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/EventBackfillFetchParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class EventBackfillFetchParamsTest { @Test - fun createEventBackfillFetchParams() { + fun create() { EventBackfillFetchParams.builder().backfillId("backfill_id").build() } diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/EventBackfillListParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/EventBackfillListParamsTest.kt index f3b27b30..ec9ccbac 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/EventBackfillListParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/EventBackfillListParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class EventBackfillListParamsTest { @Test - fun createEventBackfillListParams() { + fun create() { EventBackfillListParams.builder().cursor("cursor").limit(1L).build() } diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/EventBackfillRevertParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/EventBackfillRevertParamsTest.kt index b21700b5..be83007a 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/EventBackfillRevertParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/EventBackfillRevertParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class EventBackfillRevertParamsTest { @Test - fun createEventBackfillRevertParams() { + fun create() { EventBackfillRevertParams.builder().backfillId("backfill_id").build() } diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/EventDeprecateParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/EventDeprecateParamsTest.kt index 3cca9473..22e8ae1f 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/EventDeprecateParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/EventDeprecateParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class EventDeprecateParamsTest { @Test - fun createEventDeprecateParams() { + fun create() { EventDeprecateParams.builder().eventId("event_id").build() } diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/EventIngestParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/EventIngestParamsTest.kt index d16ad836..ed44547c 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/EventIngestParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/EventIngestParamsTest.kt @@ -11,7 +11,7 @@ import org.junit.jupiter.api.Test class EventIngestParamsTest { @Test - fun createEventIngestParams() { + fun create() { EventIngestParams.builder() .addEvent( EventIngestParams.Event.builder() diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/EventSearchParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/EventSearchParamsTest.kt index f9410fd1..d3f2907f 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/EventSearchParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/EventSearchParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class EventSearchParamsTest { @Test - fun createEventSearchParams() { + fun create() { EventSearchParams.builder() .addEventId("string") .timeframeEnd(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/EventUpdateParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/EventUpdateParamsTest.kt index 1bbf2714..ed46deb6 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/EventUpdateParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/EventUpdateParamsTest.kt @@ -10,7 +10,7 @@ import org.junit.jupiter.api.Test class EventUpdateParamsTest { @Test - fun createEventUpdateParams() { + fun create() { EventUpdateParams.builder() .eventId("event_id") .eventName("event_name") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/EventVolumeListParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/EventVolumeListParamsTest.kt index ee372031..b205e101 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/EventVolumeListParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/EventVolumeListParamsTest.kt @@ -10,7 +10,7 @@ import org.junit.jupiter.api.Test class EventVolumeListParamsTest { @Test - fun createEventVolumeListParams() { + fun create() { EventVolumeListParams.builder() .timeframeStart(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .cursor("cursor") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceCreateParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceCreateParamsTest.kt index 178f7c53..29b303a9 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceCreateParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceCreateParamsTest.kt @@ -11,7 +11,7 @@ import org.junit.jupiter.api.Test class InvoiceCreateParamsTest { @Test - fun createInvoiceCreateParams() { + fun create() { InvoiceCreateParams.builder() .currency("USD") .invoiceDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceFetchParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceFetchParamsTest.kt index 030b67e4..514ba0b8 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceFetchParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceFetchParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class InvoiceFetchParamsTest { @Test - fun createInvoiceFetchParams() { + fun create() { InvoiceFetchParams.builder().invoiceId("invoice_id").build() } diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceFetchUpcomingParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceFetchUpcomingParamsTest.kt index 501774d3..a3e6f3c9 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceFetchUpcomingParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceFetchUpcomingParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class InvoiceFetchUpcomingParamsTest { @Test - fun createInvoiceFetchUpcomingParams() { + fun create() { InvoiceFetchUpcomingParams.builder().subscriptionId("subscription_id").build() } diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceIssueParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceIssueParamsTest.kt index af106f96..2917fee2 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceIssueParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceIssueParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class InvoiceIssueParamsTest { @Test - fun createInvoiceIssueParams() { + fun create() { InvoiceIssueParams.builder().invoiceId("invoice_id").synchronous(true).build() } diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceLineItemCreateParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceLineItemCreateParamsTest.kt index 541e4ead..d4ae388b 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceLineItemCreateParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceLineItemCreateParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class InvoiceLineItemCreateParamsTest { @Test - fun createInvoiceLineItemCreateParams() { + fun create() { InvoiceLineItemCreateParams.builder() .amount("12.00") .endDate(LocalDate.parse("2023-09-22")) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceListParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceListParamsTest.kt index d4e5b566..5d85dc19 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceListParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceListParamsTest.kt @@ -11,7 +11,7 @@ import org.junit.jupiter.api.Test class InvoiceListParamsTest { @Test - fun createInvoiceListParams() { + fun create() { InvoiceListParams.builder() .amount("amount") .amountGt("amount[gt]") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceMarkPaidParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceMarkPaidParamsTest.kt index 011c81c5..102d7daa 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceMarkPaidParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceMarkPaidParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class InvoiceMarkPaidParamsTest { @Test - fun createInvoiceMarkPaidParams() { + fun create() { InvoiceMarkPaidParams.builder() .invoiceId("invoice_id") .paymentReceivedDate(LocalDate.parse("2023-09-22")) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoicePayParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoicePayParamsTest.kt index 29d99462..89d3ba96 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoicePayParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoicePayParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class InvoicePayParamsTest { @Test - fun createInvoicePayParams() { + fun create() { InvoicePayParams.builder().invoiceId("invoice_id").build() } diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceUpdateParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceUpdateParamsTest.kt index 11b185bb..a9f7eebc 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceUpdateParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceUpdateParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class InvoiceUpdateParamsTest { @Test - fun createInvoiceUpdateParams() { + fun create() { InvoiceUpdateParams.builder() .invoiceId("invoice_id") .metadata( diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceVoidInvoiceParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceVoidInvoiceParamsTest.kt index 9fa21fd7..3f4515a6 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceVoidInvoiceParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/InvoiceVoidInvoiceParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class InvoiceVoidInvoiceParamsTest { @Test - fun createInvoiceVoidInvoiceParams() { + fun create() { InvoiceVoidInvoiceParams.builder().invoiceId("invoice_id").build() } diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/ItemCreateParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/ItemCreateParamsTest.kt index b93d0607..33e131fd 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/ItemCreateParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/ItemCreateParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class ItemCreateParamsTest { @Test - fun createItemCreateParams() { + fun create() { ItemCreateParams.builder().name("API requests").build() } diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/ItemFetchParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/ItemFetchParamsTest.kt index c8372bdc..4193b949 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/ItemFetchParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/ItemFetchParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class ItemFetchParamsTest { @Test - fun createItemFetchParams() { + fun create() { ItemFetchParams.builder().itemId("item_id").build() } diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/ItemListParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/ItemListParamsTest.kt index ebfb9491..01d1c1f3 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/ItemListParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/ItemListParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class ItemListParamsTest { @Test - fun createItemListParams() { + fun create() { ItemListParams.builder().cursor("cursor").limit(1L).build() } diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/ItemUpdateParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/ItemUpdateParamsTest.kt index 7d60ec13..1df6d5a4 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/ItemUpdateParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/ItemUpdateParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class ItemUpdateParamsTest { @Test - fun createItemUpdateParams() { + fun create() { ItemUpdateParams.builder() .itemId("item_id") .addExternalConnection( diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/MetricCreateParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/MetricCreateParamsTest.kt index 5a2746a4..5c332e14 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/MetricCreateParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/MetricCreateParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class MetricCreateParamsTest { @Test - fun createMetricCreateParams() { + fun create() { MetricCreateParams.builder() .description("Sum of bytes downloaded in fast mode") .itemId("item_id") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/MetricFetchParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/MetricFetchParamsTest.kt index 17795cfa..fb7efc44 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/MetricFetchParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/MetricFetchParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class MetricFetchParamsTest { @Test - fun createMetricFetchParams() { + fun create() { MetricFetchParams.builder().metricId("metric_id").build() } diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/MetricListParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/MetricListParamsTest.kt index 025707e4..9a5facf1 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/MetricListParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/MetricListParamsTest.kt @@ -10,7 +10,7 @@ import org.junit.jupiter.api.Test class MetricListParamsTest { @Test - fun createMetricListParams() { + fun create() { MetricListParams.builder() .createdAtGt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .createdAtGte(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/MetricUpdateParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/MetricUpdateParamsTest.kt index 43ef1e4b..ed55040a 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/MetricUpdateParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/MetricUpdateParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class MetricUpdateParamsTest { @Test - fun createMetricUpdateParams() { + fun create() { MetricUpdateParams.builder() .metricId("metric_id") .metadata( diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/PlanCreateParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/PlanCreateParamsTest.kt index 6d855c11..a5164320 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/PlanCreateParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/PlanCreateParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class PlanCreateParamsTest { @Test - fun createPlanCreateParams() { + fun create() { PlanCreateParams.builder() .currency("currency") .name("name") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/PlanExternalPlanIdFetchParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/PlanExternalPlanIdFetchParamsTest.kt index ca0db4c3..052b8fda 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/PlanExternalPlanIdFetchParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/PlanExternalPlanIdFetchParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class PlanExternalPlanIdFetchParamsTest { @Test - fun createPlanExternalPlanIdFetchParams() { + fun create() { PlanExternalPlanIdFetchParams.builder().externalPlanId("external_plan_id").build() } diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/PlanExternalPlanIdUpdateParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/PlanExternalPlanIdUpdateParamsTest.kt index 37f206a4..41a3a229 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/PlanExternalPlanIdUpdateParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/PlanExternalPlanIdUpdateParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class PlanExternalPlanIdUpdateParamsTest { @Test - fun createPlanExternalPlanIdUpdateParams() { + fun create() { PlanExternalPlanIdUpdateParams.builder() .otherExternalPlanId("external_plan_id") .externalPlanId("external_plan_id") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/PlanFetchParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/PlanFetchParamsTest.kt index 782e10c8..35aa136d 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/PlanFetchParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/PlanFetchParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class PlanFetchParamsTest { @Test - fun createPlanFetchParams() { + fun create() { PlanFetchParams.builder().planId("plan_id").build() } diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/PlanListParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/PlanListParamsTest.kt index 9c9527a2..48585150 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/PlanListParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/PlanListParamsTest.kt @@ -10,7 +10,7 @@ import org.junit.jupiter.api.Test class PlanListParamsTest { @Test - fun createPlanListParams() { + fun create() { PlanListParams.builder() .createdAtGt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .createdAtGte(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/PlanUpdateParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/PlanUpdateParamsTest.kt index 29c1d25c..9cccfd74 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/PlanUpdateParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/PlanUpdateParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class PlanUpdateParamsTest { @Test - fun createPlanUpdateParams() { + fun create() { PlanUpdateParams.builder() .planId("plan_id") .externalPlanId("external_plan_id") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/PriceCreateParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/PriceCreateParamsTest.kt index 4c0ae8ca..c11ac526 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/PriceCreateParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/PriceCreateParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class PriceCreateParamsTest { @Test - fun createPriceCreateParams() { + fun create() { PriceCreateParams.builder() .forNewFloatingUnitPrice( PriceCreateParams.NewFloatingUnitPrice.builder() diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/PriceEvaluateParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/PriceEvaluateParamsTest.kt index f99743ed..92f78784 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/PriceEvaluateParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/PriceEvaluateParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class PriceEvaluateParamsTest { @Test - fun createPriceEvaluateParams() { + fun create() { PriceEvaluateParams.builder() .priceId("price_id") .timeframeEnd(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/PriceExternalPriceIdFetchParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/PriceExternalPriceIdFetchParamsTest.kt index e730fba0..91634a59 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/PriceExternalPriceIdFetchParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/PriceExternalPriceIdFetchParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class PriceExternalPriceIdFetchParamsTest { @Test - fun createPriceExternalPriceIdFetchParams() { + fun create() { PriceExternalPriceIdFetchParams.builder().externalPriceId("external_price_id").build() } diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/PriceExternalPriceIdUpdateParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/PriceExternalPriceIdUpdateParamsTest.kt index 9357e6a5..9fe80ff9 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/PriceExternalPriceIdUpdateParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/PriceExternalPriceIdUpdateParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class PriceExternalPriceIdUpdateParamsTest { @Test - fun createPriceExternalPriceIdUpdateParams() { + fun create() { PriceExternalPriceIdUpdateParams.builder() .externalPriceId("external_price_id") .metadata( diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/PriceFetchParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/PriceFetchParamsTest.kt index ba45f289..5ef4dc13 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/PriceFetchParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/PriceFetchParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class PriceFetchParamsTest { @Test - fun createPriceFetchParams() { + fun create() { PriceFetchParams.builder().priceId("price_id").build() } diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/PriceListParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/PriceListParamsTest.kt index 6d9d6b06..2de64b46 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/PriceListParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/PriceListParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class PriceListParamsTest { @Test - fun createPriceListParams() { + fun create() { PriceListParams.builder().cursor("cursor").limit(1L).build() } diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/PriceUpdateParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/PriceUpdateParamsTest.kt index b3d7d83c..550c881a 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/PriceUpdateParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/PriceUpdateParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class PriceUpdateParamsTest { @Test - fun createPriceUpdateParams() { + fun create() { PriceUpdateParams.builder() .priceId("price_id") .metadata( diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionCancelParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionCancelParamsTest.kt index beca43f1..1e223161 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionCancelParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionCancelParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class SubscriptionCancelParamsTest { @Test - fun createSubscriptionCancelParams() { + fun create() { SubscriptionCancelParams.builder() .subscriptionId("subscription_id") .cancelOption(SubscriptionCancelParams.CancelOption.END_OF_SUBSCRIPTION_TERM) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionCreateParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionCreateParamsTest.kt index 183f56df..c168d21a 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionCreateParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionCreateParamsTest.kt @@ -10,7 +10,7 @@ import org.junit.jupiter.api.Test class SubscriptionCreateParamsTest { @Test - fun createSubscriptionCreateParams() { + fun create() { SubscriptionCreateParams.builder() .addAddAdjustment( SubscriptionCreateParams.AddAdjustment.builder() diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionFetchCostsParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionFetchCostsParamsTest.kt index d8244900..ab7c25c0 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionFetchCostsParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionFetchCostsParamsTest.kt @@ -10,7 +10,7 @@ import org.junit.jupiter.api.Test class SubscriptionFetchCostsParamsTest { @Test - fun createSubscriptionFetchCostsParams() { + fun create() { SubscriptionFetchCostsParams.builder() .subscriptionId("subscription_id") .currency("currency") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionFetchParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionFetchParamsTest.kt index d5a361d7..a50c3641 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionFetchParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionFetchParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class SubscriptionFetchParamsTest { @Test - fun createSubscriptionFetchParams() { + fun create() { SubscriptionFetchParams.builder().subscriptionId("subscription_id").build() } diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionFetchScheduleParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionFetchScheduleParamsTest.kt index a9d105c6..37df9a7d 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionFetchScheduleParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionFetchScheduleParamsTest.kt @@ -10,7 +10,7 @@ import org.junit.jupiter.api.Test class SubscriptionFetchScheduleParamsTest { @Test - fun createSubscriptionFetchScheduleParams() { + fun create() { SubscriptionFetchScheduleParams.builder() .subscriptionId("subscription_id") .cursor("cursor") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionFetchUsageParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionFetchUsageParamsTest.kt index affa3373..26ac7e9f 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionFetchUsageParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionFetchUsageParamsTest.kt @@ -10,7 +10,7 @@ import org.junit.jupiter.api.Test class SubscriptionFetchUsageParamsTest { @Test - fun createSubscriptionFetchUsageParams() { + fun create() { SubscriptionFetchUsageParams.builder() .subscriptionId("subscription_id") .billableMetricId("billable_metric_id") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionListParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionListParamsTest.kt index 28d76e77..54c0cf16 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionListParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionListParamsTest.kt @@ -10,7 +10,7 @@ import org.junit.jupiter.api.Test class SubscriptionListParamsTest { @Test - fun createSubscriptionListParams() { + fun create() { SubscriptionListParams.builder() .createdAtGt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .createdAtGte(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionPriceIntervalsParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionPriceIntervalsParamsTest.kt index e94c1495..b23e7f81 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionPriceIntervalsParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionPriceIntervalsParamsTest.kt @@ -10,7 +10,7 @@ import org.junit.jupiter.api.Test class SubscriptionPriceIntervalsParamsTest { @Test - fun createSubscriptionPriceIntervalsParams() { + fun create() { SubscriptionPriceIntervalsParams.builder() .subscriptionId("subscription_id") .addAdd( diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionSchedulePlanChangeParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionSchedulePlanChangeParamsTest.kt index 3273cc77..c55b6661 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionSchedulePlanChangeParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionSchedulePlanChangeParamsTest.kt @@ -10,7 +10,7 @@ import org.junit.jupiter.api.Test class SubscriptionSchedulePlanChangeParamsTest { @Test - fun createSubscriptionSchedulePlanChangeParams() { + fun create() { SubscriptionSchedulePlanChangeParams.builder() .subscriptionId("subscription_id") .changeOption(SubscriptionSchedulePlanChangeParams.ChangeOption.REQUESTED_DATE) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionTriggerPhaseParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionTriggerPhaseParamsTest.kt index 36506209..3901f06c 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionTriggerPhaseParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionTriggerPhaseParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class SubscriptionTriggerPhaseParamsTest { @Test - fun createSubscriptionTriggerPhaseParams() { + fun create() { SubscriptionTriggerPhaseParams.builder() .subscriptionId("subscription_id") .effectiveDate(LocalDate.parse("2019-12-27")) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUnscheduleCancellationParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUnscheduleCancellationParamsTest.kt index 162186d2..dfe59bf3 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUnscheduleCancellationParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUnscheduleCancellationParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class SubscriptionUnscheduleCancellationParamsTest { @Test - fun createSubscriptionUnscheduleCancellationParams() { + fun create() { SubscriptionUnscheduleCancellationParams.builder().subscriptionId("subscription_id").build() } diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUnscheduleFixedFeeQuantityUpdatesParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUnscheduleFixedFeeQuantityUpdatesParamsTest.kt index d04d5543..10c9d955 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUnscheduleFixedFeeQuantityUpdatesParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUnscheduleFixedFeeQuantityUpdatesParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class SubscriptionUnscheduleFixedFeeQuantityUpdatesParamsTest { @Test - fun createSubscriptionUnscheduleFixedFeeQuantityUpdatesParams() { + fun create() { SubscriptionUnscheduleFixedFeeQuantityUpdatesParams.builder() .subscriptionId("subscription_id") .priceId("price_id") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUnschedulePendingPlanChangesParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUnschedulePendingPlanChangesParamsTest.kt index fac0700b..698ad0cf 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUnschedulePendingPlanChangesParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUnschedulePendingPlanChangesParamsTest.kt @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test class SubscriptionUnschedulePendingPlanChangesParamsTest { @Test - fun createSubscriptionUnschedulePendingPlanChangesParams() { + fun create() { SubscriptionUnschedulePendingPlanChangesParams.builder() .subscriptionId("subscription_id") .build() diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUpdateFixedFeeQuantityParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUpdateFixedFeeQuantityParamsTest.kt index 44913809..dae8c168 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUpdateFixedFeeQuantityParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUpdateFixedFeeQuantityParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class SubscriptionUpdateFixedFeeQuantityParamsTest { @Test - fun createSubscriptionUpdateFixedFeeQuantityParams() { + fun create() { SubscriptionUpdateFixedFeeQuantityParams.builder() .subscriptionId("subscription_id") .priceId("price_id") diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUpdateParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUpdateParamsTest.kt index d2a39864..189843e4 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUpdateParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUpdateParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class SubscriptionUpdateParamsTest { @Test - fun createSubscriptionUpdateParams() { + fun create() { SubscriptionUpdateParams.builder() .subscriptionId("subscription_id") .autoCollection(true) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUpdateTrialParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUpdateTrialParamsTest.kt index f2a11c9a..809a4ec4 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUpdateTrialParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/SubscriptionUpdateTrialParamsTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test class SubscriptionUpdateTrialParamsTest { @Test - fun createSubscriptionUpdateTrialParams() { + fun create() { SubscriptionUpdateTrialParams.builder() .subscriptionId("subscription_id") .trialEndDate(OffsetDateTime.parse("2017-07-21T17:32:28Z")) diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/models/TopLevelPingParamsTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/models/TopLevelPingParamsTest.kt index 07ab7b9f..7da06053 100644 --- a/orb-java-core/src/test/kotlin/com/withorb/api/models/TopLevelPingParamsTest.kt +++ b/orb-java-core/src/test/kotlin/com/withorb/api/models/TopLevelPingParamsTest.kt @@ -7,7 +7,7 @@ import org.junit.jupiter.api.Test class TopLevelPingParamsTest { @Test - fun createTopLevelPingParams() { + fun create() { TopLevelPingParams.builder().build() } }