Skip to content
Merged
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 .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.468.0"
".": "0.469.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 236
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e3103e9bb8480e11581841c322e0bd0255b64413d401873c96cd00a3e6d6c3f7.yml
openapi_spec_hash: 962e1efe27066cf84b405a6695dd8288
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-31046e3fe86098c429a87dc861cf42dae0252314abf90021a804e748f9c16417.yml
openapi_spec_hash: 78fe78704879172326e842c27ee09a3a
config_hash: 4945e03affdf289484733306e4797f81
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.469.0 (2026-04-03)

Full Changelog: [v0.468.0...v0.469.0](https://github.com/Increase/increase-python/compare/v0.468.0...v0.469.0)

### Features

* **api:** api update ([4fe0d7e](https://github.com/Increase/increase-python/commit/4fe0d7e417b0d5bdcceb6c9322e25c492fc80d08))

## 0.468.0 (2026-04-02)

Full Changelog: [v0.467.0...v0.468.0](https://github.com/Increase/increase-python/compare/v0.467.0...v0.468.0)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "increase"
version = "0.468.0"
version = "0.469.0"
description = "The official Python library for the increase API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/increase/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "increase"
__version__ = "0.468.0" # x-release-please-version
__version__ = "0.469.0" # x-release-please-version
16 changes: 16 additions & 0 deletions src/increase/resources/cards.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def create(
self,
*,
account_id: str,
authorization_controls: card_create_params.AuthorizationControls | Omit = omit,
billing_address: card_create_params.BillingAddress | Omit = omit,
description: str | Omit = omit,
digital_wallet: card_create_params.DigitalWallet | Omit = omit,
Expand All @@ -74,6 +75,8 @@ def create(
Args:
account_id: The Account the card should belong to.

authorization_controls: Controls that restrict how this card can be used.

billing_address: The card's billing address.

description: The description you choose to give the card.
Expand Down Expand Up @@ -102,6 +105,7 @@ def create(
body=maybe_transform(
{
"account_id": account_id,
"authorization_controls": authorization_controls,
"billing_address": billing_address,
"description": description,
"digital_wallet": digital_wallet,
Expand Down Expand Up @@ -158,6 +162,7 @@ def update(
self,
card_id: str,
*,
authorization_controls: card_update_params.AuthorizationControls | Omit = omit,
billing_address: card_update_params.BillingAddress | Omit = omit,
description: str | Omit = omit,
digital_wallet: card_update_params.DigitalWallet | Omit = omit,
Expand All @@ -177,6 +182,8 @@ def update(
Args:
card_id: The card identifier.

authorization_controls: Controls that restrict how this card can be used.

billing_address: The card's updated billing address.

description: The description you choose to give the card.
Expand Down Expand Up @@ -210,6 +217,7 @@ def update(
path_template("/cards/{card_id}", card_id=card_id),
body=maybe_transform(
{
"authorization_controls": authorization_controls,
"billing_address": billing_address,
"description": description,
"digital_wallet": digital_wallet,
Expand Down Expand Up @@ -450,6 +458,7 @@ async def create(
self,
*,
account_id: str,
authorization_controls: card_create_params.AuthorizationControls | Omit = omit,
billing_address: card_create_params.BillingAddress | Omit = omit,
description: str | Omit = omit,
digital_wallet: card_create_params.DigitalWallet | Omit = omit,
Expand All @@ -468,6 +477,8 @@ async def create(
Args:
account_id: The Account the card should belong to.

authorization_controls: Controls that restrict how this card can be used.

billing_address: The card's billing address.

description: The description you choose to give the card.
Expand Down Expand Up @@ -496,6 +507,7 @@ async def create(
body=await async_maybe_transform(
{
"account_id": account_id,
"authorization_controls": authorization_controls,
"billing_address": billing_address,
"description": description,
"digital_wallet": digital_wallet,
Expand Down Expand Up @@ -552,6 +564,7 @@ async def update(
self,
card_id: str,
*,
authorization_controls: card_update_params.AuthorizationControls | Omit = omit,
billing_address: card_update_params.BillingAddress | Omit = omit,
description: str | Omit = omit,
digital_wallet: card_update_params.DigitalWallet | Omit = omit,
Expand All @@ -571,6 +584,8 @@ async def update(
Args:
card_id: The card identifier.

authorization_controls: Controls that restrict how this card can be used.

billing_address: The card's updated billing address.

description: The description you choose to give the card.
Expand Down Expand Up @@ -604,6 +619,7 @@ async def update(
path_template("/cards/{card_id}", card_id=card_id),
body=await async_maybe_transform(
{
"authorization_controls": authorization_controls,
"billing_address": billing_address,
"description": description,
"digital_wallet": digital_wallet,
Expand Down
160 changes: 158 additions & 2 deletions src/increase/types/card.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,167 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import TYPE_CHECKING, Dict, Optional
from typing import TYPE_CHECKING, Dict, List, Optional
from datetime import datetime
from typing_extensions import Literal

from pydantic import Field as FieldInfo

from .._models import BaseModel

__all__ = ["Card", "BillingAddress", "DigitalWallet"]
__all__ = [
"Card",
"AuthorizationControls",
"AuthorizationControlsMaximumAuthorizationCount",
"AuthorizationControlsMerchantAcceptorIdentifier",
"AuthorizationControlsMerchantAcceptorIdentifierAllowed",
"AuthorizationControlsMerchantAcceptorIdentifierBlocked",
"AuthorizationControlsMerchantCategoryCode",
"AuthorizationControlsMerchantCategoryCodeAllowed",
"AuthorizationControlsMerchantCategoryCodeBlocked",
"AuthorizationControlsMerchantCountry",
"AuthorizationControlsMerchantCountryAllowed",
"AuthorizationControlsMerchantCountryBlocked",
"AuthorizationControlsSpendingLimit",
"AuthorizationControlsSpendingLimitMerchantCategoryCode",
"BillingAddress",
"DigitalWallet",
]


class AuthorizationControlsMaximumAuthorizationCount(BaseModel):
"""Limits the number of authorizations that can be approved on this card."""

all_time: Optional[int] = None
"""
The maximum number of authorizations that can be approved on this card over its
lifetime.
"""


class AuthorizationControlsMerchantAcceptorIdentifierAllowed(BaseModel):
identifier: str
"""The Merchant Acceptor ID."""


class AuthorizationControlsMerchantAcceptorIdentifierBlocked(BaseModel):
identifier: str
"""The Merchant Acceptor ID."""


class AuthorizationControlsMerchantAcceptorIdentifier(BaseModel):
"""
Restricts which Merchant Acceptor IDs are allowed or blocked for authorizations on this card.
"""

allowed: Optional[List[AuthorizationControlsMerchantAcceptorIdentifierAllowed]] = None
"""The Merchant Acceptor IDs that are allowed for authorizations on this card."""

blocked: Optional[List[AuthorizationControlsMerchantAcceptorIdentifierBlocked]] = None
"""The Merchant Acceptor IDs that are blocked for authorizations on this card."""


class AuthorizationControlsMerchantCategoryCodeAllowed(BaseModel):
code: str
"""The Merchant Category Code (MCC)."""


class AuthorizationControlsMerchantCategoryCodeBlocked(BaseModel):
code: str
"""The Merchant Category Code (MCC)."""


class AuthorizationControlsMerchantCategoryCode(BaseModel):
"""
Restricts which Merchant Category Codes are allowed or blocked for authorizations on this card.
"""

allowed: Optional[List[AuthorizationControlsMerchantCategoryCodeAllowed]] = None
"""The Merchant Category Codes that are allowed for authorizations on this card."""

blocked: Optional[List[AuthorizationControlsMerchantCategoryCodeBlocked]] = None
"""The Merchant Category Codes that are blocked for authorizations on this card."""


class AuthorizationControlsMerchantCountryAllowed(BaseModel):
country: str
"""The ISO 3166-1 alpha-2 country code."""


class AuthorizationControlsMerchantCountryBlocked(BaseModel):
country: str
"""The ISO 3166-1 alpha-2 country code."""


class AuthorizationControlsMerchantCountry(BaseModel):
"""
Restricts which merchant countries are allowed or blocked for authorizations on this card.
"""

allowed: Optional[List[AuthorizationControlsMerchantCountryAllowed]] = None
"""The merchant countries that are allowed for authorizations on this card."""

blocked: Optional[List[AuthorizationControlsMerchantCountryBlocked]] = None
"""The merchant countries that are blocked for authorizations on this card."""


class AuthorizationControlsSpendingLimitMerchantCategoryCode(BaseModel):
code: str
"""The Merchant Category Code (MCC)."""


class AuthorizationControlsSpendingLimit(BaseModel):
interval: Literal["all_time", "per_transaction", "per_day", "per_week", "per_month"]
"""The interval at which the spending limit is enforced.

- `all_time` - The spending limit applies over the lifetime of the card.
- `per_transaction` - The spending limit applies per transaction.
- `per_day` - The spending limit applies per day. Resets nightly at midnight
UTC.
- `per_week` - The spending limit applies per week. Resets weekly on Mondays at
midnight UTC.
- `per_month` - The spending limit applies per month. Resets on the first of the
month, midnight UTC.
"""

merchant_category_codes: Optional[List[AuthorizationControlsSpendingLimitMerchantCategoryCode]] = None
"""The Merchant Category Codes (MCCs) this spending limit applies to.

If not set, the limit applies to all transactions.
"""

settlement_amount: int
"""The maximum settlement amount permitted in the given interval."""


class AuthorizationControls(BaseModel):
"""Controls that restrict how this card can be used."""

maximum_authorization_count: Optional[AuthorizationControlsMaximumAuthorizationCount] = None
"""Limits the number of authorizations that can be approved on this card."""

merchant_acceptor_identifier: Optional[AuthorizationControlsMerchantAcceptorIdentifier] = None
"""
Restricts which Merchant Acceptor IDs are allowed or blocked for authorizations
on this card.
"""

merchant_category_code: Optional[AuthorizationControlsMerchantCategoryCode] = None
"""
Restricts which Merchant Category Codes are allowed or blocked for
authorizations on this card.
"""

merchant_country: Optional[AuthorizationControlsMerchantCountry] = None
"""
Restricts which merchant countries are allowed or blocked for authorizations on
this card.
"""

spending_limits: Optional[List[AuthorizationControlsSpendingLimit]] = None
"""Spending limits for this card.

The most restrictive limit is applied if multiple limits match.
"""


class BillingAddress(BaseModel):
Expand Down Expand Up @@ -66,6 +219,9 @@ class Card(BaseModel):
account_id: str
"""The identifier for the account this card belongs to."""

authorization_controls: Optional[AuthorizationControls] = None
"""Controls that restrict how this card can be used."""

billing_address: BillingAddress
"""The Card's billing address."""

Expand Down
Loading