Skip to content

Commit 17cd5ef

Browse files
fix(api): name conflict between type and account type
1 parent e2c3beb commit 17cd5ef

20 files changed

Lines changed: 258 additions & 216 deletions

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 165
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-1aaf1d9d9aea1bfa14a48559f01d539aa1449d65f252dc9c3b606c7bca300af1.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-41b87f6139d55188993492b9c042a6bc1bc0506c166334c387072b57b6c79869.yml
33
openapi_spec_hash: 3327246caf3bcbd3504ce99c81062075
4-
config_hash: a5d12cd64a37624cbe350cd7b2380693
4+
config_hash: f390dcd4de9109eff9667160949feef2

lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateParams.kt

Lines changed: 48 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2043,7 +2043,7 @@ private constructor(
20432043
private val owner: JsonField<String>,
20442044
private val ownerType: JsonField<OwnerType>,
20452045
private val routingNumber: JsonField<String>,
2046-
private val type: JsonField<Type>,
2046+
private val type: JsonField<AccountType>,
20472047
private val verificationMethod: JsonField<ExternallyVerifiedVerificationMethod>,
20482048
private val accountToken: JsonField<String>,
20492049
private val address: JsonField<ExternalBankAccountAddress>,
@@ -2073,7 +2073,9 @@ private constructor(
20732073
@JsonProperty("routing_number")
20742074
@ExcludeMissing
20752075
routingNumber: JsonField<String> = JsonMissing.of(),
2076-
@JsonProperty("type") @ExcludeMissing type: JsonField<Type> = JsonMissing.of(),
2076+
@JsonProperty("type")
2077+
@ExcludeMissing
2078+
type: JsonField<AccountType> = JsonMissing.of(),
20772079
@JsonProperty("verification_method")
20782080
@ExcludeMissing
20792081
verificationMethod: JsonField<ExternallyVerifiedVerificationMethod> =
@@ -2177,7 +2179,7 @@ private constructor(
21772179
* unexpectedly missing or null (e.g. if the server responded with an unexpected
21782180
* value).
21792181
*/
2180-
fun type(): Type = type.getRequired("type")
2182+
fun type(): AccountType = type.getRequired("type")
21812183

21822184
/**
21832185
* Verification Method
@@ -2305,7 +2307,7 @@ private constructor(
23052307
*
23062308
* Unlike [type], this method doesn't throw if the JSON field has an unexpected type.
23072309
*/
2308-
@JsonProperty("type") @ExcludeMissing fun _type(): JsonField<Type> = type
2310+
@JsonProperty("type") @ExcludeMissing fun _type(): JsonField<AccountType> = type
23092311

23102312
/**
23112313
* Returns the raw JSON value of [verificationMethod].
@@ -2423,7 +2425,7 @@ private constructor(
24232425
private var owner: JsonField<String>? = null
24242426
private var ownerType: JsonField<OwnerType>? = null
24252427
private var routingNumber: JsonField<String>? = null
2426-
private var type: JsonField<Type>? = null
2428+
private var type: JsonField<AccountType>? = null
24272429
private var verificationMethod: JsonField<ExternallyVerifiedVerificationMethod>? =
24282430
null
24292431
private var accountToken: JsonField<String> = JsonMissing.of()
@@ -2548,16 +2550,16 @@ private constructor(
25482550
}
25492551

25502552
/** Account Type */
2551-
fun type(type: Type) = type(JsonField.of(type))
2553+
fun type(type: AccountType) = type(JsonField.of(type))
25522554

25532555
/**
25542556
* Sets [Builder.type] to an arbitrary JSON value.
25552557
*
2556-
* You should usually call [Builder.type] with a well-typed [Type] value instead.
2557-
* This method is primarily for setting the field to an undocumented or not yet
2558-
* supported value.
2558+
* You should usually call [Builder.type] with a well-typed [AccountType] value
2559+
* instead. This method is primarily for setting the field to an undocumented or not
2560+
* yet supported value.
25592561
*/
2560-
fun type(type: JsonField<Type>) = apply { this.type = type }
2562+
fun type(type: JsonField<AccountType>) = apply { this.type = type }
25612563

25622564
/** Verification Method */
25632565
fun verificationMethod(verificationMethod: ExternallyVerifiedVerificationMethod) =
@@ -2792,8 +2794,9 @@ private constructor(
27922794
(if (userDefinedId.asKnown().isPresent) 1 else 0)
27932795

27942796
/** Account Type */
2795-
class Type @JsonCreator private constructor(private val value: JsonField<String>) :
2796-
Enum {
2797+
class AccountType
2798+
@JsonCreator
2799+
private constructor(private val value: JsonField<String>) : Enum {
27972800

27982801
/**
27992802
* Returns this class instance's raw value.
@@ -2811,19 +2814,19 @@ private constructor(
28112814

28122815
@JvmField val SAVINGS = of("SAVINGS")
28132816

2814-
@JvmStatic fun of(value: String) = Type(JsonField.of(value))
2817+
@JvmStatic fun of(value: String) = AccountType(JsonField.of(value))
28152818
}
28162819

2817-
/** An enum containing [Type]'s known values. */
2820+
/** An enum containing [AccountType]'s known values. */
28182821
enum class Known {
28192822
CHECKING,
28202823
SAVINGS,
28212824
}
28222825

28232826
/**
2824-
* An enum containing [Type]'s known values, as well as an [_UNKNOWN] member.
2827+
* An enum containing [AccountType]'s known values, as well as an [_UNKNOWN] member.
28252828
*
2826-
* An instance of [Type] can contain an unknown value in a couple of cases:
2829+
* An instance of [AccountType] can contain an unknown value in a couple of cases:
28272830
* - It was deserialized from data that doesn't match any known member. For example,
28282831
* if the SDK is on an older version than the API, then the API may respond with
28292832
* new members that the SDK is unaware of.
@@ -2833,7 +2836,8 @@ private constructor(
28332836
CHECKING,
28342837
SAVINGS,
28352838
/**
2836-
* An enum member indicating that [Type] was instantiated with an unknown value.
2839+
* An enum member indicating that [AccountType] was instantiated with an unknown
2840+
* value.
28372841
*/
28382842
_UNKNOWN,
28392843
}
@@ -2865,7 +2869,7 @@ private constructor(
28652869
when (this) {
28662870
CHECKING -> Known.CHECKING
28672871
SAVINGS -> Known.SAVINGS
2868-
else -> throw LithicInvalidDataException("Unknown Type: $value")
2872+
else -> throw LithicInvalidDataException("Unknown AccountType: $value")
28692873
}
28702874

28712875
/**
@@ -2884,7 +2888,7 @@ private constructor(
28842888

28852889
private var validated: Boolean = false
28862890

2887-
fun validate(): Type = apply {
2891+
fun validate(): AccountType = apply {
28882892
if (validated) {
28892893
return@apply
28902894
}
@@ -2914,7 +2918,7 @@ private constructor(
29142918
return true
29152919
}
29162920

2917-
return /* spotless:off */ other is Type && value == other.value /* spotless:on */
2921+
return /* spotless:off */ other is AccountType && value == other.value /* spotless:on */
29182922
}
29192923

29202924
override fun hashCode() = value.hashCode()
@@ -3082,7 +3086,7 @@ private constructor(
30823086
private val owner: JsonField<String>,
30833087
private val ownerType: JsonField<OwnerType>,
30843088
private val routingNumber: JsonField<String>,
3085-
private val type: JsonField<Type>,
3089+
private val type: JsonField<AccountType>,
30863090
private val verificationMethod: JsonField<UnverifiedVerificationMethod>,
30873091
private val accountToken: JsonField<String>,
30883092
private val address: JsonField<ExternalBankAccountAddress>,
@@ -3112,7 +3116,9 @@ private constructor(
31123116
@JsonProperty("routing_number")
31133117
@ExcludeMissing
31143118
routingNumber: JsonField<String> = JsonMissing.of(),
3115-
@JsonProperty("type") @ExcludeMissing type: JsonField<Type> = JsonMissing.of(),
3119+
@JsonProperty("type")
3120+
@ExcludeMissing
3121+
type: JsonField<AccountType> = JsonMissing.of(),
31163122
@JsonProperty("verification_method")
31173123
@ExcludeMissing
31183124
verificationMethod: JsonField<UnverifiedVerificationMethod> = JsonMissing.of(),
@@ -3215,7 +3221,7 @@ private constructor(
32153221
* unexpectedly missing or null (e.g. if the server responded with an unexpected
32163222
* value).
32173223
*/
3218-
fun type(): Type = type.getRequired("type")
3224+
fun type(): AccountType = type.getRequired("type")
32193225

32203226
/**
32213227
* Verification Method
@@ -3343,7 +3349,7 @@ private constructor(
33433349
*
33443350
* Unlike [type], this method doesn't throw if the JSON field has an unexpected type.
33453351
*/
3346-
@JsonProperty("type") @ExcludeMissing fun _type(): JsonField<Type> = type
3352+
@JsonProperty("type") @ExcludeMissing fun _type(): JsonField<AccountType> = type
33473353

33483354
/**
33493355
* Returns the raw JSON value of [verificationMethod].
@@ -3460,7 +3466,7 @@ private constructor(
34603466
private var owner: JsonField<String>? = null
34613467
private var ownerType: JsonField<OwnerType>? = null
34623468
private var routingNumber: JsonField<String>? = null
3463-
private var type: JsonField<Type>? = null
3469+
private var type: JsonField<AccountType>? = null
34643470
private var verificationMethod: JsonField<UnverifiedVerificationMethod>? = null
34653471
private var accountToken: JsonField<String> = JsonMissing.of()
34663472
private var address: JsonField<ExternalBankAccountAddress> = JsonMissing.of()
@@ -3581,16 +3587,16 @@ private constructor(
35813587
}
35823588

35833589
/** Account Type */
3584-
fun type(type: Type) = type(JsonField.of(type))
3590+
fun type(type: AccountType) = type(JsonField.of(type))
35853591

35863592
/**
35873593
* Sets [Builder.type] to an arbitrary JSON value.
35883594
*
3589-
* You should usually call [Builder.type] with a well-typed [Type] value instead.
3590-
* This method is primarily for setting the field to an undocumented or not yet
3591-
* supported value.
3595+
* You should usually call [Builder.type] with a well-typed [AccountType] value
3596+
* instead. This method is primarily for setting the field to an undocumented or not
3597+
* yet supported value.
35923598
*/
3593-
fun type(type: JsonField<Type>) = apply { this.type = type }
3599+
fun type(type: JsonField<AccountType>) = apply { this.type = type }
35943600

35953601
/** Verification Method */
35963602
fun verificationMethod(verificationMethod: UnverifiedVerificationMethod) =
@@ -3825,8 +3831,9 @@ private constructor(
38253831
(if (userDefinedId.asKnown().isPresent) 1 else 0)
38263832

38273833
/** Account Type */
3828-
class Type @JsonCreator private constructor(private val value: JsonField<String>) :
3829-
Enum {
3834+
class AccountType
3835+
@JsonCreator
3836+
private constructor(private val value: JsonField<String>) : Enum {
38303837

38313838
/**
38323839
* Returns this class instance's raw value.
@@ -3844,19 +3851,19 @@ private constructor(
38443851

38453852
@JvmField val SAVINGS = of("SAVINGS")
38463853

3847-
@JvmStatic fun of(value: String) = Type(JsonField.of(value))
3854+
@JvmStatic fun of(value: String) = AccountType(JsonField.of(value))
38483855
}
38493856

3850-
/** An enum containing [Type]'s known values. */
3857+
/** An enum containing [AccountType]'s known values. */
38513858
enum class Known {
38523859
CHECKING,
38533860
SAVINGS,
38543861
}
38553862

38563863
/**
3857-
* An enum containing [Type]'s known values, as well as an [_UNKNOWN] member.
3864+
* An enum containing [AccountType]'s known values, as well as an [_UNKNOWN] member.
38583865
*
3859-
* An instance of [Type] can contain an unknown value in a couple of cases:
3866+
* An instance of [AccountType] can contain an unknown value in a couple of cases:
38603867
* - It was deserialized from data that doesn't match any known member. For example,
38613868
* if the SDK is on an older version than the API, then the API may respond with
38623869
* new members that the SDK is unaware of.
@@ -3866,7 +3873,8 @@ private constructor(
38663873
CHECKING,
38673874
SAVINGS,
38683875
/**
3869-
* An enum member indicating that [Type] was instantiated with an unknown value.
3876+
* An enum member indicating that [AccountType] was instantiated with an unknown
3877+
* value.
38703878
*/
38713879
_UNKNOWN,
38723880
}
@@ -3898,7 +3906,7 @@ private constructor(
38983906
when (this) {
38993907
CHECKING -> Known.CHECKING
39003908
SAVINGS -> Known.SAVINGS
3901-
else -> throw LithicInvalidDataException("Unknown Type: $value")
3909+
else -> throw LithicInvalidDataException("Unknown AccountType: $value")
39023910
}
39033911

39043912
/**
@@ -3917,7 +3925,7 @@ private constructor(
39173925

39183926
private var validated: Boolean = false
39193927

3920-
fun validate(): Type = apply {
3928+
fun validate(): AccountType = apply {
39213929
if (validated) {
39223930
return@apply
39233931
}
@@ -3947,7 +3955,7 @@ private constructor(
39473955
return true
39483956
}
39493957

3950-
return /* spotless:off */ other is Type && value == other.value /* spotless:on */
3958+
return /* spotless:off */ other is AccountType && value == other.value /* spotless:on */
39513959
}
39523960

39533961
override fun hashCode() = value.hashCode()

0 commit comments

Comments
 (0)