Skip to content

Commit d89ab88

Browse files
stainless-botstainless-app[bot]
authored andcommitted
feat(api)!: change account holder creation response, new settlement detail type (#145)
1 parent d3e1bc3 commit d89ab88

17 files changed

Lines changed: 735 additions & 24 deletions

File tree

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

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

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

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ private constructor(
3030
private val tosTimestamp: JsonField<String>,
3131
private val websiteUrl: JsonField<String>,
3232
private val workflow: JsonField<Workflow>,
33+
private val externalId: JsonField<String>,
3334
private val additionalProperties: Map<String, JsonValue>,
3435
) {
3536

@@ -100,6 +101,9 @@ private constructor(
100101
/** Specifies the type of KYB workflow to run. */
101102
fun workflow(): Workflow = workflow.getRequired("workflow")
102103

104+
/** A user provided id that can be used to link an account holder with an external system */
105+
fun externalId(): Optional<String> = Optional.ofNullable(externalId.getNullable("external_id"))
106+
103107
/**
104108
* List of all entities with >25% ownership in the company. If no entity or individual owns >25%
105109
* of the company, and the largest shareholder is an entity, please identify them in this field.
@@ -166,6 +170,9 @@ private constructor(
166170
/** Specifies the type of KYB workflow to run. */
167171
@JsonProperty("workflow") @ExcludeMissing fun _workflow() = workflow
168172

173+
/** A user provided id that can be used to link an account holder with an external system */
174+
@JsonProperty("external_id") @ExcludeMissing fun _externalId() = externalId
175+
169176
@JsonAnyGetter
170177
@ExcludeMissing
171178
fun _additionalProperties(): Map<String, JsonValue> = additionalProperties
@@ -181,6 +188,7 @@ private constructor(
181188
tosTimestamp()
182189
websiteUrl()
183190
workflow()
191+
externalId()
184192
validated = true
185193
}
186194
}
@@ -202,6 +210,7 @@ private constructor(
202210
this.tosTimestamp == other.tosTimestamp &&
203211
this.websiteUrl == other.websiteUrl &&
204212
this.workflow == other.workflow &&
213+
this.externalId == other.externalId &&
205214
this.additionalProperties == other.additionalProperties
206215
}
207216

@@ -218,14 +227,15 @@ private constructor(
218227
tosTimestamp,
219228
websiteUrl,
220229
workflow,
230+
externalId,
221231
additionalProperties,
222232
)
223233
}
224234
return hashCode
225235
}
226236

227237
override fun toString() =
228-
"Kyb{beneficialOwnerEntities=$beneficialOwnerEntities, beneficialOwnerIndividuals=$beneficialOwnerIndividuals, businessEntity=$businessEntity, controlPerson=$controlPerson, kybPassedTimestamp=$kybPassedTimestamp, natureOfBusiness=$natureOfBusiness, tosTimestamp=$tosTimestamp, websiteUrl=$websiteUrl, workflow=$workflow, additionalProperties=$additionalProperties}"
238+
"Kyb{beneficialOwnerEntities=$beneficialOwnerEntities, beneficialOwnerIndividuals=$beneficialOwnerIndividuals, businessEntity=$businessEntity, controlPerson=$controlPerson, kybPassedTimestamp=$kybPassedTimestamp, natureOfBusiness=$natureOfBusiness, tosTimestamp=$tosTimestamp, websiteUrl=$websiteUrl, workflow=$workflow, externalId=$externalId, additionalProperties=$additionalProperties}"
229239

