Skip to content

Commit 1847269

Browse files
feat(api)!: deprecate 'auth rule token' in 'card' and 'account holder' models (#257)
## Migration The deprecated files will be removed in a future release. Use the `/auth_rules` endpoints to fetch Auth Rule information instead.
1 parent f0ed004 commit 1847269

49 files changed

Lines changed: 6414 additions & 49 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.

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
configured_endpoints: 122
1+
configured_endpoints: 127

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

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@ private constructor(
4040
fun accountHolder(): Optional<AccountHolder> =
4141
Optional.ofNullable(accountHolder.getNullable("account_holder"))
4242

43-
/** List of identifiers for the Auth Rule(s) that are applied on the account. */
43+
/**
44+
* List of identifiers for the Auth Rule(s) that are applied on the account. This field is
45+
* deprecated and will no longer be populated in the `account_holder` object. The key will be
46+
* removed from the schema in a future release. Use the `/auth_rules` endpoints to fetch Auth
47+
* Rule information instead.
48+
*/
4449
fun authRuleTokens(): Optional<List<String>> =
4550
Optional.ofNullable(authRuleTokens.getNullable("auth_rule_tokens"))
4651

@@ -81,7 +86,12 @@ private constructor(
8186

8287
@JsonProperty("account_holder") @ExcludeMissing fun _accountHolder() = accountHolder
8388

84-
/** List of identifiers for the Auth Rule(s) that are applied on the account. */
89+
/**
90+
* List of identifiers for the Auth Rule(s) that are applied on the account. This field is
91+
* deprecated and will no longer be populated in the `account_holder` object. The key will be
92+
* removed from the schema in a future release. Use the `/auth_rules` endpoints to fetch Auth
93+
* Rule information instead.
94+
*/
8595
@JsonProperty("auth_rule_tokens") @ExcludeMissing fun _authRuleTokens() = authRuleTokens
8696

8797
/**
@@ -211,11 +221,21 @@ private constructor(
211221
this.accountHolder = accountHolder
212222
}
213223

214-
/** List of identifiers for the Auth Rule(s) that are applied on the account. */
224+
/**
225+
* List of identifiers for the Auth Rule(s) that are applied on the account. This field is
226+
* deprecated and will no longer be populated in the `account_holder` object. The key will
227+
* be removed from the schema in a future release. Use the `/auth_rules` endpoints to fetch
228+
* Auth Rule information instead.
229+
*/
215230
fun authRuleTokens(authRuleTokens: List<String>) =
216231
authRuleTokens(JsonField.of(authRuleTokens))
217232

218-
/** List of identifiers for the Auth Rule(s) that are applied on the account. */
233+
/**
234+
* List of identifiers for the Auth Rule(s) that are applied on the account. This field is
235+
* deprecated and will no longer be populated in the `account_holder` object. The key will
236+
* be removed from the schema in a future release. Use the `/auth_rules` endpoints to fetch
237+
* Auth Rule information instead.
238+
*/
219239
@JsonProperty("auth_rule_tokens")
220240
@ExcludeMissing
221241
fun authRuleTokens(authRuleTokens: JsonField<List<String>>) = apply {

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

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,12 @@ private constructor(
5252
/** Globally unique identifier for the account to which the card belongs. */
5353
fun accountToken(): String = accountToken.getRequired("account_token")
5454

55-
/** List of identifiers for the Auth Rule(s) that are applied on the card. */
55+
/**
56+
* List of identifiers for the Auth Rule(s) that are applied on the card. This field is
57+
* deprecated and will no longer be populated in the `Card` object. The key will be removed from
58+
* the schema in a future release. Use the `/auth_rules` endpoints to fetch Auth Rule
59+
* information instead.
60+
*/
5661
fun authRuleTokens(): Optional<List<String>> =
5762
Optional.ofNullable(authRuleTokens.getNullable("auth_rule_tokens"))
5863

@@ -167,7 +172,12 @@ private constructor(
167172
/** Globally unique identifier for the account to which the card belongs. */
168173
@JsonProperty("account_token") @ExcludeMissing fun _accountToken() = accountToken
169174

170-
/** List of identifiers for the Auth Rule(s) that are applied on the card. */
175+
/**
176+
* List of identifiers for the Auth Rule(s) that are applied on the card. This field is
177+
* deprecated and will no longer be populated in the `Card` object. The key will be removed from
178+
* the schema in a future release. Use the `/auth_rules` endpoints to fetch Auth Rule
179+
* information instead.
180+
*/
171181
@JsonProperty("auth_rule_tokens") @ExcludeMissing fun _authRuleTokens() = authRuleTokens
172182

173183
/** Globally unique identifier for the card program on which the card exists. */
@@ -433,11 +443,21 @@ private constructor(
433443
this.accountToken = accountToken
434444
}
435445

436-
/** List of identifiers for the Auth Rule(s) that are applied on the card. */
446+
/**
447+
* List of identifiers for the Auth Rule(s) that are applied on the card. This field is
448+
* deprecated and will no longer be populated in the `Card` object. The key will be removed
449+
* from the schema in a future release. Use the `/auth_rules` endpoints to fetch Auth Rule
450+
* information instead.
451+
*/
437452
fun authRuleTokens(authRuleTokens: List<String>) =
438453
authRuleTokens(JsonField.of(authRuleTokens))
439454

440-
/** List of identifiers for the Auth Rule(s) that are applied on the card. */
455+
/**
456+
* List of identifiers for the Auth Rule(s) that are applied on the card. This field is
457+
* deprecated and will no longer be populated in the `Card` object. The key will be removed
458+
* from the schema in a future release. Use the `/auth_rules` endpoints to fetch Auth Rule
459+
* information instead.
460+
*/
441461
@JsonProperty("auth_rule_tokens")
442462
@ExcludeMissing
443463
fun authRuleTokens(authRuleTokens: JsonField<List<String>>) = apply {

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

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import java.util.Optional
2121
class CardUpdateParams
2222
constructor(
2323
private val cardToken: String,
24-
private val authRuleToken: String?,
2524
private val digitalCardArtToken: String?,
2625
private val memo: String?,
2726
private val pin: String?,
@@ -35,8 +34,6 @@ constructor(
3534

3635
fun cardToken(): String = cardToken
3736

38-
fun authRuleToken(): Optional<String> = Optional.ofNullable(authRuleToken)
39-
4037
fun digitalCardArtToken(): Optional<String> = Optional.ofNullable(digitalCardArtToken)
4138

4239
fun memo(): Optional<String> = Optional.ofNullable(memo)
@@ -52,7 +49,6 @@ constructor(
5249
@JvmSynthetic
5350
internal fun getBody(): CardUpdateBody {
5451
return CardUpdateBody(
55-
authRuleToken,
5652
digitalCardArtToken,
5753
memo,
5854
pin,
@@ -78,7 +74,6 @@ constructor(
7874
@NoAutoDetect
7975
class CardUpdateBody
8076
internal constructor(
81-
private val authRuleToken: String?,
8277
private val digitalCardArtToken: String?,
8378
private val memo: String?,
8479
private val pin: String?,
@@ -90,12 +85,6 @@ constructor(
9085

9186
private var hashCode: Int = 0
9287

93-
/**
94-
* Identifier for any Auth Rules that will be applied to transactions taking place with the
95-
* card.
96-
*/
97-
@JsonProperty("auth_rule_token") fun authRuleToken(): String? = authRuleToken
98-
9988
/**
10089
* Specifies the digital card art to be displayed in the user’s digital wallet after
10190
* tokenization. This artwork must be approved by Mastercard and configured by Lithic to
@@ -161,7 +150,6 @@ constructor(
161150
}
162151

163152
return other is CardUpdateBody &&
164-
this.authRuleToken == other.authRuleToken &&
165153
this.digitalCardArtToken == other.digitalCardArtToken &&
166154
this.memo == other.memo &&
167155
this.pin == other.pin &&
@@ -175,7 +163,6 @@ constructor(
175163
if (hashCode == 0) {
176164
hashCode =
177165
Objects.hash(
178-
authRuleToken,
179166
digitalCardArtToken,
180167
memo,
181168
pin,
@@ -189,7 +176,7 @@ constructor(
189176
}
190177

191178
override fun toString() =
192-
"CardUpdateBody{authRuleToken=$authRuleToken, digitalCardArtToken=$digitalCardArtToken, memo=$memo, pin=$pin, spendLimit=$spendLimit, spendLimitDuration=$spendLimitDuration, state=$state, additionalProperties=$additionalProperties}"
179+
"CardUpdateBody{digitalCardArtToken=$digitalCardArtToken, memo=$memo, pin=$pin, spendLimit=$spendLimit, spendLimitDuration=$spendLimitDuration, state=$state, additionalProperties=$additionalProperties}"
193180

194181
companion object {
195182

@@ -198,7 +185,6 @@ constructor(
198185

199186
class Builder {
200187

201-
private var authRuleToken: String? = null
202188
private var digitalCardArtToken: String? = null
203189
private var memo: String? = null
204190
private var pin: String? = null
@@ -209,7 +195,6 @@ constructor(
209195

210196
@JvmSynthetic
211197
internal fun from(cardUpdateBody: CardUpdateBody) = apply {
212-
this.authRuleToken = cardUpdateBody.authRuleToken
213198
this.digitalCardArtToken = cardUpdateBody.digitalCardArtToken
214199
this.memo = cardUpdateBody.memo
215200
this.pin = cardUpdateBody.pin
@@ -219,13 +204,6 @@ constructor(
219204
additionalProperties(cardUpdateBody.additionalProperties)
220205
}
221206

222-
/**
223-
* Identifier for any Auth Rules that will be applied to transactions taking place with
224-
* the card.
225-
*/
226-
@JsonProperty("auth_rule_token")
227-
fun authRuleToken(authRuleToken: String) = apply { this.authRuleToken = authRuleToken }
228-
229207
/**
230208
* Specifies the digital card art to be displayed in the user’s digital wallet after
231209
* tokenization. This artwork must be approved by Mastercard and configured by Lithic to
@@ -303,7 +281,6 @@ constructor(
303281

304282
fun build(): CardUpdateBody =
305283
CardUpdateBody(
306-
authRuleToken,
307284
digitalCardArtToken,
308285
memo,
309286
pin,
@@ -328,7 +305,6 @@ constructor(
328305

329306
return other is CardUpdateParams &&
330307
this.cardToken == other.cardToken &&
331-
this.authRuleToken == other.authRuleToken &&
332308
this.digitalCardArtToken == other.digitalCardArtToken &&
333309
this.memo == other.memo &&
334310
this.pin == other.pin &&
@@ -343,7 +319,6 @@ constructor(
343319
override fun hashCode(): Int {
344320
return Objects.hash(
345321
cardToken,
346-
authRuleToken,
347322
digitalCardArtToken,
348323
memo,
349324
pin,
@@ -357,7 +332,7 @@ constructor(
357332
}
358333

359334
override fun toString() =
360-
"CardUpdateParams{cardToken=$cardToken, authRuleToken=$authRuleToken, digitalCardArtToken=$digitalCardArtToken, memo=$memo, pin=$pin, spendLimit=$spendLimit, spendLimitDuration=$spendLimitDuration, state=$state, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}"
335+
"CardUpdateParams{cardToken=$cardToken, digitalCardArtToken=$digitalCardArtToken, memo=$memo, pin=$pin, spendLimit=$spendLimit, spendLimitDuration=$spendLimitDuration, state=$state, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}"
361336

362337
fun toBuilder() = Builder().from(this)
363338

@@ -370,7 +345,6 @@ constructor(
370345
class Builder {
371346

372347
private var cardToken: String? = null
373-
private var authRuleToken: String? = null
374348
private var digitalCardArtToken: String? = null
375349
private var memo: String? = null
376350
private var pin: String? = null
@@ -384,7 +358,6 @@ constructor(
384358
@JvmSynthetic
385359
internal fun from(cardUpdateParams: CardUpdateParams) = apply {
386360
this.cardToken = cardUpdateParams.cardToken
387-
this.authRuleToken = cardUpdateParams.authRuleToken
388361
this.digitalCardArtToken = cardUpdateParams.digitalCardArtToken
389362
this.memo = cardUpdateParams.memo
390363
this.pin = cardUpdateParams.pin
@@ -398,12 +371,6 @@ constructor(
398371

399372
fun cardToken(cardToken: String) = apply { this.cardToken = cardToken }
400373

401-
/**
402-
* Identifier for any Auth Rules that will be applied to transactions taking place with the
403-
* card.
404-
*/
405-
fun authRuleToken(authRuleToken: String) = apply { this.authRuleToken = authRuleToken }
406-
407374
/**
408375
* Specifies the digital card art to be displayed in the user’s digital wallet after
409376
* tokenization. This artwork must be approved by Mastercard and configured by Lithic to
@@ -516,7 +483,6 @@ constructor(
516483
fun build(): CardUpdateParams =
517484
CardUpdateParams(
518485
checkNotNull(cardToken) { "`cardToken` is required but was not set" },
519-
authRuleToken,
520486
digitalCardArtToken,
521487
memo,
522488
pin,

0 commit comments

Comments
 (0)