Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
configured_endpoints: 239
openapi_spec_hash: f8d2bbed3081c9ffc1547d28f89a8a34
openapi_spec_hash: 03c188a3008d5c3c962d6e1862a45c9a
config_hash: 1ca082e374ef7000e2a5971e8da740e0
2 changes: 1 addition & 1 deletion scripts/mock

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions src/increase/resources/cards.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def create(
account_id: str,
authorization_controls: card_create_params.AuthorizationControls | Omit = omit,
billing_address: card_create_params.BillingAddress | Omit = omit,
cardholder_name: card_create_params.CardholderName | Omit = omit,
description: str | Omit = omit,
digital_wallet: card_create_params.DigitalWallet | Omit = omit,
entity_id: str | Omit = omit,
Expand All @@ -79,6 +80,9 @@ def create(

billing_address: The card's billing address.

cardholder_name: The name of the cardholder. Used to respond to Account Name Inquiry requests
from acquirers in Card Validations.

description: The description you choose to give the card.

digital_wallet: The contact information used in the two-factor steps for digital wallet card
Expand Down Expand Up @@ -107,6 +111,7 @@ def create(
"account_id": account_id,
"authorization_controls": authorization_controls,
"billing_address": billing_address,
"cardholder_name": cardholder_name,
"description": description,
"digital_wallet": digital_wallet,
"entity_id": entity_id,
Expand Down Expand Up @@ -462,6 +467,7 @@ async def create(
account_id: str,
authorization_controls: card_create_params.AuthorizationControls | Omit = omit,
billing_address: card_create_params.BillingAddress | Omit = omit,
cardholder_name: card_create_params.CardholderName | Omit = omit,
description: str | Omit = omit,
digital_wallet: card_create_params.DigitalWallet | Omit = omit,
entity_id: str | Omit = omit,
Expand All @@ -483,6 +489,9 @@ async def create(

billing_address: The card's billing address.

cardholder_name: The name of the cardholder. Used to respond to Account Name Inquiry requests
from acquirers in Card Validations.

description: The description you choose to give the card.

digital_wallet: The contact information used in the two-factor steps for digital wallet card
Expand Down Expand Up @@ -511,6 +520,7 @@ async def create(
"account_id": account_id,
"authorization_controls": authorization_controls,
"billing_address": billing_address,
"cardholder_name": cardholder_name,
"description": description,
"digital_wallet": digital_wallet,
"entity_id": entity_id,
Expand Down
24 changes: 24 additions & 0 deletions src/increase/types/card.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"AuthorizationControlsUsageSingleUse",
"AuthorizationControlsUsageSingleUseSettlementAmount",
"BillingAddress",
"CardholderName",
"DigitalWallet",
]

Expand Down Expand Up @@ -231,6 +232,22 @@ class BillingAddress(BaseModel):
"""The US state of the billing address."""


class CardholderName(BaseModel):
"""The name of the cardholder.

Used to respond to Account Name Inquiry requests from acquirers in Card Validations.
"""

first: str
"""The cardholder's first name."""

last: str
"""The cardholder's last name."""

middle: Optional[str] = None
"""The cardholder's middle name."""


class DigitalWallet(BaseModel):
"""
The contact information used in the two-factor steps for digital wallet card creation. At least one field must be present to complete the digital wallet steps.
Expand Down Expand Up @@ -276,6 +293,13 @@ class Card(BaseModel):
bin: str
"""The Bank Identification Number (BIN) of the Card."""

cardholder_name: Optional[CardholderName] = None
"""The name of the cardholder.

Used to respond to Account Name Inquiry requests from acquirers in Card
Validations.
"""

created_at: datetime
"""
The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which
Expand Down
24 changes: 24 additions & 0 deletions src/increase/types/card_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"AuthorizationControlsUsageSingleUse",
"AuthorizationControlsUsageSingleUseSettlementAmount",
"BillingAddress",
"CardholderName",
"DigitalWallet",
]

Expand All @@ -38,6 +39,13 @@ class CardCreateParams(TypedDict, total=False):
billing_address: BillingAddress
"""The card's billing address."""

cardholder_name: CardholderName
"""The name of the cardholder.

Used to respond to Account Name Inquiry requests from acquirers in Card
Validations.
"""

description: str
"""The description you choose to give the card."""

Expand Down Expand Up @@ -276,6 +284,22 @@ class BillingAddress(TypedDict, total=False):
"""The second line of the billing address."""


class CardholderName(TypedDict, total=False):
"""The name of the cardholder.

Used to respond to Account Name Inquiry requests from acquirers in Card Validations.
"""

first: Required[str]
"""The cardholder's first name."""

last: Required[str]
"""The cardholder's last name."""

middle: str
"""The cardholder's middle name."""


class DigitalWallet(TypedDict, total=False):
"""
The contact information used in the two-factor steps for digital wallet card creation. To add the card to a digital wallet, you may supply an email or phone number with this request. Otherwise, subscribe and then action a Real Time Decision with the category `digital_wallet_token_requested` or `digital_wallet_authentication_requested`.
Expand Down
10 changes: 10 additions & 0 deletions tests/api_resources/test_cards.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ def test_method_create_with_all_params(self, client: Increase) -> None:
"state": "x",
"line2": "x",
},
cardholder_name={
"first": "x",
"last": "x",
"middle": "x",
},
description="Card for Ian Crease",
digital_wallet={
"digital_card_profile_id": "digital_card_profile_id",
Expand Down Expand Up @@ -447,6 +452,11 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease)
"state": "x",
"line2": "x",
},
cardholder_name={
"first": "x",
"last": "x",
"middle": "x",
},
description="Card for Ian Crease",
digital_wallet={
"digital_card_profile_id": "digital_card_profile_id",
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading