Skip to content

Commit 816be7e

Browse files
committed
feat(api): regenerate SDK from OpenAPI spec 1.104.0
1 parent 792382d commit 816be7e

160 files changed

Lines changed: 2498 additions & 442 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 0 additions & 16 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<!-- x-release-please-start-version -->
44

55
[![Maven Central](https://img.shields.io/maven-central/v/com.dodopayments.api/dodo-payments-java)](https://central.sonatype.com/artifact/com.dodopayments.api/dodo-payments-java/1.102.1)
6-
[![javadoc](https://javadoc.io/badge2/com.dodopayments.api/dodo-payments-java/1.102.1/javadoc.svg)](https://javadoc.io/doc/com.dodopayments.api/dodo-payments-java/1.102.0)
6+
[![javadoc](https://javadoc.io/badge2/com.dodopayments.api/dodo-payments-java/1.102.1/javadoc.svg)](https://javadoc.io/doc/com.dodopayments.api/dodo-payments-java/1.102.1)
77

88
<!-- x-release-please-end -->
99

dodo-payments-java-client-okhttp/src/main/kotlin/com/dodopayments/api/client/okhttp/DodoPaymentsOkHttpClient.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ class DodoPaymentsOkHttpClient private constructor() {
240240
* Defaults to the live_mode environment: `https://live.dodopayments.com`.
241241
*
242242
* The following other environments, with dedicated builder methods, are available:
243+
*
243244
* - test_mode: `https://test.dodopayments.com`
244245
*/
245246
fun baseUrl(baseUrl: String?) = apply { clientOptions.baseUrl(baseUrl) }

dodo-payments-java-client-okhttp/src/main/kotlin/com/dodopayments/api/client/okhttp/DodoPaymentsOkHttpClientAsync.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ class DodoPaymentsOkHttpClientAsync private constructor() {
240240
* Defaults to the live_mode environment: `https://live.dodopayments.com`.
241241
*
242242
* The following other environments, with dedicated builder methods, are available:
243+
*
243244
* - test_mode: `https://test.dodopayments.com`
244245
*/
245246
fun baseUrl(baseUrl: String?) = apply { clientOptions.baseUrl(baseUrl) }

dodo-payments-java-core/src/main/kotlin/com/dodopayments/api/core/Check.kt

Lines changed: 23 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -24,45 +24,39 @@ internal fun <T : Any> checkKnown(name: String, value: MultipartField<T>): T =
2424
}
2525

2626
@JvmSynthetic
27-
internal fun checkLength(name: String, value: String, length: Int): String =
28-
value.also {
29-
check(it.length == length) { "`$name` must have length $length, but was ${it.length}" }
30-
}
27+
internal fun checkLength(name: String, value: String, length: Int): String = value.also {
28+
check(it.length == length) { "`$name` must have length $length, but was ${it.length}" }
29+
}
3130

3231
@JvmSynthetic
33-
internal fun checkMinLength(name: String, value: String, minLength: Int): String =
34-
value.also {
35-
check(it.length >= minLength) {
36-
if (minLength == 1) "`$name` must be non-empty, but was empty"
37-
else "`$name` must have at least length $minLength, but was ${it.length}"
38-
}
32+
internal fun checkMinLength(name: String, value: String, minLength: Int): String = value.also {
33+
check(it.length >= minLength) {
34+
if (minLength == 1) "`$name` must be non-empty, but was empty"
35+
else "`$name` must have at least length $minLength, but was ${it.length}"
3936
}
37+
}
4038

4139
@JvmSynthetic
42-
internal fun checkMaxLength(name: String, value: String, maxLength: Int): String =
43-
value.also {
44-
check(it.length <= maxLength) {
45-
"`$name` must have at most length $maxLength, but was ${it.length}"
46-
}
40+
internal fun checkMaxLength(name: String, value: String, maxLength: Int): String = value.also {
41+
check(it.length <= maxLength) {
42+
"`$name` must have at most length $maxLength, but was ${it.length}"
4743
}
44+
}
4845

4946
@JvmSynthetic
5047
internal fun checkJacksonVersionCompatibility() {
51-
val incompatibleJacksonVersions =
52-
RUNTIME_JACKSON_VERSIONS.mapNotNull {
53-
val badVersionReason = BAD_JACKSON_VERSIONS[it.toString()]
54-
when {
55-
it.majorVersion != MINIMUM_JACKSON_VERSION.majorVersion ->
56-
it to "incompatible major version"
57-
it.minorVersion < MINIMUM_JACKSON_VERSION.minorVersion ->
58-
it to "minor version too low"
59-
it.minorVersion == MINIMUM_JACKSON_VERSION.minorVersion &&
60-
it.patchLevel < MINIMUM_JACKSON_VERSION.patchLevel ->
61-
it to "patch version too low"
62-
badVersionReason != null -> it to badVersionReason
63-
else -> null
64-
}
48+
val incompatibleJacksonVersions = RUNTIME_JACKSON_VERSIONS.mapNotNull {
49+
val badVersionReason = BAD_JACKSON_VERSIONS[it.toString()]
50+
when {
51+
it.majorVersion != MINIMUM_JACKSON_VERSION.majorVersion ->
52+
it to "incompatible major version"
53+
it.minorVersion < MINIMUM_JACKSON_VERSION.minorVersion -> it to "minor version too low"
54+
it.minorVersion == MINIMUM_JACKSON_VERSION.minorVersion &&
55+
it.patchLevel < MINIMUM_JACKSON_VERSION.patchLevel -> it to "patch version too low"
56+
badVersionReason != null -> it to badVersionReason
57+
else -> null
6558
}
59+
}
6660
check(incompatibleJacksonVersions.isEmpty()) {
6761
"""
6862
This SDK requires a minimum Jackson version of $MINIMUM_JACKSON_VERSION, but the following incompatible Jackson versions were detected at runtime:

dodo-payments-java-core/src/main/kotlin/com/dodopayments/api/core/ClientOptions.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ private constructor(
136136
* Defaults to the live_mode environment: `https://live.dodopayments.com`.
137137
*
138138
* The following other environments, with dedicated builder methods, are available:
139+
*
139140
* - test_mode: `https://test.dodopayments.com`
140141
*/
141142
fun baseUrl(): String = baseUrl ?: LIVE_MODE_URL
@@ -277,6 +278,7 @@ private constructor(
277278
* Defaults to the live_mode environment: `https://live.dodopayments.com`.
278279
*
279280
* The following other environments, with dedicated builder methods, are available:
281+
*
280282
* - test_mode: `https://test.dodopayments.com`
281283
*/
282284
fun baseUrl(baseUrl: String?) = apply { this.baseUrl = baseUrl }

dodo-payments-java-core/src/main/kotlin/com/dodopayments/api/models/balances/BalanceLedgerEntry.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,9 +688,11 @@ private constructor(
688688
* An enum containing [EventType]'s known values, as well as an [_UNKNOWN] member.
689689
*
690690
* An instance of [EventType] can contain an unknown value in a couple of cases:
691+
*
691692
* - It was deserialized from data that doesn't match any known member. For example, if the
692693
* SDK is on an older version than the API, then the API may respond with new members that
693694
* the SDK is unaware of.
695+
*
694696
* - It was constructed with an arbitrary value using the [of] method.
695697
*/
696698
enum class Value {

dodo-payments-java-core/src/main/kotlin/com/dodopayments/api/models/balances/BalanceRetrieveLedgerParams.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,9 +773,11 @@ private constructor(
773773
* An enum containing [Currency]'s known values, as well as an [_UNKNOWN] member.
774774
*
775775
* An instance of [Currency] can contain an unknown value in a couple of cases:
776+
*
776777
* - It was deserialized from data that doesn't match any known member. For example, if the
777778
* SDK is on an older version than the API, then the API may respond with new members that
778779
* the SDK is unaware of.
780+
*
779781
* - It was constructed with an arbitrary value using the [of] method.
780782
*/
781783
enum class Value {
@@ -1399,9 +1401,11 @@ private constructor(
13991401
* An enum containing [EventType]'s known values, as well as an [_UNKNOWN] member.
14001402
*
14011403
* An instance of [EventType] can contain an unknown value in a couple of cases:
1404+
*
14021405
* - It was deserialized from data that doesn't match any known member. For example, if the
14031406
* SDK is on an older version than the API, then the API may respond with new members that
14041407
* the SDK is unaware of.
1408+
*
14051409
* - It was constructed with an arbitrary value using the [of] method.
14061410
*/
14071411
enum class Value {

dodo-payments-java-core/src/main/kotlin/com/dodopayments/api/models/brands/Brand.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,9 +628,11 @@ private constructor(
628628
* An enum containing [VerificationStatus]'s known values, as well as an [_UNKNOWN] member.
629629
*
630630
* An instance of [VerificationStatus] can contain an unknown value in a couple of cases:
631+
*
631632
* - It was deserialized from data that doesn't match any known member. For example, if the
632633
* SDK is on an older version than the API, then the API may respond with new members that
633634
* the SDK is unaware of.
635+
*
634636
* - It was constructed with an arbitrary value using the [of] method.
635637
*/
636638
enum class Value {

dodo-payments-java-core/src/main/kotlin/com/dodopayments/api/models/checkoutsessions/CheckoutSessionCustomization.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,9 +385,11 @@ private constructor(
385385
* An enum containing [Theme]'s known values, as well as an [_UNKNOWN] member.
386386
*
387387
* An instance of [Theme] can contain an unknown value in a couple of cases:
388+
*
388389
* - It was deserialized from data that doesn't match any known member. For example, if the
389390
* SDK is on an older version than the API, then the API may respond with new members that
390391
* the SDK is unaware of.
392+
*
391393
* - It was constructed with an arbitrary value using the [of] method.
392394
*/
393395
enum class Value {

0 commit comments

Comments
 (0)