diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index c9964537..26b1ce24 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.49.1"
+ ".": "0.50.0"
}
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 47c6dab2..bbb7bd2c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,25 @@
# Changelog
+## 0.50.0 (2025-03-19)
+
+Full Changelog: [v0.49.1...v0.50.0](https://github.com/orbcorp/orb-java/compare/v0.49.1...v0.50.0)
+
+### ⚠ BREAKING CHANGES
+
+* **client:** refactor exception structure and methods ([#357](https://github.com/orbcorp/orb-java/issues/357))
+
+### Bug Fixes
+
+* compilation error ([287236c](https://github.com/orbcorp/orb-java/commit/287236c510b6351aa98f68abce900ad40f824537))
+
+
+### Chores
+
+* **client:** refactor exception structure and methods ([#357](https://github.com/orbcorp/orb-java/issues/357)) ([adc2898](https://github.com/orbcorp/orb-java/commit/adc28986adf95bb668ba4b4176fcd3c4b3507ca6))
+* **internal:** codegen related update ([#356](https://github.com/orbcorp/orb-java/issues/356)) ([56e24bf](https://github.com/orbcorp/orb-java/commit/56e24bf8cdaf22d81e15d59bd0d5c2611729050e))
+* **internal:** refactor enum query param serialization ([#353](https://github.com/orbcorp/orb-java/issues/353)) ([06904bf](https://github.com/orbcorp/orb-java/commit/06904bf13668ca9cb0cc9713a12c1b21811dbaa1))
+* **internal:** version bump ([#354](https://github.com/orbcorp/orb-java/issues/354)) ([8d4d3e1](https://github.com/orbcorp/orb-java/commit/8d4d3e1e02c9547ad12254a8057294ff9c98de79))
+
## 0.49.1 (2025-03-18)
Full Changelog: [v0.49.0...v0.49.1](https://github.com/orbcorp/orb-java/compare/v0.49.0...v0.49.1)
diff --git a/README.md b/README.md
index f84bf89a..6c709b5a 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
-[](https://central.sonatype.com/artifact/com.withorb.api/orb-java/0.49.1)
+[](https://central.sonatype.com/artifact/com.withorb.api/orb-java/0.50.0)
@@ -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.49.1")
+implementation("com.withorb.api:orb-java:0.50.0")
```
### Maven
@@ -28,7 +28,7 @@ implementation("com.withorb.api:orb-java:0.49.1")
com.withorb.api
orb-java
- 0.49.1
+ 0.50.0
```
diff --git a/build.gradle.kts b/build.gradle.kts
index 90730ca1..8df177b3 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,4 +1,4 @@
allprojects {
group = "com.withorb.api"
- version = "0.49.1" // x-release-please-version
+ version = "0.50.0" // x-release-please-version
}
diff --git a/buildSrc/src/main/kotlin/orb.kotlin.gradle.kts b/buildSrc/src/main/kotlin/orb.kotlin.gradle.kts
index e6e85260..55b2fc55 100644
--- a/buildSrc/src/main/kotlin/orb.kotlin.gradle.kts
+++ b/buildSrc/src/main/kotlin/orb.kotlin.gradle.kts
@@ -21,9 +21,9 @@ kotlin {
"-nowarn",
)
jvmTarget.set(JvmTarget.JVM_1_8)
- languageVersion.set(KotlinVersion.KOTLIN_1_8)
- apiVersion.set(KotlinVersion.KOTLIN_1_8)
- coreLibrariesVersion = "1.8.0"
+ languageVersion.set(KotlinVersion.KOTLIN_1_9)
+ apiVersion.set(KotlinVersion.KOTLIN_1_9)
+ coreLibrariesVersion = "1.9.20"
}
}
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/core/handlers/ErrorHandler.kt b/orb-java-core/src/main/kotlin/com/withorb/api/core/handlers/ErrorHandler.kt
index b4e8860c..70ed82f3 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/core/handlers/ErrorHandler.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/core/handlers/ErrorHandler.kt
@@ -1,125 +1,84 @@
+// File generated from our OpenAPI spec by Stainless.
+
@file:JvmName("ErrorHandler")
package com.withorb.api.core.handlers
import com.fasterxml.jackson.databind.json.JsonMapper
-import com.withorb.api.core.http.Headers
+import com.withorb.api.core.JsonMissing
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.http.HttpResponse
import com.withorb.api.core.http.HttpResponse.Handler
import com.withorb.api.errors.BadRequestException
import com.withorb.api.errors.InternalServerException
import com.withorb.api.errors.NotFoundException
-import com.withorb.api.errors.OrbError
import com.withorb.api.errors.PermissionDeniedException
import com.withorb.api.errors.RateLimitException
import com.withorb.api.errors.UnauthorizedException
import com.withorb.api.errors.UnexpectedStatusCodeException
import com.withorb.api.errors.UnprocessableEntityException
-import java.io.ByteArrayInputStream
-import java.io.InputStream
@JvmSynthetic
-internal fun errorHandler(jsonMapper: JsonMapper): Handler {
- val handler = jsonHandler(jsonMapper)
+internal fun errorHandler(jsonMapper: JsonMapper): Handler {
+ val handler = jsonHandler(jsonMapper)
- return object : Handler {
- override fun handle(response: HttpResponse): OrbError =
+ return object : Handler {
+ override fun handle(response: HttpResponse): JsonValue =
try {
handler.handle(response)
} catch (e: Exception) {
- OrbError.builder().build()
+ JsonMissing.of()
}
}
}
@JvmSynthetic
-internal fun Handler.withErrorHandler(errorHandler: Handler): Handler =
+internal fun Handler.withErrorHandler(errorHandler: Handler): Handler =
object : Handler {
- override fun handle(response: HttpResponse): T {
+ override fun handle(response: HttpResponse): T =
when (val statusCode = response.statusCode()) {
- in 200..299 -> {
- return this@withErrorHandler.handle(response)
- }
- 400 -> {
- val buffered = response.buffered()
- throw BadRequestException(
- buffered.headers(),
- stringHandler().handle(buffered),
- errorHandler.handle(buffered),
- )
- }
- 401 -> {
- val buffered = response.buffered()
- throw UnauthorizedException(
- buffered.headers(),
- stringHandler().handle(buffered),
- errorHandler.handle(buffered),
- )
- }
- 403 -> {
- val buffered = response.buffered()
- throw PermissionDeniedException(
- buffered.headers(),
- stringHandler().handle(buffered),
- errorHandler.handle(buffered),
- )
- }
- 404 -> {
- val buffered = response.buffered()
- throw NotFoundException(
- buffered.headers(),
- stringHandler().handle(buffered),
- errorHandler.handle(buffered),
- )
- }
- 422 -> {
- val buffered = response.buffered()
- throw UnprocessableEntityException(
- buffered.headers(),
- stringHandler().handle(buffered),
- errorHandler.handle(buffered),
- )
- }
- 429 -> {
- val buffered = response.buffered()
- throw RateLimitException(
- buffered.headers(),
- stringHandler().handle(buffered),
- errorHandler.handle(buffered),
- )
- }
- in 500..599 -> {
- val buffered = response.buffered()
- throw InternalServerException(
- statusCode,
- buffered.headers(),
- stringHandler().handle(buffered),
- errorHandler.handle(buffered),
- )
- }
- else -> {
- val buffered = response.buffered()
- throw UnexpectedStatusCodeException(
- statusCode,
- buffered.headers(),
- stringHandler().handle(buffered),
- errorHandler.handle(buffered),
- )
- }
+ in 200..299 -> this@withErrorHandler.handle(response)
+ 400 ->
+ throw BadRequestException.builder()
+ .headers(response.headers())
+ .body(errorHandler.handle(response))
+ .build()
+ 401 ->
+ throw UnauthorizedException.builder()
+ .headers(response.headers())
+ .body(errorHandler.handle(response))
+ .build()
+ 403 ->
+ throw PermissionDeniedException.builder()
+ .headers(response.headers())
+ .body(errorHandler.handle(response))
+ .build()
+ 404 ->
+ throw NotFoundException.builder()
+ .headers(response.headers())
+ .body(errorHandler.handle(response))
+ .build()
+ 422 ->
+ throw UnprocessableEntityException.builder()
+ .headers(response.headers())
+ .body(errorHandler.handle(response))
+ .build()
+ 429 ->
+ throw RateLimitException.builder()
+ .headers(response.headers())
+ .body(errorHandler.handle(response))
+ .build()
+ in 500..599 ->
+ throw InternalServerException.builder()
+ .statusCode(statusCode)
+ .headers(response.headers())
+ .body(errorHandler.handle(response))
+ .build()
+ else ->
+ throw UnexpectedStatusCodeException.builder()
+ .statusCode(statusCode)
+ .headers(response.headers())
+ .body(errorHandler.handle(response))
+ .build()
}
- }
- }
-
-private fun HttpResponse.buffered(): HttpResponse {
- val body = body().readBytes()
-
- return object : HttpResponse {
- override fun statusCode(): Int = this@buffered.statusCode()
-
- override fun headers(): Headers = this@buffered.headers()
-
- override fun body(): InputStream = ByteArrayInputStream(body)
-
- override fun close() = this@buffered.close()
}
-}
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/errors/BadRequestException.kt b/orb-java-core/src/main/kotlin/com/withorb/api/errors/BadRequestException.kt
index 08d6372d..b9d3acfc 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/errors/BadRequestException.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/errors/BadRequestException.kt
@@ -1,6 +1,80 @@
+// File generated from our OpenAPI spec by Stainless.
+
package com.withorb.api.errors
+import com.withorb.api.core.JsonValue
+import com.withorb.api.core.checkRequired
import com.withorb.api.core.http.Headers
+import java.util.Optional
+import kotlin.jvm.optionals.getOrNull
+
+class BadRequestException
+private constructor(private val headers: Headers, private val body: JsonValue, cause: Throwable?) :
+ OrbServiceException("400: $body", cause) {
+
+ override fun headers(): Headers = headers
+
+ override fun body(): JsonValue = body
+
+ override fun statusCode(): Int = 400
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /**
+ * Returns a mutable builder for constructing an instance of [BadRequestException].
+ *
+ * The following fields are required:
+ * ```java
+ * .headers()
+ * .body()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [BadRequestException]. */
+ class Builder internal constructor() {
+
+ private var headers: Headers? = null
+ private var body: JsonValue? = null
+ private var cause: Throwable? = null
+
+ @JvmSynthetic
+ internal fun from(badRequestException: BadRequestException) = apply {
+ headers = badRequestException.headers
+ body = badRequestException.body
+ cause = badRequestException.cause
+ }
+
+ fun headers(headers: Headers) = apply { this.headers = headers }
+
+ fun body(body: JsonValue) = apply { this.body = body }
+
+ fun cause(cause: Throwable?) = apply { this.cause = cause }
+
+ /** Alias for calling [Builder.cause] with `cause.orElse(null)`. */
+ fun cause(cause: Optional) = cause(cause.getOrNull())
-class BadRequestException(headers: Headers, body: String, error: OrbError) :
- OrbServiceException(400, headers, body, error)
+ /**
+ * Returns an immutable instance of [BadRequestException].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .headers()
+ * .body()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): BadRequestException =
+ BadRequestException(
+ checkRequired("headers", headers),
+ checkRequired("body", body),
+ cause,
+ )
+ }
+}
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/errors/InternalServerException.kt b/orb-java-core/src/main/kotlin/com/withorb/api/errors/InternalServerException.kt
index 3913e5ec..ad38f269 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/errors/InternalServerException.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/errors/InternalServerException.kt
@@ -1,6 +1,91 @@
+// File generated from our OpenAPI spec by Stainless.
+
package com.withorb.api.errors
+import com.withorb.api.core.JsonValue
+import com.withorb.api.core.checkRequired
import com.withorb.api.core.http.Headers
+import java.util.Optional
+import kotlin.jvm.optionals.getOrNull
+
+class InternalServerException
+private constructor(
+ private val statusCode: Int,
+ private val headers: Headers,
+ private val body: JsonValue,
+ cause: Throwable?,
+) : OrbServiceException("$statusCode: $body", cause) {
+
+ override fun statusCode(): Int = statusCode
+
+ override fun headers(): Headers = headers
+
+ override fun body(): JsonValue = body
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /**
+ * Returns a mutable builder for constructing an instance of [InternalServerException].
+ *
+ * The following fields are required:
+ * ```java
+ * .statusCode()
+ * .headers()
+ * .body()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [InternalServerException]. */
+ class Builder internal constructor() {
+
+ private var statusCode: Int? = null
+ private var headers: Headers? = null
+ private var body: JsonValue? = null
+ private var cause: Throwable? = null
+
+ @JvmSynthetic
+ internal fun from(internalServerException: InternalServerException) = apply {
+ statusCode = internalServerException.statusCode
+ headers = internalServerException.headers
+ body = internalServerException.body
+ cause = internalServerException.cause
+ }
+
+ fun statusCode(statusCode: Int) = apply { this.statusCode = statusCode }
+
+ fun headers(headers: Headers) = apply { this.headers = headers }
+
+ fun body(body: JsonValue) = apply { this.body = body }
+
+ fun cause(cause: Throwable?) = apply { this.cause = cause }
+
+ /** Alias for calling [Builder.cause] with `cause.orElse(null)`. */
+ fun cause(cause: Optional) = cause(cause.getOrNull())
-class InternalServerException(statusCode: Int, headers: Headers, body: String, error: OrbError) :
- OrbServiceException(statusCode, headers, body, error)
+ /**
+ * Returns an immutable instance of [InternalServerException].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .statusCode()
+ * .headers()
+ * .body()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): InternalServerException =
+ InternalServerException(
+ checkRequired("statusCode", statusCode),
+ checkRequired("headers", headers),
+ checkRequired("body", body),
+ cause,
+ )
+ }
+}
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/errors/NotFoundException.kt b/orb-java-core/src/main/kotlin/com/withorb/api/errors/NotFoundException.kt
index ae91d72d..752cb1f9 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/errors/NotFoundException.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/errors/NotFoundException.kt
@@ -1,6 +1,76 @@
+// File generated from our OpenAPI spec by Stainless.
+
package com.withorb.api.errors
+import com.withorb.api.core.JsonValue
+import com.withorb.api.core.checkRequired
import com.withorb.api.core.http.Headers
+import java.util.Optional
+import kotlin.jvm.optionals.getOrNull
+
+class NotFoundException
+private constructor(private val headers: Headers, private val body: JsonValue, cause: Throwable?) :
+ OrbServiceException("404: $body", cause) {
+
+ override fun headers(): Headers = headers
+
+ override fun body(): JsonValue = body
+
+ override fun statusCode(): Int = 404
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /**
+ * Returns a mutable builder for constructing an instance of [NotFoundException].
+ *
+ * The following fields are required:
+ * ```java
+ * .headers()
+ * .body()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [NotFoundException]. */
+ class Builder internal constructor() {
+
+ private var headers: Headers? = null
+ private var body: JsonValue? = null
+ private var cause: Throwable? = null
+
+ @JvmSynthetic
+ internal fun from(notFoundException: NotFoundException) = apply {
+ headers = notFoundException.headers
+ body = notFoundException.body
+ cause = notFoundException.cause
+ }
+
+ fun headers(headers: Headers) = apply { this.headers = headers }
+
+ fun body(body: JsonValue) = apply { this.body = body }
+
+ fun cause(cause: Throwable?) = apply { this.cause = cause }
+
+ /** Alias for calling [Builder.cause] with `cause.orElse(null)`. */
+ fun cause(cause: Optional) = cause(cause.getOrNull())
-class NotFoundException(headers: Headers, body: String, error: OrbError) :
- OrbServiceException(404, headers, body, error)
+ /**
+ * Returns an immutable instance of [NotFoundException].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .headers()
+ * .body()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): NotFoundException =
+ NotFoundException(checkRequired("headers", headers), checkRequired("body", body), cause)
+ }
+}
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/errors/OrbError.kt b/orb-java-core/src/main/kotlin/com/withorb/api/errors/OrbError.kt
deleted file mode 100644
index 3efbe253..00000000
--- a/orb-java-core/src/main/kotlin/com/withorb/api/errors/OrbError.kt
+++ /dev/null
@@ -1,82 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package com.withorb.api.errors
-
-import com.fasterxml.jackson.annotation.JsonAnyGetter
-import com.fasterxml.jackson.annotation.JsonAnySetter
-import com.fasterxml.jackson.annotation.JsonCreator
-import com.withorb.api.core.ExcludeMissing
-import com.withorb.api.core.JsonValue
-import com.withorb.api.core.NoAutoDetect
-import com.withorb.api.core.immutableEmptyMap
-import com.withorb.api.core.toImmutable
-import java.util.Objects
-
-@NoAutoDetect
-class OrbError
-@JsonCreator
-private constructor(
- @JsonAnyGetter
- @ExcludeMissing
- @JsonAnySetter
- @get:JvmName("additionalProperties")
- val additionalProperties: Map = immutableEmptyMap()
-) {
-
- fun toBuilder() = Builder().from(this)
-
- companion object {
-
- /** Returns a mutable builder for constructing an instance of [OrbError]. */
- @JvmStatic fun builder() = Builder()
- }
-
- /** A builder for [OrbError]. */
- class Builder internal constructor() {
-
- private var additionalProperties: MutableMap = mutableMapOf()
-
- @JvmSynthetic
- internal fun from(orbError: OrbError) = apply {
- additionalProperties = orbError.additionalProperties.toMutableMap()
- }
-
- fun additionalProperties(additionalProperties: Map) = apply {
- this.additionalProperties.clear()
- putAllAdditionalProperties(additionalProperties)
- }
-
- fun putAdditionalProperty(key: String, value: JsonValue) = apply {
- additionalProperties.put(key, value)
- }
-
- fun putAllAdditionalProperties(additionalProperties: Map) = apply {
- this.additionalProperties.putAll(additionalProperties)
- }
-
- fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) }
-
- fun removeAllAdditionalProperties(keys: Set) = apply {
- keys.forEach(::removeAdditionalProperty)
- }
-
- /**
- * Returns an immutable instance of [OrbError].
- *
- * Further updates to this [Builder] will not mutate the returned instance.
- */
- fun build(): OrbError = OrbError(additionalProperties.toImmutable())
- }
-
- override fun equals(other: Any?): Boolean {
- if (this === other) {
- return true
- }
-
- return /* spotless:off */ other is OrbError && additionalProperties == other.additionalProperties /* spotless:on */
- }
-
- override fun hashCode(): Int = /* spotless:off */ Objects.hash(additionalProperties) /* spotless:on */
-
- override fun toString() = "OrbError{additionalProperties=$additionalProperties}"
-}
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/errors/OrbServiceException.kt b/orb-java-core/src/main/kotlin/com/withorb/api/errors/OrbServiceException.kt
index c386c79c..3b327800 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/errors/OrbServiceException.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/errors/OrbServiceException.kt
@@ -1,23 +1,16 @@
+// File generated from our OpenAPI spec by Stainless.
+
package com.withorb.api.errors
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.http.Headers
abstract class OrbServiceException
-@JvmOverloads
-constructor(
- private val statusCode: Int,
- private val headers: Headers,
- private val body: String,
- private val error: OrbError,
- message: String = "$statusCode: $error",
- cause: Throwable? = null,
-) : OrbException(message, cause) {
-
- fun statusCode(): Int = statusCode
+protected constructor(message: String, cause: Throwable? = null) : OrbException(message, cause) {
- fun headers(): Headers = headers
+ abstract fun statusCode(): Int
- fun body(): String = body
+ abstract fun headers(): Headers
- fun error(): OrbError = error
+ abstract fun body(): JsonValue
}
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/errors/PermissionDeniedException.kt b/orb-java-core/src/main/kotlin/com/withorb/api/errors/PermissionDeniedException.kt
index 176d1734..12dd216c 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/errors/PermissionDeniedException.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/errors/PermissionDeniedException.kt
@@ -1,6 +1,80 @@
+// File generated from our OpenAPI spec by Stainless.
+
package com.withorb.api.errors
+import com.withorb.api.core.JsonValue
+import com.withorb.api.core.checkRequired
import com.withorb.api.core.http.Headers
+import java.util.Optional
+import kotlin.jvm.optionals.getOrNull
+
+class PermissionDeniedException
+private constructor(private val headers: Headers, private val body: JsonValue, cause: Throwable?) :
+ OrbServiceException("403: $body", cause) {
+
+ override fun headers(): Headers = headers
+
+ override fun body(): JsonValue = body
+
+ override fun statusCode(): Int = 403
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /**
+ * Returns a mutable builder for constructing an instance of [PermissionDeniedException].
+ *
+ * The following fields are required:
+ * ```java
+ * .headers()
+ * .body()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [PermissionDeniedException]. */
+ class Builder internal constructor() {
+
+ private var headers: Headers? = null
+ private var body: JsonValue? = null
+ private var cause: Throwable? = null
+
+ @JvmSynthetic
+ internal fun from(permissionDeniedException: PermissionDeniedException) = apply {
+ headers = permissionDeniedException.headers
+ body = permissionDeniedException.body
+ cause = permissionDeniedException.cause
+ }
+
+ fun headers(headers: Headers) = apply { this.headers = headers }
+
+ fun body(body: JsonValue) = apply { this.body = body }
+
+ fun cause(cause: Throwable?) = apply { this.cause = cause }
+
+ /** Alias for calling [Builder.cause] with `cause.orElse(null)`. */
+ fun cause(cause: Optional) = cause(cause.getOrNull())
-class PermissionDeniedException(headers: Headers, body: String, error: OrbError) :
- OrbServiceException(403, headers, body, error)
+ /**
+ * Returns an immutable instance of [PermissionDeniedException].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .headers()
+ * .body()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): PermissionDeniedException =
+ PermissionDeniedException(
+ checkRequired("headers", headers),
+ checkRequired("body", body),
+ cause,
+ )
+ }
+}
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/errors/RateLimitException.kt b/orb-java-core/src/main/kotlin/com/withorb/api/errors/RateLimitException.kt
index f76f50cc..c354afb9 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/errors/RateLimitException.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/errors/RateLimitException.kt
@@ -1,6 +1,80 @@
+// File generated from our OpenAPI spec by Stainless.
+
package com.withorb.api.errors
+import com.withorb.api.core.JsonValue
+import com.withorb.api.core.checkRequired
import com.withorb.api.core.http.Headers
+import java.util.Optional
+import kotlin.jvm.optionals.getOrNull
+
+class RateLimitException
+private constructor(private val headers: Headers, private val body: JsonValue, cause: Throwable?) :
+ OrbServiceException("429: $body", cause) {
+
+ override fun headers(): Headers = headers
+
+ override fun body(): JsonValue = body
+
+ override fun statusCode(): Int = 429
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /**
+ * Returns a mutable builder for constructing an instance of [RateLimitException].
+ *
+ * The following fields are required:
+ * ```java
+ * .headers()
+ * .body()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [RateLimitException]. */
+ class Builder internal constructor() {
+
+ private var headers: Headers? = null
+ private var body: JsonValue? = null
+ private var cause: Throwable? = null
+
+ @JvmSynthetic
+ internal fun from(rateLimitException: RateLimitException) = apply {
+ headers = rateLimitException.headers
+ body = rateLimitException.body
+ cause = rateLimitException.cause
+ }
+
+ fun headers(headers: Headers) = apply { this.headers = headers }
+
+ fun body(body: JsonValue) = apply { this.body = body }
+
+ fun cause(cause: Throwable?) = apply { this.cause = cause }
+
+ /** Alias for calling [Builder.cause] with `cause.orElse(null)`. */
+ fun cause(cause: Optional) = cause(cause.getOrNull())
-class RateLimitException(headers: Headers, body: String, error: OrbError) :
- OrbServiceException(429, headers, body, error)
+ /**
+ * Returns an immutable instance of [RateLimitException].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .headers()
+ * .body()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): RateLimitException =
+ RateLimitException(
+ checkRequired("headers", headers),
+ checkRequired("body", body),
+ cause,
+ )
+ }
+}
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/errors/UnauthorizedException.kt b/orb-java-core/src/main/kotlin/com/withorb/api/errors/UnauthorizedException.kt
index a561c505..7148d476 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/errors/UnauthorizedException.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/errors/UnauthorizedException.kt
@@ -1,6 +1,80 @@
+// File generated from our OpenAPI spec by Stainless.
+
package com.withorb.api.errors
+import com.withorb.api.core.JsonValue
+import com.withorb.api.core.checkRequired
import com.withorb.api.core.http.Headers
+import java.util.Optional
+import kotlin.jvm.optionals.getOrNull
+
+class UnauthorizedException
+private constructor(private val headers: Headers, private val body: JsonValue, cause: Throwable?) :
+ OrbServiceException("401: $body", cause) {
+
+ override fun headers(): Headers = headers
+
+ override fun body(): JsonValue = body
+
+ override fun statusCode(): Int = 401
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /**
+ * Returns a mutable builder for constructing an instance of [UnauthorizedException].
+ *
+ * The following fields are required:
+ * ```java
+ * .headers()
+ * .body()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [UnauthorizedException]. */
+ class Builder internal constructor() {
+
+ private var headers: Headers? = null
+ private var body: JsonValue? = null
+ private var cause: Throwable? = null
+
+ @JvmSynthetic
+ internal fun from(unauthorizedException: UnauthorizedException) = apply {
+ headers = unauthorizedException.headers
+ body = unauthorizedException.body
+ cause = unauthorizedException.cause
+ }
+
+ fun headers(headers: Headers) = apply { this.headers = headers }
+
+ fun body(body: JsonValue) = apply { this.body = body }
+
+ fun cause(cause: Throwable?) = apply { this.cause = cause }
+
+ /** Alias for calling [Builder.cause] with `cause.orElse(null)`. */
+ fun cause(cause: Optional) = cause(cause.getOrNull())
-class UnauthorizedException(headers: Headers, body: String, error: OrbError) :
- OrbServiceException(401, headers, body, error)
+ /**
+ * Returns an immutable instance of [UnauthorizedException].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .headers()
+ * .body()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): UnauthorizedException =
+ UnauthorizedException(
+ checkRequired("headers", headers),
+ checkRequired("body", body),
+ cause,
+ )
+ }
+}
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/errors/UnexpectedStatusCodeException.kt b/orb-java-core/src/main/kotlin/com/withorb/api/errors/UnexpectedStatusCodeException.kt
index 81b26ef5..75648438 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/errors/UnexpectedStatusCodeException.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/errors/UnexpectedStatusCodeException.kt
@@ -1,10 +1,92 @@
+// File generated from our OpenAPI spec by Stainless.
+
package com.withorb.api.errors
+import com.withorb.api.core.JsonValue
+import com.withorb.api.core.checkRequired
import com.withorb.api.core.http.Headers
+import java.util.Optional
+import kotlin.jvm.optionals.getOrNull
+
+class UnexpectedStatusCodeException
+private constructor(
+ private val statusCode: Int,
+ private val headers: Headers,
+ private val body: JsonValue,
+ cause: Throwable?,
+) : OrbServiceException("$statusCode: $body", cause) {
+
+ override fun statusCode(): Int = statusCode
+
+ override fun headers(): Headers = headers
+
+ override fun body(): JsonValue = body
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /**
+ * Returns a mutable builder for constructing an instance of
+ * [UnexpectedStatusCodeException].
+ *
+ * The following fields are required:
+ * ```java
+ * .statusCode()
+ * .headers()
+ * .body()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [UnexpectedStatusCodeException]. */
+ class Builder internal constructor() {
+
+ private var statusCode: Int? = null
+ private var headers: Headers? = null
+ private var body: JsonValue? = null
+ private var cause: Throwable? = null
+
+ @JvmSynthetic
+ internal fun from(unexpectedStatusCodeException: UnexpectedStatusCodeException) = apply {
+ statusCode = unexpectedStatusCodeException.statusCode
+ headers = unexpectedStatusCodeException.headers
+ body = unexpectedStatusCodeException.body
+ cause = unexpectedStatusCodeException.cause
+ }
+
+ fun statusCode(statusCode: Int) = apply { this.statusCode = statusCode }
+
+ fun headers(headers: Headers) = apply { this.headers = headers }
+
+ fun body(body: JsonValue) = apply { this.body = body }
+
+ fun cause(cause: Throwable?) = apply { this.cause = cause }
+
+ /** Alias for calling [Builder.cause] with `cause.orElse(null)`. */
+ fun cause(cause: Optional) = cause(cause.getOrNull())
-class UnexpectedStatusCodeException(
- statusCode: Int,
- headers: Headers,
- body: String,
- error: OrbError,
-) : OrbServiceException(statusCode, headers, body, error)
+ /**
+ * Returns an immutable instance of [UnexpectedStatusCodeException].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .statusCode()
+ * .headers()
+ * .body()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): UnexpectedStatusCodeException =
+ UnexpectedStatusCodeException(
+ checkRequired("statusCode", statusCode),
+ checkRequired("headers", headers),
+ checkRequired("body", body),
+ cause,
+ )
+ }
+}
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/errors/UnprocessableEntityException.kt b/orb-java-core/src/main/kotlin/com/withorb/api/errors/UnprocessableEntityException.kt
index 6f23fd97..5907a45b 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/errors/UnprocessableEntityException.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/errors/UnprocessableEntityException.kt
@@ -1,6 +1,80 @@
+// File generated from our OpenAPI spec by Stainless.
+
package com.withorb.api.errors
+import com.withorb.api.core.JsonValue
+import com.withorb.api.core.checkRequired
import com.withorb.api.core.http.Headers
+import java.util.Optional
+import kotlin.jvm.optionals.getOrNull
+
+class UnprocessableEntityException
+private constructor(private val headers: Headers, private val body: JsonValue, cause: Throwable?) :
+ OrbServiceException("422: $body", cause) {
+
+ override fun headers(): Headers = headers
+
+ override fun body(): JsonValue = body
+
+ override fun statusCode(): Int = 422
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /**
+ * Returns a mutable builder for constructing an instance of [UnprocessableEntityException].
+ *
+ * The following fields are required:
+ * ```java
+ * .headers()
+ * .body()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [UnprocessableEntityException]. */
+ class Builder internal constructor() {
+
+ private var headers: Headers? = null
+ private var body: JsonValue? = null
+ private var cause: Throwable? = null
+
+ @JvmSynthetic
+ internal fun from(unprocessableEntityException: UnprocessableEntityException) = apply {
+ headers = unprocessableEntityException.headers
+ body = unprocessableEntityException.body
+ cause = unprocessableEntityException.cause
+ }
+
+ fun headers(headers: Headers) = apply { this.headers = headers }
+
+ fun body(body: JsonValue) = apply { this.body = body }
+
+ fun cause(cause: Throwable?) = apply { this.cause = cause }
+
+ /** Alias for calling [Builder.cause] with `cause.orElse(null)`. */
+ fun cause(cause: Optional) = cause(cause.getOrNull())
-class UnprocessableEntityException(headers: Headers, body: String, error: OrbError) :
- OrbServiceException(422, headers, body, error)
+ /**
+ * Returns an immutable instance of [UnprocessableEntityException].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .headers()
+ * .body()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): UnprocessableEntityException =
+ UnprocessableEntityException(
+ checkRequired("headers", headers),
+ checkRequired("body", body),
+ cause,
+ )
+ }
+}
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCostListByExternalIdParams.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCostListByExternalIdParams.kt
index e2b36f85..4494ae76 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCostListByExternalIdParams.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCostListByExternalIdParams.kt
@@ -176,7 +176,7 @@ private constructor(
timeframeStart?.let {
put("timeframe_start", DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(it))
}
- viewMode?.let { put("view_mode", it.asString()) }
+ viewMode?.let { put("view_mode", it.toString()) }
putAll(additionalQueryParams)
}
.build()
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCostListParams.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCostListParams.kt
index c92c6d4c..a3604eab 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCostListParams.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCostListParams.kt
@@ -176,7 +176,7 @@ private constructor(
timeframeStart?.let {
put("timeframe_start", DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(it))
}
- viewMode?.let { put("view_mode", it.asString()) }
+ viewMode?.let { put("view_mode", it.toString()) }
putAll(additionalQueryParams)
}
.build()
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCreditLedgerListByExternalIdParams.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCreditLedgerListByExternalIdParams.kt
index 4ec06829..d729fbe6 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCreditLedgerListByExternalIdParams.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCreditLedgerListByExternalIdParams.kt
@@ -168,8 +168,8 @@ private constructor(
}
currency?.let { put("currency", it) }
cursor?.let { put("cursor", it) }
- entryStatus?.let { put("entry_status", it.asString()) }
- entryType?.let { put("entry_type", it.asString()) }
+ entryStatus?.let { put("entry_status", it.toString()) }
+ entryType?.let { put("entry_type", it.toString()) }
limit?.let { put("limit", it.toString()) }
minimumAmount?.let { put("minimum_amount", it) }
putAll(additionalQueryParams)
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCreditLedgerListParams.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCreditLedgerListParams.kt
index a18d77c5..0e4e6c99 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCreditLedgerListParams.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerCreditLedgerListParams.kt
@@ -168,8 +168,8 @@ private constructor(
}
currency?.let { put("currency", it) }
cursor?.let { put("cursor", it) }
- entryStatus?.let { put("entry_status", it.asString()) }
- entryType?.let { put("entry_type", it.asString()) }
+ entryStatus?.let { put("entry_status", it.toString()) }
+ entryType?.let { put("entry_type", it.toString()) }
limit?.let { put("limit", it.toString()) }
minimumAmount?.let { put("minimum_amount", it) }
putAll(additionalQueryParams)
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceListParams.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceListParams.kt
index 80971f75..7816a9d2 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceListParams.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/InvoiceListParams.kt
@@ -119,7 +119,7 @@ private constructor(
amountLt?.let { put("amount[lt]", it) }
cursor?.let { put("cursor", it) }
customerId?.let { put("customer_id", it) }
- dateType?.let { put("date_type", it.asString()) }
+ dateType?.let { put("date_type", it.toString()) }
dueDate?.let { put("due_date", it.toString()) }
dueDateWindow?.let { put("due_date_window", it) }
dueDateGt?.let { put("due_date[gt]", it.toString()) }
@@ -139,7 +139,7 @@ private constructor(
}
isRecurring?.let { put("is_recurring", it.toString()) }
limit?.let { put("limit", it.toString()) }
- status?.forEach { put("status[]", it.asString()) }
+ status?.forEach { put("status[]", it.toString()) }
subscriptionId?.let { put("subscription_id", it) }
putAll(additionalQueryParams)
}
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/PlanListParams.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/PlanListParams.kt
index f111d06e..364d6991 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/models/PlanListParams.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/PlanListParams.kt
@@ -78,7 +78,7 @@ private constructor(
}
cursor?.let { put("cursor", it) }
limit?.let { put("limit", it.toString()) }
- status?.let { put("status", it.asString()) }
+ status?.let { put("status", it.toString()) }
putAll(additionalQueryParams)
}
.build()
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionFetchCostsParams.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionFetchCostsParams.kt
index 3daa60b7..f6b3bb0e 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionFetchCostsParams.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionFetchCostsParams.kt
@@ -79,7 +79,7 @@ private constructor(
timeframeStart?.let {
put("timeframe_start", DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(it))
}
- viewMode?.let { put("view_mode", it.asString()) }
+ viewMode?.let { put("view_mode", it.toString()) }
putAll(additionalQueryParams)
}
.build()
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionFetchUsageParams.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionFetchUsageParams.kt
index bd05f4f7..c0ba3e2f 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionFetchUsageParams.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionFetchUsageParams.kt
@@ -264,7 +264,7 @@ private constructor(
billableMetricId?.let { put("billable_metric_id", it) }
firstDimensionKey?.let { put("first_dimension_key", it) }
firstDimensionValue?.let { put("first_dimension_value", it) }
- granularity?.let { put("granularity", it.asString()) }
+ granularity?.let { put("granularity", it.toString()) }
groupBy?.let { put("group_by", it) }
secondDimensionKey?.let { put("second_dimension_key", it) }
secondDimensionValue?.let { put("second_dimension_value", it) }
@@ -274,7 +274,7 @@ private constructor(
timeframeStart?.let {
put("timeframe_start", DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(it))
}
- viewMode?.let { put("view_mode", it.asString()) }
+ viewMode?.let { put("view_mode", it.toString()) }
putAll(additionalQueryParams)
}
.build()
diff --git a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionListParams.kt b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionListParams.kt
index 3fd7f34a..ac2d08eb 100644
--- a/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionListParams.kt
+++ b/orb-java-core/src/main/kotlin/com/withorb/api/models/SubscriptionListParams.kt
@@ -90,7 +90,7 @@ private constructor(
customerId?.forEach { put("customer_id[]", it) }
externalCustomerId?.forEach { put("external_customer_id[]", it) }
limit?.let { put("limit", it.toString()) }
- status?.let { put("status", it.asString()) }
+ status?.let { put("status", it.toString()) }
putAll(additionalQueryParams)
}
.build()
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 9d6f729c..7b552015 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.async
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -14,7 +15,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepareAsync
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.Alert
import com.withorb.api.models.AlertCreateForCustomerParams
import com.withorb.api.models.AlertCreateForExternalCustomerParams
@@ -95,7 +95,7 @@ class AlertServiceAsyncImpl internal constructor(private val clientOptions: Clie
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
AlertServiceAsync.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val retrieveHandler: Handler =
jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler)
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 6f9caa73..cc36bb5b 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.async
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -14,7 +15,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepareAsync
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.Coupon
import com.withorb.api.models.CouponArchiveParams
import com.withorb.api.models.CouponCreateParams
@@ -71,7 +71,7 @@ class CouponServiceAsyncImpl internal constructor(private val clientOptions: Cli
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
CouponServiceAsync.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val subscriptions: SubscriptionServiceAsync.WithRawResponse by lazy {
SubscriptionServiceAsyncImpl.WithRawResponseImpl(clientOptions)
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 03e14d76..5ac5ea04 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.async
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -14,7 +15,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepareAsync
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.CreditNote
import com.withorb.api.models.CreditNoteCreateParams
import com.withorb.api.models.CreditNoteFetchParams
@@ -55,7 +55,7 @@ class CreditNoteServiceAsyncImpl internal constructor(private val clientOptions:
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
CreditNoteServiceAsync.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val createHandler: Handler =
jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler)
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 9ceb756e..81e4e13a 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.async
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.emptyHandler
import com.withorb.api.core.handlers.errorHandler
@@ -16,7 +17,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepareAsync
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.Customer
import com.withorb.api.models.CustomerCreateParams
import com.withorb.api.models.CustomerDeleteParams
@@ -128,7 +128,7 @@ class CustomerServiceAsyncImpl internal constructor(private val clientOptions: C
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
CustomerServiceAsync.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val costs: CostServiceAsync.WithRawResponse by lazy {
CostServiceAsyncImpl.WithRawResponseImpl(clientOptions)
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 718b2366..7c1ead25 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.async
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -14,7 +15,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepareAsync
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.DimensionalPriceGroup
import com.withorb.api.models.DimensionalPriceGroupCreateParams
import com.withorb.api.models.DimensionalPriceGroupListPageAsync
@@ -66,7 +66,7 @@ internal constructor(private val clientOptions: ClientOptions) : DimensionalPric
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
DimensionalPriceGroupServiceAsync.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val externalDimensionalPriceGroupId:
ExternalDimensionalPriceGroupIdServiceAsync.WithRawResponse by lazy {
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 863ca156..02d350b0 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.async
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -14,7 +15,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepareAsync
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.EventDeprecateParams
import com.withorb.api.models.EventDeprecateResponse
import com.withorb.api.models.EventIngestParams
@@ -77,7 +77,7 @@ class EventServiceAsyncImpl internal constructor(private val clientOptions: Clie
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
EventServiceAsync.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val backfills: BackfillServiceAsync.WithRawResponse by lazy {
BackfillServiceAsyncImpl.WithRawResponseImpl(clientOptions)
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 ee30734e..223f00bc 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.async
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -14,7 +15,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepareAsync
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.InvoiceLineItemCreateParams
import com.withorb.api.models.InvoiceLineItemCreateResponse
import java.util.concurrent.CompletableFuture
@@ -38,7 +38,7 @@ internal constructor(private val clientOptions: ClientOptions) : InvoiceLineItem
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
InvoiceLineItemServiceAsync.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val createHandler: Handler =
jsonHandler(clientOptions.jsonMapper)
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 557b0835..522765d4 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.async
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -14,7 +15,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepareAsync
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.Invoice
import com.withorb.api.models.InvoiceCreateParams
import com.withorb.api.models.InvoiceFetchParams
@@ -104,7 +104,7 @@ class InvoiceServiceAsyncImpl internal constructor(private val clientOptions: Cl
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
InvoiceServiceAsync.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val createHandler: Handler =
jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler)
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 93f2f3d0..f49a8d57 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.async
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -14,7 +15,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepareAsync
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.Item
import com.withorb.api.models.ItemCreateParams
import com.withorb.api.models.ItemFetchParams
@@ -63,7 +63,7 @@ class ItemServiceAsyncImpl internal constructor(private val clientOptions: Clien
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
ItemServiceAsync.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val createHandler: Handler- =
jsonHandler
- (clientOptions.jsonMapper).withErrorHandler(errorHandler)
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 fc114218..80641249 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.async
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -14,7 +15,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepareAsync
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.BillableMetric
import com.withorb.api.models.MetricCreateParams
import com.withorb.api.models.MetricFetchParams
@@ -63,7 +63,7 @@ class MetricServiceAsyncImpl internal constructor(private val clientOptions: Cli
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
MetricServiceAsync.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val createHandler: Handler =
jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler)
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 b3613622..33a0a4cc 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.async
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -14,7 +15,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepareAsync
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.Plan
import com.withorb.api.models.PlanCreateParams
import com.withorb.api.models.PlanFetchParams
@@ -71,7 +71,7 @@ class PlanServiceAsyncImpl internal constructor(private val clientOptions: Clien
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
PlanServiceAsync.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val externalPlanId: ExternalPlanIdServiceAsync.WithRawResponse by lazy {
ExternalPlanIdServiceAsyncImpl.WithRawResponseImpl(clientOptions)
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 b4ca2714..62dc3652 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.async
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -14,7 +15,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepareAsync
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.Price
import com.withorb.api.models.PriceCreateParams
import com.withorb.api.models.PriceEvaluateParams
@@ -80,7 +80,7 @@ class PriceServiceAsyncImpl internal constructor(private val clientOptions: Clie
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
PriceServiceAsync.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val externalPriceId: ExternalPriceIdServiceAsync.WithRawResponse by lazy {
ExternalPriceIdServiceAsyncImpl.WithRawResponseImpl(clientOptions)
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 8fedb797..e04aaf48 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.async
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -14,7 +15,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepareAsync
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.Subscription
import com.withorb.api.models.SubscriptionCancelParams
import com.withorb.api.models.SubscriptionCancelResponse
@@ -176,7 +176,7 @@ class SubscriptionServiceAsyncImpl internal constructor(private val clientOption
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
SubscriptionServiceAsync.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val createHandler: Handler =
jsonHandler(clientOptions.jsonMapper)
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 ed308888..c7520c7a 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.async
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -13,7 +14,6 @@ import com.withorb.api.core.http.HttpResponse.Handler
import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepareAsync
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.TopLevelPingParams
import com.withorb.api.models.TopLevelPingResponse
import java.util.concurrent.CompletableFuture
@@ -37,7 +37,7 @@ class TopLevelServiceAsyncImpl internal constructor(private val clientOptions: C
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
TopLevelServiceAsync.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val pingHandler: Handler =
jsonHandler(clientOptions.jsonMapper)
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 958a353e..f16d7df4 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.async.coupons
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -13,7 +14,6 @@ import com.withorb.api.core.http.HttpResponse.Handler
import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepareAsync
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.CouponSubscriptionListPageAsync
import com.withorb.api.models.CouponSubscriptionListParams
import java.util.concurrent.CompletableFuture
@@ -37,7 +37,7 @@ class SubscriptionServiceAsyncImpl internal constructor(private val clientOption
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
SubscriptionServiceAsync.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val listHandler: Handler =
jsonHandler(clientOptions.jsonMapper)
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 7188b22c..86f9e5a9 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.async.customers
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -14,7 +15,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepareAsync
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.CustomerBalanceTransactionCreateParams
import com.withorb.api.models.CustomerBalanceTransactionCreateResponse
import com.withorb.api.models.CustomerBalanceTransactionListPageAsync
@@ -47,7 +47,7 @@ internal constructor(private val clientOptions: ClientOptions) : BalanceTransact
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
BalanceTransactionServiceAsync.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val createHandler: Handler =
jsonHandler(clientOptions.jsonMapper)
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 ff651220..5a17f858 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.async.customers
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -13,7 +14,6 @@ import com.withorb.api.core.http.HttpResponse.Handler
import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepareAsync
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.CustomerCostListByExternalIdParams
import com.withorb.api.models.CustomerCostListByExternalIdResponse
import com.withorb.api.models.CustomerCostListParams
@@ -46,7 +46,7 @@ class CostServiceAsyncImpl internal constructor(private val clientOptions: Clien
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
CostServiceAsync.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val listHandler: Handler =
jsonHandler(clientOptions.jsonMapper)
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 bdba8bd8..057c0ac6 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.async.customers
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -13,7 +14,6 @@ import com.withorb.api.core.http.HttpResponse.Handler
import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepareAsync
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.CustomerCreditListByExternalIdPageAsync
import com.withorb.api.models.CustomerCreditListByExternalIdParams
import com.withorb.api.models.CustomerCreditListPageAsync
@@ -58,7 +58,7 @@ class CreditServiceAsyncImpl internal constructor(private val clientOptions: Cli
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
CreditServiceAsync.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val ledger: LedgerServiceAsync.WithRawResponse by lazy {
LedgerServiceAsyncImpl.WithRawResponseImpl(clientOptions)
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 4bb1fef3..23fb93e9 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.async.customers.credits
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -14,7 +15,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepareAsync
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.CustomerCreditLedgerCreateEntryByExternalIdParams
import com.withorb.api.models.CustomerCreditLedgerCreateEntryByExternalIdResponse
import com.withorb.api.models.CustomerCreditLedgerCreateEntryParams
@@ -65,7 +65,7 @@ class LedgerServiceAsyncImpl internal constructor(private val clientOptions: Cli
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
LedgerServiceAsync.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val listHandler: Handler =
jsonHandler(clientOptions.jsonMapper)
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 965e2891..9e647dd2 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.async.customers.credits
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.emptyHandler
import com.withorb.api.core.handlers.errorHandler
@@ -16,7 +17,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepareAsync
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.CustomerCreditTopUpCreateByExternalIdParams
import com.withorb.api.models.CustomerCreditTopUpCreateByExternalIdResponse
import com.withorb.api.models.CustomerCreditTopUpCreateParams
@@ -83,7 +83,7 @@ class TopUpServiceAsyncImpl internal constructor(private val clientOptions: Clie
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
TopUpServiceAsync.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val createHandler: Handler =
jsonHandler(clientOptions.jsonMapper)
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 2bc94697..811a2580 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.async.dimensionalPriceGroups
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -13,7 +14,6 @@ import com.withorb.api.core.http.HttpResponse.Handler
import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepareAsync
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.DimensionalPriceGroup
import com.withorb.api.models.DimensionalPriceGroupExternalDimensionalPriceGroupIdRetrieveParams
import java.util.concurrent.CompletableFuture
@@ -41,7 +41,7 @@ internal constructor(private val clientOptions: ClientOptions) :
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
ExternalDimensionalPriceGroupIdServiceAsync.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val retrieveHandler: Handler =
jsonHandler(clientOptions.jsonMapper)
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 eecea660..26392fd4 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.async.events
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -14,7 +15,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepareAsync
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.EventBackfillCloseParams
import com.withorb.api.models.EventBackfillCloseResponse
import com.withorb.api.models.EventBackfillCreateParams
@@ -74,7 +74,7 @@ class BackfillServiceAsyncImpl internal constructor(private val clientOptions: C
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
BackfillServiceAsync.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val createHandler: Handler =
jsonHandler(clientOptions.jsonMapper)
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 badc78e3..9ffce57f 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.async.events
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -13,7 +14,6 @@ import com.withorb.api.core.http.HttpResponse.Handler
import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepareAsync
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.EventVolumeListParams
import com.withorb.api.models.EventVolumes
import java.util.concurrent.CompletableFuture
@@ -37,7 +37,7 @@ class VolumeServiceAsyncImpl internal constructor(private val clientOptions: Cli
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
VolumeServiceAsync.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val listHandler: Handler =
jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler)
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 19c3c7bb..8d77ebf5 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.async.plans
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -14,7 +15,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepareAsync
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.Plan
import com.withorb.api.models.PlanExternalPlanIdFetchParams
import com.withorb.api.models.PlanExternalPlanIdUpdateParams
@@ -46,7 +46,7 @@ internal constructor(private val clientOptions: ClientOptions) : ExternalPlanIdS
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
ExternalPlanIdServiceAsync.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val updateHandler: Handler =
jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler)
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 c7cc3758..b8bf55ab 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.async.prices
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -14,7 +15,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepareAsync
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.Price
import com.withorb.api.models.PriceExternalPriceIdFetchParams
import com.withorb.api.models.PriceExternalPriceIdUpdateParams
@@ -46,7 +46,7 @@ internal constructor(private val clientOptions: ClientOptions) : ExternalPriceId
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
ExternalPriceIdServiceAsync.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val updateHandler: Handler =
jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler)
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 eb52b065..78449d3e 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.blocking
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -14,7 +15,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepare
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.Alert
import com.withorb.api.models.AlertCreateForCustomerParams
import com.withorb.api.models.AlertCreateForExternalCustomerParams
@@ -79,7 +79,7 @@ class AlertServiceImpl internal constructor(private val clientOptions: ClientOpt
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
AlertService.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val retrieveHandler: Handler =
jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler)
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 b837c13b..f14f6514 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.blocking
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -14,7 +15,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepare
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.Coupon
import com.withorb.api.models.CouponArchiveParams
import com.withorb.api.models.CouponCreateParams
@@ -58,7 +58,7 @@ class CouponServiceImpl internal constructor(private val clientOptions: ClientOp
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
CouponService.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val subscriptions: SubscriptionService.WithRawResponse by lazy {
SubscriptionServiceImpl.WithRawResponseImpl(clientOptions)
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 67f4a2c0..3ca147c0 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.blocking
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -14,7 +15,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepare
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.CreditNote
import com.withorb.api.models.CreditNoteCreateParams
import com.withorb.api.models.CreditNoteFetchParams
@@ -51,7 +51,7 @@ class CreditNoteServiceImpl internal constructor(private val clientOptions: Clie
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
CreditNoteService.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val createHandler: Handler =
jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler)
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 1036ca36..55956714 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.blocking
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.emptyHandler
import com.withorb.api.core.handlers.errorHandler
@@ -16,7 +17,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepare
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.Customer
import com.withorb.api.models.CustomerCreateParams
import com.withorb.api.models.CustomerDeleteParams
@@ -116,7 +116,7 @@ class CustomerServiceImpl internal constructor(private val clientOptions: Client
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
CustomerService.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val costs: CostService.WithRawResponse by lazy {
CostServiceImpl.WithRawResponseImpl(clientOptions)
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 b41e0e5e..9b6aeab2 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.blocking
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -14,7 +15,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepare
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.DimensionalPriceGroup
import com.withorb.api.models.DimensionalPriceGroupCreateParams
import com.withorb.api.models.DimensionalPriceGroupListPage
@@ -63,7 +63,7 @@ internal constructor(private val clientOptions: ClientOptions) : DimensionalPric
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
DimensionalPriceGroupService.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val externalDimensionalPriceGroupId:
ExternalDimensionalPriceGroupIdService.WithRawResponse by lazy {
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 cfc0fe72..9a48a553 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.blocking
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -14,7 +15,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepare
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.EventDeprecateParams
import com.withorb.api.models.EventDeprecateResponse
import com.withorb.api.models.EventIngestParams
@@ -76,7 +76,7 @@ class EventServiceImpl internal constructor(private val clientOptions: ClientOpt
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
EventService.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val backfills: BackfillService.WithRawResponse by lazy {
BackfillServiceImpl.WithRawResponseImpl(clientOptions)
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 f6e86628..03eeb98c 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.blocking
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -14,7 +15,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepare
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.InvoiceLineItemCreateParams
import com.withorb.api.models.InvoiceLineItemCreateResponse
@@ -37,7 +37,7 @@ class InvoiceLineItemServiceImpl internal constructor(private val clientOptions:
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
InvoiceLineItemService.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val createHandler: Handler =
jsonHandler(clientOptions.jsonMapper)
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 d4627d0a..99caab96 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.blocking
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -14,7 +15,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepare
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.Invoice
import com.withorb.api.models.InvoiceCreateParams
import com.withorb.api.models.InvoiceFetchParams
@@ -82,7 +82,7 @@ class InvoiceServiceImpl internal constructor(private val clientOptions: ClientO
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
InvoiceService.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val createHandler: Handler =
jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler)
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 79901ad7..fd65f62a 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.blocking
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -14,7 +15,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepare
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.Item
import com.withorb.api.models.ItemCreateParams
import com.withorb.api.models.ItemFetchParams
@@ -49,7 +49,7 @@ class ItemServiceImpl internal constructor(private val clientOptions: ClientOpti
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
ItemService.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val createHandler: Handler
- =
jsonHandler
- (clientOptions.jsonMapper).withErrorHandler(errorHandler)
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 dab3f11d..fa83164d 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.blocking
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -14,7 +15,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepare
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.BillableMetric
import com.withorb.api.models.MetricCreateParams
import com.withorb.api.models.MetricFetchParams
@@ -56,7 +56,7 @@ class MetricServiceImpl internal constructor(private val clientOptions: ClientOp
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
MetricService.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val createHandler: Handler =
jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler)
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 b5bb48ad..a3d43019 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.blocking
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -14,7 +15,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepare
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.Plan
import com.withorb.api.models.PlanCreateParams
import com.withorb.api.models.PlanFetchParams
@@ -57,7 +57,7 @@ class PlanServiceImpl internal constructor(private val clientOptions: ClientOpti
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
PlanService.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val externalPlanId: ExternalPlanIdService.WithRawResponse by lazy {
ExternalPlanIdServiceImpl.WithRawResponseImpl(clientOptions)
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 24528479..d2722631 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.blocking
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -14,7 +15,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepare
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.Price
import com.withorb.api.models.PriceCreateParams
import com.withorb.api.models.PriceEvaluateParams
@@ -67,7 +67,7 @@ class PriceServiceImpl internal constructor(private val clientOptions: ClientOpt
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
PriceService.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val externalPriceId: ExternalPriceIdService.WithRawResponse by lazy {
ExternalPriceIdServiceImpl.WithRawResponseImpl(clientOptions)
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 9f28a5ab..072646a2 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.blocking
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -14,7 +15,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepare
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.Subscription
import com.withorb.api.models.SubscriptionCancelParams
import com.withorb.api.models.SubscriptionCancelResponse
@@ -171,7 +171,7 @@ class SubscriptionServiceImpl internal constructor(private val clientOptions: Cl
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
SubscriptionService.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val createHandler: Handler =
jsonHandler(clientOptions.jsonMapper)
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 2b7c37b1..cfabafd8 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.blocking
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -13,7 +14,6 @@ import com.withorb.api.core.http.HttpResponse.Handler
import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepare
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.TopLevelPingParams
import com.withorb.api.models.TopLevelPingResponse
@@ -36,7 +36,7 @@ class TopLevelServiceImpl internal constructor(private val clientOptions: Client
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
TopLevelService.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val pingHandler: Handler =
jsonHandler(clientOptions.jsonMapper)
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 86fb9fcd..ff1b5ac5 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.blocking.coupons
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -13,7 +14,6 @@ import com.withorb.api.core.http.HttpResponse.Handler
import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepare
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.CouponSubscriptionListPage
import com.withorb.api.models.CouponSubscriptionListParams
@@ -36,7 +36,7 @@ class SubscriptionServiceImpl internal constructor(private val clientOptions: Cl
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
SubscriptionService.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val listHandler: Handler =
jsonHandler(clientOptions.jsonMapper)
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 dc5107d2..60f17384 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.blocking.customers
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -14,7 +15,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepare
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.CustomerBalanceTransactionCreateParams
import com.withorb.api.models.CustomerBalanceTransactionCreateResponse
import com.withorb.api.models.CustomerBalanceTransactionListPage
@@ -46,7 +46,7 @@ class BalanceTransactionServiceImpl internal constructor(private val clientOptio
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
BalanceTransactionService.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val createHandler: Handler =
jsonHandler(clientOptions.jsonMapper)
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 516c24ba..cdee75f4 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.blocking.customers
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -13,7 +14,6 @@ import com.withorb.api.core.http.HttpResponse.Handler
import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepare
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.CustomerCostListByExternalIdParams
import com.withorb.api.models.CustomerCostListByExternalIdResponse
import com.withorb.api.models.CustomerCostListParams
@@ -44,7 +44,7 @@ class CostServiceImpl internal constructor(private val clientOptions: ClientOpti
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
CostService.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val listHandler: Handler =
jsonHandler(clientOptions.jsonMapper)
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 349dc357..cb3c858d 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.blocking.customers
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -13,7 +14,6 @@ import com.withorb.api.core.http.HttpResponse.Handler
import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepare
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.CustomerCreditListByExternalIdPage
import com.withorb.api.models.CustomerCreditListByExternalIdParams
import com.withorb.api.models.CustomerCreditListPage
@@ -57,7 +57,7 @@ class CreditServiceImpl internal constructor(private val clientOptions: ClientOp
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
CreditService.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val ledger: LedgerService.WithRawResponse by lazy {
LedgerServiceImpl.WithRawResponseImpl(clientOptions)
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 07e94808..278d574e 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.blocking.customers.credits
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -14,7 +15,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepare
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.CustomerCreditLedgerCreateEntryByExternalIdParams
import com.withorb.api.models.CustomerCreditLedgerCreateEntryByExternalIdResponse
import com.withorb.api.models.CustomerCreditLedgerCreateEntryParams
@@ -64,7 +64,7 @@ class LedgerServiceImpl internal constructor(private val clientOptions: ClientOp
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
LedgerService.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val listHandler: Handler =
jsonHandler(clientOptions.jsonMapper)
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 1ce7f80c..c7b4b5c2 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.blocking.customers.credits
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.emptyHandler
import com.withorb.api.core.handlers.errorHandler
@@ -16,7 +17,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepare
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.CustomerCreditTopUpCreateByExternalIdParams
import com.withorb.api.models.CustomerCreditTopUpCreateByExternalIdResponse
import com.withorb.api.models.CustomerCreditTopUpCreateParams
@@ -81,7 +81,7 @@ class TopUpServiceImpl internal constructor(private val clientOptions: ClientOpt
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
TopUpService.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val createHandler: Handler =
jsonHandler(clientOptions.jsonMapper)
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 c8f71978..b22f2e41 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.blocking.dimensionalPriceGroups
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -13,7 +14,6 @@ import com.withorb.api.core.http.HttpResponse.Handler
import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepare
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.DimensionalPriceGroup
import com.withorb.api.models.DimensionalPriceGroupExternalDimensionalPriceGroupIdRetrieveParams
@@ -39,7 +39,7 @@ internal constructor(private val clientOptions: ClientOptions) :
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
ExternalDimensionalPriceGroupIdService.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val retrieveHandler: Handler =
jsonHandler(clientOptions.jsonMapper)
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 2cacb147..cb5140f9 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.blocking.events
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -14,7 +15,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepare
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.EventBackfillCloseParams
import com.withorb.api.models.EventBackfillCloseResponse
import com.withorb.api.models.EventBackfillCreateParams
@@ -73,7 +73,7 @@ class BackfillServiceImpl internal constructor(private val clientOptions: Client
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
BackfillService.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val createHandler: Handler =
jsonHandler(clientOptions.jsonMapper)
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 c4ec970d..e26afcd9 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.blocking.events
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -13,7 +14,6 @@ import com.withorb.api.core.http.HttpResponse.Handler
import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepare
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.EventVolumeListParams
import com.withorb.api.models.EventVolumes
@@ -33,7 +33,7 @@ class VolumeServiceImpl internal constructor(private val clientOptions: ClientOp
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
VolumeService.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val listHandler: Handler =
jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler)
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 1249a330..464cadc3 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.blocking.plans
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -14,7 +15,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepare
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.Plan
import com.withorb.api.models.PlanExternalPlanIdFetchParams
import com.withorb.api.models.PlanExternalPlanIdUpdateParams
@@ -45,7 +45,7 @@ class ExternalPlanIdServiceImpl internal constructor(private val clientOptions:
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
ExternalPlanIdService.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val updateHandler: Handler =
jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler)
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 e5a93cd8..8b773019 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
@@ -3,6 +3,7 @@
package com.withorb.api.services.blocking.prices
import com.withorb.api.core.ClientOptions
+import com.withorb.api.core.JsonValue
import com.withorb.api.core.RequestOptions
import com.withorb.api.core.handlers.errorHandler
import com.withorb.api.core.handlers.jsonHandler
@@ -14,7 +15,6 @@ import com.withorb.api.core.http.HttpResponseFor
import com.withorb.api.core.http.json
import com.withorb.api.core.http.parseable
import com.withorb.api.core.prepare
-import com.withorb.api.errors.OrbError
import com.withorb.api.models.Price
import com.withorb.api.models.PriceExternalPriceIdFetchParams
import com.withorb.api.models.PriceExternalPriceIdUpdateParams
@@ -45,7 +45,7 @@ class ExternalPriceIdServiceImpl internal constructor(private val clientOptions:
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
ExternalPriceIdService.WithRawResponse {
- private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
private val updateHandler: Handler =
jsonHandler(clientOptions.jsonMapper).withErrorHandler(errorHandler)
diff --git a/orb-java-core/src/test/kotlin/com/withorb/api/services/ErrorHandlingTest.kt b/orb-java-core/src/test/kotlin/com/withorb/api/services/ErrorHandlingTest.kt
index f0b5b3f5..bdd64545 100644
--- a/orb-java-core/src/test/kotlin/com/withorb/api/services/ErrorHandlingTest.kt
+++ b/orb-java-core/src/test/kotlin/com/withorb/api/services/ErrorHandlingTest.kt
@@ -16,7 +16,6 @@ import com.withorb.api.core.jsonMapper
import com.withorb.api.errors.BadRequestException
import com.withorb.api.errors.InternalServerException
import com.withorb.api.errors.NotFoundException
-import com.withorb.api.errors.OrbError
import com.withorb.api.errors.OrbException
import com.withorb.api.errors.PermissionDeniedException
import com.withorb.api.errors.RateLimitException
@@ -35,10 +34,9 @@ internal class ErrorHandlingTest {
companion object {
- private val ERROR: OrbError =
- OrbError.builder().putAdditionalProperty("errorProperty", JsonValue.from("42")).build()
+ private val ERROR_JSON: JsonValue = JsonValue.from(mapOf("errorProperty" to "42"))
- private val ERROR_JSON: ByteArray = jsonMapper().writeValueAsBytes(ERROR)
+ private val ERROR_JSON_BYTES: ByteArray = jsonMapper().writeValueAsBytes(ERROR_JSON)
private const val HEADER_NAME: String = "Error-Header"
@@ -63,7 +61,9 @@ internal class ErrorHandlingTest {
val customerService = client.customers()
stubFor(
post(anyUrl())
- .willReturn(status(400).withHeader(HEADER_NAME, HEADER_VALUE).withBody(ERROR_JSON))
+ .willReturn(
+ status(400).withHeader(HEADER_NAME, HEADER_VALUE).withBody(ERROR_JSON_BYTES)
+ )
)
val e =
@@ -153,8 +153,8 @@ internal class ErrorHandlingTest {
}
assertThat(e.statusCode()).isEqualTo(400)
- assertThat(e.error()).isEqualTo(ERROR)
assertThat(e.headers().toMap()).contains(entry(HEADER_NAME, listOf(HEADER_VALUE)))
+ assertThat(e.body()).isEqualTo(ERROR_JSON)
}
@Test
@@ -162,7 +162,9 @@ internal class ErrorHandlingTest {
val customerService = client.customers()
stubFor(
post(anyUrl())
- .willReturn(status(401).withHeader(HEADER_NAME, HEADER_VALUE).withBody(ERROR_JSON))
+ .willReturn(
+ status(401).withHeader(HEADER_NAME, HEADER_VALUE).withBody(ERROR_JSON_BYTES)
+ )
)
val e =
@@ -252,8 +254,8 @@ internal class ErrorHandlingTest {
}
assertThat(e.statusCode()).isEqualTo(401)
- assertThat(e.error()).isEqualTo(ERROR)
assertThat(e.headers().toMap()).contains(entry(HEADER_NAME, listOf(HEADER_VALUE)))
+ assertThat(e.body()).isEqualTo(ERROR_JSON)
}
@Test
@@ -261,7 +263,9 @@ internal class ErrorHandlingTest {
val customerService = client.customers()
stubFor(
post(anyUrl())
- .willReturn(status(403).withHeader(HEADER_NAME, HEADER_VALUE).withBody(ERROR_JSON))
+ .willReturn(
+ status(403).withHeader(HEADER_NAME, HEADER_VALUE).withBody(ERROR_JSON_BYTES)
+ )
)
val e =
@@ -351,8 +355,8 @@ internal class ErrorHandlingTest {
}
assertThat(e.statusCode()).isEqualTo(403)
- assertThat(e.error()).isEqualTo(ERROR)
assertThat(e.headers().toMap()).contains(entry(HEADER_NAME, listOf(HEADER_VALUE)))
+ assertThat(e.body()).isEqualTo(ERROR_JSON)
}
@Test
@@ -360,7 +364,9 @@ internal class ErrorHandlingTest {
val customerService = client.customers()
stubFor(
post(anyUrl())
- .willReturn(status(404).withHeader(HEADER_NAME, HEADER_VALUE).withBody(ERROR_JSON))
+ .willReturn(
+ status(404).withHeader(HEADER_NAME, HEADER_VALUE).withBody(ERROR_JSON_BYTES)
+ )
)
val e =
@@ -450,8 +456,8 @@ internal class ErrorHandlingTest {
}
assertThat(e.statusCode()).isEqualTo(404)
- assertThat(e.error()).isEqualTo(ERROR)
assertThat(e.headers().toMap()).contains(entry(HEADER_NAME, listOf(HEADER_VALUE)))
+ assertThat(e.body()).isEqualTo(ERROR_JSON)
}
@Test
@@ -459,7 +465,9 @@ internal class ErrorHandlingTest {
val customerService = client.customers()
stubFor(
post(anyUrl())
- .willReturn(status(422).withHeader(HEADER_NAME, HEADER_VALUE).withBody(ERROR_JSON))
+ .willReturn(
+ status(422).withHeader(HEADER_NAME, HEADER_VALUE).withBody(ERROR_JSON_BYTES)
+ )
)
val e =
@@ -549,8 +557,8 @@ internal class ErrorHandlingTest {
}
assertThat(e.statusCode()).isEqualTo(422)
- assertThat(e.error()).isEqualTo(ERROR)
assertThat(e.headers().toMap()).contains(entry(HEADER_NAME, listOf(HEADER_VALUE)))
+ assertThat(e.body()).isEqualTo(ERROR_JSON)
}
@Test
@@ -558,7 +566,9 @@ internal class ErrorHandlingTest {
val customerService = client.customers()
stubFor(
post(anyUrl())
- .willReturn(status(429).withHeader(HEADER_NAME, HEADER_VALUE).withBody(ERROR_JSON))
+ .willReturn(
+ status(429).withHeader(HEADER_NAME, HEADER_VALUE).withBody(ERROR_JSON_BYTES)
+ )
)
val e =
@@ -648,8 +658,8 @@ internal class ErrorHandlingTest {
}
assertThat(e.statusCode()).isEqualTo(429)
- assertThat(e.error()).isEqualTo(ERROR)
assertThat(e.headers().toMap()).contains(entry(HEADER_NAME, listOf(HEADER_VALUE)))
+ assertThat(e.body()).isEqualTo(ERROR_JSON)
}
@Test
@@ -657,7 +667,9 @@ internal class ErrorHandlingTest {
val customerService = client.customers()
stubFor(
post(anyUrl())
- .willReturn(status(500).withHeader(HEADER_NAME, HEADER_VALUE).withBody(ERROR_JSON))
+ .willReturn(
+ status(500).withHeader(HEADER_NAME, HEADER_VALUE).withBody(ERROR_JSON_BYTES)
+ )
)
val e =
@@ -747,8 +759,8 @@ internal class ErrorHandlingTest {
}
assertThat(e.statusCode()).isEqualTo(500)
- assertThat(e.error()).isEqualTo(ERROR)
assertThat(e.headers().toMap()).contains(entry(HEADER_NAME, listOf(HEADER_VALUE)))
+ assertThat(e.body()).isEqualTo(ERROR_JSON)
}
@Test
@@ -756,7 +768,9 @@ internal class ErrorHandlingTest {
val customerService = client.customers()
stubFor(
post(anyUrl())
- .willReturn(status(999).withHeader(HEADER_NAME, HEADER_VALUE).withBody(ERROR_JSON))
+ .willReturn(
+ status(999).withHeader(HEADER_NAME, HEADER_VALUE).withBody(ERROR_JSON_BYTES)
+ )
)
val e =
@@ -846,8 +860,8 @@ internal class ErrorHandlingTest {
}
assertThat(e.statusCode()).isEqualTo(999)
- assertThat(e.error()).isEqualTo(ERROR)
assertThat(e.headers().toMap()).contains(entry(HEADER_NAME, listOf(HEADER_VALUE)))
+ assertThat(e.body()).isEqualTo(ERROR_JSON)
}
@Test