Skip to content

Commit 4e66287

Browse files
docs(api): clarify wallet ID parameter requirements in card provision
1 parent af428ae commit 4e66287

5 files changed

Lines changed: 44 additions & 28 deletions

File tree

‎.stats.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 215
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-113e179e6007c80abd835ff26bfdce4dd24beee5174678687431cb672ce06be8.yml
3-
openapi_spec_hash: 0f42308e15d062d48e3d4857c39ac749
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-540c088e3f3c062a6169bbd7631ad456c7bc65afc7044ae8ffb879d0694140db.yml
3+
openapi_spec_hash: 6474e2ca67af0c9b57338d2468b96d99
44
config_hash: f6d04d790aaddf639fc04b7f0092e7ec

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

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,21 @@ private constructor(
4949
fun certificate(): Optional<String> = body.certificate()
5050

5151
/**
52-
* Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY` and the card is on the
53-
* Visa network. Stable device identification set by the wallet provider.
52+
* Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY`. Stable device
53+
* identification set by the wallet provider. Required for both wallets regardless of network,
54+
* though the value is only used for cards on the Visa network and is ignored on Amex and
55+
* Mastercard.
5456
*
5557
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
5658
* server responded with an unexpected value).
5759
*/
5860
fun clientDeviceId(): Optional<String> = body.clientDeviceId()
5961

6062
/**
61-
* Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY` and the card is on the
62-
* Visa network. Consumer ID that identifies the wallet account holder entity.
63+
* Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY`. Consumer ID that
64+
* identifies the wallet account holder entity. Required for both wallets regardless of network,
65+
* though the value is only used for cards on the Visa network and is ignored on Amex and
66+
* Mastercard.
6367
*
6468
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
6569
* server responded with an unexpected value).
@@ -206,8 +210,10 @@ private constructor(
206210
fun certificate(certificate: JsonField<String>) = apply { body.certificate(certificate) }
207211

208212
/**
209-
* Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY` and the card is on
210-
* the Visa network. Stable device identification set by the wallet provider.
213+
* Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY`. Stable device
214+
* identification set by the wallet provider. Required for both wallets regardless of
215+
* network, though the value is only used for cards on the Visa network and is ignored on
216+
* Amex and Mastercard.
211217
*/
212218
fun clientDeviceId(clientDeviceId: String) = apply { body.clientDeviceId(clientDeviceId) }
213219

@@ -223,8 +229,10 @@ private constructor(
223229
}
224230

225231
/**
226-
* Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY` and the card is on
227-
* the Visa network. Consumer ID that identifies the wallet account holder entity.
232+
* Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY`. Consumer ID that
233+
* identifies the wallet account holder entity. Required for both wallets regardless of
234+
* network, though the value is only used for cards on the Visa network and is ignored on
235+
* Amex and Mastercard.
228236
*/
229237
fun clientWalletAccountId(clientWalletAccountId: String) = apply {
230238
body.clientWalletAccountId(clientWalletAccountId)
@@ -483,17 +491,21 @@ private constructor(
483491
fun certificate(): Optional<String> = certificate.getOptional("certificate")
484492

485493
/**
486-
* Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY` and the card is on
487-
* the Visa network. Stable device identification set by the wallet provider.
494+
* Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY`. Stable device
495+
* identification set by the wallet provider. Required for both wallets regardless of
496+
* network, though the value is only used for cards on the Visa network and is ignored on
497+
* Amex and Mastercard.
488498
*
489499
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
490500
* server responded with an unexpected value).
491501
*/
492502
fun clientDeviceId(): Optional<String> = clientDeviceId.getOptional("client_device_id")
493503

494504
/**
495-
* Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY` and the card is on
496-
* the Visa network. Consumer ID that identifies the wallet account holder entity.
505+
* Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY`. Consumer ID that
506+
* identifies the wallet account holder entity. Required for both wallets regardless of
507+
* network, though the value is only used for cards on the Visa network and is ignored on
508+
* Amex and Mastercard.
497509
*
498510
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
499511
* server responded with an unexpected value).
@@ -643,8 +655,10 @@ private constructor(
643655
}
644656

645657
/**
646-
* Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY` and the card is
647-
* on the Visa network. Stable device identification set by the wallet provider.
658+
* Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY`. Stable device
659+
* identification set by the wallet provider. Required for both wallets regardless of
660+
* network, though the value is only used for cards on the Visa network and is ignored
661+
* on Amex and Mastercard.
648662
*/
649663
fun clientDeviceId(clientDeviceId: String) =
650664
clientDeviceId(JsonField.of(clientDeviceId))
@@ -661,8 +675,10 @@ private constructor(
661675
}
662676

663677
/**
664-
* Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY` and the card is
665-
* on the Visa network. Consumer ID that identifies the wallet account holder entity.
678+
* Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY`. Consumer ID
679+
* that identifies the wallet account holder entity. Required for both wallets
680+
* regardless of network, though the value is only used for cards on the Visa network
681+
* and is ignored on Amex and Mastercard.
666682
*/
667683
fun clientWalletAccountId(clientWalletAccountId: String) =
668684
clientWalletAccountId(JsonField.of(clientWalletAccountId))

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ internal class CardProvisionParamsTest {
1212
CardProvisionParams.builder()
1313
.cardToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
1414
.certificate("U3RhaW5sZXNzIHJvY2tz")
15-
.clientDeviceId("client_device_id")
16-
.clientWalletAccountId("client_wallet_account_id")
15+
.clientDeviceId("d3538acf-e5df-4446-8ce6-588fa4472ac1")
16+
.clientWalletAccountId("d3538acf-e5df-4446-8ce6-588fa4472ac1")
1717
.digitalWallet(CardProvisionParams.DigitalWallet.GOOGLE_PAY)
1818
.nonce("U3RhaW5sZXNzIHJvY2tz")
1919
.nonceSignature("U3RhaW5sZXNzIHJvY2tz")
@@ -36,8 +36,8 @@ internal class CardProvisionParamsTest {
3636
CardProvisionParams.builder()
3737
.cardToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
3838
.certificate("U3RhaW5sZXNzIHJvY2tz")
39-
.clientDeviceId("client_device_id")
40-
.clientWalletAccountId("client_wallet_account_id")
39+
.clientDeviceId("d3538acf-e5df-4446-8ce6-588fa4472ac1")
40+
.clientWalletAccountId("d3538acf-e5df-4446-8ce6-588fa4472ac1")
4141
.digitalWallet(CardProvisionParams.DigitalWallet.GOOGLE_PAY)
4242
.nonce("U3RhaW5sZXNzIHJvY2tz")
4343
.nonceSignature("U3RhaW5sZXNzIHJvY2tz")
@@ -46,8 +46,8 @@ internal class CardProvisionParamsTest {
4646
val body = params._body()
4747

4848
assertThat(body.certificate()).contains("U3RhaW5sZXNzIHJvY2tz")
49-
assertThat(body.clientDeviceId()).contains("client_device_id")
50-
assertThat(body.clientWalletAccountId()).contains("client_wallet_account_id")
49+
assertThat(body.clientDeviceId()).contains("d3538acf-e5df-4446-8ce6-588fa4472ac1")
50+
assertThat(body.clientWalletAccountId()).contains("d3538acf-e5df-4446-8ce6-588fa4472ac1")
5151
assertThat(body.digitalWallet()).contains(CardProvisionParams.DigitalWallet.GOOGLE_PAY)
5252
assertThat(body.nonce()).contains("U3RhaW5sZXNzIHJvY2tz")
5353
assertThat(body.nonceSignature()).contains("U3RhaW5sZXNzIHJvY2tz")

‎lithic-java-core/src/test/kotlin/com/lithic/api/services/async/CardServiceAsyncTest.kt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ internal class CardServiceAsyncTest {
207207
CardProvisionParams.builder()
208208
.cardToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
209209
.certificate("U3RhaW5sZXNzIHJvY2tz")
210-
.clientDeviceId("client_device_id")
211-
.clientWalletAccountId("client_wallet_account_id")
210+
.clientDeviceId("d3538acf-e5df-4446-8ce6-588fa4472ac1")
211+
.clientWalletAccountId("d3538acf-e5df-4446-8ce6-588fa4472ac1")
212212
.digitalWallet(CardProvisionParams.DigitalWallet.GOOGLE_PAY)
213213
.nonce("U3RhaW5sZXNzIHJvY2tz")
214214
.nonceSignature("U3RhaW5sZXNzIHJvY2tz")

‎lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/CardServiceTest.kt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ internal class CardServiceTest {
202202
CardProvisionParams.builder()
203203
.cardToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
204204
.certificate("U3RhaW5sZXNzIHJvY2tz")
205-
.clientDeviceId("client_device_id")
206-
.clientWalletAccountId("client_wallet_account_id")
205+
.clientDeviceId("d3538acf-e5df-4446-8ce6-588fa4472ac1")
206+
.clientWalletAccountId("d3538acf-e5df-4446-8ce6-588fa4472ac1")
207207
.digitalWallet(CardProvisionParams.DigitalWallet.GOOGLE_PAY)
208208
.nonce("U3RhaW5sZXNzIHJvY2tz")
209209
.nonceSignature("U3RhaW5sZXNzIHJvY2tz")

0 commit comments

Comments
 (0)