Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 3af0e56

Browse files
committedOct 11, 2024
feat(api): updates to documentation and addition of new 3DS simulation methods (#595)
- new simulation endpoints for 3DS for simulating challenges and challenge responses - extracts LoanTape balances properties into their own sub-property under `balances` - updates to documentation and required properties on Transaction and Card - updates response type for V1 -> V2 AuthRule migration endpoint to allow for multiple responses
1 parent 70a0a3d commit 3af0e56

22 files changed

+817
-449
lines changed
 

‎.stats.yml

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

‎api.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,14 +563,21 @@ Methods:
563563
Types:
564564

565565
```python
566-
from lithic.types.three_ds import DecisioningRetrieveSecretResponse
566+
from lithic.types.three_ds import (
567+
ChallengeResponse,
568+
ChallengeResult,
569+
DecisioningRetrieveSecretResponse,
570+
DecisioningSimulateChallengeResponse,
571+
)
567572
```
568573

569574
Methods:
570575

571576
- <code title="post /v1/three_ds_decisioning/challenge_response">client.three_ds.decisioning.<a href="./src/lithic/resources/three_ds/decisioning.py">challenge_response</a>(\*\*<a href="src/lithic/types/three_ds/decisioning_challenge_response_params.py">params</a>) -> None</code>
572577
- <code title="get /v1/three_ds_decisioning/secret">client.three_ds.decisioning.<a href="./src/lithic/resources/three_ds/decisioning.py">retrieve_secret</a>() -> <a href="./src/lithic/types/three_ds/decisioning_retrieve_secret_response.py">DecisioningRetrieveSecretResponse</a></code>
573578
- <code title="post /v1/three_ds_decisioning/secret/rotate">client.three_ds.decisioning.<a href="./src/lithic/resources/three_ds/decisioning.py">rotate_secret</a>() -> None</code>
579+
- <code title="post /v1/three_ds_decisioning/simulate/challenge">client.three_ds.decisioning.<a href="./src/lithic/resources/three_ds/decisioning.py">simulate_challenge</a>(\*\*<a href="src/lithic/types/three_ds/decisioning_simulate_challenge_params.py">params</a>) -> <a href="./src/lithic/types/three_ds/decisioning_simulate_challenge_response.py">DecisioningSimulateChallengeResponse</a></code>
580+
- <code title="post /v1/three_ds_decisioning/simulate/challenge_response">client.three_ds.decisioning.<a href="./src/lithic/resources/three_ds/decisioning.py">simulate_challenge_response</a>(\*\*<a href="src/lithic/types/three_ds/decisioning_simulate_challenge_response_params.py">params</a>) -> None</code>
574581

575582
# Reports
576583

‎src/lithic/resources/auth_rules/auth_rules.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -350,9 +350,11 @@ def migrate_v1_to_v2(
350350
) -> AuthRuleMigrateV1ToV2Response:
351351
"""Migrates an existing V1 authorization rule to a V2 authorization rule.
352352
353-
This will
354-
alter the internal structure of the Auth Rule such that it becomes a V2
355-
Authorization Rule that can be operated on through the /v2/auth_rules endpoints.
353+
Depending
354+
on the configuration of the V1 Auth Rule, this will yield one or two V2
355+
authorization rules. This endpoint will alter the internal structure of the Auth
356+
Rule such that the resulting rules become a V2 Authorization Rule that can be
357+
operated on through the /v2/auth_rules endpoints.
356358
357359
After a V1 Auth Rule has been migrated, it can no longer be operated on through
358360
the /v1/auth_rules/\\** endpoints. Eventually, Lithic will deprecate the
@@ -740,9 +742,11 @@ async def migrate_v1_to_v2(
740742
) -> AuthRuleMigrateV1ToV2Response:
741743
"""Migrates an existing V1 authorization rule to a V2 authorization rule.
742744
743-
This will
744-
alter the internal structure of the Auth Rule such that it becomes a V2
745-
Authorization Rule that can be operated on through the /v2/auth_rules endpoints.
745+
Depending
746+
on the configuration of the V1 Auth Rule, this will yield one or two V2
747+
authorization rules. This endpoint will alter the internal structure of the Auth
748+
Rule such that the resulting rules become a V2 Authorization Rule that can be
749+
operated on through the /v2/auth_rules endpoints.
746750
747751
After a V1 Auth Rule has been migrated, it can no longer be operated on through
748752
the /v1/auth_rules/\\** endpoints. Eventually, Lithic will deprecate the

‎src/lithic/resources/cards/cards.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,7 @@ def create(
180180
exp_year: Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is
181181
provided, an expiration date will be generated.
182182
183-
memo: Friendly name to identify the card. We recommend against using this field to
184-
store JSON data as it can cause unexpected behavior.
183+
memo: Friendly name to identify the card.
185184
186185
pin: Encrypted PIN block (in base64). Only applies to cards of type `PHYSICAL` and
187186
`VIRTUAL`. See
@@ -337,8 +336,7 @@ def update(
337336
by Lithic to use. See
338337
[Flexible Card Art Guide](https://docs.lithic.com/docs/about-digital-wallets#flexible-card-art).
339338
340-
memo: Friendly name to identify the card. We recommend against using this field to
341-
store JSON data as it can cause unexpected behavior.
339+
memo: Friendly name to identify the card.
342340
343341
pin: Encrypted PIN block (in base64). Only applies to cards of type `PHYSICAL` and
344342
`VIRTUAL`. Changing PIN also resets PIN status to `OK`. See
@@ -1067,8 +1065,7 @@ async def create(
10671065
exp_year: Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is
10681066
provided, an expiration date will be generated.
10691067
1070-
memo: Friendly name to identify the card. We recommend against using this field to
1071-
store JSON data as it can cause unexpected behavior.
1068+
memo: Friendly name to identify the card.
10721069
10731070
pin: Encrypted PIN block (in base64). Only applies to cards of type `PHYSICAL` and
10741071
`VIRTUAL`. See
@@ -1224,8 +1221,7 @@ async def update(
12241221
by Lithic to use. See
12251222
[Flexible Card Art Guide](https://docs.lithic.com/docs/about-digital-wallets#flexible-card-art).
12261223
1227-
memo: Friendly name to identify the card. We recommend against using this field to
1228-
store JSON data as it can cause unexpected behavior.
1224+
memo: Friendly name to identify the card.
12291225
12301226
pin: Encrypted PIN block (in base64). Only applies to cards of type `PHYSICAL` and
12311227
`VIRTUAL`. Changing PIN also resets PIN status to `OK`. See

‎src/lithic/resources/three_ds/authentication.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
from __future__ import annotations
44

5+
from typing_extensions import Literal
6+
57
import httpx
68

79
from ... import _legacy_response
@@ -82,6 +84,7 @@ def simulate(
8284
merchant: authentication_simulate_params.Merchant,
8385
pan: str,
8486
transaction: authentication_simulate_params.Transaction,
87+
card_expiry_check: Literal["MATCH", "MISMATCH", "NOT_PRESENT"] | NotGiven = NOT_GIVEN,
8588
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
8689
# The extra values given here take precedence over values defined on the client or passed to this method.
8790
extra_headers: Headers | None = None,
@@ -98,6 +101,9 @@ def simulate(
98101
Args:
99102
pan: Sixteen digit card number.
100103
104+
card_expiry_check: When set will use the following values as part of the Simulated Authentication.
105+
When not set defaults to MATCH
106+
101107
extra_headers: Send extra headers
102108
103109
extra_query: Add additional query parameters to the request
@@ -113,6 +119,7 @@ def simulate(
113119
"merchant": merchant,
114120
"pan": pan,
115121
"transaction": transaction,
122+
"card_expiry_check": card_expiry_check,
116123
},
117124
authentication_simulate_params.AuthenticationSimulateParams,
118125
),
@@ -184,6 +191,7 @@ async def simulate(
184191
merchant: authentication_simulate_params.Merchant,
185192
pan: str,
186193
transaction: authentication_simulate_params.Transaction,
194+
card_expiry_check: Literal["MATCH", "MISMATCH", "NOT_PRESENT"] | NotGiven = NOT_GIVEN,
187195
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
188196
# The extra values given here take precedence over values defined on the client or passed to this method.
189197
extra_headers: Headers | None = None,
@@ -200,6 +208,9 @@ async def simulate(
200208
Args:
201209
pan: Sixteen digit card number.
202210
211+
card_expiry_check: When set will use the following values as part of the Simulated Authentication.
212+
When not set defaults to MATCH
213+
203214
extra_headers: Send extra headers
204215
205216
extra_query: Add additional query parameters to the request
@@ -215,6 +226,7 @@ async def simulate(
215226
"merchant": merchant,
216227
"pan": pan,
217228
"transaction": transaction,
229+
"card_expiry_check": card_expiry_check,
218230
},
219231
authentication_simulate_params.AuthenticationSimulateParams,
220232
),
There was a problem loading the remainder of the diff.

0 commit comments

Comments
 (0)
Please sign in to comment.