Skip to content

Commit 78148ad

Browse files
feat(api): add WALLET_RECOMMENDATION_REASONS attribute for tokenization rules
feat(api): provide a unified model for AuthRule fix(api): make certain payoff fields nullable fix(api): fix examples in spec that were not fully valid
1 parent 1b9005d commit 78148ad

24 files changed

+230
-808
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 171
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-9791980619fc7ce8afb01f77dfe3c660a540975327378287cb666136ae4b0a99.yml
3-
openapi_spec_hash: 0752074b2a7b0534329a1e3176c94a62
4-
config_hash: aab05d0cf41f1f6b9f4d5677273c1600
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-a9de2732e7a28b7fc5b8b7b171781d617337b6223d82ef7d6a554d0bd2b33bab.yml
3+
openapi_spec_hash: fc6111d286c7002cd854af23841d137e
4+
config_hash: f6f5c7f37033e89a3cf91a48371a718a

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,29 @@ for card in first_page.data:
176176
# Remove `await` for non-async usage.
177177
```
178178

179+
## Nested params
180+
181+
Nested parameters are dictionaries. The SDK uses TypedDict for type validation, but you can pass regular dictionaries as shown below:
182+
183+
```python
184+
from lithic import Lithic
185+
186+
client = Lithic()
187+
188+
card = client.cards.create(
189+
type="PHYSICAL",
190+
shipping_address={
191+
"address1": "123",
192+
"city": "NEW YORK",
193+
"country": "USA",
194+
"first_name": "Johnny",
195+
"last_name": "Appleseed",
196+
"postal_code": "10001",
197+
"state": "NY",
198+
},
199+
)
200+
```
201+
179202
## Webhook Verification
180203

181204
We provide helper methods for verifying that a webhook request came from Lithic, and not a malicious third party.

api.md

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -95,26 +95,20 @@ from lithic.types.auth_rules import (
9595
RuleStats,
9696
VelocityLimitParams,
9797
VelocityLimitPeriod,
98-
V2CreateResponse,
99-
V2RetrieveResponse,
100-
V2UpdateResponse,
101-
V2ListResponse,
102-
V2DraftResponse,
103-
V2PromoteResponse,
10498
V2RetrieveFeaturesResponse,
10599
V2RetrieveReportResponse,
106100
)
107101
```
108102

109103
Methods:
110104

111-
- <code title="post /v2/auth_rules">client.auth_rules.v2.<a href="./src/lithic/resources/auth_rules/v2/v2.py">create</a>(\*\*<a href="src/lithic/types/auth_rules/v2_create_params.py">params</a>) -> <a href="./src/lithic/types/auth_rules/v2_create_response.py">V2CreateResponse</a></code>
112-
- <code title="get /v2/auth_rules/{auth_rule_token}">client.auth_rules.v2.<a href="./src/lithic/resources/auth_rules/v2/v2.py">retrieve</a>(auth_rule_token) -> <a href="./src/lithic/types/auth_rules/v2_retrieve_response.py">V2RetrieveResponse</a></code>
113-
- <code title="patch /v2/auth_rules/{auth_rule_token}">client.auth_rules.v2.<a href="./src/lithic/resources/auth_rules/v2/v2.py">update</a>(auth_rule_token, \*\*<a href="src/lithic/types/auth_rules/v2_update_params.py">params</a>) -> <a href="./src/lithic/types/auth_rules/v2_update_response.py">V2UpdateResponse</a></code>
114-
- <code title="get /v2/auth_rules">client.auth_rules.v2.<a href="./src/lithic/resources/auth_rules/v2/v2.py">list</a>(\*\*<a href="src/lithic/types/auth_rules/v2_list_params.py">params</a>) -> <a href="./src/lithic/types/auth_rules/v2_list_response.py">SyncCursorPage[V2ListResponse]</a></code>
105+
- <code title="post /v2/auth_rules">client.auth_rules.v2.<a href="./src/lithic/resources/auth_rules/v2/v2.py">create</a>(\*\*<a href="src/lithic/types/auth_rules/v2_create_params.py">params</a>) -> <a href="./src/lithic/types/auth_rules/auth_rule.py">AuthRule</a></code>
106+
- <code title="get /v2/auth_rules/{auth_rule_token}">client.auth_rules.v2.<a href="./src/lithic/resources/auth_rules/v2/v2.py">retrieve</a>(auth_rule_token) -> <a href="./src/lithic/types/auth_rules/auth_rule.py">AuthRule</a></code>
107+
- <code title="patch /v2/auth_rules/{auth_rule_token}">client.auth_rules.v2.<a href="./src/lithic/resources/auth_rules/v2/v2.py">update</a>(auth_rule_token, \*\*<a href="src/lithic/types/auth_rules/v2_update_params.py">params</a>) -> <a href="./src/lithic/types/auth_rules/auth_rule.py">AuthRule</a></code>
108+
- <code title="get /v2/auth_rules">client.auth_rules.v2.<a href="./src/lithic/resources/auth_rules/v2/v2.py">list</a>(\*\*<a href="src/lithic/types/auth_rules/v2_list_params.py">params</a>) -> <a href="./src/lithic/types/auth_rules/auth_rule.py">SyncCursorPage[AuthRule]</a></code>
115109
- <code title="delete /v2/auth_rules/{auth_rule_token}">client.auth_rules.v2.<a href="./src/lithic/resources/auth_rules/v2/v2.py">delete</a>(auth_rule_token) -> None</code>
116-
- <code title="post /v2/auth_rules/{auth_rule_token}/draft">client.auth_rules.v2.<a href="./src/lithic/resources/auth_rules/v2/v2.py">draft</a>(auth_rule_token, \*\*<a href="src/lithic/types/auth_rules/v2_draft_params.py">params</a>) -> <a href="./src/lithic/types/auth_rules/v2_draft_response.py">V2DraftResponse</a></code>
117-
- <code title="post /v2/auth_rules/{auth_rule_token}/promote">client.auth_rules.v2.<a href="./src/lithic/resources/auth_rules/v2/v2.py">promote</a>(auth_rule_token) -> <a href="./src/lithic/types/auth_rules/v2_promote_response.py">V2PromoteResponse</a></code>
110+
- <code title="post /v2/auth_rules/{auth_rule_token}/draft">client.auth_rules.v2.<a href="./src/lithic/resources/auth_rules/v2/v2.py">draft</a>(auth_rule_token, \*\*<a href="src/lithic/types/auth_rules/v2_draft_params.py">params</a>) -> <a href="./src/lithic/types/auth_rules/auth_rule.py">AuthRule</a></code>
111+
- <code title="post /v2/auth_rules/{auth_rule_token}/promote">client.auth_rules.v2.<a href="./src/lithic/resources/auth_rules/v2/v2.py">promote</a>(auth_rule_token) -> <a href="./src/lithic/types/auth_rules/auth_rule.py">AuthRule</a></code>
118112
- <code title="get /v2/auth_rules/{auth_rule_token}/features">client.auth_rules.v2.<a href="./src/lithic/resources/auth_rules/v2/v2.py">retrieve_features</a>(auth_rule_token, \*\*<a href="src/lithic/types/auth_rules/v2_retrieve_features_params.py">params</a>) -> <a href="./src/lithic/types/auth_rules/v2_retrieve_features_response.py">V2RetrieveFeaturesResponse</a></code>
119113
- <code title="get /v2/auth_rules/{auth_rule_token}/report">client.auth_rules.v2.<a href="./src/lithic/resources/auth_rules/v2/v2.py">retrieve_report</a>(auth_rule_token, \*\*<a href="src/lithic/types/auth_rules/v2_retrieve_report_params.py">params</a>) -> <a href="./src/lithic/types/auth_rules/v2_retrieve_report_response.py">V2RetrieveReportResponse</a></code>
120114

