Skip to content

Commit 55373bb

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
style(internal): sort fields (#429)
1 parent 440de6d commit 55373bb

File tree

69 files changed

+8701
-8701
lines changed

Some content is hidden

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

69 files changed

+8701
-8701
lines changed

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

Lines changed: 152 additions & 152 deletions
Large diffs are not rendered by default.

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

Lines changed: 138 additions & 138 deletions
Large diffs are not rendered by default.

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

Lines changed: 68 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -23,40 +23,34 @@ import java.util.Optional
2323
class AccountHolderCreateResponse
2424
@JsonCreator
2525
private constructor(
26+
@JsonProperty("token") @ExcludeMissing private val token: JsonField<String> = JsonMissing.of(),
2627
@JsonProperty("account_token")
2728
@ExcludeMissing
2829
private val accountToken: JsonField<String> = JsonMissing.of(),
29-
@JsonProperty("created")
30-
@ExcludeMissing
31-
private val created: JsonField<OffsetDateTime> = JsonMissing.of(),
32-
@JsonProperty("external_id")
33-
@ExcludeMissing
34-
private val externalId: JsonField<String> = JsonMissing.of(),
3530
@JsonProperty("status")
3631
@ExcludeMissing
3732
private val status: JsonField<Status> = JsonMissing.of(),
3833
@JsonProperty("status_reasons")
3934
@ExcludeMissing
4035
private val statusReasons: JsonField<List<StatusReasons>> = JsonMissing.of(),
36+
@JsonProperty("created")
37+
@ExcludeMissing
38+
private val created: JsonField<OffsetDateTime> = JsonMissing.of(),
39+
@JsonProperty("external_id")
40+
@ExcludeMissing
41+
private val externalId: JsonField<String> = JsonMissing.of(),
4142
@JsonProperty("required_documents")
4243
@ExcludeMissing
4344
private val requiredDocuments: JsonField<List<RequiredDocument>> = JsonMissing.of(),
44-
@JsonProperty("token") @ExcludeMissing private val token: JsonField<String> = JsonMissing.of(),
4545
@JsonAnySetter private val additionalProperties: Map<String, JsonValue> = immutableEmptyMap(),
4646
) {
4747

48+
/** Globally unique identifier for the account holder. */
49+
fun token(): String = token.getRequired("token")
50+
4851
/** Globally unique identifier for the account. */
4952
fun accountToken(): String = accountToken.getRequired("account_token")
5053

51-
/** Timestamp of when the account holder was created. */
52-
fun created(): Optional<OffsetDateTime> = Optional.ofNullable(created.getNullable("created"))
53-
54-
/**
55-
* Customer-provided token that indicates a relationship with an object outside of the Lithic
56-
* ecosystem.
57-
*/
58-
fun externalId(): Optional<String> = Optional.ofNullable(externalId.getNullable("external_id"))
59-
6054
/**
6155
* KYC and KYB evaluation states.
6256
*
@@ -68,6 +62,15 @@ private constructor(
6862
/** Reason for the evaluation status. */
6963
fun statusReasons(): List<StatusReasons> = statusReasons.getRequired("status_reasons")
7064

65+
/** Timestamp of when the account holder was created. */
66+
fun created(): Optional<OffsetDateTime> = Optional.ofNullable(created.getNullable("created"))
67+
68+
/**
69+
* Customer-provided token that indicates a relationship with an object outside of the Lithic
70+
* ecosystem.
71+
*/
72+
fun externalId(): Optional<String> = Optional.ofNullable(externalId.getNullable("external_id"))
73+
7174
/**
7275
* Only present for "KYB_BASIC" workflow. A list of documents required for the account holder to
7376
* be approved.
@@ -76,20 +79,11 @@ private constructor(
7679
Optional.ofNullable(requiredDocuments.getNullable("required_documents"))
7780

7881
/** Globally unique identifier for the account holder. */
79-
fun token(): String = token.getRequired("token")
82+
@JsonProperty("token") @ExcludeMissing fun _token() = token
8083

8184
/** Globally unique identifier for the account. */
8285
@JsonProperty("account_token") @ExcludeMissing fun _accountToken() = accountToken
8386

84-
/** Timestamp of when the account holder was created. */
85-
@JsonProperty("created") @ExcludeMissing fun _created() = created
86-
87-
/**
88-
* Customer-provided token that indicates a relationship with an object outside of the Lithic
89-
* ecosystem.
90-
*/
91-
@JsonProperty("external_id") @ExcludeMissing fun _externalId() = externalId
92-
9387
/**
9488
* KYC and KYB evaluation states.
9589
*
@@ -101,15 +95,21 @@ private constructor(
10195
/** Reason for the evaluation status. */
10296
@JsonProperty("status_reasons") @ExcludeMissing fun _statusReasons() = statusReasons
10397

98+
/** Timestamp of when the account holder was created. */
99+
@JsonProperty("created") @ExcludeMissing fun _created() = created
100+
101+
/**
102+
* Customer-provided token that indicates a relationship with an object outside of the Lithic
103+
* ecosystem.
104+
*/
105+
@JsonProperty("external_id") @ExcludeMissing fun _externalId() = externalId
106+
104107
/**
105108
* Only present for "KYB_BASIC" workflow. A list of documents required for the account holder to
106109
* be approved.
107110
*/
108111
@JsonProperty("required_documents") @ExcludeMissing fun _requiredDocuments() = requiredDocuments
109112

110-
/** Globally unique identifier for the account holder. */
111-
@JsonProperty("token") @ExcludeMissing fun _token() = token
112-
113113
@JsonAnyGetter
114114
@ExcludeMissing
115115
fun _additionalProperties(): Map<String, JsonValue> = additionalProperties
@@ -118,13 +118,13 @@ private constructor(
118118

119119
fun validate(): AccountHolderCreateResponse = apply {
120120
if (!validated) {
121+
token()
121122
accountToken()
122-
created()
123-
externalId()
124123
status()
125124
statusReasons()
125+
created()
126+
externalId()
126127
requiredDocuments().map { it.forEach { it.validate() } }
127-
token()
128128
validated = true
129129
}
130130
}
@@ -138,27 +138,33 @@ private constructor(
138138

139139
class Builder {
140140

141+
private var token: JsonField<String> = JsonMissing.of()
141142
private var accountToken: JsonField<String> = JsonMissing.of()
142-
private var created: JsonField<OffsetDateTime> = JsonMissing.of()
143-
private var externalId: JsonField<String> = JsonMissing.of()
144143
private var status: JsonField<Status> = JsonMissing.of()
145144
private var statusReasons: JsonField<List<StatusReasons>> = JsonMissing.of()
145+
private var created: JsonField<OffsetDateTime> = JsonMissing.of()
146+
private var externalId: JsonField<String> = JsonMissing.of()
146147
private var requiredDocuments: JsonField<List<RequiredDocument>> = JsonMissing.of()
147-
private var token: JsonField<String> = JsonMissing.of()
148148
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
149149

150150
@JvmSynthetic
151151
internal fun from(accountHolderCreateResponse: AccountHolderCreateResponse) = apply {
152+
token = accountHolderCreateResponse.token
152153
accountToken = accountHolderCreateResponse.accountToken
153-
created = accountHolderCreateResponse.created
154-
externalId = accountHolderCreateResponse.externalId
155154
status = accountHolderCreateResponse.status
156155
statusReasons = accountHolderCreateResponse.statusReasons
156+
created = accountHolderCreateResponse.created
157+
externalId = accountHolderCreateResponse.externalId
157158
requiredDocuments = accountHolderCreateResponse.requiredDocuments
158-
token = accountHolderCreateResponse.token
159159
additionalProperties = accountHolderCreateResponse.additionalProperties.toMutableMap()
160160
}
161161

162+
/** Globally unique identifier for the account holder. */
163+
fun token(token: String) = token(JsonField.of(token))
164+
165+
/** Globally unique identifier for the account holder. */
166+
fun token(token: JsonField<String>) = apply { this.token = token }
167+
162168
/** Globally unique identifier for the account. */
163169
fun accountToken(accountToken: String) = accountToken(JsonField.of(accountToken))
164170

@@ -167,24 +173,6 @@ private constructor(
167173
this.accountToken = accountToken
168174
}
169175

170-
/** Timestamp of when the account holder was created. */
171-
fun created(created: OffsetDateTime) = created(JsonField.of(created))
172-
173-
/** Timestamp of when the account holder was created. */
174-
fun created(created: JsonField<OffsetDateTime>) = apply { this.created = created }
175-
176-
/**
177-
* Customer-provided token that indicates a relationship with an object outside of the
178-
* Lithic ecosystem.
179-
*/
180-
fun externalId(externalId: String) = externalId(JsonField.of(externalId))
181-
182-
/**
183-
* Customer-provided token that indicates a relationship with an object outside of the
184-
* Lithic ecosystem.
185-
*/
186-
fun externalId(externalId: JsonField<String>) = apply { this.externalId = externalId }
187-
188176
/**
189177
* KYC and KYB evaluation states.
190178
*
@@ -210,6 +198,24 @@ private constructor(
210198
this.statusReasons = statusReasons
211199
}
212200

201+
/** Timestamp of when the account holder was created. */
202+
fun created(created: OffsetDateTime) = created(JsonField.of(created))
203+
204+
/** Timestamp of when the account holder was created. */
205+
fun created(created: JsonField<OffsetDateTime>) = apply { this.created = created }
206+
207+
/**
208+
* Customer-provided token that indicates a relationship with an object outside of the
209+
* Lithic ecosystem.
210+
*/
211+
fun externalId(externalId: String) = externalId(JsonField.of(externalId))
212+
213+
/**
214+
* Customer-provided token that indicates a relationship with an object outside of the
215+
* Lithic ecosystem.
216+
*/
217+
fun externalId(externalId: JsonField<String>) = apply { this.externalId = externalId }
218+
213219
/**
214220
* Only present for "KYB_BASIC" workflow. A list of documents required for the account
215221
* holder to be approved.
@@ -225,12 +231,6 @@ private constructor(
225231
this.requiredDocuments = requiredDocuments
226232
}
227233

228-
/** Globally unique identifier for the account holder. */
229-
fun token(token: String) = token(JsonField.of(token))
230-
231-
/** Globally unique identifier for the account holder. */
232-
fun token(token: JsonField<String>) = apply { this.token = token }
233-
234234
fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
235235
this.additionalProperties.clear()
236236
putAllAdditionalProperties(additionalProperties)
@@ -252,13 +252,13 @@ private constructor(
252252

253253
fun build(): AccountHolderCreateResponse =
254254
AccountHolderCreateResponse(
255+
token,
255256
accountToken,
256-
created,
257-
externalId,
258257
status,
259258
statusReasons.map { it.toImmutable() },
259+
created,
260+
externalId,
260261
requiredDocuments.map { it.toImmutable() },
261-
token,
262262
additionalProperties.toImmutable(),
263263
)
264264
}
@@ -581,15 +581,15 @@ private constructor(
581581
return true
582582
}
583583

584-
return /* spotless:off */ other is AccountHolderCreateResponse && accountToken == other.accountToken && created == other.created && externalId == other.externalId && status == other.status && statusReasons == other.statusReasons && requiredDocuments == other.requiredDocuments && token == other.token && additionalProperties == other.additionalProperties /* spotless:on */
584+
return /* spotless:off */ other is AccountHolderCreateResponse && token == other.token && accountToken == other.accountToken && status == other.status && statusReasons == other.statusReasons && created == other.created && externalId == other.externalId && requiredDocuments == other.requiredDocuments && additionalProperties == other.additionalProperties /* spotless:on */
585585
}
586586

587587
/* spotless:off */
588-
private val hashCode: Int by lazy { Objects.hash(accountToken, created, externalId, status, statusReasons, requiredDocuments, token, additionalProperties) }
588+
private val hashCode: Int by lazy { Objects.hash(token, accountToken, status, statusReasons, created, externalId, requiredDocuments, additionalProperties) }
589589
/* spotless:on */
590590

591591
override fun hashCode(): Int = hashCode
592592

593593
override fun toString() =
594-
"AccountHolderCreateResponse{accountToken=$accountToken, created=$created, externalId=$externalId, status=$status, statusReasons=$statusReasons, requiredDocuments=$requiredDocuments, token=$token, additionalProperties=$additionalProperties}"
594+
"AccountHolderCreateResponse{token=$token, accountToken=$accountToken, status=$status, statusReasons=$statusReasons, created=$created, externalId=$externalId, requiredDocuments=$requiredDocuments, additionalProperties=$additionalProperties}"
595595
}

0 commit comments

Comments
 (0)