Skip to content

Commit 5e1e7b0

Browse files
feat(api): updates
feat(api): updates
1 parent ead6b82 commit 5e1e7b0

13 files changed

Lines changed: 178 additions & 17 deletions

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

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class AccountHolder
2121
private constructor(
2222
private val token: JsonField<String>,
2323
private val accountToken: JsonField<String>,
24+
private val businessAccountToken: JsonField<String>,
2425
private val status: JsonField<Status>,
2526
private val statusReasons: JsonField<List<StatusReason>>,
2627
private val additionalProperties: Map<String, JsonValue>,
@@ -37,6 +38,14 @@ private constructor(
3738
fun accountToken(): Optional<String> =
3839
Optional.ofNullable(accountToken.getNullable("account_token"))
3940

41+
/**
42+
* Only applicable for customers using the KYC-Exempt workflow to enroll authorized users of
43+
* businesses. Pass the account_token of the enrolled business associated with the
44+
* AUTHORIZED_USER in this field.
45+
*/
46+
fun businessAccountToken(): Optional<String> =
47+
Optional.ofNullable(businessAccountToken.getNullable("business_account_token"))
48+
4049
/**
4150
* KYC and KYB evaluation states.
4251
*
@@ -55,6 +64,15 @@ private constructor(
5564
/** Globally unique identifier for the account. */
5665
@JsonProperty("account_token") @ExcludeMissing fun _accountToken() = accountToken
5766

67+
/**
68+
* Only applicable for customers using the KYC-Exempt workflow to enroll authorized users of
69+
* businesses. Pass the account_token of the enrolled business associated with the
70+
* AUTHORIZED_USER in this field.
71+
*/
72+
@JsonProperty("business_account_token")
73+
@ExcludeMissing
74+
fun _businessAccountToken() = businessAccountToken
75+
5876
/**
5977
* KYC and KYB evaluation states.
6078
*
@@ -74,6 +92,7 @@ private constructor(
7492
if (!validated) {
7593
token()
7694
accountToken()
95+
businessAccountToken()
7796
status()
7897
statusReasons()
7998
validated = true
@@ -90,6 +109,7 @@ private constructor(
90109
return other is AccountHolder &&
91110
this.token == other.token &&
92111
this.accountToken == other.accountToken &&
112+
this.businessAccountToken == other.businessAccountToken &&
93113
this.status == other.status &&
94114
this.statusReasons == other.statusReasons &&
95115
this.additionalProperties == other.additionalProperties
@@ -101,6 +121,7 @@ private constructor(
101121
Objects.hash(
102122
token,
103123
accountToken,
124+
businessAccountToken,
104125
status,
105126
statusReasons,
106127
additionalProperties,
@@ -110,7 +131,7 @@ private constructor(
110131
}
111132

112133
override fun toString() =
113-
"AccountHolder{token=$token, accountToken=$accountToken, status=$status, statusReasons=$statusReasons, additionalProperties=$additionalProperties}"
134+
"AccountHolder{token=$token, accountToken=$accountToken, businessAccountToken=$businessAccountToken, status=$status, statusReasons=$statusReasons, additionalProperties=$additionalProperties}"
114135

115136
companion object {
116137

@@ -121,6 +142,7 @@ private constructor(
121142

122143
private var token: JsonField<String> = JsonMissing.of()
123144
private var accountToken: JsonField<String> = JsonMissing.of()
145+
private var businessAccountToken: JsonField<String> = JsonMissing.of()
124146
private var status: JsonField<Status> = JsonMissing.of()
125147
private var statusReasons: JsonField<List<StatusReason>> = JsonMissing.of()
126148
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
@@ -129,6 +151,7 @@ private constructor(
129151
internal fun from(accountHolder: AccountHolder) = apply {
130152
this.token = accountHolder.token
131153
this.accountToken = accountHolder.accountToken
154+
this.businessAccountToken = accountHolder.businessAccountToken
132155
this.status = accountHolder.status
133156
this.statusReasons = accountHolder.statusReasons
134157
additionalProperties(accountHolder.additionalProperties)
@@ -152,6 +175,25 @@ private constructor(
152175
this.accountToken = accountToken
153176
}
154177

178+
/**
179+
* Only applicable for customers using the KYC-Exempt workflow to enroll authorized users of
180+
* businesses. Pass the account_token of the enrolled business associated with the
181+
* AUTHORIZED_USER in this field.
182+
*/
183+
fun businessAccountToken(businessAccountToken: String) =
184+
businessAccountToken(JsonField.of(businessAccountToken))
185+
186+
/**
187+
* Only applicable for customers using the KYC-Exempt workflow to enroll authorized users of
188+
* businesses. Pass the account_token of the enrolled business associated with the
189+
* AUTHORIZED_USER in this field.
190+
*/
191+
@JsonProperty("business_account_token")
192+
@ExcludeMissing
193+
fun businessAccountToken(businessAccountToken: JsonField<String>) = apply {
194+
this.businessAccountToken = businessAccountToken
195+
}
196+
155197
/**
156198
* KYC and KYB evaluation states.
157199
*
@@ -199,6 +241,7 @@ private constructor(
199241
AccountHolder(
200242
token,
201243
accountToken,
244+
businessAccountToken,
202245
status,
203246
statusReasons.map { it.toUnmodifiable() },
204247
additionalProperties.toUnmodifiable(),

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

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1419,6 +1419,7 @@ constructor(
14191419
private val lastName: String?,
14201420
private val email: String?,
14211421
private val phoneNumber: String?,
1422+
private val businessAccountToken: String?,
14221423
private val address: Address?,
14231424
private val additionalProperties: Map<String, JsonValue>,
14241425
) {
@@ -1444,6 +1445,14 @@ constructor(
14441445
/** The KYC Exempt user's phone number */
14451446
@JsonProperty("phone_number") fun phoneNumber(): String? = phoneNumber
14461447

1448+
/**
1449+
* Only applicable for customers using the KYC-Exempt workflow to enroll authorized users of
1450+
* businesses. Pass the account_token of the enrolled business associated with the
1451+
* AUTHORIZED_USER in this field.
1452+
*/
1453+
@JsonProperty("business_account_token")
1454+
fun businessAccountToken(): String? = businessAccountToken
1455+
14471456
/**
14481457
* KYC Exempt user's current address - PO boxes, UPS drops, and FedEx drops are not
14491458
* acceptable; APO/FPO are acceptable. Only USA addresses are currently supported.
@@ -1468,6 +1477,7 @@ constructor(
14681477
this.lastName == other.lastName &&
14691478
this.email == other.email &&
14701479
this.phoneNumber == other.phoneNumber &&
1480+
this.businessAccountToken == other.businessAccountToken &&
14711481
this.address == other.address &&
14721482
this.additionalProperties == other.additionalProperties
14731483
}
@@ -1482,6 +1492,7 @@ constructor(
14821492
lastName,
14831493
email,
14841494
phoneNumber,
1495+
businessAccountToken,
14851496
address,
14861497
additionalProperties,
14871498
)
@@ -1490,7 +1501,7 @@ constructor(
14901501
}
14911502

14921503
override fun toString() =
1493-
"KycExempt{workflow=$workflow, kycExemptionType=$kycExemptionType, firstName=$firstName, lastName=$lastName, email=$email, phoneNumber=$phoneNumber, address=$address, additionalProperties=$additionalProperties}"
1504+
"KycExempt{workflow=$workflow, kycExemptionType=$kycExemptionType, firstName=$firstName, lastName=$lastName, email=$email, phoneNumber=$phoneNumber, businessAccountToken=$businessAccountToken, address=$address, additionalProperties=$additionalProperties}"
14941505

14951506
companion object {
14961507

@@ -1505,6 +1516,7 @@ constructor(
15051516
private var lastName: String? = null
15061517
private var email: String? = null
15071518
private var phoneNumber: String? = null
1519+
private var businessAccountToken: String? = null
15081520
private var address: Address? = null
15091521
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
15101522

@@ -1516,6 +1528,7 @@ constructor(
15161528
this.lastName = kycExempt.lastName
15171529
this.email = kycExempt.email
15181530
this.phoneNumber = kycExempt.phoneNumber
1531+
this.businessAccountToken = kycExempt.businessAccountToken
15191532
this.address = kycExempt.address
15201533
additionalProperties(kycExempt.additionalProperties)
15211534
}
@@ -1545,6 +1558,16 @@ constructor(
15451558
@JsonProperty("phone_number")
15461559
fun phoneNumber(phoneNumber: String) = apply { this.phoneNumber = phoneNumber }
15471560

1561+
/**
1562+
* Only applicable for customers using the KYC-Exempt workflow to enroll authorized
1563+
* users of businesses. Pass the account_token of the enrolled business associated with
1564+
* the AUTHORIZED_USER in this field.
1565+
*/
1566+
@JsonProperty("business_account_token")
1567+
fun businessAccountToken(businessAccountToken: String) = apply {
1568+
this.businessAccountToken = businessAccountToken
1569+
}
1570+
15481571
/**
15491572
* KYC Exempt user's current address - PO boxes, UPS drops, and FedEx drops are not
15501573
* acceptable; APO/FPO are acceptable. Only USA addresses are currently supported.
@@ -1576,6 +1599,7 @@ constructor(
15761599
checkNotNull(lastName) { "`lastName` is required but was not set" },
15771600
checkNotNull(email) { "`email` is required but was not set" },
15781601
checkNotNull(phoneNumber) { "`phoneNumber` is required but was not set" },
1602+
businessAccountToken,
15791603
address,
15801604
additionalProperties.toUnmodifiable(),
15811605
)

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

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ constructor(
1717
private val accountHolderToken: String,
1818
private val email: String?,
1919
private val phoneNumber: String?,
20+
private val businessAccountToken: String?,
2021
private val additionalQueryParams: Map<String, List<String>>,
2122
private val additionalHeaders: Map<String, List<String>>,
2223
private val additionalBodyProperties: Map<String, JsonValue>,
@@ -28,11 +29,14 @@ constructor(
2829

2930
fun phoneNumber(): Optional<String> = Optional.ofNullable(phoneNumber)
3031

32+
fun businessAccountToken(): Optional<String> = Optional.ofNullable(businessAccountToken)
33+
3134
@JvmSynthetic
3235
internal fun getBody(): AccountHolderUpdateBody {
3336
return AccountHolderUpdateBody(
3437
email,
3538
phoneNumber,
39+
businessAccountToken,
3640
additionalBodyProperties,
3741
)
3842
}
@@ -54,6 +58,7 @@ constructor(
5458
internal constructor(
5559
private val email: String?,
5660
private val phoneNumber: String?,
61+
private val businessAccountToken: String?,
5762
private val additionalProperties: Map<String, JsonValue>,
5863
) {
5964

@@ -72,6 +77,14 @@ constructor(
7277
*/
7378
@JsonProperty("phone_number") fun phoneNumber(): String? = phoneNumber
7479

80+
/**
81+
* Only applicable for customers using the KYC-Exempt workflow to enroll authorized users of
82+
* businesses. Pass the account_token of the enrolled business associated with the
83+
* AUTHORIZED_USER in this field.
84+
*/
85+
@JsonProperty("business_account_token")
86+
fun businessAccountToken(): String? = businessAccountToken
87+
7588
@JsonAnyGetter
7689
@ExcludeMissing
7790
fun _additionalProperties(): Map<String, JsonValue> = additionalProperties
@@ -86,6 +99,7 @@ constructor(
8699
return other is AccountHolderUpdateBody &&
87100
this.email == other.email &&
88101
this.phoneNumber == other.phoneNumber &&
102+
this.businessAccountToken == other.businessAccountToken &&
89103
this.additionalProperties == other.additionalProperties
90104
}
91105

@@ -95,14 +109,15 @@ constructor(
95109
Objects.hash(
96110
email,
97111
phoneNumber,
112+
businessAccountToken,
98113
additionalProperties,
99114
)
100115
}
101116
return hashCode
102117
}
103118

104119
override fun toString() =
105-
"AccountHolderUpdateBody{email=$email, phoneNumber=$phoneNumber, additionalProperties=$additionalProperties}"
120+
"AccountHolderUpdateBody{email=$email, phoneNumber=$phoneNumber, businessAccountToken=$businessAccountToken, additionalProperties=$additionalProperties}"
106121

107122
companion object {
108123

@@ -113,12 +128,14 @@ constructor(
113128

114129
private var email: String? = null
115130
private var phoneNumber: String? = null
131+
private var businessAccountToken: String? = null
116132
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
117133

118134
@JvmSynthetic
119135
internal fun from(accountHolderUpdateBody: AccountHolderUpdateBody) = apply {
120136
this.email = accountHolderUpdateBody.email
121137
this.phoneNumber = accountHolderUpdateBody.phoneNumber
138+
this.businessAccountToken = accountHolderUpdateBody.businessAccountToken
122139
additionalProperties(accountHolderUpdateBody.additionalProperties)
123140
}
124141

@@ -136,6 +153,16 @@ constructor(
136153
@JsonProperty("phone_number")
137154
fun phoneNumber(phoneNumber: String) = apply { this.phoneNumber = phoneNumber }
138155

156+
/**
157+
* Only applicable for customers using the KYC-Exempt workflow to enroll authorized
158+
* users of businesses. Pass the account_token of the enrolled business associated with
159+
* the AUTHORIZED_USER in this field.
160+
*/
161+
@JsonProperty("business_account_token")
162+
fun businessAccountToken(businessAccountToken: String) = apply {
163+
this.businessAccountToken = businessAccountToken
164+
}
165+
139166
fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
140167
this.additionalProperties.clear()
141168
this.additionalProperties.putAll(additionalProperties)
@@ -154,6 +181,7 @@ constructor(
154181
AccountHolderUpdateBody(
155182
email,
156183
phoneNumber,
184+
businessAccountToken,
157185
additionalProperties.toUnmodifiable(),
158186
)
159187
}
@@ -174,6 +202,7 @@ constructor(
174202
this.accountHolderToken == other.accountHolderToken &&
175203
this.email == other.email &&
176204
this.phoneNumber == other.phoneNumber &&
205+
this.businessAccountToken == other.businessAccountToken &&
177206
this.additionalQueryParams == other.additionalQueryParams &&
178207
this.additionalHeaders == other.additionalHeaders &&
179208
this.additionalBodyProperties == other.additionalBodyProperties
@@ -184,14 +213,15 @@ constructor(
184213
accountHolderToken,
185214
email,
186215
phoneNumber,
216+
businessAccountToken,
187217
additionalQueryParams,
188218
additionalHeaders,
189219
additionalBodyProperties,
190220
)
191221
}
192222

193223
override fun toString() =
194-
"AccountHolderUpdateParams{accountHolderToken=$accountHolderToken, email=$email, phoneNumber=$phoneNumber, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}"
224+
"AccountHolderUpdateParams{accountHolderToken=$accountHolderToken, email=$email, phoneNumber=$phoneNumber, businessAccountToken=$businessAccountToken, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}"
195225

196226
fun toBuilder() = Builder().from(this)
197227

@@ -206,6 +236,7 @@ constructor(
206236
private var accountHolderToken: String? = null
207237
private var email: String? = null
208238
private var phoneNumber: String? = null
239+
private var businessAccountToken: String? = null
209240
private var additionalQueryParams: MutableMap<String, MutableList<String>> = mutableMapOf()
210241
private var additionalHeaders: MutableMap<String, MutableList<String>> = mutableMapOf()
211242
private var additionalBodyProperties: MutableMap<String, JsonValue> = mutableMapOf()
@@ -215,6 +246,7 @@ constructor(
215246
this.accountHolderToken = accountHolderUpdateParams.accountHolderToken
216247
this.email = accountHolderUpdateParams.email
217248
this.phoneNumber = accountHolderUpdateParams.phoneNumber
249+
this.businessAccountToken = accountHolderUpdateParams.businessAccountToken
218250
additionalQueryParams(accountHolderUpdateParams.additionalQueryParams)
219251
additionalHeaders(accountHolderUpdateParams.additionalHeaders)
220252
additionalBodyProperties(accountHolderUpdateParams.additionalBodyProperties)
@@ -237,6 +269,15 @@ constructor(
237269
*/
238270
fun phoneNumber(phoneNumber: String) = apply { this.phoneNumber = phoneNumber }
239271

272+
/**
273+
* Only applicable for customers using the KYC-Exempt workflow to enroll authorized users of
274+
* businesses. Pass the account_token of the enrolled business associated with the
275+
* AUTHORIZED_USER in this field.
276+
*/
277+
fun businessAccountToken(businessAccountToken: String) = apply {
278+
this.businessAccountToken = businessAccountToken
279+
}
280+
240281
fun additionalQueryParams(additionalQueryParams: Map<String, List<String>>) = apply {
241282
this.additionalQueryParams.clear()
242283
putAllQueryParams(additionalQueryParams)
@@ -298,6 +339,7 @@ constructor(
298339
},
299340
email,
300341
phoneNumber,
342+
businessAccountToken,
301343
additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
302344
additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
303345
additionalBodyProperties.toUnmodifiable(),

0 commit comments

Comments
 (0)