diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 09eb6e203..7f9560adf 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.329.0"
+ ".": "0.330.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 14e640b1e..f6bbc76b8 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 217
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-61210b27ac135ed841515ad3c3dfedaf42dc1398b0a3ed63bbd6c154d1b31a6a.yml
-openapi_spec_hash: b0d2957f6269776252f0ddaa6489772a
-config_hash: e1885b38eded054b77308a024c5d80cc
+configured_endpoints: 213
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-fc17d091731928c882b2272ea5de831cafcbf237a7887652a5f133c29cb1bbc4.yml
+openapi_spec_hash: aad429d087b7557be4103d1309cd81a0
+config_hash: e1e8bc2138a13f290956ae6687f099cd
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1c100191f..f3eb67c05 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## 0.330.0 (2025-09-17)
+
+Full Changelog: [v0.329.0...v0.330.0](https://github.com/Increase/increase-python/compare/v0.329.0...v0.330.0)
+
+### Features
+
+* **api:** api update ([4ee4a0f](https://github.com/Increase/increase-python/commit/4ee4a0f1790e40c5b3b09d1d0cf732511fe77e75))
+
## 0.329.0 (2025-09-17)
Full Changelog: [v0.328.0...v0.329.0](https://github.com/Increase/increase-python/compare/v0.328.0...v0.329.0)
diff --git a/api.md b/api.md
index c42718fa8..a47477046 100644
--- a/api.md
+++ b/api.md
@@ -89,20 +89,6 @@ Methods:
- client.card_purchase_supplements.retrieve(card_purchase_supplement_id) -> CardPurchaseSupplement
- client.card_purchase_supplements.list(\*\*params) -> SyncPage[CardPurchaseSupplement]
-# CardDisputes
-
-Types:
-
-```python
-from increase.types import CardDispute
-```
-
-Methods:
-
-- client.card_disputes.create(\*\*params) -> CardDispute
-- client.card_disputes.retrieve(card_dispute_id) -> CardDispute
-- client.card_disputes.list(\*\*params) -> SyncPage[CardDispute]
-
# PhysicalCards
Types:
@@ -840,12 +826,6 @@ Methods:
- client.simulations.card_refunds.create(\*\*params) -> Transaction
-## CardDisputes
-
-Methods:
-
-- client.simulations.card_disputes.action(card_dispute_id, \*\*params) -> CardDispute
-
## PhysicalCards
Methods:
diff --git a/pyproject.toml b/pyproject.toml
index e838b1016..2ccb42f97 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "increase"
-version = "0.329.0"
+version = "0.330.0"
description = "The official Python library for the increase API"
dynamic = ["readme"]
license = "Apache-2.0"
diff --git a/src/increase/_client.py b/src/increase/_client.py
index 9d50bd591..9f1640ed8 100644
--- a/src/increase/_client.py
+++ b/src/increase/_client.py
@@ -42,7 +42,6 @@
oauth_tokens,
transactions,
ach_transfers,
- card_disputes,
card_payments,
check_deposits,
physical_cards,
@@ -116,7 +115,6 @@ class Increase(SyncAPIClient):
cards: cards.CardsResource
card_payments: card_payments.CardPaymentsResource
card_purchase_supplements: card_purchase_supplements.CardPurchaseSupplementsResource
- card_disputes: card_disputes.CardDisputesResource
physical_cards: physical_cards.PhysicalCardsResource
digital_card_profiles: digital_card_profiles.DigitalCardProfilesResource
physical_card_profiles: physical_card_profiles.PhysicalCardProfilesResource
@@ -263,7 +261,6 @@ def __init__(
self.cards = cards.CardsResource(self)
self.card_payments = card_payments.CardPaymentsResource(self)
self.card_purchase_supplements = card_purchase_supplements.CardPurchaseSupplementsResource(self)
- self.card_disputes = card_disputes.CardDisputesResource(self)
self.physical_cards = physical_cards.PhysicalCardsResource(self)
self.digital_card_profiles = digital_card_profiles.DigitalCardProfilesResource(self)
self.physical_card_profiles = physical_card_profiles.PhysicalCardProfilesResource(self)
@@ -479,7 +476,6 @@ class AsyncIncrease(AsyncAPIClient):
cards: cards.AsyncCardsResource
card_payments: card_payments.AsyncCardPaymentsResource
card_purchase_supplements: card_purchase_supplements.AsyncCardPurchaseSupplementsResource
- card_disputes: card_disputes.AsyncCardDisputesResource
physical_cards: physical_cards.AsyncPhysicalCardsResource
digital_card_profiles: digital_card_profiles.AsyncDigitalCardProfilesResource
physical_card_profiles: physical_card_profiles.AsyncPhysicalCardProfilesResource
@@ -628,7 +624,6 @@ def __init__(
self.cards = cards.AsyncCardsResource(self)
self.card_payments = card_payments.AsyncCardPaymentsResource(self)
self.card_purchase_supplements = card_purchase_supplements.AsyncCardPurchaseSupplementsResource(self)
- self.card_disputes = card_disputes.AsyncCardDisputesResource(self)
self.physical_cards = physical_cards.AsyncPhysicalCardsResource(self)
self.digital_card_profiles = digital_card_profiles.AsyncDigitalCardProfilesResource(self)
self.physical_card_profiles = physical_card_profiles.AsyncPhysicalCardProfilesResource(self)
@@ -849,7 +844,6 @@ def __init__(self, client: Increase) -> None:
self.card_purchase_supplements = card_purchase_supplements.CardPurchaseSupplementsResourceWithRawResponse(
client.card_purchase_supplements
)
- self.card_disputes = card_disputes.CardDisputesResourceWithRawResponse(client.card_disputes)
self.physical_cards = physical_cards.PhysicalCardsResourceWithRawResponse(client.physical_cards)
self.digital_card_profiles = digital_card_profiles.DigitalCardProfilesResourceWithRawResponse(
client.digital_card_profiles
@@ -960,7 +954,6 @@ def __init__(self, client: AsyncIncrease) -> None:
self.card_purchase_supplements = card_purchase_supplements.AsyncCardPurchaseSupplementsResourceWithRawResponse(
client.card_purchase_supplements
)
- self.card_disputes = card_disputes.AsyncCardDisputesResourceWithRawResponse(client.card_disputes)
self.physical_cards = physical_cards.AsyncPhysicalCardsResourceWithRawResponse(client.physical_cards)
self.digital_card_profiles = digital_card_profiles.AsyncDigitalCardProfilesResourceWithRawResponse(
client.digital_card_profiles
@@ -1085,7 +1078,6 @@ def __init__(self, client: Increase) -> None:
self.card_purchase_supplements = card_purchase_supplements.CardPurchaseSupplementsResourceWithStreamingResponse(
client.card_purchase_supplements
)
- self.card_disputes = card_disputes.CardDisputesResourceWithStreamingResponse(client.card_disputes)
self.physical_cards = physical_cards.PhysicalCardsResourceWithStreamingResponse(client.physical_cards)
self.digital_card_profiles = digital_card_profiles.DigitalCardProfilesResourceWithStreamingResponse(
client.digital_card_profiles
@@ -1212,7 +1204,6 @@ def __init__(self, client: AsyncIncrease) -> None:
client.card_purchase_supplements
)
)
- self.card_disputes = card_disputes.AsyncCardDisputesResourceWithStreamingResponse(client.card_disputes)
self.physical_cards = physical_cards.AsyncPhysicalCardsResourceWithStreamingResponse(client.physical_cards)
self.digital_card_profiles = digital_card_profiles.AsyncDigitalCardProfilesResourceWithStreamingResponse(
client.digital_card_profiles
diff --git a/src/increase/_version.py b/src/increase/_version.py
index 92409c5c6..29af8aeb9 100644
--- a/src/increase/_version.py
+++ b/src/increase/_version.py
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
__title__ = "increase"
-__version__ = "0.329.0" # x-release-please-version
+__version__ = "0.330.0" # x-release-please-version
diff --git a/src/increase/resources/__init__.py b/src/increase/resources/__init__.py
index d00f033c3..64fc78c87 100644
--- a/src/increase/resources/__init__.py
+++ b/src/increase/resources/__init__.py
@@ -129,14 +129,6 @@
ACHTransfersResourceWithStreamingResponse,
AsyncACHTransfersResourceWithStreamingResponse,
)
-from .card_disputes import (
- CardDisputesResource,
- AsyncCardDisputesResource,
- CardDisputesResourceWithRawResponse,
- AsyncCardDisputesResourceWithRawResponse,
- CardDisputesResourceWithStreamingResponse,
- AsyncCardDisputesResourceWithStreamingResponse,
-)
from .card_payments import (
CardPaymentsResource,
AsyncCardPaymentsResource,
@@ -479,12 +471,6 @@
"AsyncCardPurchaseSupplementsResourceWithRawResponse",
"CardPurchaseSupplementsResourceWithStreamingResponse",
"AsyncCardPurchaseSupplementsResourceWithStreamingResponse",
- "CardDisputesResource",
- "AsyncCardDisputesResource",
- "CardDisputesResourceWithRawResponse",
- "AsyncCardDisputesResourceWithRawResponse",
- "CardDisputesResourceWithStreamingResponse",
- "AsyncCardDisputesResourceWithStreamingResponse",
"PhysicalCardsResource",
"AsyncPhysicalCardsResource",
"PhysicalCardsResourceWithRawResponse",
diff --git a/src/increase/resources/card_disputes.py b/src/increase/resources/card_disputes.py
deleted file mode 100644
index efc5ab590..000000000
--- a/src/increase/resources/card_disputes.py
+++ /dev/null
@@ -1,428 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-import httpx
-
-from ..types import card_dispute_list_params, card_dispute_create_params
-from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
-from .._utils import maybe_transform, async_maybe_transform
-from .._compat import cached_property
-from .._resource import SyncAPIResource, AsyncAPIResource
-from .._response import (
- to_raw_response_wrapper,
- to_streamed_response_wrapper,
- async_to_raw_response_wrapper,
- async_to_streamed_response_wrapper,
-)
-from ..pagination import SyncPage, AsyncPage
-from .._base_client import AsyncPaginator, make_request_options
-from ..types.card_dispute import CardDispute
-
-__all__ = ["CardDisputesResource", "AsyncCardDisputesResource"]
-
-
-class CardDisputesResource(SyncAPIResource):
- @cached_property
- def with_raw_response(self) -> CardDisputesResourceWithRawResponse:
- """
- This property can be used as a prefix for any HTTP method call to return
- the raw response object instead of the parsed content.
-
- For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers
- """
- return CardDisputesResourceWithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> CardDisputesResourceWithStreamingResponse:
- """
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
-
- For more information, see https://www.github.com/Increase/increase-python#with_streaming_response
- """
- return CardDisputesResourceWithStreamingResponse(self)
-
- def create(
- self,
- *,
- disputed_transaction_id: str,
- explanation: str,
- amount: int | NotGiven = NOT_GIVEN,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- idempotency_key: str | None = None,
- ) -> CardDispute:
- """
- Create a Card Dispute
-
- Args:
- disputed_transaction_id: The Transaction you wish to dispute. This Transaction must have a `source_type`
- of `card_settlement`.
-
- explanation: Why you are disputing this Transaction.
-
- amount: The monetary amount of the part of the transaction that is being disputed. This
- is optional and will default to the full amount of the transaction if not
- provided. If provided, the amount must be less than or equal to the amount of
- the transaction.
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
-
- idempotency_key: Specify a custom idempotency key for this request
- """
- return self._post(
- "/card_disputes",
- body=maybe_transform(
- {
- "disputed_transaction_id": disputed_transaction_id,
- "explanation": explanation,
- "amount": amount,
- },
- card_dispute_create_params.CardDisputeCreateParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- idempotency_key=idempotency_key,
- ),
- cast_to=CardDispute,
- )
-
- def retrieve(
- self,
- card_dispute_id: str,
- *,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> CardDispute:
- """
- Retrieve a Card Dispute
-
- Args:
- card_dispute_id: The identifier of the Card Dispute.
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- if not card_dispute_id:
- raise ValueError(f"Expected a non-empty value for `card_dispute_id` but received {card_dispute_id!r}")
- return self._get(
- f"/card_disputes/{card_dispute_id}",
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- cast_to=CardDispute,
- )
-
- def list(
- self,
- *,
- created_at: card_dispute_list_params.CreatedAt | NotGiven = NOT_GIVEN,
- cursor: str | NotGiven = NOT_GIVEN,
- idempotency_key: str | NotGiven = NOT_GIVEN,
- limit: int | NotGiven = NOT_GIVEN,
- status: card_dispute_list_params.Status | NotGiven = NOT_GIVEN,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SyncPage[CardDispute]:
- """
- List Card Disputes
-
- Args:
- cursor: Return the page of entries after this one.
-
- idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for
- that object. This value is unique across Increase and is used to ensure that a
- request is only processed once. Learn more about
- [idempotency](https://increase.com/documentation/idempotency-keys).
-
- limit: Limit the size of the list that is returned. The default (and maximum) is 100
- objects.
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- return self._get_api_list(
- "/card_disputes",
- page=SyncPage[CardDispute],
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- query=maybe_transform(
- {
- "created_at": created_at,
- "cursor": cursor,
- "idempotency_key": idempotency_key,
- "limit": limit,
- "status": status,
- },
- card_dispute_list_params.CardDisputeListParams,
- ),
- ),
- model=CardDispute,
- )
-
-
-class AsyncCardDisputesResource(AsyncAPIResource):
- @cached_property
- def with_raw_response(self) -> AsyncCardDisputesResourceWithRawResponse:
- """
- This property can be used as a prefix for any HTTP method call to return
- the raw response object instead of the parsed content.
-
- For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers
- """
- return AsyncCardDisputesResourceWithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> AsyncCardDisputesResourceWithStreamingResponse:
- """
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
-
- For more information, see https://www.github.com/Increase/increase-python#with_streaming_response
- """
- return AsyncCardDisputesResourceWithStreamingResponse(self)
-
- async def create(
- self,
- *,
- disputed_transaction_id: str,
- explanation: str,
- amount: int | NotGiven = NOT_GIVEN,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- idempotency_key: str | None = None,
- ) -> CardDispute:
- """
- Create a Card Dispute
-
- Args:
- disputed_transaction_id: The Transaction you wish to dispute. This Transaction must have a `source_type`
- of `card_settlement`.
-
- explanation: Why you are disputing this Transaction.
-
- amount: The monetary amount of the part of the transaction that is being disputed. This
- is optional and will default to the full amount of the transaction if not
- provided. If provided, the amount must be less than or equal to the amount of
- the transaction.
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
-
- idempotency_key: Specify a custom idempotency key for this request
- """
- return await self._post(
- "/card_disputes",
- body=await async_maybe_transform(
- {
- "disputed_transaction_id": disputed_transaction_id,
- "explanation": explanation,
- "amount": amount,
- },
- card_dispute_create_params.CardDisputeCreateParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- idempotency_key=idempotency_key,
- ),
- cast_to=CardDispute,
- )
-
- async def retrieve(
- self,
- card_dispute_id: str,
- *,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> CardDispute:
- """
- Retrieve a Card Dispute
-
- Args:
- card_dispute_id: The identifier of the Card Dispute.
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- if not card_dispute_id:
- raise ValueError(f"Expected a non-empty value for `card_dispute_id` but received {card_dispute_id!r}")
- return await self._get(
- f"/card_disputes/{card_dispute_id}",
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- cast_to=CardDispute,
- )
-
- def list(
- self,
- *,
- created_at: card_dispute_list_params.CreatedAt | NotGiven = NOT_GIVEN,
- cursor: str | NotGiven = NOT_GIVEN,
- idempotency_key: str | NotGiven = NOT_GIVEN,
- limit: int | NotGiven = NOT_GIVEN,
- status: card_dispute_list_params.Status | NotGiven = NOT_GIVEN,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> AsyncPaginator[CardDispute, AsyncPage[CardDispute]]:
- """
- List Card Disputes
-
- Args:
- cursor: Return the page of entries after this one.
-
- idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for
- that object. This value is unique across Increase and is used to ensure that a
- request is only processed once. Learn more about
- [idempotency](https://increase.com/documentation/idempotency-keys).
-
- limit: Limit the size of the list that is returned. The default (and maximum) is 100
- objects.
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- return self._get_api_list(
- "/card_disputes",
- page=AsyncPage[CardDispute],
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- query=maybe_transform(
- {
- "created_at": created_at,
- "cursor": cursor,
- "idempotency_key": idempotency_key,
- "limit": limit,
- "status": status,
- },
- card_dispute_list_params.CardDisputeListParams,
- ),
- ),
- model=CardDispute,
- )
-
-
-class CardDisputesResourceWithRawResponse:
- def __init__(self, card_disputes: CardDisputesResource) -> None:
- self._card_disputes = card_disputes
-
- self.create = to_raw_response_wrapper(
- card_disputes.create,
- )
- self.retrieve = to_raw_response_wrapper(
- card_disputes.retrieve,
- )
- self.list = to_raw_response_wrapper(
- card_disputes.list,
- )
-
-
-class AsyncCardDisputesResourceWithRawResponse:
- def __init__(self, card_disputes: AsyncCardDisputesResource) -> None:
- self._card_disputes = card_disputes
-
- self.create = async_to_raw_response_wrapper(
- card_disputes.create,
- )
- self.retrieve = async_to_raw_response_wrapper(
- card_disputes.retrieve,
- )
- self.list = async_to_raw_response_wrapper(
- card_disputes.list,
- )
-
-
-class CardDisputesResourceWithStreamingResponse:
- def __init__(self, card_disputes: CardDisputesResource) -> None:
- self._card_disputes = card_disputes
-
- self.create = to_streamed_response_wrapper(
- card_disputes.create,
- )
- self.retrieve = to_streamed_response_wrapper(
- card_disputes.retrieve,
- )
- self.list = to_streamed_response_wrapper(
- card_disputes.list,
- )
-
-
-class AsyncCardDisputesResourceWithStreamingResponse:
- def __init__(self, card_disputes: AsyncCardDisputesResource) -> None:
- self._card_disputes = card_disputes
-
- self.create = async_to_streamed_response_wrapper(
- card_disputes.create,
- )
- self.retrieve = async_to_streamed_response_wrapper(
- card_disputes.retrieve,
- )
- self.list = async_to_streamed_response_wrapper(
- card_disputes.list,
- )
diff --git a/src/increase/resources/simulations/__init__.py b/src/increase/resources/simulations/__init__.py
index c1a47a541..a9f636a2b 100644
--- a/src/increase/resources/simulations/__init__.py
+++ b/src/increase/resources/simulations/__init__.py
@@ -48,14 +48,6 @@
ACHTransfersResourceWithStreamingResponse,
AsyncACHTransfersResourceWithStreamingResponse,
)
-from .card_disputes import (
- CardDisputesResource,
- AsyncCardDisputesResource,
- CardDisputesResourceWithRawResponse,
- AsyncCardDisputesResourceWithRawResponse,
- CardDisputesResourceWithStreamingResponse,
- AsyncCardDisputesResourceWithStreamingResponse,
-)
from .card_reversals import (
CardReversalsResource,
AsyncCardReversalsResource,
@@ -296,12 +288,6 @@
"AsyncCardRefundsResourceWithRawResponse",
"CardRefundsResourceWithStreamingResponse",
"AsyncCardRefundsResourceWithStreamingResponse",
- "CardDisputesResource",
- "AsyncCardDisputesResource",
- "CardDisputesResourceWithRawResponse",
- "AsyncCardDisputesResourceWithRawResponse",
- "CardDisputesResourceWithStreamingResponse",
- "AsyncCardDisputesResourceWithStreamingResponse",
"PhysicalCardsResource",
"AsyncPhysicalCardsResource",
"PhysicalCardsResourceWithRawResponse",
diff --git a/src/increase/resources/simulations/card_disputes.py b/src/increase/resources/simulations/card_disputes.py
deleted file mode 100644
index c48a3474a..000000000
--- a/src/increase/resources/simulations/card_disputes.py
+++ /dev/null
@@ -1,237 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing_extensions import Literal
-
-import httpx
-
-from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
-from ..._utils import maybe_transform, async_maybe_transform
-from ..._compat import cached_property
-from ..._resource import SyncAPIResource, AsyncAPIResource
-from ..._response import (
- to_raw_response_wrapper,
- to_streamed_response_wrapper,
- async_to_raw_response_wrapper,
- async_to_streamed_response_wrapper,
-)
-from ..._base_client import make_request_options
-from ...types.simulations import card_dispute_action_params
-from ...types.card_dispute import CardDispute
-
-__all__ = ["CardDisputesResource", "AsyncCardDisputesResource"]
-
-
-class CardDisputesResource(SyncAPIResource):
- @cached_property
- def with_raw_response(self) -> CardDisputesResourceWithRawResponse:
- """
- This property can be used as a prefix for any HTTP method call to return
- the raw response object instead of the parsed content.
-
- For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers
- """
- return CardDisputesResourceWithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> CardDisputesResourceWithStreamingResponse:
- """
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
-
- For more information, see https://www.github.com/Increase/increase-python#with_streaming_response
- """
- return CardDisputesResourceWithStreamingResponse(self)
-
- def action(
- self,
- card_dispute_id: str,
- *,
- status: Literal["pending_user_information", "accepted", "rejected", "lost", "won"],
- explanation: str | NotGiven = NOT_GIVEN,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- idempotency_key: str | None = None,
- ) -> CardDispute:
- """
- After a [Card Dispute](#card-disputes) is created in production, the dispute
- will be reviewed. Since no review happens in sandbox, this endpoint simulates
- moving a Card Dispute into a rejected or accepted state. A Card Dispute can only
- be actioned one time and must have a status of `pending_reviewing`.
-
- Args:
- card_dispute_id: The dispute you would like to action.
-
- status: The status to move the dispute to.
-
- - `pending_user_information` - Increase has requested more information related
- to the Card Dispute from you.
- - `accepted` - The Card Dispute has been accepted and your funds have been
- returned. The card dispute will eventually transition into `won` or `lost`
- depending on the outcome.
- - `rejected` - The Card Dispute has been rejected.
- - `lost` - The Card Dispute has been lost and funds previously credited from the
- acceptance have been debited.
- - `won` - The Card Dispute has been won and no further action can be taken.
-
- explanation: Why the dispute was rejected. Not required for accepting disputes.
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
-
- idempotency_key: Specify a custom idempotency key for this request
- """
- if not card_dispute_id:
- raise ValueError(f"Expected a non-empty value for `card_dispute_id` but received {card_dispute_id!r}")
- return self._post(
- f"/simulations/card_disputes/{card_dispute_id}/action",
- body=maybe_transform(
- {
- "status": status,
- "explanation": explanation,
- },
- card_dispute_action_params.CardDisputeActionParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- idempotency_key=idempotency_key,
- ),
- cast_to=CardDispute,
- )
-
-
-class AsyncCardDisputesResource(AsyncAPIResource):
- @cached_property
- def with_raw_response(self) -> AsyncCardDisputesResourceWithRawResponse:
- """
- This property can be used as a prefix for any HTTP method call to return
- the raw response object instead of the parsed content.
-
- For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers
- """
- return AsyncCardDisputesResourceWithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> AsyncCardDisputesResourceWithStreamingResponse:
- """
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
-
- For more information, see https://www.github.com/Increase/increase-python#with_streaming_response
- """
- return AsyncCardDisputesResourceWithStreamingResponse(self)
-
- async def action(
- self,
- card_dispute_id: str,
- *,
- status: Literal["pending_user_information", "accepted", "rejected", "lost", "won"],
- explanation: str | NotGiven = NOT_GIVEN,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- idempotency_key: str | None = None,
- ) -> CardDispute:
- """
- After a [Card Dispute](#card-disputes) is created in production, the dispute
- will be reviewed. Since no review happens in sandbox, this endpoint simulates
- moving a Card Dispute into a rejected or accepted state. A Card Dispute can only
- be actioned one time and must have a status of `pending_reviewing`.
-
- Args:
- card_dispute_id: The dispute you would like to action.
-
- status: The status to move the dispute to.
-
- - `pending_user_information` - Increase has requested more information related
- to the Card Dispute from you.
- - `accepted` - The Card Dispute has been accepted and your funds have been
- returned. The card dispute will eventually transition into `won` or `lost`
- depending on the outcome.
- - `rejected` - The Card Dispute has been rejected.
- - `lost` - The Card Dispute has been lost and funds previously credited from the
- acceptance have been debited.
- - `won` - The Card Dispute has been won and no further action can be taken.
-
- explanation: Why the dispute was rejected. Not required for accepting disputes.
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
-
- idempotency_key: Specify a custom idempotency key for this request
- """
- if not card_dispute_id:
- raise ValueError(f"Expected a non-empty value for `card_dispute_id` but received {card_dispute_id!r}")
- return await self._post(
- f"/simulations/card_disputes/{card_dispute_id}/action",
- body=await async_maybe_transform(
- {
- "status": status,
- "explanation": explanation,
- },
- card_dispute_action_params.CardDisputeActionParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- idempotency_key=idempotency_key,
- ),
- cast_to=CardDispute,
- )
-
-
-class CardDisputesResourceWithRawResponse:
- def __init__(self, card_disputes: CardDisputesResource) -> None:
- self._card_disputes = card_disputes
-
- self.action = to_raw_response_wrapper(
- card_disputes.action,
- )
-
-
-class AsyncCardDisputesResourceWithRawResponse:
- def __init__(self, card_disputes: AsyncCardDisputesResource) -> None:
- self._card_disputes = card_disputes
-
- self.action = async_to_raw_response_wrapper(
- card_disputes.action,
- )
-
-
-class CardDisputesResourceWithStreamingResponse:
- def __init__(self, card_disputes: CardDisputesResource) -> None:
- self._card_disputes = card_disputes
-
- self.action = to_streamed_response_wrapper(
- card_disputes.action,
- )
-
-
-class AsyncCardDisputesResourceWithStreamingResponse:
- def __init__(self, card_disputes: AsyncCardDisputesResource) -> None:
- self._card_disputes = card_disputes
-
- self.action = async_to_streamed_response_wrapper(
- card_disputes.action,
- )
diff --git a/src/increase/resources/simulations/simulations.py b/src/increase/resources/simulations/simulations.py
index 4b1ea1a12..ebc3636c4 100644
--- a/src/increase/resources/simulations/simulations.py
+++ b/src/increase/resources/simulations/simulations.py
@@ -44,14 +44,6 @@
ACHTransfersResourceWithStreamingResponse,
AsyncACHTransfersResourceWithStreamingResponse,
)
-from .card_disputes import (
- CardDisputesResource,
- AsyncCardDisputesResource,
- CardDisputesResourceWithRawResponse,
- AsyncCardDisputesResourceWithRawResponse,
- CardDisputesResourceWithStreamingResponse,
- AsyncCardDisputesResourceWithStreamingResponse,
-)
from .card_reversals import (
CardReversalsResource,
AsyncCardReversalsResource,
@@ -277,10 +269,6 @@ def card_fuel_confirmations(self) -> CardFuelConfirmationsResource:
def card_refunds(self) -> CardRefundsResource:
return CardRefundsResource(self._client)
- @cached_property
- def card_disputes(self) -> CardDisputesResource:
- return CardDisputesResource(self._client)
-
@cached_property
def physical_cards(self) -> PhysicalCardsResource:
return PhysicalCardsResource(self._client)
@@ -414,10 +402,6 @@ def card_fuel_confirmations(self) -> AsyncCardFuelConfirmationsResource:
def card_refunds(self) -> AsyncCardRefundsResource:
return AsyncCardRefundsResource(self._client)
- @cached_property
- def card_disputes(self) -> AsyncCardDisputesResource:
- return AsyncCardDisputesResource(self._client)
-
@cached_property
def physical_cards(self) -> AsyncPhysicalCardsResource:
return AsyncPhysicalCardsResource(self._client)
@@ -554,10 +538,6 @@ def card_fuel_confirmations(self) -> CardFuelConfirmationsResourceWithRawRespons
def card_refunds(self) -> CardRefundsResourceWithRawResponse:
return CardRefundsResourceWithRawResponse(self._simulations.card_refunds)
- @cached_property
- def card_disputes(self) -> CardDisputesResourceWithRawResponse:
- return CardDisputesResourceWithRawResponse(self._simulations.card_disputes)
-
@cached_property
def physical_cards(self) -> PhysicalCardsResourceWithRawResponse:
return PhysicalCardsResourceWithRawResponse(self._simulations.physical_cards)
@@ -679,10 +659,6 @@ def card_fuel_confirmations(self) -> AsyncCardFuelConfirmationsResourceWithRawRe
def card_refunds(self) -> AsyncCardRefundsResourceWithRawResponse:
return AsyncCardRefundsResourceWithRawResponse(self._simulations.card_refunds)
- @cached_property
- def card_disputes(self) -> AsyncCardDisputesResourceWithRawResponse:
- return AsyncCardDisputesResourceWithRawResponse(self._simulations.card_disputes)
-
@cached_property
def physical_cards(self) -> AsyncPhysicalCardsResourceWithRawResponse:
return AsyncPhysicalCardsResourceWithRawResponse(self._simulations.physical_cards)
@@ -804,10 +780,6 @@ def card_fuel_confirmations(self) -> CardFuelConfirmationsResourceWithStreamingR
def card_refunds(self) -> CardRefundsResourceWithStreamingResponse:
return CardRefundsResourceWithStreamingResponse(self._simulations.card_refunds)
- @cached_property
- def card_disputes(self) -> CardDisputesResourceWithStreamingResponse:
- return CardDisputesResourceWithStreamingResponse(self._simulations.card_disputes)
-
@cached_property
def physical_cards(self) -> PhysicalCardsResourceWithStreamingResponse:
return PhysicalCardsResourceWithStreamingResponse(self._simulations.physical_cards)
@@ -931,10 +903,6 @@ def card_fuel_confirmations(self) -> AsyncCardFuelConfirmationsResourceWithStrea
def card_refunds(self) -> AsyncCardRefundsResourceWithStreamingResponse:
return AsyncCardRefundsResourceWithStreamingResponse(self._simulations.card_refunds)
- @cached_property
- def card_disputes(self) -> AsyncCardDisputesResourceWithStreamingResponse:
- return AsyncCardDisputesResourceWithStreamingResponse(self._simulations.card_disputes)
-
@cached_property
def physical_cards(self) -> AsyncPhysicalCardsResourceWithStreamingResponse:
return AsyncPhysicalCardsResourceWithStreamingResponse(self._simulations.physical_cards)
diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py
index eb6eed1a4..eae146400 100644
--- a/src/increase/types/__init__.py
+++ b/src/increase/types/__init__.py
@@ -18,7 +18,6 @@
from .transaction import Transaction as Transaction
from .ach_transfer import ACHTransfer as ACHTransfer
from .card_details import CardDetails as CardDetails
-from .card_dispute import CardDispute as CardDispute
from .card_payment import CardPayment as CardPayment
from .check_deposit import CheckDeposit as CheckDeposit
from .physical_card import PhysicalCard as PhysicalCard
@@ -79,7 +78,6 @@
from .file_link_create_params import FileLinkCreateParams as FileLinkCreateParams
from .transaction_list_params import TransactionListParams as TransactionListParams
from .ach_transfer_list_params import ACHTransferListParams as ACHTransferListParams
-from .card_dispute_list_params import CardDisputeListParams as CardDisputeListParams
from .card_payment_list_params import CardPaymentListParams as CardPaymentListParams
from .card_purchase_supplement import CardPurchaseSupplement as CardPurchaseSupplement
from .check_deposit_list_params import CheckDepositListParams as CheckDepositListParams
@@ -89,7 +87,6 @@
from .account_number_list_params import AccountNumberListParams as AccountNumberListParams
from .ach_transfer_create_params import ACHTransferCreateParams as ACHTransferCreateParams
from .bookkeeping_balance_lookup import BookkeepingBalanceLookup as BookkeepingBalanceLookup
-from .card_dispute_create_params import CardDisputeCreateParams as CardDisputeCreateParams
from .check_transfer_list_params import CheckTransferListParams as CheckTransferListParams
from .intrafi_account_enrollment import IntrafiAccountEnrollment as IntrafiAccountEnrollment
from .routing_number_list_params import RoutingNumberListParams as RoutingNumberListParams
diff --git a/src/increase/types/card_dispute.py b/src/increase/types/card_dispute.py
deleted file mode 100644
index 249bb0d83..000000000
--- a/src/increase/types/card_dispute.py
+++ /dev/null
@@ -1,144 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Optional
-from datetime import datetime
-from typing_extensions import Literal
-
-from .._models import BaseModel
-
-__all__ = ["CardDispute", "Acceptance", "Loss", "Rejection", "Win"]
-
-
-class Acceptance(BaseModel):
- accepted_at: datetime
- """
- The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which
- the Card Dispute was accepted.
- """
-
- card_dispute_id: str
- """The identifier of the Card Dispute that was accepted."""
-
- transaction_id: str
- """
- The identifier of the Transaction that was created to return the disputed funds
- to your account.
- """
-
-
-class Loss(BaseModel):
- card_dispute_id: str
- """The identifier of the Card Dispute that was lost."""
-
- explanation: str
- """Why the Card Dispute was lost."""
-
- lost_at: datetime
- """
- The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which
- the Card Dispute was lost.
- """
-
- transaction_id: str
- """
- The identifier of the Transaction that was created to debit the disputed funds
- from your account.
- """
-
-
-class Rejection(BaseModel):
- card_dispute_id: str
- """The identifier of the Card Dispute that was rejected."""
-
- explanation: str
- """Why the Card Dispute was rejected."""
-
- rejected_at: datetime
- """
- The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which
- the Card Dispute was rejected.
- """
-
-
-class Win(BaseModel):
- card_dispute_id: str
- """The identifier of the Card Dispute that was won."""
-
- won_at: datetime
- """
- The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which
- the Card Dispute was won.
- """
-
-
-class CardDispute(BaseModel):
- id: str
- """The Card Dispute identifier."""
-
- acceptance: Optional[Acceptance] = None
- """
- If the Card Dispute's status is `accepted`, this will contain details of the
- successful dispute.
- """
-
- amount: Optional[int] = None
- """The amount of the dispute, if provided, or the transaction amount otherwise."""
-
- created_at: datetime
- """
- The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which
- the Card Dispute was created.
- """
-
- disputed_transaction_id: str
- """The identifier of the Transaction that was disputed."""
-
- explanation: str
- """Why you disputed the Transaction in question."""
-
- idempotency_key: Optional[str] = None
- """The idempotency key you chose for this object.
-
- This value is unique across Increase and is used to ensure that a request is
- only processed once. Learn more about
- [idempotency](https://increase.com/documentation/idempotency-keys).
- """
-
- loss: Optional[Loss] = None
- """
- If the Card Dispute's status is `lost`, this will contain details of the lost
- dispute.
- """
-
- rejection: Optional[Rejection] = None
- """
- If the Card Dispute's status is `rejected`, this will contain details of the
- unsuccessful dispute.
- """
-
- status: Literal["pending_reviewing", "pending_user_information", "accepted", "rejected", "lost", "won"]
- """The results of the Dispute investigation.
-
- - `pending_reviewing` - The Card Dispute is pending review.
- - `pending_user_information` - Increase has requested more information related
- to the Card Dispute from you.
- - `accepted` - The Card Dispute has been accepted and your funds have been
- returned. The card dispute will eventually transition into `won` or `lost`
- depending on the outcome.
- - `rejected` - The Card Dispute has been rejected.
- - `lost` - The Card Dispute has been lost and funds previously credited from the
- acceptance have been debited.
- - `won` - The Card Dispute has been won and no further action can be taken.
- """
-
- type: Literal["card_dispute"]
- """A constant representing the object's type.
-
- For this resource it will always be `card_dispute`.
- """
-
- win: Optional[Win] = None
- """
- If the Card Dispute's status is `won`, this will contain details of the won
- dispute.
- """
diff --git a/src/increase/types/card_dispute_create_params.py b/src/increase/types/card_dispute_create_params.py
deleted file mode 100644
index fd2a7207d..000000000
--- a/src/increase/types/card_dispute_create_params.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing_extensions import Required, TypedDict
-
-__all__ = ["CardDisputeCreateParams"]
-
-
-class CardDisputeCreateParams(TypedDict, total=False):
- disputed_transaction_id: Required[str]
- """The Transaction you wish to dispute.
-
- This Transaction must have a `source_type` of `card_settlement`.
- """
-
- explanation: Required[str]
- """Why you are disputing this Transaction."""
-
- amount: int
- """The monetary amount of the part of the transaction that is being disputed.
-
- This is optional and will default to the full amount of the transaction if not
- provided. If provided, the amount must be less than or equal to the amount of
- the transaction.
- """
diff --git a/src/increase/types/card_dispute_list_params.py b/src/increase/types/card_dispute_list_params.py
deleted file mode 100644
index 73e384bd2..000000000
--- a/src/increase/types/card_dispute_list_params.py
+++ /dev/null
@@ -1,73 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing import List, Union
-from datetime import datetime
-from typing_extensions import Literal, Annotated, TypedDict
-
-from .._utils import PropertyInfo
-
-__all__ = ["CardDisputeListParams", "CreatedAt", "Status"]
-
-
-class CardDisputeListParams(TypedDict, total=False):
- created_at: CreatedAt
-
- cursor: str
- """Return the page of entries after this one."""
-
- idempotency_key: str
- """
- Filter records to the one with the specified `idempotency_key` you chose for
- that object. This value is unique across Increase and is used to ensure that a
- request is only processed once. Learn more about
- [idempotency](https://increase.com/documentation/idempotency-keys).
- """
-
- limit: int
- """Limit the size of the list that is returned.
-
- The default (and maximum) is 100 objects.
- """
-
- status: Status
-
-
-class CreatedAt(TypedDict, total=False):
- after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
- """
- Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
- timestamp.
- """
-
- before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
- """
- Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
- timestamp.
- """
-
- on_or_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
- """
- Return results on or after this
- [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.
- """
-
- on_or_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
- """
- Return results on or before this
- [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.
- """
-
-
-_StatusReservedKeywords = TypedDict(
- "_StatusReservedKeywords",
- {
- "in": List[Literal["pending_reviewing", "pending_user_information", "accepted", "rejected", "lost", "won"]],
- },
- total=False,
-)
-
-
-class Status(_StatusReservedKeywords, total=False):
- pass
diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py
index 8f74919bf..669de5026 100644
--- a/src/increase/types/simulations/__init__.py
+++ b/src/increase/types/simulations/__init__.py
@@ -8,7 +8,6 @@
from .card_refund_create_params import CardRefundCreateParams as CardRefundCreateParams
from .ach_transfer_return_params import ACHTransferReturnParams as ACHTransferReturnParams
from .ach_transfer_settle_params import ACHTransferSettleParams as ACHTransferSettleParams
-from .card_dispute_action_params import CardDisputeActionParams as CardDisputeActionParams
from .card_reversal_create_params import CardReversalCreateParams as CardReversalCreateParams
from .card_increment_create_params import CardIncrementCreateParams as CardIncrementCreateParams
from .card_settlement_create_params import CardSettlementCreateParams as CardSettlementCreateParams
diff --git a/src/increase/types/simulations/card_dispute_action_params.py b/src/increase/types/simulations/card_dispute_action_params.py
deleted file mode 100644
index eaf7cbedc..000000000
--- a/src/increase/types/simulations/card_dispute_action_params.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing_extensions import Literal, Required, TypedDict
-
-__all__ = ["CardDisputeActionParams"]
-
-
-class CardDisputeActionParams(TypedDict, total=False):
- status: Required[Literal["pending_user_information", "accepted", "rejected", "lost", "won"]]
- """The status to move the dispute to.
-
- - `pending_user_information` - Increase has requested more information related
- to the Card Dispute from you.
- - `accepted` - The Card Dispute has been accepted and your funds have been
- returned. The card dispute will eventually transition into `won` or `lost`
- depending on the outcome.
- - `rejected` - The Card Dispute has been rejected.
- - `lost` - The Card Dispute has been lost and funds previously credited from the
- acceptance have been debited.
- - `won` - The Card Dispute has been won and no further action can be taken.
- """
-
- explanation: str
- """Why the dispute was rejected. Not required for accepting disputes."""
diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py
index d3f057a40..9f95f3335 100644
--- a/src/increase/types/transaction.py
+++ b/src/increase/types/transaction.py
@@ -399,9 +399,6 @@ class SourceCardDisputeAcceptance(BaseModel):
the Card Dispute was accepted.
"""
- card_dispute_id: str
- """The identifier of the Card Dispute that was accepted."""
-
transaction_id: str
"""
The identifier of the Transaction that was created to return the disputed funds
@@ -438,9 +435,6 @@ class SourceCardDisputeFinancial(BaseModel):
amount: int
"""The amount of the financial event."""
- card_dispute_id: str
- """The identifier of the Card Dispute the financial event is associated with."""
-
network: Literal["visa"]
"""The network that the Card Dispute is associated with.
@@ -462,9 +456,6 @@ class SourceCardDisputeFinancial(BaseModel):
class SourceCardDisputeLoss(BaseModel):
- card_dispute_id: str
- """The identifier of the Card Dispute that was lost."""
-
explanation: str
"""Why the Card Dispute was lost."""
diff --git a/tests/api_resources/simulations/test_card_disputes.py b/tests/api_resources/simulations/test_card_disputes.py
deleted file mode 100644
index aee1aa35b..000000000
--- a/tests/api_resources/simulations/test_card_disputes.py
+++ /dev/null
@@ -1,126 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-import os
-from typing import Any, cast
-
-import pytest
-
-from increase import Increase, AsyncIncrease
-from tests.utils import assert_matches_type
-from increase.types import CardDispute
-
-base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
-
-
-class TestCardDisputes:
- parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
-
- @parametrize
- def test_method_action(self, client: Increase) -> None:
- card_dispute = client.simulations.card_disputes.action(
- card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men",
- status="rejected",
- )
- assert_matches_type(CardDispute, card_dispute, path=["response"])
-
- @parametrize
- def test_method_action_with_all_params(self, client: Increase) -> None:
- card_dispute = client.simulations.card_disputes.action(
- card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men",
- status="rejected",
- explanation="This was a valid recurring transaction",
- )
- assert_matches_type(CardDispute, card_dispute, path=["response"])
-
- @parametrize
- def test_raw_response_action(self, client: Increase) -> None:
- response = client.simulations.card_disputes.with_raw_response.action(
- card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men",
- status="rejected",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- card_dispute = response.parse()
- assert_matches_type(CardDispute, card_dispute, path=["response"])
-
- @parametrize
- def test_streaming_response_action(self, client: Increase) -> None:
- with client.simulations.card_disputes.with_streaming_response.action(
- card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men",
- status="rejected",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- card_dispute = response.parse()
- assert_matches_type(CardDispute, card_dispute, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @parametrize
- def test_path_params_action(self, client: Increase) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_dispute_id` but received ''"):
- client.simulations.card_disputes.with_raw_response.action(
- card_dispute_id="",
- status="rejected",
- )
-
-
-class TestAsyncCardDisputes:
- parametrize = pytest.mark.parametrize(
- "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
- )
-
- @parametrize
- async def test_method_action(self, async_client: AsyncIncrease) -> None:
- card_dispute = await async_client.simulations.card_disputes.action(
- card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men",
- status="rejected",
- )
- assert_matches_type(CardDispute, card_dispute, path=["response"])
-
- @parametrize
- async def test_method_action_with_all_params(self, async_client: AsyncIncrease) -> None:
- card_dispute = await async_client.simulations.card_disputes.action(
- card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men",
- status="rejected",
- explanation="This was a valid recurring transaction",
- )
- assert_matches_type(CardDispute, card_dispute, path=["response"])
-
- @parametrize
- async def test_raw_response_action(self, async_client: AsyncIncrease) -> None:
- response = await async_client.simulations.card_disputes.with_raw_response.action(
- card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men",
- status="rejected",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- card_dispute = await response.parse()
- assert_matches_type(CardDispute, card_dispute, path=["response"])
-
- @parametrize
- async def test_streaming_response_action(self, async_client: AsyncIncrease) -> None:
- async with async_client.simulations.card_disputes.with_streaming_response.action(
- card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men",
- status="rejected",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- card_dispute = await response.parse()
- assert_matches_type(CardDispute, card_dispute, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @parametrize
- async def test_path_params_action(self, async_client: AsyncIncrease) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_dispute_id` but received ''"):
- await async_client.simulations.card_disputes.with_raw_response.action(
- card_dispute_id="",
- status="rejected",
- )
diff --git a/tests/api_resources/test_card_disputes.py b/tests/api_resources/test_card_disputes.py
deleted file mode 100644
index 4d84ea732..000000000
--- a/tests/api_resources/test_card_disputes.py
+++ /dev/null
@@ -1,270 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-import os
-from typing import Any, cast
-
-import pytest
-
-from increase import Increase, AsyncIncrease
-from tests.utils import assert_matches_type
-from increase.types import CardDispute
-from increase._utils import parse_datetime
-from increase.pagination import SyncPage, AsyncPage
-
-base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
-
-
-class TestCardDisputes:
- parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
-
- @parametrize
- def test_method_create(self, client: Increase) -> None:
- card_dispute = client.card_disputes.create(
- disputed_transaction_id="transaction_uyrp7fld2ium70oa7oi",
- explanation="Unauthorized recurring transaction.",
- )
- assert_matches_type(CardDispute, card_dispute, path=["response"])
-
- @parametrize
- def test_method_create_with_all_params(self, client: Increase) -> None:
- card_dispute = client.card_disputes.create(
- disputed_transaction_id="transaction_uyrp7fld2ium70oa7oi",
- explanation="Unauthorized recurring transaction.",
- amount=1,
- )
- assert_matches_type(CardDispute, card_dispute, path=["response"])
-
- @parametrize
- def test_raw_response_create(self, client: Increase) -> None:
- response = client.card_disputes.with_raw_response.create(
- disputed_transaction_id="transaction_uyrp7fld2ium70oa7oi",
- explanation="Unauthorized recurring transaction.",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- card_dispute = response.parse()
- assert_matches_type(CardDispute, card_dispute, path=["response"])
-
- @parametrize
- def test_streaming_response_create(self, client: Increase) -> None:
- with client.card_disputes.with_streaming_response.create(
- disputed_transaction_id="transaction_uyrp7fld2ium70oa7oi",
- explanation="Unauthorized recurring transaction.",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- card_dispute = response.parse()
- assert_matches_type(CardDispute, card_dispute, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @parametrize
- def test_method_retrieve(self, client: Increase) -> None:
- card_dispute = client.card_disputes.retrieve(
- "card_dispute_id",
- )
- assert_matches_type(CardDispute, card_dispute, path=["response"])
-
- @parametrize
- def test_raw_response_retrieve(self, client: Increase) -> None:
- response = client.card_disputes.with_raw_response.retrieve(
- "card_dispute_id",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- card_dispute = response.parse()
- assert_matches_type(CardDispute, card_dispute, path=["response"])
-
- @parametrize
- def test_streaming_response_retrieve(self, client: Increase) -> None:
- with client.card_disputes.with_streaming_response.retrieve(
- "card_dispute_id",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- card_dispute = response.parse()
- assert_matches_type(CardDispute, card_dispute, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @parametrize
- def test_path_params_retrieve(self, client: Increase) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_dispute_id` but received ''"):
- client.card_disputes.with_raw_response.retrieve(
- "",
- )
-
- @parametrize
- def test_method_list(self, client: Increase) -> None:
- card_dispute = client.card_disputes.list()
- assert_matches_type(SyncPage[CardDispute], card_dispute, path=["response"])
-
- @parametrize
- def test_method_list_with_all_params(self, client: Increase) -> None:
- card_dispute = client.card_disputes.list(
- created_at={
- "after": parse_datetime("2019-12-27T18:11:19.117Z"),
- "before": parse_datetime("2019-12-27T18:11:19.117Z"),
- "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"),
- "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"),
- },
- cursor="cursor",
- idempotency_key="x",
- limit=1,
- status={"in": ["pending_reviewing"]},
- )
- assert_matches_type(SyncPage[CardDispute], card_dispute, path=["response"])
-
- @parametrize
- def test_raw_response_list(self, client: Increase) -> None:
- response = client.card_disputes.with_raw_response.list()
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- card_dispute = response.parse()
- assert_matches_type(SyncPage[CardDispute], card_dispute, path=["response"])
-
- @parametrize
- def test_streaming_response_list(self, client: Increase) -> None:
- with client.card_disputes.with_streaming_response.list() as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- card_dispute = response.parse()
- assert_matches_type(SyncPage[CardDispute], card_dispute, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
-
-class TestAsyncCardDisputes:
- parametrize = pytest.mark.parametrize(
- "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
- )
-
- @parametrize
- async def test_method_create(self, async_client: AsyncIncrease) -> None:
- card_dispute = await async_client.card_disputes.create(
- disputed_transaction_id="transaction_uyrp7fld2ium70oa7oi",
- explanation="Unauthorized recurring transaction.",
- )
- assert_matches_type(CardDispute, card_dispute, path=["response"])
-
- @parametrize
- async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None:
- card_dispute = await async_client.card_disputes.create(
- disputed_transaction_id="transaction_uyrp7fld2ium70oa7oi",
- explanation="Unauthorized recurring transaction.",
- amount=1,
- )
- assert_matches_type(CardDispute, card_dispute, path=["response"])
-
- @parametrize
- async def test_raw_response_create(self, async_client: AsyncIncrease) -> None:
- response = await async_client.card_disputes.with_raw_response.create(
- disputed_transaction_id="transaction_uyrp7fld2ium70oa7oi",
- explanation="Unauthorized recurring transaction.",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- card_dispute = await response.parse()
- assert_matches_type(CardDispute, card_dispute, path=["response"])
-
- @parametrize
- async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None:
- async with async_client.card_disputes.with_streaming_response.create(
- disputed_transaction_id="transaction_uyrp7fld2ium70oa7oi",
- explanation="Unauthorized recurring transaction.",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- card_dispute = await response.parse()
- assert_matches_type(CardDispute, card_dispute, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @parametrize
- async def test_method_retrieve(self, async_client: AsyncIncrease) -> None:
- card_dispute = await async_client.card_disputes.retrieve(
- "card_dispute_id",
- )
- assert_matches_type(CardDispute, card_dispute, path=["response"])
-
- @parametrize
- async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None:
- response = await async_client.card_disputes.with_raw_response.retrieve(
- "card_dispute_id",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- card_dispute = await response.parse()
- assert_matches_type(CardDispute, card_dispute, path=["response"])
-
- @parametrize
- async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None:
- async with async_client.card_disputes.with_streaming_response.retrieve(
- "card_dispute_id",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- card_dispute = await response.parse()
- assert_matches_type(CardDispute, card_dispute, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @parametrize
- async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_dispute_id` but received ''"):
- await async_client.card_disputes.with_raw_response.retrieve(
- "",
- )
-
- @parametrize
- async def test_method_list(self, async_client: AsyncIncrease) -> None:
- card_dispute = await async_client.card_disputes.list()
- assert_matches_type(AsyncPage[CardDispute], card_dispute, path=["response"])
-
- @parametrize
- async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None:
- card_dispute = await async_client.card_disputes.list(
- created_at={
- "after": parse_datetime("2019-12-27T18:11:19.117Z"),
- "before": parse_datetime("2019-12-27T18:11:19.117Z"),
- "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"),
- "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"),
- },
- cursor="cursor",
- idempotency_key="x",
- limit=1,
- status={"in": ["pending_reviewing"]},
- )
- assert_matches_type(AsyncPage[CardDispute], card_dispute, path=["response"])
-
- @parametrize
- async def test_raw_response_list(self, async_client: AsyncIncrease) -> None:
- response = await async_client.card_disputes.with_raw_response.list()
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- card_dispute = await response.parse()
- assert_matches_type(AsyncPage[CardDispute], card_dispute, path=["response"])
-
- @parametrize
- async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None:
- async with async_client.card_disputes.with_streaming_response.list() as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- card_dispute = await response.parse()
- assert_matches_type(AsyncPage[CardDispute], card_dispute, path=["response"])
-
- assert cast(Any, response.is_closed) is True