230240
companion object {
231241

@@ -243,6 +253,7 @@ private constructor(
243253
private var tosTimestamp: JsonField<String> = JsonMissing.of()
244254
private var websiteUrl: JsonField<String> = JsonMissing.of()
245255
private var workflow: JsonField<Workflow> = JsonMissing.of()
256+
private var externalId: JsonField<String> = JsonMissing.of()
246257
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
247258

248259
@JvmSynthetic
@@ -256,6 +267,7 @@ private constructor(
256267
this.tosTimestamp = kyb.tosTimestamp
257268
this.websiteUrl = kyb.websiteUrl
258269
this.workflow = kyb.workflow
270+
this.externalId = kyb.externalId
259271
additionalProperties(kyb.additionalProperties)
260272
}
261273

@@ -424,6 +436,14 @@ private constructor(
424436
@ExcludeMissing
425437
fun workflow(workflow: JsonField<Workflow>) = apply { this.workflow = workflow }
426438

439+
/** A user provided id that can be used to link an account holder with an external system */
440+
fun externalId(externalId: String) = externalId(JsonField.of(externalId))
441+
442+
/** A user provided id that can be used to link an account holder with an external system */
443+
@JsonProperty("external_id")
444+
@ExcludeMissing
445+
fun externalId(externalId: JsonField<String>) = apply { this.externalId = externalId }
446+
427447
fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
428448
this.additionalProperties.clear()
429449
this.additionalProperties.putAll(additionalProperties)
@@ -449,6 +469,7 @@ private constructor(
449469
tosTimestamp,
450470
websiteUrl,
451471
workflow,
472+
externalId,
452473
additionalProperties.toUnmodifiable(),
453474
)
454475
}

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

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ private constructor(
2525
private val kycPassedTimestamp: JsonField<String>,
2626
private val tosTimestamp: JsonField<String>,
2727
private val workflow: JsonField<Workflow>,
28+
private val externalId: JsonField<String>,
2829
private val additionalProperties: Map<String, JsonValue>,
2930
) {
3031

@@ -54,6 +55,9 @@ private constructor(
5455
/** Specifies the type of KYC workflow to run. */
5556
fun workflow(): Workflow = workflow.getRequired("workflow")
5657

58+
/** A user provided id that can be used to link an account holder with an external system */
59+
fun externalId(): Optional<String> = Optional.ofNullable(externalId.getNullable("external_id"))
60+
5761
/** Information on individual for whom the account is being opened and KYC is being run. */
5862
@JsonProperty("individual") @ExcludeMissing fun _individual() = individual
5963

@@ -77,6 +81,9 @@ private constructor(
7781
/** Specifies the type of KYC workflow to run. */
7882
@JsonProperty("workflow") @ExcludeMissing fun _workflow() = workflow
7983

84+
/** A user provided id that can be used to link an account holder with an external system */
85+
@JsonProperty("external_id") @ExcludeMissing fun _externalId() = externalId
86+
8087
@JsonAnyGetter
8188
@ExcludeMissing
8289
fun _additionalProperties(): Map<String, JsonValue> = additionalProperties
@@ -87,6 +94,7 @@ private constructor(
8794
kycPassedTimestamp()
8895
tosTimestamp()
8996
workflow()
97+
externalId()
9098
validated = true
9199
}
92100
}
@@ -103,6 +111,7 @@ private constructor(
103111
this.kycPassedTimestamp == other.kycPassedTimestamp &&
104112
this.tosTimestamp == other.tosTimestamp &&
105113
this.workflow == other.workflow &&
114+
this.externalId == other.externalId &&
106115
this.additionalProperties == other.additionalProperties
107116
}
108117

@@ -114,14 +123,15 @@ private constructor(
114123
kycPassedTimestamp,
115124
tosTimestamp,
116125
workflow,
126+
externalId,
117127
additionalProperties,
118128
)
119129
}
120130
return hashCode
121131
}
122132

123133
override fun toString() =
124-
"Kyc{individual=$individual, kycPassedTimestamp=$kycPassedTimestamp, tosTimestamp=$tosTimestamp, workflow=$workflow, additionalProperties=$additionalProperties}"
134+
"Kyc{individual=$individual, kycPassedTimestamp=$kycPassedTimestamp, tosTimestamp=$tosTimestamp, workflow=$workflow, externalId=$externalId, additionalProperties=$additionalProperties}"
125135

126136
companion object {
127137

@@ -134,6 +144,7 @@ private constructor(
134144
private var kycPassedTimestamp: JsonField<String> = JsonMissing.of()
135145
private var tosTimestamp: JsonField<String> = JsonMissing.of()
136146
private var workflow: JsonField<Workflow> = JsonMissing.of()
147+
private var externalId: JsonField<String> = JsonMissing.of()
137148
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
138149

139150
@JvmSynthetic
@@ -142,6 +153,7 @@ private constructor(
142153
this.kycPassedTimestamp = kyc.kycPassedTimestamp
143154
this.tosTimestamp = kyc.tosTimestamp
144155
this.workflow = kyc.workflow
156+
this.externalId = kyc.externalId
145157
additionalProperties(kyc.additionalProperties)
146158
}
147159

@@ -200,6 +212,14 @@ private constructor(
200212
@ExcludeMissing
201213
fun workflow(workflow: JsonField<Workflow>) = apply { this.workflow = workflow }
202214

215+
/** A user provided id that can be used to link an account holder with an external system */
216+
fun externalId(externalId: String) = externalId(JsonField.of(externalId))
217+
218+
/** A user provided id that can be used to link an account holder with an external system */
219+
@JsonProperty("external_id")
220+
@ExcludeMissing
221+
fun externalId(externalId: JsonField<String>) = apply { this.externalId = externalId }
222+
203223
fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
204224
this.additionalProperties.clear()
205225
this.additionalProperties.putAll(additionalProperties)
@@ -220,6 +240,7 @@ private constructor(
220240
kycPassedTimestamp,
221241
tosTimestamp,
222242
workflow,
243+
externalId,
223244
additionalProperties.toUnmodifiable(),
224245
)
225246
}

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

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ private constructor(
2929
private val lastName: JsonField<String>,
3030
private val phoneNumber: JsonField<String>,
3131
private val workflow: JsonField<Workflow>,
32+
private val externalId: JsonField<String>,
3233
private val additionalProperties: Map<String, JsonValue>,
3334
) {
3435

@@ -68,6 +69,9 @@ private constructor(
6869
/** Specifies the workflow type. This must be 'KYC_EXEMPT' */
6970
fun workflow(): Workflow = workflow.getRequired("workflow")
7071

72+
/** A user provided id that can be used to link an account holder with an external system */
73+
fun externalId(): Optional<String> = Optional.ofNullable(externalId.getNullable("external_id"))
74+
7175
/**
7276
* KYC Exempt user's current address - PO boxes, UPS drops, and FedEx drops are not acceptable;
7377
* APO/FPO are acceptable. Only USA addresses are currently supported.
@@ -101,6 +105,9 @@ private constructor(
101105
/** Specifies the workflow type. This must be 'KYC_EXEMPT' */
102106
@JsonProperty("workflow") @ExcludeMissing fun _workflow() = workflow
103107

108+
/** A user provided id that can be used to link an account holder with an external system */
109+
@JsonProperty("external_id") @ExcludeMissing fun _externalId() = externalId
110+
104111
@JsonAnyGetter
105112
@ExcludeMissing
106113
fun _additionalProperties(): Map<String, JsonValue> = additionalProperties
@@ -115,6 +122,7 @@ private constructor(
115122
lastName()
116123
phoneNumber()
117124
workflow()
125+
externalId()
118126
validated = true
119127
}
120128
}
@@ -135,6 +143,7 @@ private constructor(
135143
this.lastName == other.lastName &&
136144
this.phoneNumber == other.phoneNumber &&
137145
this.workflow == other.workflow &&
146+
this.externalId == other.externalId &&
138147
this.additionalProperties == other.additionalProperties
139148
}
140149

@@ -150,14 +159,15 @@ private constructor(
150159
lastName,
151160
phoneNumber,
152161
workflow,
162+
externalId,
153163
additionalProperties,
154164
)
155165
}
156166
return hashCode
157167
}
158168

159169
override fun toString() =
160-
"KycExempt{address=$address, businessAccountToken=$businessAccountToken, email=$email, firstName=$firstName, kycExemptionType=$kycExemptionType, lastName=$lastName, phoneNumber=$phoneNumber, workflow=$workflow, additionalProperties=$additionalProperties}"
170+
"KycExempt{address=$address, businessAccountToken=$businessAccountToken, email=$email, firstName=$firstName, kycExemptionType=$kycExemptionType, lastName=$lastName, phoneNumber=$phoneNumber, workflow=$workflow, externalId=$externalId, additionalProperties=$additionalProperties}"
161171

162172
companion object {
163173

@@ -174,6 +184,7 @@ private constructor(
174184
private var lastName: JsonField<String> = JsonMissing.of()
175185
private var phoneNumber: JsonField<String> = JsonMissing.of()
176186
private var workflow: JsonField<Workflow> = JsonMissing.of()
187+
private var externalId: JsonField<String> = JsonMissing.of()
177188
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
178189

179190
@JvmSynthetic
@@ -186,6 +197,7 @@ private constructor(
186197
this.lastName = kycExempt.lastName
187198
this.phoneNumber = kycExempt.phoneNumber
188199
this.workflow = kycExempt.workflow
200+
this.externalId = kycExempt.externalId
189201
additionalProperties(kycExempt.additionalProperties)
190202
}
191203

@@ -273,6 +285,14 @@ private constructor(
273285
@ExcludeMissing
274286
fun workflow(workflow: JsonField<Workflow>) = apply { this.workflow = workflow }
275287

288+
/** A user provided id that can be used to link an account holder with an external system */
289+
fun externalId(externalId: String) = externalId(JsonField.of(externalId))
290+
291+
/** A user provided id that can be used to link an account holder with an external system */
292+
@JsonProperty("external_id")
293+
@ExcludeMissing
294+
fun externalId(externalId: JsonField<String>) = apply { this.externalId = externalId }
295+
276296
fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
277297
this.additionalProperties.clear()
278298
this.additionalProperties.putAll(additionalProperties)
@@ -297,6 +317,7 @@ private constructor(
297317
lastName,
298318
phoneNumber,
299319
workflow,
320+
externalId,
300321
additionalProperties.toUnmodifiable(),
301322
)
302323
}

0 commit comments

Comments
 (0)