@@ -162,11 +156,7 @@ Methods:
162156
Types:
163157

164158
```python
165-
from lithic.types import (
166-
Tokenization,
167-
TokenizationSimulateResponse,
168-
TokenizationUpdateDigitalCardArtResponse,
169-
)
159+
from lithic.types import Tokenization
170160
```
171161

172162
Methods:
@@ -177,9 +167,9 @@ Methods:
177167
- <code title="post /v1/tokenizations/{tokenization_token}/deactivate">client.tokenizations.<a href="./src/lithic/resources/tokenizations.py">deactivate</a>(tokenization_token) -> None</code>
178168
- <code title="post /v1/tokenizations/{tokenization_token}/pause">client.tokenizations.<a href="./src/lithic/resources/tokenizations.py">pause</a>(tokenization_token) -> None</code>
179169
- <code title="post /v1/tokenizations/{tokenization_token}/resend_activation_code">client.tokenizations.<a href="./src/lithic/resources/tokenizations.py">resend_activation_code</a>(tokenization_token, \*\*<a href="src/lithic/types/tokenization_resend_activation_code_params.py">params</a>) -> None</code>
180-
- <code title="post /v1/simulate/tokenizations">client.tokenizations.<a href="./src/lithic/resources/tokenizations.py">simulate</a>(\*\*<a href="src/lithic/types/tokenization_simulate_params.py">params</a>) -> <a href="./src/lithic/types/tokenization_simulate_response.py">TokenizationSimulateResponse</a></code>
170+
- <code title="post /v1/simulate/tokenizations">client.tokenizations.<a href="./src/lithic/resources/tokenizations.py">simulate</a>(\*\*<a href="src/lithic/types/tokenization_simulate_params.py">params</a>) -> <a href="./src/lithic/types/tokenization.py">Tokenization</a></code>
181171
- <code title="post /v1/tokenizations/{tokenization_token}/unpause">client.tokenizations.<a href="./src/lithic/resources/tokenizations.py">unpause</a>(tokenization_token) -> None</code>
182-
- <code title="post /v1/tokenizations/{tokenization_token}/update_digital_card_art">client.tokenizations.<a href="./src/lithic/resources/tokenizations.py">update_digital_card_art</a>(tokenization_token, \*\*<a href="src/lithic/types/tokenization_update_digital_card_art_params.py">params</a>) -> <a href="./src/lithic/types/tokenization_update_digital_card_art_response.py">TokenizationUpdateDigitalCardArtResponse</a></code>
172+
- <code title="post /v1/tokenizations/{tokenization_token}/update_digital_card_art">client.tokenizations.<a href="./src/lithic/resources/tokenizations.py">update_digital_card_art</a>(tokenization_token, \*\*<a href="src/lithic/types/tokenization_update_digital_card_art_params.py">params</a>) -> <a href="./src/lithic/types/tokenization.py">Tokenization</a></code>
183173

184174
# Cards
185175

0 commit comments

Comments
 (0)