Skip to content

Commit b6c52f0

Browse files
feat(api): add method field and enum values to authorization challenge types
1 parent 1839dc3 commit b6c52f0

12 files changed

Lines changed: 247 additions & 25 deletions

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 194
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-711671459efe47bdb250c7ac893569af9b9e1b7c60ded53a77627be76e300a02.yml
3-
openapi_spec_hash: 193dc8a880e100bb74b493de7d4703e1
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-9350b3c0a9a4fc31e1cac88e705f1ac6895108360ba8f7845a8da20db825f82e.yml
3+
openapi_spec_hash: c99714470f6321912e8022434a861897
44
config_hash: 1c5c139a2aa0d1d45c063f953a9bc803

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

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

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,12 +489,15 @@ private constructor(
489489

490490
@JvmField val SMS = of("SMS")
491491

492+
@JvmField val OUT_OF_BAND = of("OUT_OF_BAND")
493+
492494
@JvmStatic fun of(value: String) = ChallengeMethod(JsonField.of(value))
493495
}
494496

495497
/** An enum containing [ChallengeMethod]'s known values. */
496498
enum class Known {
497-
SMS
499+
SMS,
500+
OUT_OF_BAND,
498501
}
499502

500503
/**
@@ -508,6 +511,7 @@ private constructor(
508511
*/
509512
enum class Value {
510513
SMS,
514+
OUT_OF_BAND,
511515
/**
512516
* An enum member indicating that [ChallengeMethod] was instantiated with an unknown
513517
* value.
@@ -525,6 +529,7 @@ private constructor(
525529
fun value(): Value =
526530
when (this) {
527531
SMS -> Value.SMS
532+
OUT_OF_BAND -> Value.OUT_OF_BAND
528533
else -> Value._UNKNOWN
529534
}
530535

@@ -540,6 +545,7 @@ private constructor(
540545
fun known(): Known =
541546
when (this) {
542547
SMS -> Known.SMS
548+
OUT_OF_BAND -> Known.OUT_OF_BAND
543549
else -> throw LithicInvalidDataException("Unknown ChallengeMethod: $value")
544550
}
545551

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ private constructor(
7676
* authorization. The card program should issue its own challenge to the cardholder and then
7777
* respond via
7878
* [/v1/card_authorizations/{event_token}/challenge_response](https://docs.lithic.com/reference/respondtoauthorizationchallenge).
79-
* - card_authorization.challenge_response: Occurs when a cardholder responds to an SMS
80-
* challenge during card authorization.
79+
* - card_authorization.challenge_response: Occurs when a cardholder responds to a challenge
80+
* during card authorization.
8181
* - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial data is
8282
* processed for a transaction event.
8383
* - card_transaction.enhanced_data.updated: Occurs when L2/L3 enhanced commercial data is
@@ -278,8 +278,8 @@ private constructor(
278278
* card authorization. The card program should issue its own challenge to the cardholder
279279
* and then respond via
280280
* [/v1/card_authorizations/{event_token}/challenge_response](https://docs.lithic.com/reference/respondtoauthorizationchallenge).
281-
* - card_authorization.challenge_response: Occurs when a cardholder responds to an SMS
282-
* challenge during card authorization.
281+
* - card_authorization.challenge_response: Occurs when a cardholder responds to a challenge
282+
* during card authorization.
283283
* - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial data is
284284
* processed for a transaction event.
285285
* - card_transaction.enhanced_data.updated: Occurs when L2/L3 enhanced commercial data is
@@ -477,8 +477,8 @@ private constructor(
477477
* authorization. The card program should issue its own challenge to the cardholder and then
478478
* respond via
479479
* [/v1/card_authorizations/{event_token}/challenge_response](https://docs.lithic.com/reference/respondtoauthorizationchallenge).
480-
* - card_authorization.challenge_response: Occurs when a cardholder responds to an SMS
481-
* challenge during card authorization.
480+
* - card_authorization.challenge_response: Occurs when a cardholder responds to a challenge
481+
* during card authorization.
482482
* - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial data is
483483
* processed for a transaction event.
484484
* - card_transaction.enhanced_data.updated: Occurs when L2/L3 enhanced commercial data is

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,8 @@ private constructor(
334334
* authorization. The card program should issue its own challenge to the cardholder and then
335335
* respond via
336336
* [/v1/card_authorizations/{event_token}/challenge_response](https://docs.lithic.com/reference/respondtoauthorizationchallenge).
337-
* - card_authorization.challenge_response: Occurs when a cardholder responds to an SMS
338-
* challenge during card authorization.
337+
* - card_authorization.challenge_response: Occurs when a cardholder responds to a challenge
338+
* during card authorization.
339339
* - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial data is
340340
* processed for a transaction event.
341341
* - card_transaction.enhanced_data.updated: Occurs when L2/L3 enhanced commercial data is

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,8 @@ private constructor(
344344
* authorization. The card program should issue its own challenge to the cardholder and then
345345
* respond via
346346
* [/v1/card_authorizations/{event_token}/challenge_response](https://docs.lithic.com/reference/respondtoauthorizationchallenge).
347-
* - card_authorization.challenge_response: Occurs when a cardholder responds to an SMS
348-
* challenge during card authorization.
347+
* - card_authorization.challenge_response: Occurs when a cardholder responds to a challenge
348+
* during card authorization.
349349
* - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial data is
350350
* processed for a transaction event.
351351
* - card_transaction.enhanced_data.updated: Occurs when L2/L3 enhanced commercial data is

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -667,8 +667,8 @@ private constructor(
667667
* authorization. The card program should issue its own challenge to the cardholder and then
668668
* respond via
669669
* [/v1/card_authorizations/{event_token}/challenge_response](https://docs.lithic.com/reference/respondtoauthorizationchallenge).
670-
* - card_authorization.challenge_response: Occurs when a cardholder responds to an SMS
671-
* challenge during card authorization.
670+
* - card_authorization.challenge_response: Occurs when a cardholder responds to a challenge
671+
* during card authorization.
672672
* - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial data is
673673
* processed for a transaction event.
674674
* - card_transaction.enhanced_data.updated: Occurs when L2/L3 enhanced commercial data is

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -690,8 +690,8 @@ private constructor(
690690
* authorization. The card program should issue its own challenge to the cardholder and then
691691
* respond via
692692
* [/v1/card_authorizations/{event_token}/challenge_response](https://docs.lithic.com/reference/respondtoauthorizationchallenge).
693-
* - card_authorization.challenge_response: Occurs when a cardholder responds to an SMS
694-
* challenge during card authorization.
693+
* - card_authorization.challenge_response: Occurs when a cardholder responds to a challenge
694+
* during card authorization.
695695
* - card_transaction.enhanced_data.created: Occurs when L2/L3 enhanced commercial data is
696696
* processed for a transaction event.
697697
* - card_transaction.enhanced_data.updated: Occurs when L2/L3 enhanced commercial data is

lithic-java-core/src/test/kotlin/com/lithic/api/models/CardAuthorizationApprovalRequestWebhookEventTest.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ internal class CardAuthorizationApprovalRequestWebhookEventTest {
128128
)
129129
.latestChallenge(
130130
CardAuthorization.LatestChallenge.builder()
131+
.method(CardAuthorization.LatestChallenge.Method.SMS)
131132
.phoneNumber("phone_number")
132133
.status(CardAuthorization.LatestChallenge.Status.COMPLETED)
133134
.completedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
@@ -330,6 +331,7 @@ internal class CardAuthorizationApprovalRequestWebhookEventTest {
330331
assertThat(cardAuthorizationApprovalRequestWebhookEvent.latestChallenge())
331332
.contains(
332333
CardAuthorization.LatestChallenge.builder()
334+
.method(CardAuthorization.LatestChallenge.Method.SMS)
333335
.phoneNumber("phone_number")
334336
.status(CardAuthorization.LatestChallenge.Status.COMPLETED)
335337
.completedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
@@ -526,6 +528,7 @@ internal class CardAuthorizationApprovalRequestWebhookEventTest {
526528
)
527529
.latestChallenge(
528530
CardAuthorization.LatestChallenge.builder()
531+
.method(CardAuthorization.LatestChallenge.Method.SMS)
529532
.phoneNumber("phone_number")
530533
.status(CardAuthorization.LatestChallenge.Status.COMPLETED)
531534
.completedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))

lithic-java-core/src/test/kotlin/com/lithic/api/models/CardAuthorizationChallengeWebhookEventTest.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ internal class CardAuthorizationChallengeWebhookEventTest {
136136
)
137137
.latestChallenge(
138138
CardAuthorization.LatestChallenge.builder()
139+
.method(CardAuthorization.LatestChallenge.Method.SMS)
139140
.phoneNumber("phone_number")
140141
.status(CardAuthorization.LatestChallenge.Status.COMPLETED)
141142
.completedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
@@ -352,6 +353,7 @@ internal class CardAuthorizationChallengeWebhookEventTest {
352353
)
353354
.latestChallenge(
354355
CardAuthorization.LatestChallenge.builder()
356+
.method(CardAuthorization.LatestChallenge.Method.SMS)
355357
.phoneNumber("phone_number")
356358
.status(CardAuthorization.LatestChallenge.Status.COMPLETED)
357359
.completedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
@@ -567,6 +569,7 @@ internal class CardAuthorizationChallengeWebhookEventTest {
567569
)
568570
.latestChallenge(
569571
CardAuthorization.LatestChallenge.builder()
572+
.method(CardAuthorization.LatestChallenge.Method.SMS)
570573
.phoneNumber("phone_number")
571574
.status(CardAuthorization.LatestChallenge.Status.COMPLETED)
572575
.completedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))

0 commit comments

Comments
 (0)