Skip to content

Commit 98f5877

Browse files
chore(api): adds replacement_account_token to Card create parameters (#623)
1 parent e906d39 commit 98f5877

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

src/lithic/resources/cards/cards.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ def create(
123123
memo: str | NotGiven = NOT_GIVEN,
124124
pin: str | NotGiven = NOT_GIVEN,
125125
product_id: str | NotGiven = NOT_GIVEN,
126+
replacement_account_token: str | NotGiven = NOT_GIVEN,
126127
replacement_for: str | NotGiven = NOT_GIVEN,
127128
shipping_address: ShippingAddress | NotGiven = NOT_GIVEN,
128129
shipping_method: Literal["2_DAY", "EXPEDITED", "EXPRESS", "PRIORITY", "STANDARD", "STANDARD_WITH_TRACKING"]
@@ -190,6 +191,12 @@ def create(
190191
before use. Specifies the configuration (i.e., physical card art) that the card
191192
should be manufactured with.
192193
194+
replacement_account_token: Restricted field limited to select use cases. Lithic will reach out directly if
195+
this field should be used. Globally unique identifier for the replacement card's
196+
account. If this field is specified, `replacement_for` must also be specified.
197+
If `replacement_for` is specified and this field is omitted, the replacement
198+
card's account will be inferred from the card being replaced.
199+
193200
replacement_for: Only applicable to cards of type `PHYSICAL`. Globally unique identifier for the
194201
card that this physical card will replace.
195202
@@ -256,6 +263,7 @@ def create(
256263
"memo": memo,
257264
"pin": pin,
258265
"product_id": product_id,
266+
"replacement_account_token": replacement_account_token,
259267
"replacement_for": replacement_for,
260268
"shipping_address": shipping_address,
261269
"shipping_method": shipping_method,
@@ -1008,6 +1016,7 @@ async def create(
10081016
memo: str | NotGiven = NOT_GIVEN,
10091017
pin: str | NotGiven = NOT_GIVEN,
10101018
product_id: str | NotGiven = NOT_GIVEN,
1019+
replacement_account_token: str | NotGiven = NOT_GIVEN,
10111020
replacement_for: str | NotGiven = NOT_GIVEN,
10121021
shipping_address: ShippingAddress | NotGiven = NOT_GIVEN,
10131022
shipping_method: Literal["2_DAY", "EXPEDITED", "EXPRESS", "PRIORITY", "STANDARD", "STANDARD_WITH_TRACKING"]
@@ -1075,6 +1084,12 @@ async def create(
10751084
before use. Specifies the configuration (i.e., physical card art) that the card
10761085
should be manufactured with.
10771086
1087+
replacement_account_token: Restricted field limited to select use cases. Lithic will reach out directly if
1088+
this field should be used. Globally unique identifier for the replacement card's
1089+
account. If this field is specified, `replacement_for` must also be specified.
1090+
If `replacement_for` is specified and this field is omitted, the replacement
1091+
card's account will be inferred from the card being replaced.
1092+
10781093
replacement_for: Only applicable to cards of type `PHYSICAL`. Globally unique identifier for the
10791094
card that this physical card will replace.
10801095
@@ -1141,6 +1156,7 @@ async def create(
11411156
"memo": memo,
11421157
"pin": pin,
11431158
"product_id": product_id,
1159+
"replacement_account_token": replacement_account_token,
11441160
"replacement_for": replacement_for,
11451161
"shipping_address": shipping_address,
11461162
"shipping_method": shipping_method,

src/lithic/types/card_create_params.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,16 @@ class CardCreateParams(TypedDict, total=False):
8787
(i.e., physical card art) that the card should be manufactured with.
8888
"""
8989

90+
replacement_account_token: str
91+
"""Restricted field limited to select use cases.
92+
93+
Lithic will reach out directly if this field should be used. Globally unique
94+
identifier for the replacement card's account. If this field is specified,
95+
`replacement_for` must also be specified. If `replacement_for` is specified and
96+
this field is omitted, the replacement card's account will be inferred from the
97+
card being replaced.
98+
"""
99+
90100
replacement_for: str
91101
"""Only applicable to cards of type `PHYSICAL`.
92102

tests/api_resources/test_cards.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ def test_method_create_with_all_params(self, client: Lithic) -> None:
4343
memo="New Card",
4444
pin="pin",
4545
product_id="1",
46+
replacement_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
4647
replacement_for="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
4748
shipping_address={
4849
"address1": "5 Broad Street",
@@ -566,6 +567,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncLithic) ->
566567
memo="New Card",
567568
pin="pin",
568569
product_id="1",
570+
replacement_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
569571
replacement_for="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
570572
shipping_address={
571573
"address1": "5 Broad Street",

0 commit comments

Comments
 (0)